ChangeLog-2020-04-10   [plain text]


2020-04-09  Simon Fraser  <simon.fraser@apple.com>

        [Async overflow scrolling] Vertical scrolls over a horizontally scrollable overflow are captured
        https://bugs.webkit.org/show_bug.cgi?id=210320

        Reviewed by Tim Horton.

        This patch adds somewhat more sophisticated latching logic to the scrolling thread, which
        fixes the inability to vertically scroll if the mouse is over an enclosed horizontal scroller.
        
        ScrollingTree owns a ScrollingTreeLatchingController, which determines when to latch and clear
        latching. Latch clearing uses a 100ms delay (like main thread latching) so that a starting gesture
        soon after another gesture, whose initial x and y are small, goes to the same scroller as before.
        
        Scrolling tree latching works as follows. When we receive a scroll event which allows use of the
        latched node, and there is a latched node, send the event directly to that node. Otherwise,
        hit-test to find the most deeply nested scroll target. Traverse up the parent chain giving each node
        an opportunity to handle the event. If handled by a node, that node becomes the latched node.
        
        ScrollingTree no longer tracks the latched node itself.

        Tests: scrollingcoordinator/mac/latching/horizontal-overflow-back-swipe.html
               scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::commitTreeState):
        (WebCore::ScrollingTree::latchedNodeID const):
        (WebCore::ScrollingTree::clearLatchedNode):
        (WebCore::ScrollingTree::mainFrameScrollPosition const):
        (WebCore::ScrollingTree::scrollingTreeAsText):
        (WebCore::ScrollingTree::setOrClearLatchedNode): Deleted.
        (WebCore::ScrollingTree::latchedNode): Deleted.
        (WebCore::ScrollingTree::setLatchedNode): Deleted.
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::hasLatchedNode const): Deleted.
        * page/scrolling/ScrollingTreeLatchingController.cpp: Added.
        (WebCore::ScrollingTreeLatchingController::receivedWheelEvent):
        (WebCore::ScrollingTreeLatchingController::latchedNodeForEvent const):
        (WebCore::ScrollingTreeLatchingController::latchedNodeID const):
        (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):
        (WebCore::ScrollingTreeLatchingController::nodeWasRemoved):
        (WebCore::ScrollingTreeLatchingController::clearLatchedNode):
        * page/scrolling/ScrollingTreeLatchingController.h: Added.
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::isLatchedNode const):
        (WebCore::ScrollingTreeScrollingNode::canScrollWithWheelEvent const):
        (WebCore::ScrollingTreeScrollingNode::scrollLimitReached const):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent):

2020-04-10  Simon Fraser  <simon.fraser@apple.com>

        Hit-testing a WebTiledBackingLayer with an animation asserts
        https://bugs.webkit.org/show_bug.cgi?id=210318

        Reviewed by Tim Horton.

        collectDescendantLayersAtPoint() calls [layer presentationLayer] for layers
        with running animations, and this calls -initWithLayer: on our layer subclasses.
        Fix WebTiledBackingLayer to not assert in this case.

        Test: fast/scrolling/mac/hit-test-overflow-tiled-layer.html

        * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
        (-[WebTiledBackingLayer initWithLayer:]):

2020-04-10  Youenn Fablet  <youenn@apple.com>

        Introduce a RealtimeMediaSource observer dedicated to receiving audio samples
        https://bugs.webkit.org/show_bug.cgi?id=210180

        Reviewed by Eric Carlson.

        RealtimeMediaSource::Observer was called on various threads which was making iterating through them difficult.
        Observers were copied to a vector for iterating each time and locking was happening for each indivudual observer.

        Instead of doing that, RealtimeMediaSource::Observer no longer gives access to audio samples, all its methods are called from the main thread.
        AudioSampleObserver is introduced with a single method to receive audio samples.
        RealtimeMediaSource keeps a set of AudioSampleObserver separated from its existing Observer hashset.
        These observers can only be added/removed from the main thread while audio sample delivery usually happens from a background thread.
        We no longer need to copy the audio sample observers in a vector and lock only once when iterating the audio sample observers.

        This change requires to update MediaStreamTrackPrivate and RealtimeMediaSource observers.
        This includes WebAudio, Audio Renderer and Media Recorder.
        Each corresponding class is now registering itself as a MediaStreamTrackPrivate::Observer and when needed as a RealtimeMediaSource::Observer.
        This allows removing the additional copy-in-vector/lock that was happening when iterating over MediaStreamTrackPrivate::Observers for audio samples.

        This change also allows for a consumer to always observe the MediaStreamTrackPrivate but receive audio samples only when needed.
        We change the AudioTrackPrivateMediaStream implementation so that, if the renderer is muted, not playing, the track is muted or not enabled,
        it no longer receives audio samples.
        This is especially useful in the typical case where a video element displays the locally captured stream (including a local audio track) but is muted
        to prevent feedback loop.
        For that reason, the player is now setting the muted state of the renderer instead of setting volume to 0.

        Covered by existing test sets.

        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediarecorder/MediaRecorderProvider.cpp:
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorderProvider.h:
        * loader/EmptyClients.cpp:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted):
        * platform/mediarecorder/MediaRecorderPrivate.cpp:
        (WebCore::MediaRecorderPrivate::selectTracks):
        * platform/mediarecorder/MediaRecorderPrivate.h:
        (WebCore::MediaRecorderPrivate::setAudioSource):
        (WebCore::MediaRecorderPrivate::~MediaRecorderPrivate):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        (WebCore::MediaRecorderPrivateAVFImpl::~MediaRecorderPrivateAVFImpl):
        (WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
        (WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
        (WebCore::MediaRecorderPrivateAVFImpl::fetchData):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediarecorder/MediaRecorderPrivateMock.cpp:
        (WebCore::MediaRecorderPrivateMock::MediaRecorderPrivateMock):
        (WebCore::MediaRecorderPrivateMock::~MediaRecorderPrivateMock):
        (WebCore::MediaRecorderPrivateMock::stopRecording):
        (WebCore::MediaRecorderPrivateMock::sampleBufferUpdated):
        (WebCore::MediaRecorderPrivateMock::audioSamplesAvailable):
        (WebCore::MediaRecorderPrivateMock::generateMockCounterString):
        (WebCore::MediaRecorderPrivateMock::fetchData):
        * platform/mediarecorder/MediaRecorderPrivateMock.h:
        * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
        (WebCore::AudioTrackPrivateMediaStream::AudioTrackPrivateMediaStream):
        (WebCore::AudioTrackPrivateMediaStream::clear):
        (WebCore::AudioTrackPrivateMediaStream::play):
        (WebCore::AudioTrackPrivateMediaStream::pause):
        (WebCore::AudioTrackPrivateMediaStream::setMuted):
        (WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
        (WebCore::AudioTrackPrivateMediaStream::trackMutedChanged):
        (WebCore::AudioTrackPrivateMediaStream::trackEnabledChanged):
        (WebCore::AudioTrackPrivateMediaStream::trackEnded):
        (WebCore::AudioTrackPrivateMediaStream::updateRenderer):
        (WebCore::AudioTrackPrivateMediaStream::startRenderer):
        (WebCore::AudioTrackPrivateMediaStream::stopRenderer):
        * platform/mediastream/AudioTrackPrivateMediaStream.h:
        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        (WebCore::webkitMediaStreamSrcFinalize):
        (WebCore::webkitMediaStreamSrcChangeState):
        (WebCore::webkitMediaStreamSrcSetupSrc):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::forEachTrack):
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::forEachObserver const):
        (WebCore::MediaStreamTrackPrivate::addObserver):
        (WebCore::MediaStreamTrackPrivate::removeObserver):
        (WebCore::MediaStreamTrackPrivate::hasStartedProducingAudioData):
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::addAudioSampleObserver):
        (WebCore::RealtimeMediaSource::removeAudioSampleObserver):
        (WebCore::RealtimeMediaSource::addObserver):
        (WebCore::RealtimeMediaSource::removeObserver):
        (WebCore::RealtimeMediaSource::forEachObserver const):
        (WebCore::RealtimeMediaSource::audioSamplesAvailable):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
        (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
        (WebCore::RealtimeOutgoingAudioSource::observeSource):
        (WebCore::RealtimeOutgoingAudioSource::unobserveSource):
        * platform/mediastream/RealtimeOutgoingAudioSource.h:
        * platform/mediastream/WebAudioSourceProvider.h:
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
        (WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
        (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
        (WebCore::WebAudioSourceProviderAVFObjC::trackEnabledChanged):
        (WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
        * testing/Internals.cpp:
        (WebCore::Internals::~Internals):
        (WebCore::createRecorderMockSource):
        (WebCore::Internals::observeMediaStreamTrack):
        (WebCore::Internals::videoSampleAvailable):
        * testing/Internals.h:

2020-04-10  Youenn Fablet  <youenn@apple.com>

        SWServer should not run a service worker that is terminating
        https://bugs.webkit.org/show_bug.cgi?id=210044

        Reviewed by Chris Dumez.

        If a test is being terminated and we want to restart it, we were previously running it right away.
        This does not work well as the service worker process might still have the terminating service worker in its map.
        Also, if the service worker is not able to terminate properly, we will kill the service worker process so there is no reason
        to try running this service worker in this process.
        Instead, wait for the service worker to terminate (which might include terminating the service worker process).

        In addition, we remove the isServiceWorkerRunning internals API since this is potentially flaky as the service worker
        might be terminated and rerunning in between two isServiceWorkerRunning checks.
        Instead, we introduce whenServiceWorkerIsTerminated which will resolve as soon as the service worker goes to terminated.

        Covered by existing spinning tests no longer crashing.

        * testing/Internals.cpp:
        (WebCore::Internals::whenServiceWorkerIsTerminated):
        * testing/Internals.h:
        * testing/Internals.idl:
        * workers/service/SWClientConnection.h:
        (WebCore::SWClientConnection::whenServiceWorkerIsTerminatedForTesting):
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::runServiceWorkerIfNecessary):
        (WebCore::SWServer::runServiceWorker):
        (WebCore::SWServer::workerContextTerminated):
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::whenTerminated):
        (WebCore::SWServerWorker::setState):
        * workers/service/server/SWServerWorker.h:
        (WebCore::SWServerWorker::isNotRunning const):

2020-04-10  Charlie Turner  <cturner@igalia.com>

        [EME][GStreamer] Relax proxy initialization assert
        https://bugs.webkit.org/show_bug.cgi?id=210258

        Reviewed by Xabier Rodriguez-Calvar.

        update() may be called on a session before its parent MediaKeys object
        has been associated with a media element. Supporting this is officially
        optional, but enough sites (including the W3C EME tests) depend on this
        optional behaviour that we should support it.

        Covered by imported/w3c/web-platform-tests/encrypted-media.

        * platform/encryptedmedia/CDMProxy.cpp:
        (WebCore::CDMInstanceProxy::mergeKeysFrom): Since the background
        proxy may not be installed yet, don't ASSERT() it exists.
        * platform/encryptedmedia/CDMProxy.h:
        (WebCore::KeyStore::hasKeys const):
        (WebCore::CDMInstanceProxy::setProxy): Now, when the background
        proxy is installed, check if any keys have been made available as
        described above, and if so, set them.

2020-04-10  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK] Avoid direct GdkEvent field usage in GtkUtilities.h
        https://bugs.webkit.org/show_bug.cgi?id=210329

        Reviewed by Carlos Garcia Campos.

        No new tests needed.

        * platform/gtk/GtkUtilities.h:
        (WebCore::wallTimeForEvent): Use gdk_event_get_time() instead of direct field access.

2020-04-10  Youenn Fablet  <youenn@apple.com>

        Bump priority of LibWebRTCAudioModule thread
        https://bugs.webkit.org/show_bug.cgi?id=210107

        Reviewed by Eric Carlson.

        LibWebRTCAudioModule operates on its own thread and is responsible to generate and push remote audio track data to audio renderers.
        It does this every 50 milliseconds and any delay in this task will trigger audio crackling.

        Migrate LibWebRTCAudioModule from a thread based approach to a WorkQueue.
        This gives cleaner code and allows to set the WorkQueue QOS to QOS::UserInteractive
        so that it does not get imnterrupted too often.

        We expect the audio task to be done every 50 ms.
        If it takes less than 50 ms to dispatch the task and execute, we dispatch a new task with some delay
        to keep the exact 50ms delay.
        Otherwise, we dispatch a task without any delay to try recovering as much as we can.

        Manullay tested on iOS using mock sources on pages rendering multiple audio tracks.
        This reduces audio crackling a lot but not completely.

        * platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
        (WebCore::LibWebRTCAudioModule::LibWebRTCAudioModule):
        (WebCore::LibWebRTCAudioModule::StartPlayout):
        (WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):
        * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:

2020-04-09  Peng Liu  <peng.liu6@apple.com>

        REGRESSION: (r258434) [ Mac WK1 ] media/track/track-css-user-override.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=210134

        Reviewed by Eric Carlson.

        Call captionPreferencesChanged() directly in CaptionUserPreferences::setCaptionsStyleSheetOverride().

        * page/CaptionUserPreferences.cpp:
        (WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride):

2020-04-09  Cathie Chen  <cathiechen@igalia.com>

        Fix up code style for scroll animation
        https://bugs.webkit.org/show_bug.cgi?id=210171

        Reviewed by Simon Fraser.

        1. Use AnimatedScroll instead of bool to indicate animated or not.
        2. Remove parameter ScrollRectToVisibleOptions, the autoscroll status is available from EventHandler.
        3. In order to keep consistent, use RenderLayer::setScrollPosition instead of RenderLayer::scrollToPosition.
        4. Add AnimatedScroll parameter to ScrollView::setContentsScrollPosition, then the scroll animation
        can be dealt in FrameView::setScrollPosition.
        5. In ScrollView::setScrollPosition, the scroll animation should be cancled before return.

        * dom/Element.cpp: Use AnimatedScroll instead of bool.
        (WebCore::Element::scrollTo):
        (WebCore::Element::setScrollLeft):
        (WebCore::Element::setScrollTop):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollTo const): No need to call scrollToOffsetWithAnimation here.
        * page/FrameView.cpp:
        (WebCore::FrameView::setScrollPosition):
        * page/FrameView.h:
        * platform/ScrollTypes.h: Add AnimatedScroll.
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setContentsScrollPosition): Add parameter AnimatedScroll.
        (WebCore::ScrollView::setScrollPosition): Cancel the scroll animation before return.
        * platform/ScrollView.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setScrollLeft):
        (WebCore::RenderBox::setScrollTop):
        (WebCore::RenderBox::setScrollPosition):
        * rendering/RenderBox.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToXPosition):
        (WebCore::RenderLayer::scrollToYPosition):
        (WebCore::RenderLayer::setScrollPosition):
        (WebCore::RenderLayer::scrollRectToVisible): Remove AutoscrollStatus.
        (WebCore::RenderLayer::autoscroll):
        (WebCore::RenderLayer::scrollToPosition): Deleted. Use setScrollPosition instead.
        * 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:

2020-04-09  Alex Christensen  <achristensen@webkit.org>

        IPC serialization of enums should serialize std::underlying_type instead of uint64_t
        https://bugs.webkit.org/show_bug.cgi?id=210228

        Reviewed by Chris Dumez and Darin Adler.

        No change in behavior, other than less memory and time spent in IPC code.

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawTextInternal):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::dump const):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ca/PlatformCALayer.cpp:
        (WebCore::PlatformCALayer::drawRepaintIndicator):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setPlatformTextDrawingMode):
        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::shouldUseLetterpressEffect):
        (WebCore::FontCascade::drawGlyphs):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::drawText):
        * rendering/TextPaintStyle.cpp:
        (WebCore::updateGraphicsContext):
        * rendering/TextPainter.cpp:
        (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::applyResource):
        * rendering/svg/RenderSVGResourceSolidColor.cpp:
        (WebCore::RenderSVGResourceSolidColor::applyResource):

2020-04-08  Darin Adler  <darin@apple.com>

        [Cocoa] Simplify NSArray, NSDictionary, and NSNumber idioms throughout WebKit
        https://bugs.webkit.org/show_bug.cgi?id=210138

        Reviewed by Alex Christensen.

        - Added createNSArray and makeVector.
        - Use createNSArray and makeVector<String> in many places where we convert
          between NSArray and Vector, replacing multiple existing functions that were
          doing the same job before; later can use them even more.
        - Use @[] many places where we create an autoreleased NSArray.
        - Use @{} many places where we create an autoreleased NSDictionary.
        - Use @() many places where we create an autoreleased NSNumber.

        * PlatformMac.cmake: Moved Float/IntRectMac.mm to Float/IntRectCocoa.mm.
        * SourcesCocoa.txt: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (AXAttributeStringSetBlockquoteLevel): Use @().
        (AXAttributeStringSetHeadingLevel): Use @().
        (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): Use @[].
        (-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]): Use @[].
        (-[WebAccessibilityObjectWrapper elementsForRange:]): Use @[].
        (-[WebAccessibilityObjectWrapper textMarkersForRange:]): Use @[].

        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::textReplacementChangeDictionary): Use @().

        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (makeVectorElement): Aded overload for AccessibilitySearchKey.
        (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
        Use makeVector<AccessibilitySearchKey>.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (accessibilityTextCriteriaForParameterizedAttribute): Use makeVector<String>.
        (accessibilitySearchTextCriteriaForParameterizedAttribute): Use makeVector<String>.
        (AXAttributeStringSetStyle): Use @().
        (AXAttributeStringSetBlockquoteLevel): Use @().
        (AXAttributeStringSetHeadingLevel): Use @().
        (-[WebAccessibilityObjectWrapper accessibilityActionNames]): Use @[].
        (convertStringsToNSArray): Deleted.
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        Use @(), @[], and createNSArray.
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        Ditto.

        * bridge/objc/WebScriptObject.mm:
        (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
        Use @().

        * editing/cocoa/AlternativeTextUIController.mm:
        (WebCore::AlternativeTextUIController::alternativesForContext):
        Use makeVector<String>.

        * editing/cocoa/HTMLConverter.mm:
        (defaultParagraphStyle): Use @[].
        (HTMLConverter::computedAttributesForElement): Use @().
        (HTMLConverter::_processMetaElementWithName): Use @().
        (HTMLConverter::_addTableForElement): Use @().

        * page/ios/FrameIOS.mm:
        (WebCore::Frame::interpretationsForCurrentRoot const): Use @[].

        * platform/cocoa/MIMETypeRegistryCocoa.mm:
        (WebCore::MIMETypeRegistry::getExtensionsForMIMEType): Use makeVector<String>.

        * platform/graphics/FloatRect.h: Added makeNSArrayElement overload so we can
        convert Vector<FloatRect> into NSArray<NSValue>.
        * platform/graphics/IntRect.h: Similarly for IntRect.

        * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
        (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Use createNSArray.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::mediaDescriptionForKind): Use @[].
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use @().
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use @().
        (WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): Use @[].
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use @{} and @().

        * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
        (WebCore::PlatformCAAnimationCocoa::valueFunction const):
        (WebCore::PlatformCAAnimationCocoa::setFromValue):
        (WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
        (WebCore::PlatformCAAnimationCocoa::setToValue):
        (WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
        (WebCore::PlatformCAAnimationCocoa::setValues):
        (WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
        (WebCore::PlatformCAAnimationCocoa::setKeyTimes):
        (WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
        (WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
        (WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
        Use @(), @[], modern for loops, auto, and allocate with capacity.

        * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
        (WebCore::PlatformCAFilters::filterValueForOperation): Use @().

        * platform/graphics/cocoa/FloatRectCocoa.mm: Moved from mac/FloatRectMac.mm.
        (WebCore::makeNSArrayElement): Added so we can convert Vector<FloatRect>
        into NSArray<NSValue>.
        * platform/graphics/cocoa/IntRectCocoa.mm: Moved from mac/IntRectMac.mm.
        (WebCore::makeNSArrayElement): Similarly for IntRect.
        (WebCore::enclosingIntRect): Use clampTo to be consistent with what
        enclosingIntRect(FloatRect) does (while fixing check-webkit-style complaint).

        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer display]): Add WebCore namespace prefix; needed depending on
        how sources get unified (and was affecting my local build when it temporarily
        had an additional source file).
        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Ditto.
        (-[WebGLLayer bindFramebufferToNextAvailableSurface]): Ditto.

        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::systemFontModificationAttributes): Use @().

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
        (WebCore::createItemProviderRegistrationList): Use createNSArray.
        (WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers): Use createNSArray.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard setItemProviders:]): Use @[].
        * platform/ios/wak/WAKView.mm:
        (-[WAKView subviews]): Dittto.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
        (WebCore::PlatformPasteboard::getPathnamesForType const): Use makeVector<String>.
        (WebCore::PlatformPasteboard::addTypes): Use makeVector<String>.
        (WebCore::PlatformPasteboard::setTypes): Use makeVector<String>.

        * platform/mac/StringUtilities.h: Removed
        webCoreStringVectorFromNSStringArray, replaced by makeVector<String>
        * platform/mac/StringUtilities.mm:
        (WebCore::webCoreStringVectorFromNSStringArray): Deleted.

        * platform/mac/WebCoreNSURLExtras.mm: Removed unneeded include.

        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::setVideoInput): Use @().
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setupCaptureSession): Use @().
        * platform/network/cocoa/CookieCocoa.mm:
        (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const): Use @().

        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::setCookiesFromDOM const): Use @{}.

        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdatePlatformRequest): Use @YES/@NO.

2020-04-09  Daniel Bates  <dabates@apple.com>

        [ macOS debug wk2 ] REGRESSION(r259761): ASSERTION FAILED: !needsLayout() on fast/events/scroll-subframe-in-rendering-update.html
        https://bugs.webkit.org/show_bug.cgi?id=210278
        <rdar://problem/61517389>

        Reviewed by Simon Fraser.

        Add a comment to clarify that the needsLayout() check during EventRegion painting in
        RenderWidget::paint() is a workaround for <https://bugs.webkit.org/show_bug.cgi?id=210278>:
        it is needed because event regions are only stored on compositing layers. Following r259761
        a non-composited frames can request their enclosing compositing layer to update the event
        region on their behalf. Outside of this special request (tracked via RenderView::needsEventRegionUpdateForNonCompositedFrame())
        we want to do what the code did pre-r259761 and bail out in RenderWidget::paint() when
        asked to perform an event region paint. We cannot depend on RenderView::needsEventRegionUpdateForNonCompositedFrame()
        though since it could be have been set by a deep nested non-composited child frame and
        an intermediary child frame along the path may have had its layout dirtied. That is why
        we check needsLayout(). Eventually the needsEventRegionUpdateForNonCompositedFrame() bit
        will be serviced (and turned off) once all frames along the path to the originally requesting
        frame lay out.

        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::paint):

2020-04-09  David Kilzer  <ddkilzer@apple.com>

        Add using WTF::isInBounds to CheckedArithmetic.h
        <https://webkit.org/b/210299>

        Reviewed by Darin Adler.

        * fileapi/Blob.cpp:
        (WebCore::Blob::size const):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::elementWasRemoved):
        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::cacheNativeImageAtIndex):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::tryGetResourceAsBufferBinding):
        - Remove WTF:: prefix from isInBounds().

2020-04-09  Andres Gonzalez  <andresg_22@apple.com>

        Fix for crash in test accessibility/mac/aria-grid-with-strange-hierarchy.html in isolated tree mode.
        https://bugs.webkit.org/show_bug.cgi?id=210295

        Reviewed by Chris Fleizach.

        Covered by accessibility/mac/aria-grid-with-strange-hierarchy.html.

        - When AXIsolatedTree::applyPendingChanges encounters a change for an
        already existing object, the existing object is discarded and the new
        object replaces it in the nodes map. The existing and new objects must
        have the same platform wrapper. Thus the wrapper needs to be detached
        from the existing object about to be discarded, and re-attached to the
        new object. We were missing the re-attachment, and hence the crash when
        the wrapper tries to access its underlying object.
        - In addition, moved the LockHolder in a couple of intances to before
        AXIsolatedTree::nodeForID, because this method accesses a member
        variable used in both threads.
        - Added stricter assert checks to catch problems with the management of
        objects and wrappers during tree updates.

        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::updateNode):
        (WebCore::AXIsolatedTree::updateChildren):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]):

2020-04-09  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION: CSS animations inside an embedded SVG image do not animate
        https://bugs.webkit.org/show_bug.cgi?id=209370

        Reviewed by Simon Fraser.

        If WebAnimation is enabled and the SVGImage includes CSS animations, the
        DocumentTimeline is added to the SVGDocument of the embedded SVGImage.
        Because the SVGImage has its own Page the RenderingUpdate is scheduled
        and the updateRendering steps run in this Page.

        The Page of the SVGImage is inactive such that scheduling RenderingUpdate
        fails; therefore the updateRendering steps never run and the CSS animation
        never advances.

        The fix is:

        1) Scheduling the RenderingUpdate: This has to happen in the Page which
           contains the renderer of the SVGImage. Because DocumentTimeline is
           added to SVGDocument, this scheduling will go through these hubs:
                - DocumentTimeline
                - Page
                - ChromeClient -> SVGImageChromeClient 
                - SVGImage
                - ImageObserver -> CachedImageObserver
                - CachedImage
                - CachedImageClient -> RenderElement
                - Page

        2) Running the updateRendering steps: Each document in the Page will
           enumerate its cached SVGImages. The updateRendering of the Page of
           each SVGImage will be called.

        To make enumerating the cached SVGImages of a Document faster, the URL
        of the cached SVGImage will be added to the cachedSVGImagesURLs of
        CachedResourceLoader when notifyFinished() is called for associated
        CachedImage.

        Tests: svg/animations/css-animation-background-svg.html
               svg/animations/css-animation-embedded-svg.html
               svg/animations/css-animation-hover-svg.html

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::scheduleAnimationResolution):
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        * html/ImageBitmap.cpp:
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::hasSVGImage const):
        (WebCore::CachedImage::CachedImageObserver::scheduleTimedRenderingUpdate):
        (WebCore::CachedImage::scheduleTimedRenderingUpdate):
        * loader/cache/CachedImage.h:
        * loader/cache/CachedImageClient.h:
        (WebCore::CachedImageClient::scheduleTimedRenderingUpdate):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::isSVGImageCachedResource):
        (WebCore::cachedResourceSVGImage):
        (WebCore::CachedResourceLoader::notifyFinished):
        (WebCore:: const):
        * loader/cache/CachedResourceLoader.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::scheduleTimedRenderingUpdate):
        * page/Page.cpp:
        (WebCore::Page::scheduleTimedRenderingUpdate):
        (WebCore::Page::updateRendering):
        * page/Page.h:
        * platform/graphics/ImageObserver.h:
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::notifyFinished):
        (WebCore::RenderElement::scheduleTimedRenderingUpdate):
        * rendering/RenderElement.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::notifyFinished):
        * svg/graphics/SVGImage.h:
        * svg/graphics/SVGImageClients.h:

2020-04-09  Keith Miller  <keith_miller@apple.com>

        Remove legacy X-WebKit-CSP header support
        https://bugs.webkit.org/show_bug.cgi?id=210256
        <rdar://problem/60634363>

        Reviewed by Geoffrey Garen.

        Supporting this header is causes compatibly issues for some sites
        and they appear to be misconfigured. Additionally, no other
        browser has supported these headers in many years. This patch
        removes all support for the legacy X-WebKit-CSP header.

        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        * page/csp/ContentSecurityPolicyDirectiveList.cpp:
        (WebCore::ContentSecurityPolicyDirectiveList::ContentSecurityPolicyDirectiveList):
        * page/csp/ContentSecurityPolicyResponseHeaders.cpp:
        (WebCore::ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders):
        * page/csp/ContentSecurityPolicyResponseHeaders.h:
        * platform/network/HTTPHeaderNames.in:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::isSafeCrossOriginResponseHeader):

2020-04-09  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] The function WebCore::systemHasBattery() should cache the result.
        https://bugs.webkit.org/show_bug.cgi?id=210296
        <rdar://problem/61331536>

        Reviewed by Darin Adler.

        The function WebCore::systemHasBattery() should cache the result, since the return value of this function
        will be the same on a specific device.

        No new tests, since there is no change in behavior.

        * platform/cocoa/SystemBattery.mm:
        (WebCore::systemHasBattery):

2020-04-09  Keith Rollin  <krollin@apple.com>

        Set ENTITLEMENTS_REQUIRED=NO for some Xcode build targets
        https://bugs.webkit.org/show_bug.cgi?id=210250
        <rdar://problem/61502270>

        Reviewed by Jonathan Bedard.

        When building with the public version of Xcode 11.4, with XCBuild
        enabled, and targeting the iOS device, some build targets issue an
        error like:

            error: An empty identity is not valid when signing a binary for
                the product type 'Command-line Tool'. (in target 'yasm' from
                project 'libwebrtc')

        A comment in <rdar://problem/47092353> suggests setting
        ENTITLEMENTS_REQUIRED=NO to relax the requirement. To that end, when
        building with the public Xcode, establish that setting for the
        affected targets.

        No new tests -- no changed functionality.

        * Configurations/WebCoreTestShim.xcconfig:
        * Configurations/WebCoreTestSupport.xcconfig:

2020-04-09  Rob Buis  <rbuis@igalia.com>

        Remove FrameLoader::outgoingOrigin
        https://bugs.webkit.org/show_bug.cgi?id=210286

        Reviewed by Darin Adler.

        Remove FrameLoader::outgoingOrigin since it is no longer used.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::outgoingOrigin const): Deleted.
        * loader/FrameLoader.h:

2020-04-09  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, reverting r259816.

        This commit broke the webkit build for macOS and iOS

        Reverted changeset:

        "Introduce a RealtimeMediaSource observer dedicated to
        receiving audio samples"
        https://bugs.webkit.org/show_bug.cgi?id=210180
        https://trac.webkit.org/changeset/259816

2020-04-09  Daniel Bates  <dabates@apple.com>

        [ macOS debug wk2 ] REGRESSION(r259762): ASSERTION FAILED: !needsLayout() on fast/events/scroll-subframe-in-rendering-update.html
        https://bugs.webkit.org/show_bug.cgi?id=210278
        <rdar://problem/61517389>

        Reviewed by Darin Adler.

        Only EventRegion paint the contents of the widget if the widget is a frame view that
        does not need layout because layout must come before painting. Otherwise, an assertion
        failure will occur.

        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::paint):

2020-04-09  Simon Fraser  <simon.fraser@apple.com>

        eventSender.monitorWheelEvents() should clear latching state
        https://bugs.webkit.org/show_bug.cgi?id=210288

        Reviewed by Tim Horton.

        Use monitorWheelEvents() as a trigger to clear scroll latching state, both main-thread (via Page)
        and scrolling thread (via ScrollingTree).

        Page::ensureWheelEventTestMonitor() had side-effects, so hide it, and have clients explicitly call Page::startMonitoringWheelEvents().

        * page/Page.cpp:
        (WebCore::Page::startMonitoringWheelEvents):
        (WebCore::Page::ensureWheelEventTestMonitor):
        * page/Page.h:
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::monitorWheelEvents):
        (WebCoreTestSupport::setWheelEventMonitorTestCallbackAndStartMonitoring):

2020-04-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add an API test for <https://trac.webkit.org/r259766>
        https://bugs.webkit.org/show_bug.cgi?id=210294

        Reviewed by Tim Horton.

        Avoid trying to place the missing value into paragraphSets in TextManipulationController by bailing if either
        the start or end positions are null (while the missing value requires both the start and end to be null, it is
        sufficient to bail if either are null because `observeParagraphs` will be a no-op anyways).

        See Tools/ChangeLog for more details.

        Test: TextManipulation.CompleteTextManipulationAvoidCrashingWhenContentIsRemoved

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::scheduleObservartionUpdate):

2020-04-09  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, reverting r259804.

        Breaks the watchOS build.

        Reverted changeset:

        "IPC serialization of enums should serialize
        std::underlying_type instead of uint64_t"
        https://bugs.webkit.org/show_bug.cgi?id=210228
        https://trac.webkit.org/changeset/259804

2020-04-09  Youenn Fablet  <youenn@apple.com>

        Introduce a RealtimeMediaSource observer dedicated to receiving audio samples
        https://bugs.webkit.org/show_bug.cgi?id=210180

        Reviewed by Eric Carlson.

        RealtimeMediaSource::Observer was called on various threads which was making iterating through them difficult.
        Observers were copied to a vector for iterating each time and locking was happening for each indivudual observer.

        Instead of doing that, RealtimeMediaSource::Observer no longer gives access to audio samples, all its methods are called from the main thread.
        AudioSampleObserver is introduced with a single method to receive audio samples.
        RealtimeMediaSource keeps a set of AudioSampleObserver separated from its existing Observer hashset.
        These observers can only be added/removed from the main thread while audio sample delivery usually happens from a background thread.
        We no longer need to copy the audio sample observers in a vector and lock only once when iterating the audio sample observers.

        This change requires to update MediaStreamTrackPrivate and RealtimeMediaSource observers.
        This includes WebAudio, Audio Renderer and Media Recorder.
        Each corresponding class is now registering itself as a MediaStreamTrackPrivate::Observer and when needed as a RealtimeMediaSource::Observer.
        This allows removing the additional copy-in-vector/lock that was happening when iterating over MediaStreamTrackPrivate::Observers for audio samples.

        This change also allows for a consumer to always observe the MediaStreamTrackPrivate but receive audio samples only when needed.
        We change the AudioTrackPrivateMediaStream implementation so that, if the renderer is muted, not playing, the track is muted or not enabled,
        it no longer receives audio samples.
        This is especially useful in the typical case where a video element displays the locally captured stream (including a local audio track) but is muted
        to prevent feedback loop.
        For that reason, the player is now setting the muted state of the renderer instead of setting volume to 0.

        Covered by existing test sets.

        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediarecorder/MediaRecorderProvider.cpp:
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorderProvider.h:
        * loader/EmptyClients.cpp:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted):
        * platform/mediarecorder/MediaRecorderPrivate.cpp:
        (WebCore::MediaRecorderPrivate::selectTracks):
        * platform/mediarecorder/MediaRecorderPrivate.h:
        (WebCore::MediaRecorderPrivate::setAudioSource):
        (WebCore::MediaRecorderPrivate::~MediaRecorderPrivate):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        (WebCore::MediaRecorderPrivateAVFImpl::~MediaRecorderPrivateAVFImpl):
        (WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
        (WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
        (WebCore::MediaRecorderPrivateAVFImpl::fetchData):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediarecorder/MediaRecorderPrivateMock.cpp:
        (WebCore::MediaRecorderPrivateMock::MediaRecorderPrivateMock):
        (WebCore::MediaRecorderPrivateMock::~MediaRecorderPrivateMock):
        (WebCore::MediaRecorderPrivateMock::stopRecording):
        (WebCore::MediaRecorderPrivateMock::sampleBufferUpdated):
        (WebCore::MediaRecorderPrivateMock::audioSamplesAvailable):
        (WebCore::MediaRecorderPrivateMock::generateMockCounterString):
        (WebCore::MediaRecorderPrivateMock::fetchData):
        * platform/mediarecorder/MediaRecorderPrivateMock.h:
        * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
        (WebCore::AudioTrackPrivateMediaStream::AudioTrackPrivateMediaStream):
        (WebCore::AudioTrackPrivateMediaStream::clear):
        (WebCore::AudioTrackPrivateMediaStream::play):
        (WebCore::AudioTrackPrivateMediaStream::pause):
        (WebCore::AudioTrackPrivateMediaStream::setMuted):
        (WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
        (WebCore::AudioTrackPrivateMediaStream::trackMutedChanged):
        (WebCore::AudioTrackPrivateMediaStream::trackEnabledChanged):
        (WebCore::AudioTrackPrivateMediaStream::trackEnded):
        (WebCore::AudioTrackPrivateMediaStream::updateRenderer):
        (WebCore::AudioTrackPrivateMediaStream::startRenderer):
        (WebCore::AudioTrackPrivateMediaStream::stopRenderer):
        * platform/mediastream/AudioTrackPrivateMediaStream.h:
        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        (WebCore::webkitMediaStreamSrcFinalize):
        (WebCore::webkitMediaStreamSrcChangeState):
        (WebCore::webkitMediaStreamSrcSetupSrc):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::forEachTrack):
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::forEachObserver const):
        (WebCore::MediaStreamTrackPrivate::addObserver):
        (WebCore::MediaStreamTrackPrivate::removeObserver):
        (WebCore::MediaStreamTrackPrivate::hasStartedProducingAudioData):
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::addAudioSampleObserver):
        (WebCore::RealtimeMediaSource::removeAudioSampleObserver):
        (WebCore::RealtimeMediaSource::addObserver):
        (WebCore::RealtimeMediaSource::removeObserver):
        (WebCore::RealtimeMediaSource::forEachObserver const):
        (WebCore::RealtimeMediaSource::audioSamplesAvailable):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
        (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
        (WebCore::RealtimeOutgoingAudioSource::observeSource):
        (WebCore::RealtimeOutgoingAudioSource::unobserveSource):
        * platform/mediastream/RealtimeOutgoingAudioSource.h:
        * platform/mediastream/WebAudioSourceProvider.h:
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
        (WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
        (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
        (WebCore::WebAudioSourceProviderAVFObjC::trackEnabledChanged):
        (WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
        * testing/Internals.cpp:
        (WebCore::Internals::~Internals):
        (WebCore::createRecorderMockSource):
        (WebCore::Internals::observeMediaStreamTrack):
        (WebCore::Internals::videoSampleAvailable):
        * testing/Internals.h:

2020-04-09  Antti Koivisto  <antti@apple.com>

        Removed unused fields and functions from StylePropertyShorthand
        https://bugs.webkit.org/show_bug.cgi?id=210279

        Reviewed by Darin Adler.

        * css/StylePropertyShorthand.cpp:
        (WebCore::borderAbridgedShorthand): Deleted.
        * css/StylePropertyShorthand.h:
        (WebCore::StylePropertyShorthand::StylePropertyShorthand):
        (WebCore::StylePropertyShorthand::properties const):
        (WebCore::StylePropertyShorthand::propertiesForInitialization const): Deleted.

2020-04-08  Simon Fraser  <simon.fraser@apple.com>

        [Async overflow scroll] Horizontal scrolls can trigger unwanted back swipes
        https://bugs.webkit.org/show_bug.cgi?id=210095
        <rdar://problem/61376245>

        Reviewed by Tim Horton.

        With async overflow/frame scrolling, EventDispatcher::wheelEvent() can't immediately
        determine whether the scrolling tree handled the scroll; we have to wait until the
        event has been processed by the scrolling thread. To allow that, add a
        ScrollingEventResult::SendToScrollingThread return value and a give tryToHandleWheelEvent()
        a callback that's called when the scrolling thread is done with the event. EventDispatcher
        uses that to send the "didReceiveEvent" with "handled" back to the UI process, which then
        proceeds with history or reading list swipes.

        Various fixes were necessary to correctly determine whether the event was handled.
        
        ScrollingTreeFrameScrollingNodeMac::handleWheelEvent() didn't return an accurate ScrollingEventResult,
        and ScrollController didn't return false in cases where rubber-banding was disabled (which broke navigation swipes
        and reading list navigation).

        Tests: scrollingcoordinator/mac/latching/main-frame-back-swipe.html
               scrollingcoordinator/mac/latching/simple-page-rubberbands.html

        * page/scrolling/ScrollingCoordinatorTypes.h:
        * page/scrolling/ScrollingThread.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::mainFrameCanRubberBandInDirection):
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::tryToHandleWheelEvent):
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const):
        * platform/cocoa/ScrollController.h:
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::handleWheelEvent):
        (WebCore::ScrollController::wheelDeltaBiasingTowardsVertical):
        (WebCore::ScrollController::directionFromEvent):
        (WebCore::ScrollController::shouldRubberBandInHorizontalDirection const):
        (WebCore::ScrollController::shouldRubberBandInDirection const):
        (WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Deleted.

2020-04-09  Alex Christensen  <achristensen@webkit.org>

        IPC serialization of enums should serialize std::underlying_type instead of uint64_t
        https://bugs.webkit.org/show_bug.cgi?id=210228

        Reviewed by Chris Dumez and Darin Adler.

        No change in behavior, other than less memory and time spent in IPC code.

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawTextInternal):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::dump const):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ca/PlatformCALayer.cpp:
        (WebCore::PlatformCALayer::drawRepaintIndicator):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setPlatformTextDrawingMode):
        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::shouldUseLetterpressEffect):
        (WebCore::FontCascade::drawGlyphs):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::drawText):
        * rendering/TextPaintStyle.cpp:
        (WebCore::updateGraphicsContext):
        * rendering/TextPainter.cpp:
        (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::applyResource):
        * rendering/svg/RenderSVGResourceSolidColor.cpp:
        (WebCore::RenderSVGResourceSolidColor::applyResource):

2020-04-09  Antti Koivisto  <antti@apple.com>

        Use more WeakPtr in RenderTreeBuilder::FirstLetter
        https://bugs.webkit.org/show_bug.cgi?id=210251
        <rdar://problem/61180381>

        Reviewed by Zalan Bujtas.

        For safety.

        * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
        (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):

2020-04-09  Delan Azabani  <dazabani@igalia.com>

        Remove unnecessary explicit parsing for mo@maxsize value "infinity"
        https://bugs.webkit.org/show_bug.cgi?id=202720

        Reviewed by Frédéric Wang.

        In MathML 2, the default mo@maxsize was infinity [1], unless some other
        default was given by mstyle@maxsize [2]. The sole purpose of "infinity"
        was to give authors a way to set mo@maxsize to infinity when some other
        mstyle@maxsize was set.

        MathML Core removes mstyle@maxsize [3][4], such that "infinity" has the
        same semantics as any other missing or invalid mo@maxsize, so the spec
        has been simplified to make infinity an anonymous value [5][6].

        No functional change, because WebKit has never supported mstyle@maxsize
        anyway. To verify that there's no functional change:

        1.  Search for references to LengthType::Infinity, and observe that the
            mo@maxsize parser in MathMLOperatorElement::maxSize is the only
            place where a Length of ::type infinity is created
        2.  Search for references to that method, and observe that the only
            caller (RenderMathMLOperator::maxSize) passes intMaxForLayoutUnit
            (infinity) to toUserUnits as the referenceValue
        3.  Go to the definition of toUserUnits, and observe that the refer-
            enceValue is used as the ParsingFailed default
        4.  Step 1 shows that no other attributes would be affected by removing
            LengthType::Infinity, and steps 2 and 3 show that mo@maxsize treats
            invalid values as infinity, therefore it's safe to remove both the
            "infinity" parsing code and the underlying LengthType variant

        [1] https://www.w3.org/TR/MathML2/chapter3.html#id.3.2.5.2
        [2] https://www.w3.org/TR/MathML2/chapter3.html#presm.mstyle
        [3] https://mathml-refresh.github.io/mathml-core/#style-change-mstyle
        [4] https://github.com/mathml-refresh/mathml/issues/1
        [5] https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes
        [6] https://github.com/mathml-refresh/mathml/issues/107

        No new tests, because no functional change.

        * mathml/MathMLElement.h: Remove LengthType::Infinity.
        * mathml/MathMLOperatorElement.cpp:
        (WebCore::MathMLOperatorElement::maxSize): Remove explicit branch on "infinity". Replace what remains with an equivalent cachedMathMLLength call.
        * rendering/mathml/RenderMathMLBlock.cpp:
        (WebCore::toUserUnits): Remove explicit branch on LengthType::Infinity.
        * rendering/mathml/RenderMathMLOperator.cpp:
        (WebCore::RenderMathMLOperator::maxSize): Update comment to refer to the default value in the same way as the spec.

2020-04-08  Chris Dumez  <cdumez@apple.com>

        querySelector("#\u0000") should match an element with ID U+FFFD
        https://bugs.webkit.org/show_bug.cgi?id=210119

        Reviewed by Darin Adler.

        As per the specification [1][2], we should preprocess the input string before performing
        CSS tokenization. The preprocessing step replaces certain characters in the input string.

        However, our code did not have this preprocessing step and instead was trying to deal
        with those characters during tokenization. This is however not working as expected for
        the '\0' character (which is supposed to be replaced with U+FFFD REPLACEMENT CHARACTER)
        because our code deals with StringViews of the input String and just converts part of
        the input stream to Strings / AtomStrings.

        To address the issue, this patch adds a preprocessing step that replaces the '\0'
        character with the U+FFFD REPLACEMENT CHARACTER). I opted not to replace '\r' or '\f'
        characters since our tokenizer seems to be dealing fine with those.

        [1] https://drafts.csswg.org/css-syntax/#input-preprocessing
        [2] https://drafts.csswg.org/css-syntax/#parser-entry-points

        Test: imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-escapes.html

        * css/parser/CSSTokenizer.cpp:
        (WebCore::preprocessString):
        (WebCore::CSSTokenizer::CSSTokenizer):
        (WebCore::CSSTokenizer::lessThan):
        (WebCore::CSSTokenizer::hyphenMinus):
        (WebCore::CSSTokenizer::hash):
        (WebCore::CSSTokenizer::reverseSolidus):
        (WebCore::CSSTokenizer::letterU):
        (WebCore::CSSTokenizer::consumeNumber):
        (WebCore::CSSTokenizer::consumeIdentLikeToken):
        (WebCore::CSSTokenizer::consumeStringTokenUntil):
        (WebCore::CSSTokenizer::consumeUnicodeRange):
        (WebCore::CSSTokenizer::consumeUrlToken):
        (WebCore::CSSTokenizer::consumeBadUrlRemnants):
        (WebCore::CSSTokenizer::consumeSingleWhitespaceIfNext):
        (WebCore::CSSTokenizer::consumeIfNext):
        (WebCore::CSSTokenizer::consumeName):
        (WebCore::CSSTokenizer::consumeEscape):
        (WebCore::CSSTokenizer::nextTwoCharsAreValidEscape):
        (WebCore::CSSTokenizer::nextCharsAreNumber):
        (WebCore::CSSTokenizer::nextCharsAreIdentifier):
        * css/parser/CSSTokenizer.h:
        * css/parser/CSSTokenizerInputStream.h:
        (WebCore::CSSTokenizerInputStream::nextInputChar const):
        (WebCore::CSSTokenizerInputStream::peek const):
        (WebCore::CSSTokenizerInputStream::peekWithoutReplacement const): Deleted.

2020-04-08  Alex Christensen  <achristensen@webkit.org>

        _corsDisablingPatterns should allow security policy access to those patterns
        https://bugs.webkit.org/show_bug.cgi?id=210218
        <rdar://problem/61395166>

        Reviewed by Timothy Hatcher.

        This gives WKWebViewConfiguration._corsDisablingPatterns power similar to WKBundleAddOriginAccessWhitelistEntry
        but its API is per-WKWebView (even if its implementation is unfortunately currently process global in the web process).
        Functionality covered by a new API test.

        * page/Page.cpp:
        (WebCore::m_loadsFromNetwork):
        * page/PageConfiguration.h:
        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::canRequest const):
        (WebCore::SecurityOrigin::canDisplay const):
        * page/SecurityPolicy.cpp:
        (WebCore::originAccessPatterns):
        (WebCore::SecurityPolicy::isAccessWhiteListed):
        (WebCore::SecurityPolicy::allowAccessTo):
        (WebCore::SecurityPolicy::isAccessToURLWhiteListed): Deleted.
        * page/SecurityPolicy.h:

2020-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION (r258525): Occasional crashes under TextManipulationController::observeParagraphs
        https://bugs.webkit.org/show_bug.cgi?id=210215
        <rdar://problem/61362512>

        Reviewed by Darin Adler.

        In the case where `startOfParagraph` or `endOfParagraph` return a null `Position`, we end up crashing under
        TextManipulationController::observeParagraphs while creating `ParagraphContentIterator`, which expects non-null
        `Position`s because it dereferences the result of `makeBoundaryPoint`.

        Avoid this crash for now by bailing if either the start or end positions are null. Tests to be added in a
        followup patch.

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::observeParagraphs):

2020-04-08  Kenneth Russell  <kbr@chromium.org>

        Release WebGLLayer earlier in ~GraphicsContextGLOpenGL
        https://bugs.webkit.org/show_bug.cgi?id=210213

        Reviewed by Dean Jackson.

        Release WebGLLayer earlier and remove public context property,
        which is no longer called.

        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:

2020-04-08  Daniel Bates  <dabates@apple.com>

        Track editable elements on screen
        https://bugs.webkit.org/show_bug.cgi?id=209888
        <rdar://problem/61196886>

        Reviewed by Simon Fraser.

        Amend EventRegion to store a region of all the hit test visible rects of editable elements
        on the page. This data will be sent over to the UI process so that it can quickly determine
        if a search rect would intersect any editable elements. 

        An element is considered editable if it has CSS -webkit-user-modify value that isn't read-only.
        Note that the value of the HTML content attribute contenteditable is internally converted to
        its -webkit-user-modify equivalent (e.g. contenteditable="true" <=> "-webkit-user-modify: read-write").

        Tests: editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html
               editing/editable-region/float-contenteditable.html
               editing/editable-region/hit-test-basic.html
               editing/editable-region/hit-test-fixed.html
               editing/editable-region/hit-test-overlap.html
               editing/editable-region/iframe.html
               editing/editable-region/input-basic.html
               editing/editable-region/out-hanging-child-of-contenteditable.html
               editing/editable-region/overflow-scroll-text-field-and-contenteditable.html
               editing/editable-region/relative-inside-fixed-contenteditable-scrolled.html
               editing/editable-region/relative-inside-transformed-contenteditable.html
               editing/editable-region/transformed-scrolled-on-top-of-fixed-contenteditables.html

        * Configurations/FeatureDefines.xcconfig: Add feature define to track editable elements on
        screen (enabled by default on iOS and iOS Simulator).
        * dom/Document.h:
        (WebCore::Document::mayHaveEditableElements const):
        (WebCore::Document::setMayHaveEditableElements):
        Add some state to each document to track whether it may have an editable element or not. This
        value represents a "maybe" because it is only set and never unset. It is set if the style resolver
        saw an element with an editable style. This flag is used as a performance optimization to avoid
        creating an event region if there are no editable elements on the page.

        * page/Frame.cpp:
        (WebCore::Frame::invalidateContentEventRegionsIfNeeded): Check if there are any editable elements.
        If so, invalidate the event region.
        * rendering/EventRegion.cpp:
        (WebCore::EventRegion::operator== const): Update for editable region.
        (WebCore::EventRegion::unite): If the specified style has a writable CSS user-modify value then
        unite the region with the editable region.
        (WebCore::EventRegion::translate): Update for editable region.
        (WebCore::EventRegion::containsEditableElementsInRect const): Added. Check if the specified rect
        intersects the editable region. If it does then that means there are one or more editable elements
        whose bounds intersect that rect. Otherwise, there are none.
        (WebCore::EventRegion::dump const): Update for editable region.
        * rendering/EventRegion.h:
        (WebCore::EventRegion::intersects const): Added.
        (WebCore::EventRegion::rectsForEditableElements const): Return the rects in the editable region.
        (WebCore::EventRegion::encode const): Encode the editable region.
        (WebCore::EventRegion::decode): Decode the editable region.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject): Traverse descendants if the page has any editable elements
        so that we find all of them.
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange): Amend the event region invalidation criterion to look
        for a change in writability. If there was a change (e.g. read-only to read-write) then invalidate
        the event region to force a re-computation of it.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::invalidateEventRegion): If the document has editable elements then we need
        to create an event region.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion): Update the region if there are editable elements.
        (WebCore::RenderLayerBacking::paintDebugOverlays): Paint the editable elements in the debug overlay.
        For now, I piggybacked (like was done for touch-action regions) on the non-fast scrollable region
        flag (not shown in the patch). I will look to add a dedicated debug overlay flag in a follow up patch.
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement): Mark the document as having an editable element if
        the style for the element being resolved is writable.

2020-04-08  Daniel Bates  <dabates@apple.com>

        Should find touch-action elements inside non-composited iframes
        https://bugs.webkit.org/show_bug.cgi?id=210041
        <rdar://problem/61323558>

        Reviewed by Simon Fraser.

        Fix up event region code to traverse non-composited iframes that have elements with a non-auto
        touch-action. The event region is computed for each composited layer during a compositing layer
        update and was retricted to being updated if the layer's associated document may have an element
        with a non-auto touch-action. To make this work for non-composited iframes I find its enclosing
        compositing layer, set a special bit that it needs an event region update because of the non-
        composited child iframe and schedule a compositing layer update. When the update happens, it
        checks to see if the special bit is set and if so overrides any restrictions that would have
        prevented the event region from being updated. The painting code for widgets is also fixed up to
        pass through an EventRegionContext to update during EventRegion painting.

        This strategy works well for updating the event region. However debug paint overlays are not
        updated (i.e. RenderLayerBacking::paintDebugOverlays() is not called) until the embedding client's
        view is repainted. For now, to fix this up I added another a hack, a special bit (RenderView::needsRepaintHackAfterCompositingLayerUpdateForDebugOverlaysOnly())
        that is only set if debug overlays are to be shown, to have the compositor repaint the view after
        updating compositing layers.

        Tests: pointerevents/ios/programmatic-touch-action-none-inside-iframe.html
               pointerevents/ios/touch-action-none-inside-iframe.html
               pointerevents/ios/touch-action-none-inside-nested-iframe.html

        * dom/Document.cpp:
        (WebCore::Document::invalidateEventRegionsForFrame): Added. Try to invalidate the event region.
        This may fail if the document does not have an enclosing compositing layer for repaint (e.g. nested
        composited iframes - see test pointerevents/ios/touch-action-none-inside-nested-iframe.html). If
        this happens then recursive on our owner element's document. Recursion is used instead of a loop
        to future proof this code for out-of-process (OOP) frames, which will likely introduce document proxy objects.
        * dom/Document.h:
        * page/Frame.cpp:
        (WebCore::Frame::invalidateContentEventRegionsIfNeeded): Added. Check if our document has any elements with
        a non-auto touch-action. If it does then ask the compositor if the enclosing compositing layer for
        repaint's event region must be invalidated - it will only reply true if this is a non-composited iframe.
        If it does then forward this invalidation request to the document. The reason I delegate to the document
        instead of handling the logic here is to future proof this code for OOP iframes.
        * page/Frame.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::didLayout): Call Frame::invalidateContentEventRegionsIfNeeded(). Also while
        I am here take out a ref on the document to ensure it lives through the end of this function, including
        through the accessibility's postNotification() code that calls out to the embedding client.

        (WebCore::FrameView::paintContents):
        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::paint):
        * platform/ScrollView.h:
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::paint):
        * platform/Scrollbar.h:
        * platform/Widget.cpp:
        (WebCore::Widget::paint):
        * platform/Widget.h:
        * platform/gtk/WidgetGtk.cpp:
        (WebCore::Widget::paint):
        * platform/ios/WidgetIOS.mm:
        (WebCore::Widget::paint):
        * platform/mac/WidgetMac.mm:
        (WebCore::Widget::paint):
        * platform/win/WidgetWin.cpp:
        (WebCore::Widget::paint):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        Pass an EventRegionContext through.

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange): Update code now that RendeLayer::invalidateEventRegion()
        takes a reason. 
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paint): Pass the EventRegionContext through. If are passed one then update
        paint flags to collect event region.
        (WebCore::RenderLayer::invalidateEventRegion): Changed return value from void to bool so as to indicate
        to the caller whether the event region was actually invalidated. Also made it take an argument as
        to the reason for the invalidation. If invalidation is due to a non-composited iframe then sets some
        state and schedule a compositing layer update.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        (WebCore::RenderLayerBacking::setContentsNeedDisplay):
        (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        Pass an EventRegionContext through

        (WebCore::RenderLayerCompositor::viewNeedsToInvalidateEventRegionOfEnclosingCompositingLayerForRepaint const): Added.

        * rendering/RenderLayerCompositor.h:
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::paint):
        * rendering/RenderScrollbar.h:
        * rendering/RenderView.h:
        Pass an EventRegionContext through.

        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::paintContents): Translate the event region by our content paint offset.
        (WebCore::RenderWidget::paint): Update for EventRegion. If painting the event region and the view
        needs layout then do what we do now and bail out. Otherwise, proceed to paint the widget's content.
        The changes to FrameView::didLayout() above means that for non-composited frames that need an event
        region update they already performed a layout. So, these paints will be allowed to descend into
        painting of the widget's content.

2020-04-08  Rob Buis  <rbuis@igalia.com>

        Make more use of FrameLoader pageID/frameID getters
        https://bugs.webkit.org/show_bug.cgi?id=210182

        Reviewed by Chris Dumez.

        Make more use of FrameLoader pageID/frameID getters, before
        this change they were only used internally in FrameLoader.

        * dom/Document.cpp:
        (WebCore::Document::pageID const):
        (WebCore::Document::frameID const):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::handleClick):
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookies const):
        (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
        (WebCore::CookieJar::setCookies):
        (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
        (WebCore::CookieJar::getRawCookies const):
        * loader/NavigationAction.cpp:
        (WebCore::createGlobalFrameIdentifier):
        * loader/PolicyChecker.cpp:
        * testing/Internals.cpp:
        (WebCore::Internals::frameIdentifier const):

2020-04-08  Doug Kelly  <dougk@apple.com>

        Additional cleanup from "Hit test with clipPath referencing parent element causes infinite recursion"
        https://bugs.webkit.org/show_bug.cgi?id=210203
        <rdar://problem/60002347>

        Reviewed by Geoffrey Garen.

        As suggested from the review in bug #209773, this incorporates some additional cleanup, including making the
        SVGHitTestCycleDetectionScope constructor explicit, and clarifying the add/remove with the WeakHashSet, since
        WeakPtr's operator* returns a reference to the template type (which is what we need).

        No new tests as this is covered by existing tests and there are no functional changes.

        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
        (WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):
        * rendering/svg/SVGRenderSupport.h:

2020-04-08  Devin Rousso  <drousso@apple.com>

        Web Inspector: Storage: cannot clear out multiple or all local storage entries
        https://bugs.webkit.org/show_bug.cgi?id=209867

        Reviewed by Timothy Hatcher.

        Tests: inspector/storage/clearDOMStorageItems.html
               inspector/storage/getDOMStorageItems.html
               inspector/storage/removeDOMStorageItem.html
               inspector/storage/setDOMStorageItem.html

        * inspector/agents/InspectorDOMStorageAgent.h:
        * inspector/agents/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::clearDOMStorageItems): Added.
        Add a `clearDOMStorageItems` command instead of calling `removeDOMStorageItem` for each key.

2020-04-08  Kenneth Russell  <kbr@chromium.org>

        WebContent process crashes in com.apple.WebCore: rx::IOSurfaceSurfaceCGL::releaseTexImage
        https://bugs.webkit.org/show_bug.cgi?id=210151

        Reviewed by Dean Jackson.

        Explicitly check for context teardown when displaying a
        WebGLLayer.

        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer display]):

2020-04-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        [macOS] Make PlatformPasteboard robust against types that cannot be encoded with +defaultCStringEncoding
        https://bugs.webkit.org/show_bug.cgi?id=210195
        <rdar://problem/61084208>

        Reviewed by Tim Horton.

        When setting pasteboard data using the three PlatformPasteboard methods below, avoid calling into NSPasteboard
        in the case where the pasteboard type fails to be encoded using +[NSString defaultCStringEncoding]. This is
        because AppKit pasteboard logic will attempt to convert the given string into a C string using [NSString
        defaultCStringEncoding], and then assume that the result is non-null, if the type is neither declared nor
        dynamic.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::canWritePasteboardType):
        (WebCore::PlatformPasteboard::setTypes):
        (WebCore::PlatformPasteboard::setBufferForType):
        (WebCore::PlatformPasteboard::setStringForType):

        Add early returns if canWritePasteboardType returns false.

2020-04-08  Truitt Savell  <tsavell@apple.com>

        Unreviewed, reverting r259708.

        Broke the iOS device Build

        Reverted changeset:

        "Enable the use of XCBuild by default in Apple builds"
        https://bugs.webkit.org/show_bug.cgi?id=209890
        https://trac.webkit.org/changeset/259708

2020-04-08  Rob Buis  <rbuis@igalia.com>

        Import fetch/origin/assorted.window.js
        https://bugs.webkit.org/show_bug.cgi?id=210128

        Reviewed by Youenn Fablet.

        Import fetch/origin/assorted.window.js and remove
        the hack to make the previous (incorrect) version work.

        * loader/cache/CachedResourceRequest.cpp:
        (WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders):

2020-04-08  Doug Kelly  <dougk@apple.com>

        Hit test with clipPath referencing parent element causes infinite recursion
        https://bugs.webkit.org/show_bug.cgi?id=209773
        <rdar://problem/60002347>

        Reviewed by Geoffrey Garen.

        Upon further investigation, the original fix for the hit test in RenderSVGResourceClipper to prevent
        infinite recursion was incomplete, as something such as a use element could easily cause another cycle which
        would not be detected by the initial fix.  Instead, by maintaining a set of visited elements, we can prevent
        visiting the same element twice, and thus breaking any cycles which might occur in the SVG document.  We
        track these elements within the SVGHitTestCycleDetectionScope class, where the set of visited elements are
        maintained statically, and instances of the class will manage the scope, as an RAII-style object.

        This is covered by an existing test, but includes additional test cases which illustrate the more complex
        document structure.

        Tests: svg/hittest/svg-clip-path-child-element-with-use-root.html
               svg/hittest/svg-clip-path-child-element-with-use.html

        * rendering/svg/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::nodeAtFloatPoint):
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::nodeAtFloatPoint):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::hitTestClipContent):
        * rendering/svg/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::nodeAtPoint):
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::nodeAtFloatPoint):
        * rendering/svg/RenderSVGText.cpp:
        (WebCore::RenderSVGText::nodeAtFloatPoint):
        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::pointInClippingArea):
        (WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope):
        (WebCore::SVGHitTestCycleDetectionScope::~SVGHitTestCycleDetectionScope):
        (WebCore::SVGHitTestCycleDetectionScope::visitedElements):
        (WebCore::SVGHitTestCycleDetectionScope::isEmpty):
        (WebCore::SVGHitTestCycleDetectionScope::isVisiting):
        * rendering/svg/SVGRenderSupport.h:

2020-04-08  Antoine Quint  <graouts@apple.com>

        transition-property is not computed correctly when transition-duration is set to "inherit"
        https://bugs.webkit.org/show_bug.cgi?id=204554
        <rdar://problem/57458091>

        Reviewed by Antti Koivisto.

        Test: transitions/transition-property-for-element-with-transition-duration-inherit.html

        The "transition-property" would behave as if "inherit" was set when the "transition-duration" property itself was set explicitly to "inherit".
        We fix this by storing all the information contained in the "transition-property" into the single Animation::m_property member instead of splitting
        it across Animation::m_mode as well. We now use a TransitionProperty struct which holds both the transition "mode" (none, all, single property,
        unknown property) and and the CSS property targeted itself.

        This requires modifying call sites of both Animation::property() and Animation::animationMode() throughout WebCore.

        * animation/AnimationTimeline.cpp:
        (WebCore::transitionMatchesProperty):
        (WebCore::compileTransitionPropertiesInStyle):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::createTransitionPropertyValue):
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::mapAnimationProperty):
        * css/makeprop.pl:
        (generateAnimationPropertyInitialValueSetter):
        (generateAnimationPropertyInheritValueSetter):
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::updateTransitions):
        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::ImplicitAnimation):
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::didAddTransition):
        * platform/animation/Animation.cpp:
        (WebCore::Animation::Animation):
        (WebCore::Animation::operator=):
        (WebCore::Animation::animationsMatch const):
        (WebCore::operator<<):
        * platform/animation/Animation.h:
        (WebCore::Animation::property const):
        (WebCore::Animation::timingFunction const):
        (WebCore::Animation::setProperty):
        (WebCore::Animation::setTimingFunction):
        (WebCore::Animation::initialProperty):
        (WebCore::Animation::animationMode const): Deleted.
        (WebCore::Animation::setAnimationMode): Deleted.
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::adjustTransitions):
        (WebCore::RenderStyle::transitionForProperty const):

2020-04-08  Youenn Fablet  <youenn@apple.com>

        Handle errors when grabbing grabbing microphone audio samples from the AudioUnit
        https://bugs.webkit.org/show_bug.cgi?id=210185

        Reviewed by Eric Carlson.

        We compute the buffer size to copy microphone samples when setting up the Audio Unit.
        This is based on the preferred buffer size and sample rate.
        But these values might change over time by the web page durig the capture.
        If the preferred buffer size increases (for instance if the page stops using WebAudio), our buffer might be too small.
        Capture will fail but we will not notify the web application.

        Update the code to reconfigure the AudioUnit if AudioUnitRender returns an error of type kAudio_ParamError.
        Update the code to only increment the number of microphoneProcsCalled if AudioUnitRender succeeds.
        This will ensure that, should AudioUnitRender fails for some time, the timer will kick in and fail the capture.
        Page will be notified and can call getUserMedia again to restart capture.

        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):

2020-04-08  Keith Rollin  <krollin@apple.com>

        Enable the use of XCBuild by default in Apple builds
        https://bugs.webkit.org/show_bug.cgi?id=209890
        <rdar://problem/44182078>

        Reviewed by Darin Adler.

        Switch from the "legacy" Xcode build system to the "new" build system
        (also known as "XCBuild"). Switching to the new system speeds up
        builds by a small percentage, better validates projects for
        build-related issues (such as dependency cycles), lets WebKit benefit
        from future improvements in XCBuild such as those coming from the
        underlying llbuild open source project, and prepares us for any other
        tools built for this new ecosystem.

        Specific changes:

        - Remove Xcode project and workspace settings that selected the Build
          system, allowing the default to take hold (which is currently the
          New build system).
        - Updated webkitdirs.pm with a terser check for Xcode version.
        - Update build-webkit and Makefile.shared to be explicit when using
          the old build system (no longer treat it as a default or fall-back
          configuration).
        - Update various xcconfig files similarly to treat the default as
          using the new build system.
        - Update various post-processing build steps to check for Xcode 11.4
          and to no longer treat the default as using the old build system.

        No new tests -- no changed functionality.

        * WebCore.xcodeproj/project.pbxproj:

2020-04-08  Philippe Normand  <pnormand@igalia.com>

        [GTK][WPE] Release logs are unconditionally filling the journal
        https://bugs.webkit.org/show_bug.cgi?id=209421

        Reviewed by Carlos Alberto Lopez Perez.

        * platform/unix/LoggingUnix.cpp:
        (WebCore::logLevelString): Disable all logging when the
        WEBKIT_DEBUG environment variable is empty.

2020-04-07  Antoine Quint  <graouts@apple.com>

        [iPadOS] Unable to toggle subpages on sites.google.com
        https://bugs.webkit.org/show_bug.cgi?id=210143
        <rdar://problem/58653069>

        Reviewed by Brent Fulgham.

        If a site built with sites.google.com has some sub-pages, tapping on the right-pointing arrow will not disclose the sub-pages due to preventDefault() being called
        on the touchend event handler. We work around this issue by adding a new quirk that will prevent a given touch event type from being dispatched on a given element.
        This quirk is only true for sites.google.com and the right-pointing arrow for the sub-pages disclosure.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):
        * page/Quirks.h:

2020-04-07  Tyler Wilcock  <twilco.o@protonmail.com>

        [css-values-4] Support font-relative lh and rlh unit
        https://bugs.webkit.org/show_bug.cgi?id=195180

        Reviewed by Antti Koivisto.

        Implement support for 'lh' and 'rlh' units.
        https://www.w3.org/TR/css-values-4/#font-relative-lengths

        * css/CSSCalculationValue.cpp:
        (WebCore::calcUnitCategory):
        (WebCore::calculationCategoryForCombination):
        (WebCore::hasDoubleValue):
        * css/CSSGradientValue.cpp:
        (WebCore::CSSLinearGradientValue::createGradient):
        (WebCore::CSSRadialGradientValue::createGradient):
        (WebCore::CSSConicGradientValue::createGradient):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::isValidCSSUnitTypeForDoubleConversion):
        (WebCore::isStringType):
        (WebCore::CSSPrimitiveValue::cleanup):
        (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
        (WebCore::CSSPrimitiveValue::unitTypeString):
        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
        (WebCore::CSSPrimitiveValue::equals const):
        (WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):
        (WebCore::CSSPrimitiveValue::collectDirectRootComputationalDependencies const):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::isFontRelativeLength):
        (WebCore::CSSPrimitiveValue::isLength):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):
        * css/CSSToLengthConversionData.cpp:
        (WebCore::CSSToLengthConversionData::viewportWidthFactor const):
        (WebCore::CSSToLengthConversionData::viewportHeightFactor const):
        (WebCore::CSSToLengthConversionData::viewportMinFactor const):
        (WebCore::CSSToLengthConversionData::viewportMaxFactor const):
        * css/CSSToLengthConversionData.h: Replace bool 'm_computingFontSize' with Optional<CSSPropertyID> that indicates the property being computed, where none means the property being computed is unknown or unimportant to know.
        (WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add 'parentStyle' parameter, necessary for calculating lh/rlh unit values.
        (WebCore::CSSToLengthConversionData::parentStyle const):
        (WebCore::CSSToLengthConversionData::computingFontSize const):
        (WebCore::CSSToLengthConversionData::computingLineHeight const):
        (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom const):
        (WebCore::CSSToLengthConversionData::copyWithAdjustedZoomAndPropertyToCompute const):
        * css/CSSUnits.cpp:
        (WebCore::operator<<):
        * css/CSSUnits.h:
        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::evaluate const):
        * css/parser/CSSParserToken.cpp:
        (WebCore::cssPrimitiveValueUnitFromTrie):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeLength):
        * css/parser/SizesAttributeParser.cpp:
        (WebCore::SizesAttributeParser::computeLength):
        (WebCore::SizesAttributeParser::effectiveSizeDefaultValue):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::TextControlInnerElement::resolveCustomStyle):
        * rendering/RenderElement.h:
        (WebCore::RenderElement::parentStyle const):
        * rendering/RenderThemeIOS.mm:
        (WebCore::applyCommonButtonPaddingToStyle):
        (WebCore::RenderThemeIOS::adjustButtonStyle const):
        * rendering/style/RenderStyle.cpp: Extract 'computedLineHeight' behavior into separate 'computeLineHeight' function so logic can be reused elsewhere.
        (WebCore::RenderStyle::computedLineHeight const):
        (WebCore::RenderStyle::computeLineHeight const):
        * rendering/style/RenderStyle.h:
        * style/StyleBuilderConverter.h: Extract zoom calculation logic out of 'csstoLengthConversionDataWithTextZoomFactor' into separate 'zoomWithTextZoomFactor' function so logic can be reused elsewhere.
        (WebCore::Style::zoomWithTextZoomFactor):
        (WebCore::Style::BuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
        (WebCore::Style::BuilderConverter::convertLineHeight):
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyValueFontSize):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::BuilderState):

2020-04-07  Zalan Bujtas  <zalan@apple.com>

        fastclick.com: A Gradient banner is missing
        https://bugs.webkit.org/show_bug.cgi?id=210169
        <rdar://problem/60680979>

        Reviewed by Simon Fraser.

        This patch ensures that if the non-fixed specified size for the background content computes to be a close-to-zero value, we produce at least one device pixel size content.
        (and this is similar to what we do for FillSizeType::Contain/Cover.)

        Test: fast/backgrounds/generated-bck-image-with-small-relative-size.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::calculateFillTileSize const):

2020-04-07  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. remove the build warning below since r243033.
        warning: unused parameter ‘pageMuted’ [-Wunused-parameter]

        No new tests, no new behaviors.

        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::setInterrupted):

2020-04-07  Chris Fleizach  <cfleizach@apple.com>

        AX: VoiceOver can't activate combobox when textfield is inside it
        https://bugs.webkit.org/show_bug.cgi?id=210081

        Reviewed by Joanmarie Diggs.

        Change accessKeyAction to return whether a simulated click event was dispatched.
        Accessibility uses that information to decide whether it should sent an event afterwards, because
        some objects accessKeyAction is only to focus(). AX is expected here to press on the object (and possibly focus).

        Test: accessibility/activation-of-input-field-inside-other-element.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press):
        * dom/Element.h:
        (WebCore::Element::accessKeyAction):
        * html/BaseCheckableInputType.cpp:
        (WebCore::BaseCheckableInputType::accessKeyAction):
        * html/BaseCheckableInputType.h:
        * html/BaseChooserOnlyDateAndTimeInputType.cpp:
        (WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction):
        * html/BaseChooserOnlyDateAndTimeInputType.h:
        * html/BaseClickableWithKeyInputType.cpp:
        (WebCore::BaseClickableWithKeyInputType::accessKeyAction):
        * html/BaseClickableWithKeyInputType.h:
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::accessKeyAction):
        * html/HTMLAnchorElement.h:
        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::accessKeyAction):
        * html/HTMLButtonElement.h:
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::accessKeyAction):
        * html/HTMLElement.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::accessKeyAction):
        * html/HTMLInputElement.h:
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::accessKeyAction):
        * html/HTMLLabelElement.h:
        * html/HTMLLegendElement.cpp:
        (WebCore::HTMLLegendElement::accessKeyAction):
        * html/HTMLLegendElement.h:
        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::accessKeyAction):
        * html/HTMLOptGroupElement.h:
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::accessKeyAction):
        * html/HTMLOptionElement.h:
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::accessKeyAction):
        * html/HTMLSelectElement.h:
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::accessKeyAction):
        * html/HTMLTextAreaElement.h:
        * html/HiddenInputType.cpp:
        (WebCore::HiddenInputType::accessKeyAction):
        * html/HiddenInputType.h:
        * html/InputType.cpp:
        (WebCore::InputType::accessKeyAction):
        * html/InputType.h:
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::accessKeyAction):
        * html/RangeInputType.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::accessKeyAction):
        * svg/SVGElement.h:

2020-04-07  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts
        https://bugs.webkit.org/show_bug.cgi?id=209923
        <rdar://problem/61223713>

        Reviewed by Brent Fulgham.

        Covered by new tests within existing test files.

        * testing/MockWebAuthenticationConfiguration.h:
        (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl:
        Adds a new parameter to reflect user cancellations on LocalAuthentication UI.

2020-04-07  Tadeu Zagallo  <tzagallo@apple.com>

        Not using strict mode within ClassDeclaration statement
        https://bugs.webkit.org/show_bug.cgi?id=205578
        <rdar://problem/58194589>

        Reviewed by Yusuke Suzuki.

        Test: JSTests/ stress/superclass-expression-strictness.js

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::IDLOperation<JSDOMWindow>::cast):
        * bindings/js/JSEventTargetCustom.h:
        (WebCore::IDLOperation<JSEventTarget>::call):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):

2020-04-07  Simon Fraser  <simon.fraser@apple.com>

        Use RectEdges<> in some scrolling tree code
        https://bugs.webkit.org/show_bug.cgi?id=210141

        Reviewed by Tim Horton.

        Add utility functions on ScrollingTreeScrollingNode to get pinned and rubberband state.
        Use them to push main frame state to the scrolling tree (which we do so we can safely
        access the state from the EventDispatcher thread).

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::setMainFramePinnedState):
        (WebCore::ScrollingTree::setMainFrameCanRubberBand):
        (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
        (WebCore::ScrollingTree::setMainFramePinState): Deleted.
        (WebCore::ScrollingTree::setCanRubberBandState): Deleted.
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::edgePinnedState const):
        (WebCore::ScrollingTreeScrollingNode::isRubberBanding const):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinAndRubberbandState):

2020-04-07  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: Change ATK mapping of the ARIA alert and alertdialog roles
        https://bugs.webkit.org/show_bug.cgi?id=210121

        Reviewed by Chris Fleizach.

        The ARIA alert role is a live region; not a dialog/message box. In contrast,
        the ATK alert role is for dialogs such as a warning message which should be
        presented immediately to the user. Because of the similarity in role names,
        the original mappings in the Core-AAM were not ideal. They have recently
        been fixed so we need to update our implementation accordingly.

        Changed mappings
        - alertdialog from ATK_ROLE_DIALOG to ATK_ROLE_ALERT
        - alert from ATK_ROLE_ALERT to ATK_ROLE_NOTIFICATION

        Updated existing tests to reflect this change.

        * accessibility/atk/WebKitAccessible.cpp:
        (atkRole):

2020-04-07  Antti Koivisto  <antti@apple.com>

        Make StylePropertyShorthand iterable
        https://bugs.webkit.org/show_bug.cgi?id=210117

        Reviewed by Darin Adler.

        Enable modern for-loops.

        * animation/AnimationTimeline.cpp:
        (WebCore::transitionMatchesProperty):
        (WebCore::compileTransitionPropertiesInStyle):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::updateStyleIfNeededForProperty):
        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::propertyIsImportant const):
        (WebCore::MutableStyleProperties::setProperty):
        * css/StylePropertyShorthand.h:
        (WebCore::StylePropertyShorthand::begin const):
        (WebCore::StylePropertyShorthand::end const):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

2020-04-07  Chris Dumez  <cdumez@apple.com>

        documentFragment.getElementById() should not work for empty-string IDs
        https://bugs.webkit.org/show_bug.cgi?id=210111

        Reviewed by Geoffrey Garen.

        Make sure that getElementById() returns null when given an empty string ID:
        - https://dom.spec.whatwg.org/#concept-id

        Test: imported/w3c/web-platform-tests/dom/nodes/DocumentFragment-getElementById.html

        * dom/DocumentFragment.cpp:
        (WebCore::DocumentFragment::getElementById const):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::getElementById const):

2020-04-07  Timothy Hatcher  <timothy@apple.com>

        WKUserScripts deferred from injection are not injected if -[WKWebView _notifyUserScripts] is called early.
        https://bugs.webkit.org/show_bug.cgi?id=210131
        rdar://problem/61368446

        Reviewed by Brady Eidson.

        If Page::notifyToInjectUserScripts() is called early, before Frame::injectUserScripts() happens,
        m_hasBeenNotifiedToInjectUserScripts will be false, allowing scripts to build up in m_userScriptsAwaitingNotification
        and never being injected (since Page::notifyToInjectUserScripts() will not be called again).

        * page/Page.cpp:
        (WebCore::Page::notifyToInjectUserScripts): Set m_hasBeenNotifiedToInjectUserScripts to true when called.

2020-04-07  Devin Rousso  <drousso@apple.com>

        Web Inspector: unable to see cookies on pages that have subframes which have been denied access to cookies
        https://bugs.webkit.org/show_bug.cgi?id=210125
        <rdar://problem/61357992>

        Reviewed by Timothy Hatcher.

        Previously, the same boolean value was re-used when checking whether that URL and `document`
        pairs is able to access cookies, meaning that if the last check returned `false`, the logic
        would incorrectly think that none of the URL and `document` pairs would have access to any
        cookies, resulting in an empty array.

        Instead of using this all-or-nothing boolean, if a URL and `document` pair is not able to
        access cookies, simply ignore it and move on to the next pair.

        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::getCookies):

2020-04-07  Ryosuke Niwa  <rniwa@webkit.org>

        TextManipulationController fails to replace a paragraph that ends with a br
        https://bugs.webkit.org/show_bug.cgi?id=210099

        Reviewed by Wenson Hsieh.

        The bug was caused by TextManipulationController::replace not ignoring the br at the end of a paragraph
        even through it doesn't appear as a token. We also need to insert this br back at the end of the paragraph
        when completing the manipulation.

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::replace):

2020-04-07  Jer Noble  <jer.noble@apple.com>

        Make sure playback of remote audio tracks is stable even if pages are using webaudio
        https://bugs.webkit.org/show_bug.cgi?id=210052

        Reviewed by Eric Carlson.

        If a client requests data from AudioSampleDataSource, and the time requested happens to land
        precicely on the end of the AudioSampleDataSoure's CARingBuffer's range, the function will get
        into an inconsistent state where it believes both that not enough samples are available to
        fulfill the request, but also that the number of frames available is equal to the number of
        requested frames. This is due to an off-by-one error, where the end of the CARingBuffer's range
        is incorrectly treated as inclusive, rather than exclusive. All subsequent requests will start at
        sampleCount + timestamp, as if that data was returned correctly, rather than returning zeros,
        propogating the error to future requests.

        Fix this state by correctly checking if timestamp is greater-than-or-equal-to endFrame. This will
        cause the method to return zero frames, and correctly apply an offset so the next request will start
        at the same effective timestamp.

        * platform/audio/mac/AudioSampleDataSource.mm:
        (WebCore::AudioSampleDataSource::pullSamplesInternal):

2020-04-07  Alicia Boya García  <aboya@igalia.com>

        [GStreamer] Log a warning if playbin is not found
        https://bugs.webkit.org/show_bug.cgi?id=210112

        Reviewed by Philippe Normand.

        I spent quite a bit of time looking in the debugger for what ended up
        being a trivial configuration issue because there was no logging
        showing any obvious problem. Let's add it.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::isAvailable):

2020-04-07  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK] CMake find module for GTK4
        https://bugs.webkit.org/show_bug.cgi?id=210110

        Reviewed by Don Olmstead.

        No new tests needed.

        * PlatformGTK.cmake: Use the GTK::GTK imported target.

2020-04-07  Andres Gonzalez  <andresg_22@apple.com>

        Initialization of modal nodes should happen lazily, not in the AXObjectCache constructor.
        https://bugs.webkit.org/show_bug.cgi?id=210090

        Reviewed by Chris Fleizach.

        - The initialization of modal nodes was performed in the AXObjectCache
        constructor, which is not necessary. Instead, this change performs the
        initialization of the modal nodes before they are needed.
        - updateCurrentModalNode was replaced with currentModalNode, and its
        implementation cleaned up.
        - Now the initialization and update of AXObjectCached::m_modalNodesSet
        and m_currentMOdalNode is clearer.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::AXObjectCache):
        (WebCore::AXObjectCache::findModalNodes):
        (WebCore::AXObjectCache::currentModalNode const):
        (WebCore::AXObjectCache::modalNode):
        (WebCore::AXObjectCache::handleModalChange):
        (WebCore::AXObjectCache::updateCurrentModalNode): Renamed currentModalNode.
        * accessibility/AXObjectCache.h:

2020-04-07  Youenn Fablet  <youenn@apple.com>

        Remove unnecessary memory allocation from RealtimeIncomingAudioSourceCocoa::OnData
        https://bugs.webkit.org/show_bug.cgi?id=209969

        Reviewed by Eric Carlson.

        Instead of allocating a new buffer for every audio chunk and copy the audio chunk,
        Create a WebAudioBufferList once (without any buffer allocation) and set the audio buffer pointer
        given by libwebrtc as the WebAudioBufferList buffer pointer.
        We do not take care of muted state anymore since this is done by consumers anyway.
        Covered by existing tests.

        * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
        (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
        * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h:

2020-04-07  Claudio Saavedra  <csaavedra@igalia.com>

        [GTK] gtk_icon_info_free is deprecated since GTK+ 3.8
        https://bugs.webkit.org/show_bug.cgi?id=118381

        Reviewed by Carlos Garcia Campos.

        GtkIconInfo is a GObject since 3.8, update accordingly.

        * platform/graphics/gtk/ImageGtk.cpp:
        (WebCore::loadMissingImageIconFromTheme):
        * platform/gtk/GUniquePtrGtk.h:

2020-04-07  Doug Kelly  <dougk@apple.com>

        Add release asserts to KeyframeEffectStack::ensureEffectsAreSorted()
        https://bugs.webkit.org/show_bug.cgi?id=210084
        <rdar://problem/61359275>

        Reviewed by Ryosuke Niwa.

        To ensure any potential problems in KeyframeEffectStack::ensureEffectsAreSorted() are found closer to the
        root cause, add several RELEASE_ASSERTs throughout this function (and its associated comparison function).
        This should guard against null pointers/null WeakPtrs, as well as other state problems which would be
        unexpected for the comparison function used by std::sort.

        No new tests; this only adds additional asserts, so there is no change to functionality, and this code is
        covered by existing tests.

        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::ensureEffectsAreSorted):
        * animation/WebAnimationUtilities.cpp:
        (WebCore::compareAnimationsByCompositeOrder):

2020-04-07  Rob Buis  <rbuis@igalia.com>

        Use GlobalFrameIdentifier in NavigationAction
        https://bugs.webkit.org/show_bug.cgi?id=210036

        Reviewed by Darin Adler.

        Use GlobalFrameIdentifier in NavigationAction rather than adding
        yet another custom data type.

        * loader/NavigationAction.cpp:
        (WebCore::createGlobalFrameIdentifier):
        (WebCore::m_globalFrameIdentifier):
        * loader/NavigationAction.h:
        (WebCore::NavigationAction::Requester::globalFrameIdentifier const):
        (WebCore::NavigationAction::Requester::pageID const): Deleted.
        (WebCore::NavigationAction::Requester::frameID const): Deleted.

2020-04-06  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in CompositeEditCommand::splitTreeToNode when inserting image in anchor element that has uneditable parent
        https://bugs.webkit.org/show_bug.cgi?id=210004
        <rdar://problem/61206583>

        Reviewed by Ryosuke Niwa.

        RemoveNodePreservingChildren can fail and leave the children dangling if the parent of the node
        is uneditable. Added editability check for the to-be-removed node.

        Test: editing/inserting/insert-img-anchor-uneditable-parent.html

        * editing/RemoveNodePreservingChildrenCommand.cpp:
        (WebCore::RemoveNodePreservingChildrenCommand::doApply):

2020-04-06  David Kilzer  <ddkilzer@apple.com>

        Use-after-move of Vector<ManipulationToken> in TextManipulationController::observeParagraphs()
        <https://webkit.org/b/210086>

        Reviewed by Ryosuke Niwa.

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::observeParagraphs):
        - Replace WTFMove() with std::exchange() to fix the clang static
          analyzer warning.  For WTF::Vector, this has no change in
          behavior.

2020-04-06  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::lastPositionInNode when indenting text node that has user-select:all parent.
        https://bugs.webkit.org/show_bug.cgi?id=210016
        <rdar://problem/61014577>

        Reviewed by Ryosuke Niwa.

        In rangeForParagraphSplittingTextNodesIfNeeded, added null check for previousSibling()
        after splitTextNode is called, and returns empty positions to caller.

        In formatSelection, check the returned positions from rangeForParagraphSplittingTextNodesIfNeeded
        and stop indenting the rest of the paragraphs.

        Test: fast/editing/indent-pre-user-select-all-crash.html

        * editing/ApplyBlockElementCommand.cpp:
        (WebCore::ApplyBlockElementCommand::formatSelection):
        (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):

2020-04-06  Devin Rousso  <drousso@apple.com>

        Web Inspector: `console.log(...)` appear as `CONSOLE LOG LOG` in the system console
        https://bugs.webkit.org/show_bug.cgi?id=210083

        Reviewed by Timothy Hatcher.

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::addMessage):
        Use the actual `MessageSource` and `MessageType` when printing console messages.

2020-04-06  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION: 4 TestWebKitAPI.DragAndDropTests.DataTransferSetData tests failing on iOS
        https://bugs.webkit.org/show_bug.cgi?id=209685
        <rdar://problem/60987461>

        Reviewed by Megan Gardner.

        After updating a WebKit open source test runner to iOS 13.4, 4 pasteboard-related API tests began to fail in
        release builds on that particular bot. Logging statements added in r259465, r259518, r259534, and r259541
        strongly suggest that this is due to an IPC dispatch race when clearing the platform pasteboard before writing
        custom pasteboard data. On iOS, the former is dispatched asynchronously, while the latter is dispatched as sync
        IPC. This means that if the UI process happens to be waiting for a sync IPC response from the web process, it
        will end up handling the incoming IPC messages out of order by immediately dispatching sync IPC (in this case,
        writing custom pasteboard data) before dispatching the async IPC (clearing data). This causes the custom
        pasteboard data to be cleared on the platform pasteboard immediately after it is written.

        To fix this, we limit clearing pasteboard data to when we would've otherwise avoided writing any custom
        pasteboard data, and additionally make it so that writing custom pasteboard data always clears out any pre-
        existing content on the pasteboard (obviating the need for a separate message to clear the pasteboard). Note
        that writing custom pasteboard data always clears the existing pasteboard on macOS and iOS -- on macOS, we use
        `-declareTypes:owner:`; on iOS, we use `-setItemProviders:`; in the case of macCatalyst, we `-setItems:`.

        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::commitToPasteboard):

        Push the call to clear the pasteboard down from the call sites of `commitToPasteboard` into `commitToPasteboard`
        itself; then, only explicitly clear the pasteboard in the case where we aren't writing custom pasteboard data
        (i.e. either custom pasteboard data is disabled, or there is no data to write),

        (WebCore::DataTransfer::moveDragState): See above.
        * editing/Editor.cpp:
        (WebCore::dispatchClipboardEvent): See above.
        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard stageRegistrationLists:]):

        Remove always-on logging added in r259541 to help diagnose the test failures.

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

        Delete line boxes when moving text renderers between block flows
        https://bugs.webkit.org/show_bug.cgi?id=210000

        Reviewed by Antti Koivisto.

        After style and/or tree mutation the existing line boxes are destroyed during the subsequent layout.
        When the text renderer moves between block flows and the destination block flow initiates a different
        type of line layout, we need to make sure the previous line content is cleaned up properly.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutSimpleLines):
        (WebCore::RenderBlockFlow::layoutLFCLines):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::removeAndDestroyTextBoxes):
        (WebCore::RenderText::dirtyLineBoxes):
        (WebCore::RenderText::deleteLineBoxes):
        * rendering/RenderText.h:

2020-04-06  Ross Kirsling  <ross.kirsling@sony.com>

        Update minimum ICU version to 60.2
        https://bugs.webkit.org/show_bug.cgi?id=209694

        Reviewed by Darin Adler.

        * PlatformMac.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * icu/LICENSE: Deleted.
        * icu/README: Deleted.
        Remove leftover files following r219155 as well as a corresponding Xcode step.

        * editing/cocoa/DataDetection.mm:
        (WebCore::buildQuery):
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::interpretationsForCurrentRoot const):
        * platform/cocoa/KeyEventCocoa.mm:
        (WebCore::keyForCharCode):
        * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
        (WebCore::TelephoneNumberDetector::find):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::createFontForCharacters):
        (WebCore::FontCache::prewarm):
        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
        (WebCore::provideStringAndAttributes):
        * platform/graphics/mac/GlyphPageMac.cpp:
        (WebCore::GlyphPage::fill):
        Manually convert between UChar and UniChar/unichar where needed.

        * platform/text/CharacterProperties.h:
        (WebCore::isEmojiGroupCandidate):
        (WebCore::isEmojiWithPresentationByDefault):
        (WebCore::isEmojiModifierBase):
        (WebCore::icuLibraryUnderstandsSupplementalSymbolsAndPictographs): Deleted.
        Remove obsoleted compile-time and runtime version checks.

2020-04-06  Simon Fraser  <simon.fraser@apple.com>

        Make ScrollableArea TextStream-loggable
        https://bugs.webkit.org/show_bug.cgi?id=210042

        Reviewed by Darin Adler.

        ScrollableArea is a pure virtual base class, so has to dump via a virtual function,
        so add debugDescription() and implement it in derived classes.

        Make the common pattern be that operator<<(TextStream&, ...) calls debugDescription.

        * page/Frame.cpp:
        (WebCore::Frame::debugDescription const):
        (WebCore::operator<<):
        * page/Frame.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::debugDescription const):
        (WebCore::operator<<):
        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::debugDescription const):
        * platform/ScrollView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::operator<<):
        * platform/ScrollableArea.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::debugDescription const):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::debugDescription const):
        * rendering/RenderListBox.h:

2020-04-06  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary with draggable text
        https://bugs.webkit.org/show_bug.cgi?id=209999
        <rdar://problem/58978340>

        Reviewed by Ryosuke Niwa.

        VisibleParagraphStart/End may return empty VisiblePosition if no proper element or node
        can be used as position candidate. Add null check for the returned VisiblePositions.

        Test: fast/css/style-change-draggable-text.html

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):

2020-04-06  Jer Noble  <jer.noble@apple.com>

        Strengthen the ASSERT in ImageDecoderAVFObjC::storeSampleBuffer().
        https://bugs.webkit.org/show_bug.cgi?id=209972
        <rdar://problem/60727431>

        Reviewed by Brent Fulgham.

        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):

2020-04-06  Jer Noble  <jer.noble@apple.com>

        [ Mac wk2 ] http/tests/media/track-in-band-hls-metadata.html is flaky crashing.
        https://bugs.webkit.org/show_bug.cgi?id=209490
        <rdar://problem/60837555>

        Reviewed by Darin Adler.

        To ensure the TaskDispatcher doesn't get destroyed on a background thread at the same time it's
        executing tasks on the main thread, when a GenericTaskQueue is destroyed on a background thread,
        move the TaskDispatcher into a task, and use the dispatcher itself to destroy itself on the
        main thread.

        * platform/GenericTaskQueue.h:
        (WebCore::GenericTaskQueue::GenericTaskQueue):
        (WebCore::GenericTaskQueue::~GenericTaskQueue):
        (WebCore::GenericTaskQueue::enqueueTask):

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

        'currentcolor' doesn't need setHasExplicitlyInheritedProperties marking anymore
        https://bugs.webkit.org/show_bug.cgi?id=210017

        Reviewed by Darin Adler.

        Removing this marking reveals problems in style update avoidance code in CSSComputedStyleDeclaration
        that also need to be addressed. The problems are not specific to exlicit 'currentcolor', they also reproduce
        with the initial value (thus the new test).

        Test: fast/css/currentColor-initial-style-update.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::nonInheritedColorPropertyHasValueCurrentColor):

        Add a helper.

        (WebCore::hasValidStyleForProperty):

        Treat a non-inherited color property as inherited if it is 'currentcolor'.

        (WebCore::updateStyleIfNeededForProperty):

        Expand shorthands so properties like border-color test correctly.

        * css/CSSProperty.cpp:
        (WebCore::CSSProperty::isColorProperty):

        Move here from CSSParserFastPaths.

        * css/CSSProperty.h:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::maybeParseValue):
        (WebCore::isColorPropertyID): Deleted.
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::unresolvedColorForProperty const):

        Factor into a helper.
        Handle all color values.

        (WebCore::RenderStyle::colorResolvingCurrentColor const):

        Renamed for clarity and some cleanups.

        (WebCore::RenderStyle::visitedDependentColor const):
        (WebCore::RenderStyle::colorIncludingFallback const): Deleted.
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::isCurrentColor):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::colorFromPrimitiveValue const):

        Remove setHasExplicitlyInheritedProperties marking.

2020-04-06  Simon Fraser  <simon.fraser@apple.com>

        Make RenderObject TextStream-loggable
        https://bugs.webkit.org/show_bug.cgi?id=210035

        Post-landing followup. More use of StringBuilder's variadic append. Have Node::debugDescription() include
        its address, and have derived classes get the base class debugDescription(). Add an override in Text.

        * dom/Element.cpp:
        (WebCore::Element::debugDescription const):
        * dom/Node.cpp:
        (WebCore::Node::debugDescription const):
        * dom/Text.cpp:
        (WebCore::Text::debugDescription const):
        (WebCore::Text::formatForDebugger const):
        * dom/Text.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::debugDescription const):

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

        The change of zoom shouldn't affect ResizeObserverSize
        https://bugs.webkit.org/show_bug.cgi?id=209947

        Reviewed by Simon Fraser.

        Zoom in/out shouldn't affect ResizeObserverSize. Use adjustLayoutUnitForAbsoluteZoom instead.

        Test: imported/w3c/web-platform-tests/resize-observer/resize-observer-with-zoom.html

        * page/ResizeObservation.cpp:
        (WebCore::ResizeObservation::computeObservedSize const):

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

        [Web Animations] Move Document.getAnimations() to DocumentOrShadowRoot
        https://bugs.webkit.org/show_bug.cgi?id=202192
        <rdar://problem/55697775>

        Reviewed by Antti Koivisto.

        We remove the getAnimations() declaration from the Document interface and instead move it on the DocumentOrShadowRoot interface.

        We add the new method Document::matchingAnimations() which takes a lambda that is provided an animation's effect's target to determine whether
        that animation should be found in the list of animations.

        In the case of Document::getAnimations(), we filter out animations targeting elements hosted in shadow roots, while in ShadowRoot:getAnimations(),
        we filter out animations targeting elements that are not hosted in the shadow root the method was called on.

        * dom/Document.cpp:
        (WebCore::Document::getAnimations):
        (WebCore::Document::matchingAnimations):
        * dom/Document.h:
        * dom/Document.idl:
        * dom/DocumentOrShadowRoot.idl:
        * dom/Element.cpp:
        (WebCore::Element::getAnimations):
        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::getAnimations):
        * dom/ShadowRoot.h:

2020-04-04  Darin Adler  <darin@apple.com>

        Stop using live ranges in DocumentMarkerController
        https://bugs.webkit.org/show_bug.cgi?id=209985

        Reviewed by Antti Koivisto.

        - Removed uses of live ranges from DocumentMarkerController.
        - Removed "active/inactive text match marker", which was only ever used
          by Chromium, and has been dead code in WebKit for while now.
        - Made a replacement for Range::absoluteTextQuads, in RenderObject,
          and moved all callers over.
        - Added a fast path for Node::isCharacterDataNode that makes it work
          without a virtual function call for the common node types.
        - Added a Node::length function that matches the DOM specification's
          definiton of a node's length, part of how ranges are defined.
        - Added a structure OffsetRange to represent start/end offsets within
          a single character data node. This is a common idiom to handle possible
          partial selection of text nodes at the start and end of the range when
          iterating text within a range.
        - Changed DocumentMarker functions to use OffsetRange.
        - Added helper functions for turning a vector of quads into a vector
          of bounding box rectangles, and for computing a union of all the
          rectangles, since both of these are common coding patterns.
        - Added an intersectingNodes function, producing a for-loop-compatible
          range for iterating all nodes covered by a DOM range.
        - Changed RenderObject::SetLayoutNeededForbiddenScope so it can be used
          without an #if at each call site, expands to nothing in release builds.
        - Eliminated uses of RetainPtr<id> instead of just id to pass arguments.

        * dom/CharacterData.h: Updated since isCharacterDataNode is no longer a
        virtual function.

        * dom/Document.cpp:
        (WebCore::Document::textInserted): Pass an OffsetRange to removeMarkers.
        (WebCore::Document::textRemoved): Ditto.

        * dom/DocumentMarker.h: Removed most platform-specific functions.
        Removed the active match boolean, which was only ever used for Chromium.
        Use OffsetRange. Updated some obsolete comments.

        * dom/DocumentMarkerController.cpp: Removed include of "Range.h".
        (WebCore::DocumentMarkerController::collectTextRanges): Change return value
        to return a structure with a node and an offset range rather than using a
        SimpleRange; adds clarity to the fact that it's guranteed to be only a
        single node. May even want to consider some day moving TextIterator over
        to this, but it's definitely better here for now.
        (WebCore::DocumentMarkerController::addMarker): Updated for the change to
        collectTextRanges and to DocumentMarker construction, and to use construction
        syntax that doesn't repeat the DocumentMarker class name. Deleted overloads
        that are no longer needed.
        (WebCore::DocumentMarkerController::addMarkerToNode): Ditto.
        (WebCore::DocumentMarkerController::addTextMatchMarker): Ditto.
        (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker): Deleted.
        (WebCore::DocumentMarkerController::addDictationResultMarker): Deleted.
        (WebCore::DocumentMarkerController::addDraggedContentMarker): Updated as above.
        (WebCore::DocumentMarkerController::addPlatformTextCheckingMarker): Deleted.
        (WebCore::DocumentMarkerController::copyMarkers): Fix a mistake where copying
        markers would have a side effect of modifying the original.
        (WebCore::DocumentMarkerController::removeMarkers): Just have this call
        filterMarkers with null for the function.
        (WebCore::DocumentMarkerController::filterMarkers): Updated for the change to
        collectTextRanges and to pass a OffsetRange.
        (WebCore::updateRenderedRectsForMarker): Use SimpleRange instead of a live
        range. Use the new RenderObject::absoluteTextQuads and boundingBoxes functions
        to make this clearer and simpler.
        (WebCore::shouldInsertAsSeparateMarker): Update for changes to DocumentMarker.
        (WebCore::DocumentMarkerController::copyMarkers): Take an OffsetRange instead
        of a start and length. Also removed the unused "delta" argument since all
        callers were passing 0.
        (WebCore::DocumentMarkerController::removeMarkers): Removed unneeded
        check if a key is still in the map.
        (WebCore::DocumentMarkerController::forEach): Added. Shared logic for the multiple
        functions that iterate the markers covered by a SimpleRange.
        (WebCore::DocumentMarkerController::markersInRange): Call forEach.
        (WebCore::DocumentMarkerController::repaintMarkers): Simplified loops.
        (WebCore::DocumentMarkerController::setMarkersActive): Deleted. Was only
        used for Chromium and has been dead code since.
        (WebCore::DocumentMarkerController::hasMarkers): Call forEach.
        (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
        Call forEach.
        * dom/DocumentMarkerController.h: Updated for the above.

        * dom/Element.cpp:
        (WebCore::Element::boundsInRootViewSpace): Use unitedBoundingBoxes.
        (WebCore::Element::absoluteEventBounds): Ditto.
        (WebCore::Element::boundingAbsoluteRectWithoutLayout): Ditto.

        * dom/Node.h: Added inline fast path for isCharacterDataNode.
        Moved some inline function bodies out of class definition so it's
        easier to read it and get an overview.

        * dom/Range.cpp:
        (WebCore::Range::absoluteRectsForRangeInText const): Use boundingBoxes.
        (WebCore::Range::absoluteTextQuads const): Deleted.
        (WebCore::Range::borderAndTextRects const): Use boundingBoxes.

        * dom/Range.h: Deleted absoluteTextQuads.

        * dom/RenderedDocumentMarker.h: Use rvalue references and move.

        * dom/SimpleRange.cpp:
        (WebCore::fastIsCharacterData): Deleted. Moved the optimizations into
        Node::isCharacterDataNode so now all callers get them.
        (WebCore::length): Deleted. Moved to Node::length.
        (WebCore::makeBoundaryPointAfterNodeContents): Use Node::length.
        (WebCore::IntersectingNodeRange::first const): Added.
        (WebCore::IntersectingNodeRange::sentinel const): Added.
        (WebCore::characterDataOffsetRange): Added.
        (WebCore::IntersectingNodeIterator::operator++): Added.

        * dom/SimpleRange.h: Added intersectingNodes function, and the
        IntersectingNodeRange and IntersectingNodeIterator classes used
        to make it work. Added the OffsetRange structure and the
        characterDataOffsetRange function, also to help with iteration.

        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
        Take out unneeded holds_alternative check.
        (WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
        Removed unneeded assertion.
        (WebCore::AlternativeTextController::dictationAlternativesForMarker):
        Removed unneeded assertion.
        (WebCore::AlternativeTextController::applyDictationAlternative):
        Removed unneeded local variables.
        (WebCore::AlternativeTextController::show): Pass reference to range
        rather than pointer to rootViewRectForRange.
        (WebCore::AlternativeTextController::timerFired): Ditto.
        (WebCore::AlternativeTextController::rootViewRectForRange const):
        Take a SimpleRange instead of a live range. Also use
        RenderObject::absoluteTextQuads and unitedBoundingBoxes.
        * editing/AlternativeTextController.h: Updated for above.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
        Removed most of the code since we can copy marker data without
        separate code for each type. Also use SimpleRange instead of a live range.

        * editing/DictationCommand.cpp: Call addMarker instead of
        addMarkerToNode.

        * editing/Editing.cpp:
        (WebCore::visiblePositionForIndexUsingCharacterIterator): Use
        SimpleRange instead of a live range.

        * editing/Editor.cpp:
        (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
        Removed a local variable.

        * editing/Editor.h: Remove use of RetainPtr<id> for arguments.

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::getTextRectangles const): Deleted.
        (WebCore::FrameSelection::getClippedVisibleTextRectangles const):
        Merged the logic from getTextRectangles in here, and changed to
        use RenderObject::absoluteTextQuads and boundingBoxes.
        * editing/FrameSelection.h: Updated for above.

        * editing/SplitTextNodeCommand.cpp:
        (WebCore::SplitTextNodeCommand::doApply): Updated for changes to
        the copyMarkers function.
        (WebCore::SplitTextNodeCommand::doUnapply): Ditto.

        * editing/cocoa/DataDetection.mm:
        (WebCore::detectItemAtPositionWithRange): Use
        RenderObject::absoluteTextQuads and unitedBoundingBoxes.

        * editing/ios/DictationCommandIOS.cpp:
        (WebCore::DictationCommandIOS::DictationCommandIOS): Remove use of
        RetainPtr<id> for arguments.
        (WebCore::DictationCommandIOS::create): Move from header.
        (WebCore::DictationCommandIOS::doApply): Updated to do the work here
        since we don't have addDictationPhraseWithAlternativesMarker any more.
        Specifically, remove the first interpretation, which leaves behind a
        vector of alternatives. Same for addDictationResultMarker.
        * editing/ios/DictationCommandIOS.h: Updated for the above.

        * editing/ios/EditorIOS.mm:
        (WebCore::Editor::insertDictationPhrases): Take id instead of
        RetainPtr<id>.
        (WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed
        around since we don't have addDictationPhraseWithAlternativesMarker
        or addDictationResultMarker any more.

        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents): Update for changes to
        SetLayoutNeededForbiddenScope.

        * page/ios/FrameIOS.mm:
        (WebCore::Frame::interpretationsForCurrentRoot const):
        Get alternatives directly from DocumentMarker::data, now that
        there is not a separate DocumentMarker::alternatives function.

        * page/mac/ServicesOverlayController.mm:
        (WebCore::textQuadsToBoundingRectForRange): Deleted.
        (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
        Use RenderObject::absoluteTextQuads, unitedBoundingBoxes,
        and enclosingIntRect to do what textQuadsToBoundingRectForRange did.

        * platform/SerializedPlatformDataCueValue.h: Remove definition of
        id since that's now done in RetainPtr.h.

        * platform/graphics/FloatQuad.cpp:
        (WebCore::boundingBoxes): Added.
        (WebCore::unitedBoundingBoxes): Added.
        * platform/graphics/FloatQuad.h: A couple tweaks, plus declared the
        functions above.

        * platform/network/ResourceHandle.h: Remove definition of
        id since that's now done in RetainPtr.h.
        * platform/network/cf/AuthenticationChallenge.h: Ditto.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::resolveStyleForMarkedText): Take out
        isActiveMatch logic that was used for Chromium only.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::minPreferredLogicalWidth const): Update for
        changes to SetLayoutNeededForbiddenScope.
        (WebCore::RenderBox::maxPreferredLogicalWidth const): Ditto.
        * rendering/RenderCounter.cpp:
        (WebCore::RenderCounter::computePreferredLogicalWidths): Ditto.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintIntoLayer): Ditto.

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
        Changed to take a const& instead of a *.
        (WebCore::RenderObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope):
        Ditto.
        (WebCore::RenderObject::markContainingBlocksForLayout): Update for
        changes to SetLayoutNeededForbiddenScope.
        (WebCore::RenderObject::absoluteBoundingBoxRect const): Use
        unitedBoundingBoxes and enclosingIntRect.
        (WebCore::RenderObject::absoluteBoundingBoxRectForRange): Use
        the new RenderObject::absoluteTextQuads and unitedBoundingBoxes.
        (WebCore::RenderObject::absoluteTextQuads): Added. Moved here from
        Range::absoluteTextQuads, but refactored for simplicity and removed
        the unused, and mildly complex to implement, feature that would
        indicate whether some or all of the quads were from fixed positioning.

        * rendering/RenderObject.h: Tweaked comments. Moved multi-line function
        bodies out of the RenderObject class definition to make it easier to
        read. Declared a new absoluteTextQuads function. Made
        m_setNeedsLayoutForbidden so setNeedsLayoutIsForbidden can be const.
        Conditionalized isSetNeedsLayoutForbidden and SetLayoutNeededForbiddenScope
        so both can be used in production builds but expand to no code.

        * rendering/RenderReplaced.cpp:
        (WebCore::draggedContentContainsReplacedElement): Simplified and updated
        now that the dragged content data no longer has its own named structure.
        (WebCore::RenderReplaced::paint): Update for changes to
        SetLayoutNeededForbiddenScope.
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::calcRowLogicalHeight): Ditto.
        (WebCore::RenderTableSection::layoutRows): Ditto.

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::textSearchHighlightColor const): Removed the Chromium-only
        concept of active vs. inactive text search highlight colors.
        (WebCore::RenderTheme::platformTextSearchHighlightColor const): Ditto.
        (WebCore::RenderTheme::activeTextSearchHighlightColor const): Deleted.
        (WebCore::RenderTheme::inactiveTextSearchHighlightColor const): Deleted.
        (WebCore::RenderTheme::platformActiveTextSearchHighlightColor const): Deleted.
        (WebCore::RenderTheme::platformInactiveTextSearchHighlightColor const): Deleted.
        * rendering/RenderTheme.h: Ditto.
        * rendering/RenderThemeMac.h: Ditto.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::platformTextSearchHighlightColor const): Ditto.
        (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Deleted.
        (WebCore::RenderThemeMac::platformInactiveTextSearchHighlightColor const): Deleted.

        * testing/Internals.cpp:
        (WebCore::Internals::addTextMatchMarker): Deleted. Was only used for a test
        of Chromium-specific scroll tick marks.
        * testing/Internals.h: Deleted addTextMatchMarker.
        * testing/Internals.idl: Ditto.

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

        Remove instance fields and methods from StyleColor
        https://bugs.webkit.org/show_bug.cgi?id=210045

        Reviewed by Zalan Bujtas.

        They are unused. The type itself remains as a namespace for static functions.
        We might want bring it back later but there is no need to leave dead code around now.

        * css/StyleColor.h:
        (WebCore::StyleColor::StyleColor): Deleted.
        (WebCore::StyleColor::currentColor): Deleted.
        (WebCore::StyleColor::isCurrentColor const): Deleted.
        (WebCore::StyleColor::getColor const): Deleted.
        (WebCore::StyleColor::resolve const): Deleted.
        (WebCore::operator==): Deleted.
        (WebCore::operator!=): Deleted.

2020-04-06  Said Abou-Hallawa  <sabouhallawa@apple.com>

        CanvasRenderingContext2D.drawImage should ignore the EXIF orientation if the image-orientation is none
        https://bugs.webkit.org/show_bug.cgi?id=209849

        Reviewed by Darin Adler.

        drawImage() will get the image-orientation of the HTMLImageElement from
        its computed style. This will be passed to GraphicsContext::drawImage()
        in the ImagePaintingOptions. Previously we were passing FromImage always.

        Test: fast/images/image-orientation-none-canvas.html

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        * html/canvas/CanvasRenderingContext2DBase.h:

2020-04-05  Rob Buis  <rbuis@igalia.com>

        Remove code that has no effect from loadURL
        https://bugs.webkit.org/show_bug.cgi?id=210029

        Reviewed by Darin Adler.

        Remove setDomainForCachePartition from loadURL since it will be
        overwritten in DocumentLoader::loadMainResource, this was
        introduced by r213126.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):

2020-04-05  Manuel Rego Casasnovas  <rego@igalia.com>

        Computed style for "outline-offset" is wrong when "outline-style" is "none"
        https://bugs.webkit.org/show_bug.cgi?id=209913

        Reviewed by Daniel Bates.

        Computed style for outline-offset was not returning the proper value
        if "outline-style" was "none".
        This was due to a check in RenderStyle::outlineOffset()
        that this patch removes.

        This code could be there because this is needed for "outline-width"
        as specified in the spec (https://drafts.csswg.org/css-ui/#outline-props),
        however there's nothing about this on the "outline-offset" property.

        Test: imported/w3c/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::outlineOffset const):

2020-04-05  Peng Liu  <peng.liu6@apple.com>

        The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
        https://bugs.webkit.org/show_bug.cgi?id=204979

        Reviewed by Darin Adler.

        We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
        "#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerViewController initWithFullscreenInterface:]):
        (VideoFullscreenInterfaceAVKit::doEnterFullscreen):

2020-04-05  Wenson Hsieh  <wenson_hsieh@apple.com>

        Address review comments after r259550
        https://bugs.webkit.org/show_bug.cgi?id=208472

        Reviewed by Darin Adler.

        * platform/ios/ValidationBubbleIOS.mm:

        Change a few named constants to be `constexpr` instead, and add comments describing their purpose.

        (label):
        (updateLabelFrame):

        Rename these helper functions and move them up the file. Turn what was previously named
        `WebValidationBubbleViewController_labelFrame` into `updateLabelFrame`, and have it additionally update the
        view controller's label's frame to avoid repeating this logic in the subclassed method implementations below.

        (callSuper):
        (WebValidationBubbleViewController_viewDidLoad):
        (WebValidationBubbleViewController_viewWillLayoutSubviews):
        (WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
        (allocWebValidationBubbleViewControllerInstance):

        Instead of using `-valueForKey`, use `objc_getAssociatedObject` and `objc_setAssociatedObject`, with
        `OBJC_ASSOCIATION_RETAIN_NONATOMIC`.

        (WebCore::ValidationBubble::ValidationBubble):
        (invokeUIViewControllerSelector): Deleted.
        (WebValidationBubbleViewController_dealloc): Deleted.

        Remove the -dealloc override. We don't need this anymore, since we're now using associated objects with
        `OBJC_ASSOCIATION_RETAIN_NONATOMIC` to hold on to and keep track of our label.

        (WebValidationBubbleViewController_labelFrame): Deleted.
        (WebValidationBubbleViewController_label): Deleted.

2020-04-05  Simon Fraser  <simon.fraser@apple.com>

        Make RenderObject TextStream-loggable
        https://bugs.webkit.org/show_bug.cgi?id=210035

        Reviewed by Zalan Bujtas.

        Add operator<<(TextStream, const RenderObject&) and add virtual debugDescription() functions on
        Node and RenderObject which should eventually replace the awkward formatForDebugger(char* buffer, unsigned length).

        Convert RenderLayer to use renderer's debug description.

        * dom/Element.cpp:
        (WebCore::Element::debugDescription const):
        * dom/Element.h:
        * dom/Node.cpp:
        (WebCore::Node::debugDescription const):
        (WebCore::operator<<):
        * dom/Node.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::name const):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::debugDescription const):
        (WebCore::operator<<):
        * rendering/RenderObject.h:

2020-04-05  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed, adding missing header inclusions to get
        non-unified build building.

        * html/HTMLCanvasElement.cpp:
        * loader/ResourceLoadNotifier.h:
        * workers/service/ServiceWorkerProvider.h:

2020-04-05  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Ugly and misaligned form validation bubble
        https://bugs.webkit.org/show_bug.cgi?id=208472
        <rdar://problem/59984027>

        Reviewed by Tim Horton.

        In iOS 13, the view of a `UIViewController` that is presented as a popover encompasses the arrow (connected to
        the popover) that points to the target rect. This means that our current logic for laying out the inner text
        label of a form validation bubble on iOS no longer works, since it sets a frame that is offset vertically and
        horizontally from the bounds of the view controller's view.

        To fix this, we need to respect the safe area insets of the view controller's view when laying out the label.
        The idiomatic way to do this is to subclass -viewSafeAreaInsetsDidChange and -viewWillLayoutSubviews on the view
        controller, and update the subview's (i.e. label's) frame; unfortunately, since ValidationBubble is implemented
        in WebCore, we can't explicitly link against UIKit, so we need to dynamically create a UIViewController subclass
        and override these subclassing hooks to get our desired behavior.

        * platform/ValidationBubble.h:
        * platform/ios/ValidationBubbleIOS.mm:
        (invokeUIViewControllerSelector):
        (WebValidationBubbleViewController_dealloc):
        (WebValidationBubbleViewController_viewDidLoad):
        (WebValidationBubbleViewController_viewWillLayoutSubviews):
        (WebValidationBubbleViewController_viewSafeAreaInsetsDidChange):
        (WebValidationBubbleViewController_labelFrame):
        (WebValidationBubbleViewController_label):
        (allocWebValidationBubbleViewControllerInstance):

        Subclass and create a custom UIViewController to ensure that the label is vertically centered in its popover.
        See above for more details.

        (WebCore::ValidationBubble::ValidationBubble):
        (WebCore::ValidationBubble::show):

        Minor style fixes: remove extraneous `.get()`s on `RetainPtr`, and use property syntax when possible.

        (WebCore::ValidationBubble::setAnchorRect):

        Additionally remove a line of code that currently forces the form validation popover to present below its target
        rect (and therefore have an arrow pointing up). It wasn't apparent why this logic was added in r208361, but it
        seems the intention wasn't to restrict the popover to presenting below the target.

        This allows the form validation popover to show up in the case where the input element is aligned to the very
        bottom of the web view, such that there isn't enough space below the field to show the validation bubble.

2020-04-04  Rob Buis  <rbuis@igalia.com>

        Remove LockHistory parameter from loadWithNavigationAction
        https://bugs.webkit.org/show_bug.cgi?id=210007

        Reviewed by Darin Adler.

        Remove LockHistory parameter from loadWithNavigationAction since NavigationAction
        has a member for this. Where needed explicitly set the LockHistory on the actions.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::loadPostRequest):
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        * loader/FrameLoader.h:

2020-04-04  David Kilzer  <ddkilzer@apple.com>

        Build fix v2: HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
        https://bugs.webkit.org/show_bug.cgi?id=209925

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::elementFromPastNamesMap const):
        (WebCore::HTMLFormElement::addToPastNamesMap):
        - Apply macros consistently.  Regressed in r259513 and was
          not fixed by r259527.

2020-04-04  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add a fourth round of logging to help diagnose <webkit.org/b/209685>
        https://bugs.webkit.org/show_bug.cgi?id=210011

        Reviewed by Darin Adler.

        Augment logging in WebItemProviderPasteboard to additionally dump a backtrace when registering item providers
        when initiating a drag on iOS. Logging thus far suggests that this is due to an IPC dispatch race when sending
        the following messages to the UI process: `WebPasteboardProxy::writeCustomData` and
        `WebPasteboardProxy::writeStringToPasteboard`. While `writeCustomData` is dispatched synchronously,
        `writeStringToPasteboard` is dispatched asynchronously; this means that it is possible for the call to
        `writeCustomData` to be dispatched before `writeStringToPasteboard` even if the web process sends the
        `writeCustomData` message later, due to the UI-process-side mechanism for immediately dispatching incoming sync
        IPC if it is currently processing sync IPC itself.

        A backtrace here should help to confirm this theory.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard stageRegistrationLists:]):

2020-04-04  Doug Kelly  <dougk@apple.com>

        Additional sanity checks in compareAnimationsByCompositeOrder()
        https://bugs.webkit.org/show_bug.cgi?id=209996

        Reviewed by Geoffrey Garen.

        compareAnimationsByCompositeOrder() is used by std::sort() which requires strict weak ordering.
        This adds additional checks to ensure strict weak ordering is maintained, first by ensuring
        the transitionProperty string is different before returning that comparison, then by only using
        if the animation is a CSSTransition or CSSAnimation if the left hand and right hand sides differ.
        This should leave all remaining cases to sort by the global animation list.

        No new tests; this should be covered by existing tests and should not change functionality
        otherwise.

        * animation/WebAnimationUtilities.cpp:
        (WebCore::compareAnimationsByCompositeOrder):

2020-04-04  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add even more logging to try and diagnose <webkit.org/b/209685>
        https://bugs.webkit.org/show_bug.cgi?id=210008

        Reviewed by Tim Horton.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard stageRegistrationLists:]):

2020-04-04  Myles C. Maxfield  <mmaxfield@apple.com>

        Ahom text is busted
        https://bugs.webkit.org/show_bug.cgi?id=209898
        <rdar://problem/60571257>

        Reviewed by Tim Horton.

        https://en.wikipedia.org/wiki/Ahom_language

        The Ahom language, U+11700 - U+1173F, requires the complex text codepath.
        This patch also makes some languages adjacent in codepoint-space (Dogra,
        Dives Akuru, Nandinagari, Zanabazar Square, Soyombo, Warang Citi, and
        Pau Cin Hau) use the complex path too.

        At some point, we really need to make the fast text codepath opt-in instead
        of opt-out. This patch is a simple band-aid fix until we can do that.

        No new tests because I can't find an appropriately licenced font.
        There is Noto Serif Ahom, but that's licenced under SIL OFL, and I'm
        not sure if that's an acceptable license to be committed to WebKit.
        https://github.com/googlefonts/noto-fonts/tree/master/hinted/NotoSerifAhom

        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::characterRangeCodePath):

2020-04-04  Antti Koivisto  <antti@apple.com>

        Implement the css-color-4 behavior for inheritance of currentColor
        https://bugs.webkit.org/show_bug.cgi?id=193171
        <rdar://problem/47287516>

        Reviewed by Simon Fraser.

        In CSS3/4 'currentcolor' inherits as 'currentcolor' instead of as a resolved color value.

        Value 'currentcolor' is represented in RenderStyle as invalid Color object. This has been true
        even before the explicit property value for it was added. Fallback to 'color' has always been
        the default behavior of most color properties.

        As a result the correct behavior falls pretty easily from WebKit code. It essentially amounts to allowing
        color properties to inherit normally even when they are invalid/currentcolor.

        In future we might want to wrap RenderStyle color values into a type that makes 'currentcolor' more explicit.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::gradientWithStylesResolved):
        * css/CSSProperties.json:

        - Remove 'no-default-color' which triggered to old inheritance behavior.
        - Rename initial value invalidColor to currentColor for clarity.

        * css/makeprop.pl:

        Code for 'no-default-color' generation is not needed anymore.

        (generateInheritValueSetter):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::colorIncludingFallback const):

        Resolve 'background-color' like the rest so setting it to 'currentcolor' works correctly.

        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::currentColor):
        (WebCore::RenderStyle::invalidColor): Deleted.
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::createFilterOperations):
        (WebCore::Style::BuilderState::colorFromPrimitiveValue const):

        Don't resolve 'currentcolor', instead return it as a value.

        (WebCore::Style::BuilderState::colorFromPrimitiveValueWithResolvedCurrentColor const):

        Helper for a few cases where we still resolve current color during style building time. It is
        used for filters and generated images.

        * style/StyleBuilderState.h:
        * svg/SVGStopElement.cpp:
        (WebCore::SVGStopElement::stopColorIncludingOpacity const):

        Resolve 'currentcolor' during use time for svg color stops.

2020-04-04  Peng Liu  <peng.liu6@apple.com>

        REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
        https://bugs.webkit.org/show_bug.cgi?id=209680

        Reviewed by Jer Noble.

        API test: WebKitLegacy.PreemptVideoFullscreen

        Call fullscreenModeChanged(VideoFullscreenModeNone) right before calling the
        functions of ChromeClient to make sure the state (m_videoFullscreenMode)
        has the expected value when some callbacks come back to the video element.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::dispatchEvent):
        (WebCore::HTMLMediaElement::exitFullscreen):

        Add null pointer checkings to fix two crashes found in stress tests.
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (VideoFullscreenControllerContext::requestVideoContentLayer):
        (VideoFullscreenControllerContext::returnVideoContentLayer):

2020-04-03  David Kilzer  <ddkilzer@apple.com>

        Build fix: HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
        https://bugs.webkit.org/show_bug.cgi?id=209925

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::elementFromPastNamesMap const):
        - Apply macros consistently.  Regressed in r259513.

2020-04-03  Jack Lee  <shihchieh_lee@apple.com>

        Protect contentFrame in SubframeLoader::loadOrRedirectSubframe with RefPtr.
        https://bugs.webkit.org/show_bug.cgi?id=127096
        <rdar://problem/61221941>

        Reviewed by Alex Christensen.

        ContentFrame is used throughout loadOrRedirectSubframe so it needs to be protected with RefPtr.
        And if loader changes frame in SubframeLoader::loadSubframe, return nullptr to notify the caller.

        No new tests, covered by existing test.

        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadOrRedirectSubframe):
        (WebCore::SubframeLoader::loadSubframe):
        * loader/SubframeLoader.h:

2020-04-03  Alex Christensen  <achristensen@webkit.org>

        Add SPI to make WKUserScripts wait for a notification
        https://bugs.webkit.org/show_bug.cgi?id=209845
        <rdar://problem/60342299>

        Reviewed by Chris Dumez.

        There's also SPI on WKWebView to provide this notification, and on WKWebViewConfiguration to start out with this notification.

        * dom/ExtensionStyleSheets.cpp:
        (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::createDocumentStructure):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocumentParser::createDocumentStructure):
        * html/PluginDocument.cpp:
        (WebCore::PluginDocumentParser::createDocumentStructure):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::finishedParsing):
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScripts):
        (WebCore::Frame::injectUserScriptImmediately):
        * page/Page.cpp:
        (WebCore::m_deviceOrientationUpdateProvider):
        (WebCore::Page::notifyToInjectUserScripts):
        (WebCore::Page::addUserScriptAwaitingNotification):
        (WebCore::Page::injectUserStyleSheet):
        (WebCore::Page::removeInjectedUserStyleSheet):
        * page/Page.h:
        (WebCore::Page::hasBeenNotifiedToInjectUserScripts const):
        * page/PageConfiguration.h:
        * page/UserContentTypes.h:
        (): Deleted.
        * page/UserScript.h:
        (WebCore::UserScript::UserScript):
        (WebCore::UserScript::waitForNotificationBeforeInjecting const):
        (WebCore::UserScript::encode const):
        (WebCore::UserScript::decode):
        * page/UserScriptTypes.h:
        (): Deleted.
        * page/UserStyleSheet.h:
        (WebCore::UserStyleSheet::UserStyleSheet):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::startElementNs):

2020-04-03  Alex Christensen  <achristensen@webkit.org>

        Use-after-move of `formState` in WebCore::PolicyChecker::checkNavigationPolicy()
        https://bugs.webkit.org/show_bug.cgi?id=209987

        Reviewed by Chris Dumez.

        Use std::exchange because formState is used later.
        No change in behavior, but this will allow use-after-move hunts to continue.

        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::checkNavigationPolicy):

2020-04-03  Sihui Liu  <sihui_liu@apple.com>

        ASSERTION FAILED: objectStoreInfo in SQLiteIDBBackingStore::getRecord
        https://bugs.webkit.org/show_bug.cgi?id=209976
        <rdar://problem/55005363>

        Reviewed by Geoffrey Garen.

        Return error if objectStoreInfo is null in SQLiteIDBBackingStore::getRecord, because there is a possibility 
        SQLiteIDBBackingStore does not have requested objectStoreInfo.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):

2020-04-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add more logging to help diagnose <webkit.org/b/209685>
        https://bugs.webkit.org/show_bug.cgi?id=209988

        Reviewed by Timothy Hatcher.

        Remove logging that was previously added in r259465.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard updateSupportedTypeIdentifiers:]):

2020-04-02  Ryosuke Niwa  <rniwa@webkit.org>

        HTMLFormElement should use WeakPtr to keep track of its FormNamedItem
        https://bugs.webkit.org/show_bug.cgi?id=209925

        Reviewed by Wenson Hsieh.

        Like r259393, this patch replaces the HashMap of AtomString to the raw pointer of a FormNamedItem
        by a HashMap of AtomString to WeakPtr of a FormNamedItem.

        It also replaces a bunch of ASSERT_WITH_SECURITY_IMPLICATIONs with ASSERTs since there are no more
        security implications left after this patch.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formElementIndex):
        (WebCore::HTMLFormElement::removeFormElement):
        (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap const):
        (WebCore::HTMLFormElement::elementFromPastNamesMap const):
        (WebCore::HTMLFormElement::addToPastNamesMap):
        (WebCore::HTMLFormElement::removeFromPastNamesMap):
        * html/HTMLFormElement.h:

2020-04-03  Tim Horton  <timothy_horton@apple.com>

        Add a visual debug indicator for locating and identifying all kinds of WebViews
        https://bugs.webkit.org/show_bug.cgi?id=209982
        <rdar://problem/60339870>

        Reviewed by Simon Fraser.

        Add a debug overlay that can be enabled with a single switch for all
        *WebView variants, which indicates the type of *WebView in an unmissable,
        gaudy fashion.

        This is intended to address some shortcomings of existing mechanisms
        that people use to answer the "what kind of web view is X app using?"
        question. Specifically:

        - it will appear even if the Web Content process does not launch or crashes
        - it will appear even if a custom content view is being used (e.g. PDF)
        - it will appear even if compositing is not enabled (e.g. in a legacy WebView on macOS)
        - it explicitly states in written text the class name of the web view, with no need for interpreting colors
        - it covers the entire web view, so cannot be accidentally obscured

        No new tests, just debugging UI.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * testing/cocoa/WebViewVisualIdentificationOverlay.h: Added.
        * testing/cocoa/WebViewVisualIdentificationOverlay.mm: Added.
        (+[WebViewVisualIdentificationOverlay shouldIdentifyWebViews]):
        Use a single default across all kinds of WebViews, instead of using
        WebPreferences and friends, in order to make it extremely easy to turn on,
        and because it's intended to be set globally, and is not useful on a
        per-view basis.

        (+[WebViewVisualIdentificationOverlay installForWebViewIfNeeded:kind:deprecated:]):
        (-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]):
        (-[WebViewVisualIdentificationOverlay dealloc]):
        (-[WebViewVisualIdentificationOverlay observeValueForKeyPath:ofObject:change:context:]):
        (-[WebViewVisualIdentificationOverlay drawLayer:inContext:]):
        Draw a wash and the class name over the entire face of the web view.
        The wash is blue for WKWebView and red for all of the deprecated web views (WKView, WebView, UIWebView).

2020-04-03  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r8412): Use RetainPtr<> for NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]
        <https://webkit.org/b/209980>

        Reviewed by Darin Adler.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        Make use of RetainPtr<>.

2020-04-03  Kenneth Russell  <kbr@chromium.org>

        Fix bugs related to VideoTextureCopierCV and ANGLE roll script
        https://bugs.webkit.org/show_bug.cgi?id=209943

        Reviewed by Dean Jackson.

        Fixed longstanding preexisting bugs related to creation and
        deletion of OpenGL objects inside VideoTextureCopierCV, including
        in which context its internal framebuffer was created. Unbind the
        output texture after hooking it up to the framebuffer to avoid any
        appearance of rendering feedback loops.

        Stop setting the WebGL compatibility context creation attribute
        for VideoTextureCopier's context.

        Covered by preexisting layout tests.

        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::VideoTextureCopierCV::VideoTextureCopierCV):
        (WebCore::VideoTextureCopierCV::~VideoTextureCopierCV):
        (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
        (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

2020-04-03  Eric Carlson  <eric.carlson@apple.com>

        Filter some capture device names
        https://bugs.webkit.org/show_bug.cgi?id=209941
        <rdar://problem/59141886>

        Reviewed by Youenn Fablet.

        Test: fast/mediastream/anonymize-device-name.html

        * platform/mediastream/CaptureDevice.h:
        (WebCore::CaptureDevice::label const):

2020-04-03  Rob Buis  <rbuis@igalia.com>

        Remove unused parameter from loadWithNavigationAction
        https://bugs.webkit.org/show_bug.cgi?id=209959

        Reviewed by Darin Adler.

        Remove unused parameter from loadWithNavigationAction.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::reloadWithOverrideEncoding):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        * loader/FrameLoader.h:

2020-04-03  David Kilzer  <ddkilzer@apple.com>

        [Xcode] Replace ASAN_OTHER_CFLAGS and ASAN_OTHER_CPLUSPLUSFLAGS with $(inherited)
        <https://webkit.org/b/209963>
        <rdar://problem/61257504>

        Reviewed by Alexey Proskuryakov.

        * Configurations/Base.xcconfig:
        - Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and
          ASAN_OTHER_LDFLAGS.

2020-04-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add logging to help diagnose <webkit.org/b/209685>
        https://bugs.webkit.org/show_bug.cgi?id=209967

        Reviewed by Darin Adler.

        Add logging to try and diagnose a handful of API test failures on iOS 13.4 test runners. The failures seem to
        only reproduce in release builds on one particular bot; even then, the problem still doesn't reproduce when
        running the API tests on this failing bot.

        As such, add some logging to try and verify whether...
        (1) the UI process is even attempting to update its supported item provider types, which should happen after
            each drag session update.
        (2) WKContentView is receiving calls to update the drag session in the first place.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard updateSupportedTypeIdentifiers:]):

2020-04-03  Sihui Liu  <sihui_liu@apple.com>

        ASSERTION FAILED: m_delegate in IDBConnectionToClient::identifier()
        https://bugs.webkit.org/show_bug.cgi?id=209891
        <rdar://problem/59293891>

        Reviewed by Geoffrey Garen.

        IDBConnectionToClient::connectionToClientClosed() can lead UniqueIDBDatabase to start processing new requests, 
        and we should make sure it ignores the requests from the closed connection. Otherwise, the connection can be 
        held alive by the request being processed. We can do that by marking connection closed before calling 
        connectionToClientClosed on UniqueIDBDatabaseConnection.

        API Test: IndexedDB.KillWebProcessWithOpenConnection

        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
        (WebCore::IDBServer::IDBConnectionToClient::connectionToClientClosed):

2020-04-03  Zalan Bujtas  <zalan@apple.com>

        [MultiColumn] Infinite loop in RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight
        https://bugs.webkit.org/show_bug.cgi?id=209948
        <rdar://problem/59331899>

        Reviewed by Antti Koivisto.

        pushToNextPageWithMinimumLogicalHeight is supposed to find the next page/column with enough space for the content.
        However we keep finding the same column because it is not balanced properly yet (while in layout, they have the initial height of LayoutUnit::max).    

        Test: fast/multicol/infinite-loop-with-unbalanced-column.html

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight const):

2020-04-03  youenn fablet  <youenn@apple.com>

        Add initial support for WebRTC HEVC
        https://bugs.webkit.org/show_bug.cgi?id=204283

        Reviewed by Eric Carlson.

        Add a runtime flag for H265 in lieu of VP8 and pipe it to libwebrtc factories.
        Test: webrtc/h265.html

        * page/Page.cpp:
        (WebCore::m_deviceOrientationUpdateProvider):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::webRTCH265CodecEnabled const):
        (WebCore::RuntimeEnabledFeatures::setWebRTCH265CodecEnabled):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
        (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
        (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):

2020-04-03  Yousuke Kimoto  <yousuke.kimoto@sony.com>

        FileSystem handle leaks in CurlCacheManager and NetworkCacheData when failed to open a file
        https://bugs.webkit.org/show_bug.cgi?id=209949

        Reviewed by Fujii Hironori.

        A file handle of FileSystem is not closed when the file handle doesn't
        return its status. The handle should be released before returning.

        No new tests, no behavior change.

        * platform/network/curl/CurlCacheManager.cpp:
        (WebCore::CurlCacheManager::loadIndex):

2020-04-03  Peng Liu  <peng.liu6@apple.com>

        WebCore::HTMLMediaElement::mediaCanStart crashes
        https://bugs.webkit.org/show_bug.cgi?id=209950

        Reviewed by Jer Noble.

        Use WeakHashSet instead of HashSet to record MediaCanStartListeners in Document.

        * dom/Document.cpp:
        (WebCore::Document::addMediaCanStartListener):
        (WebCore::Document::removeMediaCanStartListener):
        (WebCore::Document::takeAnyMediaCanStartListener):
        * dom/Document.h:
        * page/MediaCanStartListener.h:

2020-04-03  Simon Fraser  <simon.fraser@apple.com>

        Flesh out enclosingScrollableArea() implementations
        https://bugs.webkit.org/show_bug.cgi?id=209953

        Reviewed by Timothy Hatcher.

        enclosingScrollableArea() is a virtual function on ScrollableArea. It's currently
        only called in an unused iOS WebKit1 code path, but will soon be used for scroll
        latching, so flesh out implementations.

        Will be tested by future scroll latching tests.

        * page/FrameView.cpp:
        (WebCore::FrameView::enclosingScrollableArea const):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::enclosingScrollableArea const):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::enclosingScrollableArea const):

2020-04-02  Simon Fraser  <simon.fraser@apple.com>

        Rename widgetDidHandleWheelEvent back to passWheelEventToWidget and make some functions private
        https://bugs.webkit.org/show_bug.cgi?id=209951

        Reviewed by Zalan Bujtas.

        Revert the rename from r199331, and make private wheel-event related functions that
        are internal to EventHandler.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::passWheelEventToWidget):
        (WebCore::EventHandler::widgetDidHandleWheelEvent): Deleted.
        * page/EventHandler.h:
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::passWheelEventToWidget):
        (WebCore::EventHandler::widgetDidHandleWheelEvent): Deleted.
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::passWheelEventToWidget):
        (WebCore::EventHandler::widgetDidHandleWheelEvent): Deleted.

2020-04-02  Andres Gonzalez  <andresg_22@apple.com>

        Crash in RenderMenuList::didUpdateActiveOption.
        https://bugs.webkit.org/show_bug.cgi?id=208867
        <rdar://problem/60035390>

        Reviewed by Chris Fleizach.

        Enabled test accessibility/menu-list-sends-change-notification.html.

        - Check the type of the AccessibilityObject before downcasting in RenderMenuList.
        - Fixed handling of the AXMenuListValueChanged notification on the Mac.
        This notification was previously ignored and hence the LayoutTest was failing.

        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postPlatformNotification):
        * rendering/RenderMenuList.cpp:
        (RenderMenuList::didUpdateActiveOption):

2020-04-02  Eric Carlson  <eric.carlson@apple.com>

        Remove unused media controls code
        https://bugs.webkit.org/show_bug.cgi?id=209875
        <rdar://problem/61172738>

        Remove code for the, now unused, C++ based media controls.

        Reviewed by Daniel Bates.

        No new tests, no functional change.

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::textTrackContainer):
        * Modules/mediacontrols/MediaControlsHost.h:
        * Modules/plugins/QuickTimePluginReplacement.mm:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AXObjectCache.cpp:
        (WebCore::createFromRenderer):
        * accessibility/AccessibilityMediaControls.cpp: Removed.
        * accessibility/AccessibilityMediaControls.h: Removed.
        * dom/Node.h:
        (WebCore::Node::isMediaControlElement const): Deleted.
        (WebCore::Node::isMediaControls const): Deleted.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::childShouldCreateRenderer const):
        (WebCore::HTMLMediaElement::pauseAfterDetachedTask):
        (WebCore::HTMLMediaElement::updateRenderer):
        (WebCore::HTMLMediaElement::selectMediaResource):
        (WebCore::HTMLMediaElement::mediaLoadingFailed):
        (WebCore::HTMLMediaElement::setNetworkState):
        (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
        (WebCore::HTMLMediaElement::setReadyState):
        (WebCore::HTMLMediaElement::progressEventTimerFired):
        (WebCore::HTMLMediaElement::setMuted):
        (WebCore::HTMLMediaElement::playbackProgressTimerFired):
        (WebCore::HTMLMediaElement::addTextTrack):
        (WebCore::HTMLMediaElement::removeTextTrack):
        (WebCore::HTMLMediaElement::didAddTextTrack):
        (WebCore::HTMLMediaElement::ensureMediaControlsShadowRoot):
        (WebCore::HTMLMediaElement::updateCaptionContainer):
        (WebCore::HTMLMediaElement::layoutSizeChanged):
        (WebCore::HTMLMediaElement::configureTextTracks):
        (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
        (WebCore::HTMLMediaElement::updateVolume):
        (WebCore::HTMLMediaElement::updatePlayState):
        (WebCore::HTMLMediaElement::enterFullscreen):
        (WebCore::HTMLMediaElement::exitFullscreen):
        (WebCore::HTMLMediaElement::didBecomeFullscreenElement):
        (WebCore::HTMLMediaElement::willStopBeingFullscreenElement):
        (WebCore::HTMLMediaElement::textTrackReadyStateChanged):
        (WebCore::HTMLMediaElement::configureTextTrackDisplay):
        (WebCore::HTMLMediaElement::updateTextTrackDisplay):
        (WebCore::HTMLMediaElement::updateTextTrackRepresentationImageIfNeeded):
        (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
        (WebCore::HTMLMediaElement::configureMediaControls):
        (WebCore::HTMLMediaElement::captionPreferencesChanged):
        (WebCore::HTMLMediaElement::setController):
        (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
        (WebCore::HTMLMediaElement::closeCaptionTracksChanged): Deleted.
        (WebCore::HTMLMediaElement::mediaControls const): Deleted.
        (WebCore::HTMLMediaElement::hasMediaControls const): Deleted.
        (WebCore::HTMLMediaElement::createMediaControls): Deleted.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::mediaControlsHost):
        * html/shadow/MediaControlElementTypes.cpp: Removed.
        * html/shadow/MediaControlElementTypes.h: Removed.
        * html/shadow/MediaControlElements.cpp: Removed.
        * html/shadow/MediaControlElements.h: Removed.
        * html/shadow/MediaControlTextTrackContainerElement.cpp: Added.
        (WebCore::MediaControlTextTrackContainerElement::create):
        (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
        (WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
        (WebCore::compareCueIntervalForDisplay):
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationImageIfNeeded):
        (WebCore::MediaControlTextTrackContainerElement::processActiveVTTCue):
        (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
        (WebCore::MediaControlTextTrackContainerElement::updateTextStrokeStyle):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationIfNeeded):
        (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackStyle):
        (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen):
        (WebCore::MediaControlTextTrackContainerElement::exitedFullscreen):
        (WebCore::MediaControlTextTrackContainerElement::updateVideoDisplaySize):
        (WebCore::MediaControlTextTrackContainerElement::updateSizes):
        (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
        (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):
        (WebCore::MediaControlTextTrackContainerElement::hide):
        (WebCore::MediaControlTextTrackContainerElement::show):
        (WebCore::MediaControlTextTrackContainerElement::isShowing const):
        (WebCore::MediaControlTextTrackContainerElement::logger const):
        (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
        (WebCore::MediaControlTextTrackContainerElement::logChannel const):
        * html/shadow/MediaControlTextTrackContainerElement.h: Added.
        * html/shadow/MediaControls.cpp: Removed.
        * html/shadow/MediaControls.h: Removed.
        * page/CaptionUserPreferencesMediaAF.cpp:
        * page/Page.cpp:
        (WebCore::Page::setPageScaleFactor):
        (WebCore::Page::setUserInterfaceLayoutDirection):
        * rendering/RenderMediaControls.cpp: Removed.
        * rendering/RenderMediaControls.h: Removed.
        * rendering/RenderSlider.cpp:
        * rendering/RenderTheme.cpp:
        * rendering/RenderThemeAdwaita.cpp:
        * rendering/RenderThemeCocoa.h:
        * rendering/RenderThemeCocoa.mm:
        (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::mediaControlsStyleSheet):
        (WebCore::RenderThemeIOS::modernMediaControlsStyleSheet):
        (WebCore::RenderThemeIOS::mediaControlsScript):
        (WebCore::RenderThemeIOS::mediaControlsBase64StringForIconNameAndType):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::mediaControlsStyleSheet):
        (WebCore::RenderThemeMac::modernMediaControlsStyleSheet):
        (WebCore::RenderThemeMac::mediaControlsScript):
        (WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType):
        * testing/Internals.cpp:
        (WebCore::Internals::getCurrentMediaControlsStatusForElement):

2020-04-02  Eric Carlson  <eric.carlson@apple.com>

        Don't call -[AVCapture startRunning] when interruption ends
        https://bugs.webkit.org/show_bug.cgi?id=209919
        <rdar://problem/61090625>

        Calling -[AVCaptureSession startRunning] after a VideoNotAllowedInSideBySide interruption
        ends triggers a bug in AVCapture that hangs the app for several seconds, but restarting the
        capture session isn't necessary because it will restart automatically in that case.

        Reviewed by Youenn Fablet.

        Tested manually.

        * platform/mediastream/mac/AVVideoCaptureSource.h: Remove InterruptionReason enum, convert
        m_interruption to m_interrupted bool
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): Remove InterruptionReason enum checking.
        (WebCore::AVVideoCaptureSource::stopProducingData): m_interruption -> m_interrupted.
        (WebCore::AVVideoCaptureSource::interrupted const): Ditto.
        (WebCore::AVVideoCaptureSource::captureSessionBeginInterruption): Ditto.
        (WebCore::AVVideoCaptureSource::captureSessionEndInterruption): Ditto. Don't restart the session.
        (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):
        Drive-by fix: always log notifications to help with debugging.

2020-04-02  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r258525): Leak of NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]
        <https://webkit.org/b/209932>
        <rdar://problem/61228565>

        Reviewed by Chris Fleizach.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        Move early return to avoid leaking NSMutableAttributedString.

2020-04-02  Chris Dumez  <cdumez@apple.com>

        ActiveDOMObject::hasPendingActivity() should stop preventing wrapper collection after ActiveDOMObject::stop() has been called
        https://bugs.webkit.org/show_bug.cgi?id=209886

        Reviewed by Ryosuke Niwa.

        ActiveDOMObject::stop() gets called when the script execution context is about to be destroyed.
        ActiveDOMObject objects should no longer run script after that and there is therefore no point
        in keeping the JS wrapper alive once stop() has been called. Worse, depending on the
        implementation of virtualHasPendingActivity(), keeping the wrapper alive past this point may
        actually cause JS wrapper leaks. Some of the virtualHasPendingActivity() were properly checking
        if the context was stopped but not all of them. To address the issue, we now check
        ActiveDOMObject::isContextStopped() in the JS bindings, in addition to
        ActiveDOMObject::hasPendingActivity(), so that it is no longer possible to keep a JS wrapper
        alive past the point where the script execution context has been stopped. This new approach
        is a lot less leak/error prone.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::virtualHasPendingActivity const):
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::requestCompleted):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::virtualHasPendingActivity const):
        (WebCore::IDBRequest::stop):
        (WebCore::IDBRequest::enqueueEvent):
        (WebCore::IDBRequest::dispatchEvent):
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::virtualHasPendingActivity const):
        (WebCore::IDBTransaction::stop):
        (WebCore::IDBTransaction::notifyDidAbort):
        (WebCore::IDBTransaction::enqueueEvent):
        (WebCore::IDBTransaction::dispatchEvent):
        * Modules/indexeddb/IDBTransaction.h:
        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::virtualHasPendingActivity const):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
        * css/FontFace.cpp:
        (WebCore::FontFace::virtualHasPendingActivity const):
        * dom/ActiveDOMObject.h:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::virtualHasPendingActivity const):
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::getOrCreate):
        (WebCore::ServiceWorkerRegistration::update):
        (WebCore::ServiceWorkerRegistration::unregister):
        (WebCore::ServiceWorkerRegistration::queueTaskToFireUpdateFoundEvent):
        (WebCore::ServiceWorkerRegistration::stop):
        (WebCore::ServiceWorkerRegistration::virtualHasPendingActivity const):
        * workers/service/ServiceWorkerRegistration.h:

2020-04-02  Simon Fraser  <simon.fraser@apple.com>

        Rename some wheel-event related functions
        https://bugs.webkit.org/show_bug.cgi?id=209918

        Reviewed by Zalan Bujtas.

        Rename some functions to describe what they do, rather than being generic "platform" things, to make
        the code easier to read.

        Similarly, rename m_clearLatchingStateTimer for what it does.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::EventHandler):
        (WebCore::EventHandler::clearLatchedStateTimerFired):
        (WebCore::EventHandler::determineWheelEventTarget):
        (WebCore::EventHandler::recordWheelEventForDeltaFilter):
        (WebCore::EventHandler::processWheelEventForScrolling):
        (WebCore::EventHandler::processWheelEventForScrollSnap):
        (WebCore::EventHandler::completeWidgetWheelEvent):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::platformPrepareForWheelEvents): Deleted.
        (WebCore::EventHandler::platformRecordWheelEvent): Deleted.
        (WebCore::EventHandler::platformCompleteWheelEvent): Deleted.
        (WebCore::EventHandler::platformNotifyIfEndGesture): Deleted.
        * page/EventHandler.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::clearOrScheduleClearingLatchedStateIfNeeded):
        (WebCore::EventHandler::determineWheelEventTarget):
        (WebCore::EventHandler::recordWheelEventForDeltaFilter):
        (WebCore::EventHandler::processWheelEventForScrolling):
        (WebCore::EventHandler::processWheelEventForScrollSnap):
        (WebCore::EventHandler::platformPrepareForWheelEvents): Deleted.
        (WebCore::EventHandler::platformRecordWheelEvent): Deleted.
        (WebCore::EventHandler::platformCompleteWheelEvent): Deleted.
        (WebCore::EventHandler::platformNotifyIfEndGesture): Deleted.

2020-04-02  Daniel Bates  <dabates@apple.com>

        Traverse float descendants when computing event and touch-action regions
        https://bugs.webkit.org/show_bug.cgi?id=209896
        <rdar://problem/61196287>

        Reviewed by Antti Koivisto.

        Consider floating objects when computing the event region and touch-action region.
        For touch-action hit testing this means that CSS touch-action is honored on floating
        objects.

        Tests: fast/scrolling/ios/event-region-float.html
               pointerevents/ios/touch-action-region-float.html

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

2020-04-02  Jer Noble  <jer.noble@apple.com>

        Hulu.com gets stuck in a "loading" state when seeking
        https://bugs.webkit.org/show_bug.cgi?id=209916
        <rdar://problem/55041979>

        Reviewed by Eric Carlson.

        Hulu.com depends on the "canplay" event firing after a seek to hide their loading indicator.
        The HTML spec says that "canplay" should only be fired when moving from the HAVE_CURRENT_DATA
        to HAVE_FUTURE_DATA or greater, but when seeking within the buffered range, the readyState
        never drops below HAVE_FUTURE_DATA. To work around this behavior, add a quirk for Hulu.com
        that always fires "canplay" after a seek completes, so long as the readyState is HAVE_FUTURE_DATA
        or higher.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::seekTask):
        (WebCore::HTMLMediaElement::finishSeek):
        * page/Quirks.cpp:
        (WebCore::Quirks::needsCanPlayAfterSeekedQuirk const):
        * page/Quirks.h:

2020-04-02  Wenson Hsieh  <wenson_hsieh@apple.com>

        Avoid null deref after inserting a text field with a list attribute
        https://bugs.webkit.org/show_bug.cgi?id=209909
        <rdar://problem/60742229>

        Reviewed by Ryosuke Niwa.

        On macOS, when painting a text field with an associated datalist (i.e. `HTMLInputElement::list()` is non-null),
        we assume that the datalist suggestions dropdown button has a renderer (in other words, it does not have a style
        of `display: none`).

        Existing logic in `TextFieldInputType` is responsible for upholding this invariant -- when the list attribute
        changes on an input field (e.g. when we parse the list attribute, or when it is set by JavaScript), we update
        the inline display style of `m_dataListDropdownIndicator`, such that it is set to `display: none` only if there
        is either no list attribute, or the list attribute is empty, or the list does not refer to a connected datalist
        element. However, there is one scenario in which this invariant is violated. Consider the following:

        1. An input field is created, and its list attribute is set to "foo". Importantly, it is not connected yet.
        2. A datalist element with id "foo" is then created and then added to the document.
        3. The input field created in (1) is then added to the document.

        In this scenario, `listAttributeTargetChanged()` is invoked after (1), but since it is not connected, it has no
        datalist yet, and so `m_dataListDropdownIndicator` will remain non-rendered. When it is later added to the DOM,
        nothing attempts to `m_dataListDropdownIndicator` even though its list attribute now refers to a datalist, so
        it remains hidden. When we later go to paint the input's datalist dropdown button in
        `RenderThemeMac::paintListButtonForInput`, we assume that the dropdown button must be rendered because the input
        has a datalist and subsequently crash since `buttonElement->renderer()` remains null.

        To fix this, we add logic to update the datalist dropdown button's inline display style when it is connected to
        the document with an existing, non-empty list attribute.

        Test: fast/forms/datalist/append-input-with-list-attribute.html

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::parseAttribute):
        (WebCore::HTMLInputElement::didFinishInsertingNode):

        Notify the InputType subclass that the datalist element may have changed after an input element is connected
        to the document with a non-empty list attribute.

        (WebCore::HTMLInputElement::dataListMayHaveChanged):
        (WebCore::ListAttributeTargetObserver::idTargetChanged):
        (WebCore::HTMLInputElement::listAttributeTargetChanged): Deleted.

        Rename listAttributeTargetChanged to dataListMayHaveChanged, since it is no longer called only when the list
        attribute changes value, but rather when the input's datalist element may have changed.

        * html/HTMLInputElement.h:
        * html/InputType.cpp:
        (WebCore::InputType::dataListMayHaveChanged):
        (WebCore::InputType::listAttributeTargetChanged): Deleted.
        * html/InputType.h:
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::dataListMayHaveChanged):
        (WebCore::RangeInputType::listAttributeTargetChanged): Deleted.
        * html/RangeInputType.h:
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::dataListMayHaveChanged):
        (WebCore::TextFieldInputType::listAttributeTargetChanged): Deleted.
        * html/TextFieldInputType.h:

2020-04-01  Darin Adler  <darin@apple.com>

        Remove all uses of live ranges from TextIterator
        https://bugs.webkit.org/show_bug.cgi?id=209723

        Reviewed by Antti Koivisto.

        - Replaced TextIterator::getLocationAndLengthFromRange with a function named
          characterRange that computes a CharacterRange given a scope and a range.
        - Removed the overload of plainText that takes a pointer to a live range.
        - Update the many callers of plainText that pass a pointer to a live range
          to pass a reference instead, adding null checks as needed to preserve behavior.
        - Rewrote some call sites to not use live ranges at all, or use them minimally.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::nextSentenceEndPosition const): Streamlined
        the logic in this function, using a smaller number of null checks since the
        functions we are calling also do null checks, simpler variable names and
        fewer local variables. Pass a reference to a live range rather than a
        pointer to the plainText function.
        (WebCore::AccessibilityObject::previousSentenceStartPosition const): Ditto.
        (WebCore::AccessibilityObject::nextParagraphEndPosition const): Ditto.
        (WebCore::AccessibilityObject::previousParagraphStartPosition const): Ditto.
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::textUnderElement const): Ditto.
        (WebCore::boundsForRects): Converted this to a file-local function and changed
        it to take a SimpleRange instead of a live range.
        (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange const): Pass
        a reference to a live range instead of a pointer.
        (WebCore::AccessibilityRenderObject::boundsForRange const): Ditto.
        * accessibility/AccessibilityRenderObject.h: Removed boundsForRects.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper _convertToNSRange:]): Rewrote to use
        characterRange instead of TextIterator::getLocationAndLengthFromRange.

        * dom/BoundaryPoint.h:
        (WebCore::makeBoundaryPointBeforeNodeContents): Added.

        * dom/Element.cpp:
        (WebCore::Element::innerText): Pass a SimpleRange instead of a live range
        to the plainText function.

        * dom/Range.cpp:
        (WebCore::Range::text const): Pass a reference to a live range instead of a
        pointer to the plainText function.

        * dom/SimpleRange.cpp:
        (WebCore::makeBoundaryPointAfterNodeContents): Added.
        (WebCore::makeRangeSelectingNodeContents): Use makeBoundaryPointBeforeNodeContents
        and makeBoundaryPointAfterNodeContents

        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::applyPendingCorrection): Pass a reference
        to a live range to plainText.
        (WebCore::AlternativeTextController::show): Ditto.
        (WebCore::AlternativeTextController::timerFired): Ditto.
        (WebCore::AlternativeTextController::handleAlternativeTextUIResult): Ditto.
        (WebCore::AlternativeTextController::recordAutocorrectionResponse): Ditto. Also
        take a SimpleRange argument.
        (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
        Ditto.
        (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):Ditto.
        * editing/AlternativeTextController.h: Update for the above changes.

        * editing/Editor.cpp:
        (WebCore::Editor::markMisspellingsAfterTypingToWord): Pass a reference
        to a live range to plainText.
        (WebCore::correctSpellcheckingPreservingTextCheckingParagraph): Ditto.
        Also refactor for simplicity and clarity.
        (WebCore::Editor::markAndReplaceFor): Ditto.
        (WebCore::Editor::changeBackToReplacedString): Ditto.
        (WebCore::Editor::transpose): Ditto.
        (WebCore::Editor::addRangeToKillRing): Ditto.
        (WebCore::Editor::stringForCandidateRequest const): Ditto.
        * editing/ReplaceRangeWithTextCommand.cpp:
        (WebCore::ReplaceRangeWithTextCommand::doApply): Ditto.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::ReplacementFragment): Ditto.
        * editing/SpellingCorrectionCommand.cpp:
        (WebCore::SpellingCorrectionCommand::doApply): Ditto.
        * editing/TextCheckingHelper.cpp:
        (WebCore::TextCheckingParagraph::text const): Ditto.
        (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto.

        * editing/TextIterator.cpp: Use more constexpr.
        (WebCore::characterSubrange): Deleted. Moved the logic from this function
        into the one place using it, the rangeForMatch function.
        (WebCore::resolveCharacterLocation): Deleted. Moved to the header file.
        (WebCore::TextIterator::getLocationAndLengthFromRange): Deleted.
        (WebCore::plainText): Deleted the overload that takes a live range pointer.
        (WebCore::plainTextUsingBackwardsTextIteratorForTesting): Deleted. Moved
        the implementation to Internals. There's nothing special about the algorithm,
        it uses SimplifiedBackwardsTextIterator in a simple way.
        (WebCore::collapsedToBoundary): Deleted. Moved the code to the one place
        it's used, the rangeForMatch function.
        (WebCore::forEachMatch): Renamed from findPlainTextMatches and changed to
        work without any use of live ranges and to use CharacterRange.
        (WebCore::rangeForMatch): Rewrote to include more of the logic, removing
        the collapsedToBoundary and characterSubrange functions, and to not use
        any live ranges.
        (WebCore::findClosestPlainText): Rewrote to tighten up the algorithm a
        bit, break ties based on the search direction, and have less repetitive code.
        (WebCore::findPlainText): Rewrote for clarity.

        * editing/TextIterator.h: Removed the forward declaration of Range.
        Removed the overload of plainText that takes a live range pointer. Moved
        the functions that work with character ranges up to the top of the file,
        grouped the other functions more logically. Deleted the
        TextIterator::getLocationAndLengthFromRange function. Put some inline
        function definitions here.

        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::markMisspellingsAfterTyping): Pass a reference
        to a live range to plainText.
        * editing/VisibleUnits.cpp:
        (WebCore::charactersAroundPosition): Pass a SimpleRange to plainText
        rather than a live range.
        * editing/cocoa/DataDetection.mm:
        (WebCore::detectItemAtPositionWithRange): Pass a reference to a live
        range to plainText.
        * editing/cocoa/DictionaryLookup.mm:
        (WebCore::DictionaryLookup::rangeForSelection): Ditto.

        * editing/cocoa/HTMLConverter.h: Tweaked #if a bit.

        * editing/mac/DictionaryLookupLegacy.mm:
        (WebCore::DictionaryLookup::rangeForSelection): Pass a reference to a
        live range to plainText. Also rewrote logic to use mostly SimpleRange.
        (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::renderedTextRespectingRange): Ditto.
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent const): Ditto.
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::toString): Ditto.

        * page/Page.cpp:
        (WebCore::Page::replaceRangesWithText): Rewrote to replaces use of
        TextIterator::getLocationAndLengthFromRange with characterRange.

        * page/ios/FrameIOS.mm:
        (WebCore::Frame::interpretationsForCurrentRoot const): Pass a
        reference to a live range to plainText.

        * testing/Internals.cpp:
        (WebCore::Internals::locationFromRange): Use characterRange.
        (WebCore::Internals::lengthFromRange): Ditto.
        (WebCore::Internals::rangeAsTextUsingBackwardsTextIterator):
        USe SimplifiedBackwardsTextIterator directly since we no longer have
        the function plainTextUsingBackwardsTextIteratorForTesting.

2020-04-02  Ryosuke Niwa  <rniwa@webkit.org>

        Remove a superflous blank line added in the previous commit as pointed out during the code review.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::copyAssociatedElementsVector const):

2020-04-01  Ryosuke Niwa  <rniwa@webkit.org>

        HTMLFormElement should use WeakPtr to keep track of its associated elements
        https://bugs.webkit.org/show_bug.cgi?id=209894

        Reviewed by Wenson Hsieh.

        Replaced the vector of raw pointers to FormAssociatedElement in HTMLFormElement by a vector
        of WeakPtr to the equivalent HTMLElement. Most of code changes below are due to type of elements
        in the vector changing from FormAssociatedElement to HTMLElement and needing conversion.

        This patch also moves clearing of m_form from ~FormAssociatedElement to its subclasses'
        destructors since we need to make a virtual function call to get HTMLElement* out of
        FormAssociatedElement, which would be too late inside ~FormAssociatedElement.

        No new tests since there should be no behavioral change.

        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::~FormAssociatedElement): Assert that m_form had been cleared
        instead of clearing it here.
        * html/FormAssociatedElement.h:
        (WebCore::FormAssociatedElement::clearForm): Added.
        * html/FormController.cpp:
        (WebCore::recordFormStructure):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::~HTMLFormControlElement): Now calls clearForm. Also removed
        the redundant comment.
        * html/HTMLFormControlsCollection.cpp:
        (WebCore::findFormAssociatedElement):
        (WebCore::HTMLFormControlsCollection::unsafeFormControlElements const): Deleted.
        (WebCore::HTMLFormControlsCollection::copyFormControlElementsVector const): Deleted.
        (WebCore::HTMLFormControlsCollection::customElementAfter const):
        (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
        * html/HTMLFormControlsCollection.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::~HTMLFormElement):
        (WebCore::HTMLFormElement::removedFromAncestor):
        (WebCore::HTMLFormElement::length const):
        (WebCore::HTMLFormElement::textFieldValues const):
        (WebCore::HTMLFormElement::resetAssociatedFormControlElements):
        (WebCore::HTMLFormElement::formElementIndexWithFormAttribute):
        (WebCore::HTMLFormElement::registerFormElement):
        (WebCore::HTMLFormElement::removeFormElement):
        (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
        (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap const):
        (WebCore::HTMLFormElement::unsafeAssociatedElements const):
        (WebCore::HTMLFormElement::copyAssociatedElementsVector const):
        * html/HTMLFormElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::~HTMLObjectElement): Added. Calls clearForm.
        * html/HTMLObjectElement.h:

2020-04-02  Alex Christensen  <achristensen@webkit.org>

        Add SPI to restrict loading to main resources or non-network loads
        https://bugs.webkit.org/show_bug.cgi?id=209893

        Reviewed by Tim Horton.

        This will allow two projects that currently use the injected bundle SPI to use these instead.
        Covered by API tests.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::validateURL):
        * loader/ResourceLoadNotifier.cpp:
        (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
        * loader/ResourceLoadNotifier.h:
        * page/Page.cpp:
        (WebCore::m_loadsFromNetwork):
        (WebCore::m_deviceOrientationUpdateProvider): Deleted.
        * page/Page.h:
        (WebCore::Page::loadsSubresources const):
        (WebCore::Page::loadsFromNetwork const):
        * page/PageConfiguration.h:

2020-04-02  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Allow WebKit to use camera in multi-tasking mode
        https://bugs.webkit.org/show_bug.cgi?id=209904

        Reviewed by Youenn Fablet.

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

2020-04-02  Antoine Quint  <graouts@apple.com>

        Video previews on shutterstock.com don't play when tapped on iPadOS
        https://bugs.webkit.org/show_bug.cgi?id=209903
        <rdar://problem/58844166>

        Reviewed by Wenson Hsieh.

        When tapping on a video preview after searching for a video on shutterstock.com, for instance on https://www.shutterstock.com/video/search/people,
        we correctly enter the hover state thanks to our content observation heuristics, but the <video> preview inserted fails to play and show due to a
        style rule setting a "display: none" style if the media-query "pointer: coarse" evaluates to true.

        In order to improve this website's behavior on iPadOS, we add a new quirk that prevents the "pointer: coarse" media query from evaluating to true.
        This new quirk, shouldPreventPointerMediaQueryFromEvaluatingToCoarse(), evaluates to true only for this this website.

        * css/MediaQueryEvaluator.cpp:
        (WebCore::pointerEvaluate):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldPreventPointerMediaQueryFromEvaluatingToCoarse const):
        * page/Quirks.h:

2020-04-02  youenn fablet  <youenn@apple.com>

        Remove synchronous termination of service workers
        https://bugs.webkit.org/show_bug.cgi?id=209666

        Reviewed by Chris Dumez.

        Instead of supporting synchronous IPC to terminate a service worker, SWServerWorker will asynchronously ask for the service worker to terminate.
        If it is not terminated after some time, SWServerWorker will then ask to terminate the process running the service worker.
        Time is kept to 10 seconds.

        We can then remove all synchronous related code related to termination.
        We migrate the terminateServiceWorker internal API to be Promise based.

        Covered by existing tests.

        * testing/Internals.cpp:
        (WebCore::Internals::terminateServiceWorker):
        * testing/Internals.h:
        * testing/Internals.idl:
        * workers/service/ServiceWorkerProvider.h:
        * workers/service/SWClientConnection.h:
        * workers/service/WorkerSWClientConnection.cpp:
        * workers/service/WorkerSWClientConnection.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::~SWServer):
        (WebCore::SWServer::unregisterServiceWorkerClient):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerToContextConnection.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::m_terminationTimer):
        (WebCore::SWServerWorker::~SWServerWorker):
        (WebCore::SWServerWorker::terminate):
        (WebCore::SWServerWorker::startTermination):
        (WebCore::SWServerWorker::terminateCompleted):
        (WebCore::SWServerWorker::callTerminationCallbacks):
        (WebCore::SWServerWorker::terminationTimerFired):
        (WebCore::SWServerWorker::setState):
        (WebCore::SWServerWorker::didFailHeartBeatCheck):
        * workers/service/server/SWServerWorker.h:
        (WebCore::SWServerWorker::terminate):

2020-04-02  Rob Buis  <rbuis@igalia.com>

        Remove FrameLoader::addExtraFieldsToMainResourceRequest
        https://bugs.webkit.org/show_bug.cgi?id=209853

        Reviewed by Darin Adler.

        Remove FrameLoader::addExtraFieldsToMainResourceRequest since the call is
        not needed in DocumentLoader and can be inlined in FrameLoader. The call
        in DocumentLoader is no longer needed since adding the User-Agent header
        is decoupled from addExtraFields functionality and the User-Agent header
        will be added in CachedResourceLoader after any custom setting of the
        user agent (setCustomUserAgent API).

        Test: http/tests/navigation/useragent-reload.php

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::startLoadingMainResource):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::addExtraFieldsToMainResourceRequest): Deleted.
        * loader/FrameLoader.h:

2020-04-01  Ryosuke Niwa  <rniwa@webkit.org>

        Crash in WebCore::HTMLDocumentParser::insert
        https://bugs.webkit.org/show_bug.cgi?id=209892

        Reviewed by Darin Adler.

        Speculative fix to check that the parser hasn't been detached before running preload scanner.

        No new tests since there is no reproduction and I couldn't come up with one.

        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        (WebCore::HTMLDocumentParser::insert):

2020-04-01  Jack Lee  <shihchieh_lee@apple.com>

        Remove the unnecessary null check for document
        https://bugs.webkit.org/show_bug.cgi?id=209819

        Reviewed by Ryosuke Niwa.

        No new tests, covered by existing test.

        * dom/Node.cpp:
        (WebCore::Node::removedFromAncestor):

2020-04-01  Wenson Hsieh  <wenson_hsieh@apple.com>

        Remove some PLATFORM(IOS_FAMILY) guards in TextFieldInputType
        https://bugs.webkit.org/show_bug.cgi?id=209883

        Reviewed by Darin Adler.

        Refactor what is currently a compile-time IOS_FAMILY guard into a runtime check behind a private helper method
        on TextFieldInputType. This makes the intention behind the iOS-specific logic more self-evident; no change in
        behavior.

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::handleFocusEvent):
        (WebCore::TextFieldInputType::handleBlurEvent):
        (WebCore::TextFieldInputType::createDataListDropdownIndicator):
        (WebCore::TextFieldInputType::shouldOnlyShowDataListDropdownButtonWhenFocusedOrEdited const):
        (WebCore::TextFieldInputType::didSetValueByUserEdit):
        (WebCore::TextFieldInputType::listAttributeTargetChanged):
        * html/TextFieldInputType.h:

2020-04-01  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] UTI from MIME type cache can be removed after r258915
        https://bugs.webkit.org/show_bug.cgi?id=209787

        Unreviewed rollout of r257828.

        In r257828, a UTI from MIME type cache was added to avoid connecting to a launch services daemon in the
        WebContent process, but after <https://trac.webkit.org/changeset/258915> this cache is not strictly needed
        anymore, since r258915 solves the problem of avoiding to connect to the daemon in a general way.

        * platform/network/mac/UTIUtilities.h:
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
        (WebCore::mapUTIFromMIMEType): Deleted.
        (WebCore::additionalMIMETypes): Deleted.
        (WebCore::createUTIFromMIMETypeMap): Deleted.
        (WebCore::setUTIFromMIMETypeMap): Deleted.
        * testing/Internals.cpp:
        (WebCore::Internals::getUTIFromMIMEType): Deleted.
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/Internals.mm:
        (WebCore::Internals::getUTIFromMIMEType): Deleted.

2020-04-01  Chris Dumez  <cdumez@apple.com>

        http/tests/navigation/page-cache-fontfaceset.html is flaky crashing
        https://bugs.webkit.org/show_bug.cgi?id=209881
        <rdar://problem/61114827>

        Reviewed by Darin Adler.

        Make sure CSSFontSelector::m_beginLoadingTimer uses a SuspendableTimer instead of a regular
        timer so that it cannot fire while in the back/forward cache and start a load.

        No new tests, covered by existing test.

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::CSSFontSelector):
        (WebCore::CSSFontSelector::clearDocument):
        * css/CSSFontSelector.h:

2020-04-01  Chris Dumez  <cdumez@apple.com>

        ASSERTION FAILED: m_wrapper on webgl/max-active-contexts-webglcontextlost-prevent-default.html
        https://bugs.webkit.org/show_bug.cgi?id=209863
        <rdar://problem/61164936>

        Reviewed by Darin Adler.

        The HTMLCanvasElement JS wrapper needs to stay alive as long as JS events may need to be fired.
        When the canvas has a WebGL context, the WebGL context may cause contextlost / contextrestored
        / contextchanged events at any point, unless the context is unrecoverably lost. To fix the
        issue, we now override virtualHasPendingActivity() in HTMLCanvasElement and return true if
        it has a WebGL context that is not unrecoverably lost and if relevant WebGL event listeners
        are registed.

        No new tests, covered by existing test.

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::virtualHasPendingActivity const):
        (WebCore::HTMLCanvasElement::stop):
        (WebCore::HTMLCanvasElement::eventListenersDidChange):
        * html/HTMLCanvasElement.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::isContextUnrecoverablyLost const):
        * html/canvas/WebGLRenderingContextBase.h:

2020-04-01  Jer Noble  <jer.noble@apple.com>

        CRASH in MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer(), uncaught ObjC exception
        https://bugs.webkit.org/show_bug.cgi?id=209827
        <rdar://problem/61113080>

        Reviewed by Eric Carlson.

        -[AVSampleBufferAudioRenderer init] can, in exceptional conditions, return nil. Passing a
        nil object, or another object that AVSampleBufferRenderSynchronizer considers "invalid", into
        -[AVSampleBufferRenderSynchronizer addRenderer:] will throw an exception. Protect against this
        scenario in two ways:

        - Check the return value of -[AVSampleBufferAudioRenderer init], and if nil, log an error,
          log to console, and set the network state to "DecodeError".
        - Wrap calls to -addRenderer: in @try/@catch blocks, which if caught, log an error, assert,
          and set the network state to "DecodeError".

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::failedToCreateRenderer):
        * Modules/mediasource/MediaSource.h:
        * platform/graphics/MediaSourcePrivateClient.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
        (WebCore::MediaSourcePrivateAVFObjC::failedToCreateAudioRenderer):
        (WebCore::MediaSourcePrivateAVFObjC::failedToCreateVideoRenderer):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):

2020-04-01  Chris Dumez  <cdumez@apple.com>

        ASSERTION FAILED: m_wrapper on imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay.html
        https://bugs.webkit.org/show_bug.cgi?id=209684
        <rdar://problem/60987285>

        Reviewed by Darin Adler.

        Make sure the JS wrapper does not get collected while the HTMLMediaElement is in a state where
        is may still fire events (and there are JS event listeners registered). In particular, it used
        to be possible for the wrapper to get collected because media playback had started and we would
        crash trying to fire the very early 'canplay' JS event.

        No new tests, covered by existing test.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::virtualHasPendingActivity const):

2020-04-01  Don Olmstead  <don.olmstead@sony.com>

        [PlayStation] Use OBJECT libraries for WebCore and PAL
        https://bugs.webkit.org/show_bug.cgi?id=209835

        Reviewed by Ross Kirsling.

        After moving to object libraries MediaStrategy's constructor and destructor were
        being reported as linker errors despite being set to default. Moving the definitions
        to a source file stopped these issues.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/MediaStrategy.cpp: Copied from Source/WebCore/platform/MediaStrategy.h.
        * platform/MediaStrategy.h:

2020-04-01  Keith Miller  <keith_miller@apple.com>

        Bindings that override getOwnPropertySlotByIndex need to say they MayHaveIndexedAccessors
        https://bugs.webkit.org/show_bug.cgi?id=209762

        Reviewed by Darin Adler.

        There may be places where we rely on this for semantic
        correctness. I couldn't find any right now but we might as
        well be conservative since this isn't a performance regression.

        * bindings/js/JSDOMWindowProperties.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        * bindings/scripts/test/JS/JSInterfaceName.h:
        (WebCore::JSInterfaceName::createStructure):
        * bindings/scripts/test/JS/JSMapLike.h:
        (WebCore::JSMapLike::createStructure):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
        (WebCore::JSReadOnlyMapLike::createStructure):
        * bindings/scripts/test/JS/JSReadOnlySetLike.h:
        (WebCore::JSReadOnlySetLike::createStructure):
        * bindings/scripts/test/JS/JSSetLike.h:
        (WebCore::JSSetLike::createStructure):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        (WebCore::JSTestActiveDOMObject::createStructure):
        * bindings/scripts/test/JS/JSTestCEReactions.h:
        (WebCore::JSTestCEReactions::createStructure):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
        (WebCore::JSTestCEReactionsStringifier::createStructure):
        * bindings/scripts/test/JS/JSTestCallTracer.h:
        (WebCore::JSTestCallTracer::createStructure):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
        (WebCore::JSTestClassWithJSBuiltinConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestDOMJIT.h:
        (WebCore::JSTestDOMJIT::createStructure):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
        (WebCore::JSTestEnabledBySetting::createStructure):
        * bindings/scripts/test/JS/JSTestEnabledForContext.h:
        (WebCore::JSTestEnabledForContext::createStructure):
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        (WebCore::JSTestEventConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        (WebCore::JSTestEventTarget::createStructure):
        * bindings/scripts/test/JS/JSTestException.h:
        (WebCore::JSTestException::createStructure):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        (WebCore::JSTestGenerateIsReachable::createStructure):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObject::createStructure):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
        (WebCore::JSTestIndexedSetterNoIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
        (WebCore::JSTestIndexedSetterThrowingException::createStructure):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
        (WebCore::JSTestIndexedSetterWithIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
        (WebCore::JSTestInterfaceLeadingUnderscore::createStructure):
        * bindings/scripts/test/JS/JSTestIterable.h:
        (WebCore::JSTestIterable::createStructure):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
        (WebCore::JSTestJSBuiltinConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        (WebCore::JSTestMediaQueryListListener::createStructure):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::createStructure):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        (WebCore::JSTestNamedConstructor::createStructure):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        (WebCore::JSTestNamedDeleterNoIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        (WebCore::JSTestNamedDeleterThrowingException::createStructure):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        (WebCore::JSTestNamedDeleterWithIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::createStructure):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
        (WebCore::JSTestNamedGetterCallWith::createStructure):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
        (WebCore::JSTestNamedGetterNoIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
        (WebCore::JSTestNamedGetterWithIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        (WebCore::JSTestNamedSetterNoIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        (WebCore::JSTestNamedSetterThrowingException::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        (WebCore::JSTestNamedSetterWithIdentifier::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetter::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::createStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::createStructure):
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/JS/JSTestObj.h:
        (WebCore::JSTestObj::createStructure):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        (WebCore::JSTestOverloadedConstructors::createStructure):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
        (WebCore::JSTestOverloadedConstructorsWithSequence::createStructure):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
        (WebCore::JSTestOverrideBuiltins::createStructure):
        * bindings/scripts/test/JS/JSTestPluginInterface.h:
        (WebCore::JSTestPluginInterface::createStructure):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
        (WebCore::JSTestPromiseRejectionEvent::createStructure):
        * bindings/scripts/test/JS/JSTestSerialization.h:
        (WebCore::JSTestSerialization::createStructure):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h:
        (WebCore::JSTestSerializationIndirectInheritance::createStructure):
        * bindings/scripts/test/JS/JSTestSerializationInherit.h:
        (WebCore::JSTestSerializationInherit::createStructure):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
        (WebCore::JSTestSerializationInheritFinal::createStructure):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        (WebCore::JSTestSerializedScriptValueInterface::createStructure):
        * bindings/scripts/test/JS/JSTestStringifier.h:
        (WebCore::JSTestStringifier::createStructure):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
        (WebCore::JSTestStringifierAnonymousOperation::createStructure):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
        (WebCore::JSTestStringifierNamedOperation::createStructure):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
        (WebCore::JSTestStringifierOperationImplementedAs::createStructure):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
        (WebCore::JSTestStringifierOperationNamedToString::createStructure):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
        (WebCore::JSTestStringifierReadOnlyAttribute::createStructure):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
        (WebCore::JSTestStringifierReadWriteAttribute::createStructure):
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        (WebCore::JSTestTypedefs::createStructure):

2020-04-01  Jer Noble  <jer.noble@apple.com>

        Don't use raw pointers in ShadowRoot.
        https://bugs.webkit.org/show_bug.cgi?id=209843
        <rdar://problem/61069603>

        Reviewed by Brent Fulgham.

        * dom/Element.cpp:
        (WebCore::Element::addShadowRoot):
        * dom/ShadowRoot.h:

2020-04-01  Jack Lee  <shihchieh_lee@apple.com>

        Notify accessibility when a node is removed from its ancestor.
        https://bugs.webkit.org/show_bug.cgi?id=209819

        Reviewed by Chris Fleizach.

        Covered by existing tests in LayoutTests/accessibility.

        * dom/Node.cpp:
        (WebCore::Node::removedFromAncestor):

2020-04-01  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, reverting r259282.
        https://bugs.webkit.org/show_bug.cgi?id=209860

        Caused memory corruption (Requested by ap on #webkit).

        Reverted changeset:

        "Scroll latching state is not a stack"
        https://bugs.webkit.org/show_bug.cgi?id=209790
        https://trac.webkit.org/changeset/259282

2020-04-01  youenn fablet  <youenn@apple.com>

        Bump libwebrtc to M82
        https://bugs.webkit.org/show_bug.cgi?id=209542

        Reviewed by Eric Carlson.

        Removed dtx/rtx support since this is no longer MTI and associatedStatId as obsolete.
        Update mock connection according new virtual pure methods.

        Covered by existing tests.

        * Modules/mediastream/RTCStatsReport.h:
        * Modules/mediastream/RTCStatsReport.idl:
        * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
        (WebCore::fillRTCRTPStreamStats):
        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
        (WebCore::toRTCEncodingParameters):
        (WebCore::toRTCHeaderExtensionParameters):
        (WebCore::fromRTCHeaderExtensionParameters):
        (WebCore::toRTCRtpSendParameters):
        (WebCore::toRTCRtpTransceiverDirection):
        * testing/MockLibWebRTCPeerConnection.h:

2020-04-01  youenn fablet  <youenn@apple.com>

        Support resolution of IPv6 STUN/TURN addresses
        https://bugs.webkit.org/show_bug.cgi?id=209808

        Reviewed by Eric Carlson.

        Add family access to IPAddress to support both IPv4 and IPv6.
        Store IPAddress internal value as IPv6 and cast them to IPv4 on demand.

        * platform/network/DNS.h:
        * platform/network/soup/DNSResolveQueueSoup.cpp:
        (WebCore::resolvedWithObserverCallback):

2020-03-31  Simon Fraser  <simon.fraser@apple.com>

        Make FrameView and Frame TextStream-loggable
        https://bugs.webkit.org/show_bug.cgi?id=209826

        Reviewed by Darin Adler.

        Provide operator<<(TextStream&, ...) for Frame and FrameView so they can be logged.
        Only basic data logging currently; this can be adjusted as necessary.

        * page/Frame.cpp:
        (WebCore::operator<<):
        * page/Frame.h:
        * page/FrameView.cpp:
        (WebCore::operator<<):
        * page/FrameView.h:

2020-03-31  Zalan Bujtas  <zalan@apple.com>

        [MultiColumn] Call RenderTreeBuilder::multiColumnDescendantInserted only when the enclosing fragmented flow has changed
        https://bugs.webkit.org/show_bug.cgi?id=209816
        <rdar://problem/60742191>

        Reviewed by Antti Koivisto.

        Just because an element goes from out-of-flow to in-flow, it does not necessarily mean that the enclosing flow is going to change.
        This patch ensure that we only call RenderTreeBuilder::multiColumnDescendantInserted when the flow actually gains new content.

        Test: fast/multicol/absolute-to-static-change-same-enclosing-flow.html

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):

2020-03-31  Simon Fraser  <simon.fraser@apple.com>

        Add type traits for ScrollableArea, and other cleanup
        https://bugs.webkit.org/show_bug.cgi?id=209838

        Reviewed by Chris Dumez.

        Make it possible to use type casts on ScrollableArea so that EventHandler code can stop
        passing around so many different types.

        Because ScrollView inherits from both Widget and ScrollableArea, expand out its SPECIALIZE_TYPE_TRAITS macros.

        Mark RenderLayer and RenderListBox ScrollableArea overrides as final.

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents): Null-check page and return early.
        * platform/ScrollView.h:
        (isType):
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::isScrollView const):
        (WebCore::ScrollableArea::isRenderLayer const):
        (WebCore::ScrollableArea::isListBox const):
        (WebCore::ScrollableArea::isPDFPlugin const):
        * rendering/RenderLayer.h:
        (isType):
        * rendering/RenderListBox.h:
        (isType):

2020-03-31  Kate Cheney  <katherine_cheney@apple.com>

        Requests for messageHandlers() in the DOMWindow should be ignored for non-app-bound navigations
        https://bugs.webkit.org/show_bug.cgi?id=209836
        <rdar://problem/61071607>

        Reviewed by Brent Fulgham.

        Ignore calls for WebKitNamespace::messageHandlers() and add release
        logging if the domain is not app-bound.

        * page/WebKitNamespace.cpp:
        (WebCore::WebKitNamespace::messageHandlers):

2020-03-31  Wenson Hsieh  <wenson_hsieh@apple.com>

        Datalist option's label not used
        https://bugs.webkit.org/show_bug.cgi?id=201768
        <rdar://problem/55361186>

        Reviewed by Darin Adler.

        Refactor DataListSuggestionInformation's suggestions to include label text as well as values, and then adjust
        TextFieldInputType::suggestions() to match label text as well as values for ports that are capable of showing
        label text in datalist suggestion UI.

        Test: fast/forms/datalist/datalist-option-labels.html

        * html/DataListSuggestionInformation.h:

        Introduce DataListSuggestion, a wrapper around a value and label. Currently, the list of datalist suggestions
        is only a `Vector<String>`; change it to be a `Vector<DataListSuggestion>` instead.

        (WebCore::DataListSuggestion::encode const):
        (WebCore::DataListSuggestion::decode):
        (WebCore::DataListSuggestionInformation::encode const):
        (WebCore::DataListSuggestionInformation::decode):

        Move encoding and decoding for DataListSuggestionInformation out of WebCoreArgumentCoders and into WebCore.

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::listAttributeTargetChanged):
        (WebCore::TextFieldInputType::suggestions):

        When computing suggestions, match label text in addition to values on ports that display label text in the
        chrome; for the time being, this is only the case for macOS, but will be extended to iOS as well in a future
        patch. Note that we don't plumb label text if it is already the same as the value, to avoid duplicate strings
        from showing up.

        (WebCore::TextFieldInputType::didCloseSuggestions):
        * html/TextFieldInputType.h:
        * loader/EmptyClients.h:
        * page/ChromeClient.h:

        Add a chrome client hook to return whether or not the client shows label text in its datalist UI.

        * platform/DataListSuggestionsClient.h:

2020-03-31  Don Olmstead  <don.olmstead@sony.com>

        [PlayStation] Fix build breaks after r259112
        https://bugs.webkit.org/show_bug.cgi?id=209830

        Unreviewed build fix.

        Add USE(GLIB) guards around RunLoopSourcePriority usage.

        * platform/ScrollAnimationKinetic.cpp:
        (WebCore::ScrollAnimationKinetic::ScrollAnimationKinetic):

2020-03-31  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: destroy WebIDBServer when session is removed in network process
        https://bugs.webkit.org/show_bug.cgi?id=209606
        <rdar://problem/59310081>

        Reviewed by Geoffrey Garen.

        Rename immediateCloseForUserDelete to immediateClose as we now use it in destructor of IDBServer to make sure 
        everything in database finishes correctly.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::~IDBServer):
        (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
        (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::immediateClose):
        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2020-03-31  Chris Dumez  <cdumez@apple.com>

        Regression(r253357) DeviceMotionEvent acceleration and rotationRate are null
        https://bugs.webkit.org/show_bug.cgi?id=209831
        <rdar://problem/60720953>

        Reviewed by Darin Adler.

        The issue was that DeviceMotionClientIOS::motionChanged() would only initialize the
        acceleration and rotationRate if [m_motionManager gyroAvailable] returned YES. After
        r253357, m_motionManager is nil because we get motion data from the UIProcess so
        [m_motionManager gyroAvailable] would always resolve to NO.

        To address the issue, I made the rotationRate parameters to motionChanged() optional
        and we rely on them being set to know if gyro data is available. Note that I did not
        make the acceleration optional because according to [1], all devices have an
        accelerometer.

        [1] https://developer.apple.com/documentation/coremotion/cmmotionmanager/1616094-devicemotionavailable?language=objc

        * platform/ios/DeviceMotionClientIOS.h:
        * platform/ios/DeviceMotionClientIOS.mm:
        (WebCore::DeviceMotionClientIOS::motionChanged):
        * platform/ios/DeviceOrientationUpdateProvider.h:
        * platform/ios/MotionManagerClient.h:
        (WebCore::MotionManagerClient::motionChanged):
        * platform/ios/WebCoreMotionManager.mm:
        (-[WebCoreMotionManager sendAccelerometerData:]):

2020-03-31  Antoine Quint  <graouts@apple.com>

        [iPadOS] Unable to scrub videos on nba.com
        https://bugs.webkit.org/show_bug.cgi?id=209829
        <rdar://problem/58804360>

        Reviewed by Dean Jackson.

        Opt nba.com into the simulated mouse events dispatch quirk.

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

2020-03-31  Rob Buis  <rbuis@igalia.com>

        Append Upgrade-Insecure-Requests header in CachedResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=209664

        Reviewed by Youenn Fablet.

        Append Upgrade-Insecure-Requests header in CachedResourceLoader, following
        the fetch spec [1, step 3].

        [1] https://fetch.spec.whatwg.org/#concept-main-fetch

        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::populateFrameLoadRequest):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addExtraFieldsToMainResourceRequest):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        (WebCore::createWindow):
        (WebCore::FrameLoader::addHTTPUpgradeInsecureRequestsIfNeeded): Deleted.
        * loader/FrameLoader.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2020-03-31  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Invalid memory access @ WebCore::FrameLoader::dispatchDidCommitLoad
        https://bugs.webkit.org/show_bug.cgi?id=209786

        Reviewed by Ryosuke Niwa.

        No new tests. Reduced test would be added later. Currently issue is verified with the original testcase in associated radar-58416328.

        Webkit1 only issue, where m_client.dispatchDidCommitLoad in FrameLoader::dispatchDidCommitLoad could cause the frame
        to be destroyed, and m_frame still being accessed outside. Changes made to protect the DocumentLoader and Frame.        

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::finishedLoading):
        (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::receivedFirstData):

2020-03-31  Lauro Moura  <lmoura@igalia.com>

        Buildfix after r259928.

        Replace outer function with its virtual implementation in
        child class.

        Unreviewed build fix.

        * workers/WorkerAnimationController.cpp:
        (WebCore::WorkerAnimationController::virtualHasPendingActivity const):
        (WebCore::WorkerAnimationController::hasPendingActivity const): Deleted.
        * workers/WorkerAnimationController.h:

2020-03-31  Eric Carlson  <eric.carlson@apple.com>

        [iPad] Use AVAudioSession to detect AirPlay route changes
        https://bugs.webkit.org/show_bug.cgi?id=209789
        <rdar://problem/58065279>

        Reviewed by Jer Noble.

        No new tests: changes only affect playback on device to an actual AirPlay device, which
        is not testable on our current testing infrastructure.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::checkPlaybackTargetCompatablity): Drive-by fix: pass log identifier
        into lambda so the method name is logged.
        (WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget): Ditto. 
        (WebCore::HTMLMediaElement::setWirelessPlaybackTarget): Update logging.
        (WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget): Call setIsPlayingToWirelessTarget
        so we kick off a media player compatibility check.

        * platform/audio/PlatformMediaSessionManager.h: Remove unused instance variables.
        * platform/audio/ios/MediaSessionHelperIOS.mm:
        (MediaSessionHelperiOS::activeAudioRouteDidChange): Change parameter to bool as it is always
        present.
        (MediaSessionHelperiOS::activeVideoRouteDidChange): Remove parameters, use the new
        MediaPlaybackTargetCocoa create method and ask it if the target supports AirPlay.
        (-[WebMediaSessionHelper initWithCallback:]): Listen for AVAudioSessionRouteChangeNotification.
        (-[WebMediaSessionHelper activeOutputDeviceDidChange:]): Update for new notification source.
        (-[WebMediaSessionHelper activeAudioRouteDidChange:]): Deleted.

        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Set playback target on session
        that is about to begin playback.
        (WebCore::MediaSessionManageriOS::activeVideoRouteDidChange): Save the target and state.

        * platform/graphics/MediaPlaybackTarget.h:
        * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h:
        * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
        (WebCore::MediaPlaybackTargetCocoa::create): Create a target from the application's currently
        active AVOutputContext.
        (WebCore::MediaPlaybackTargetCocoa::supportsAirPlayVideo const): New.
        (WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const): Use new API if available instead
        of just checking for the AVOutputContext name.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget): Log.
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget): 
        * platform/mock/MediaPlaybackTargetMock.h:

2020-03-31  Jer Noble  <jer.noble@apple.com>

        REGRESSION: [ Mac wk2 Release ] Flaky crash in WebCore::MediaPlayer::createVideoFullscreenLayer
        https://bugs.webkit.org/show_bug.cgi?id=209668
        <rdar://problem/60976297>

        Reviewed by Darin Adler.

        Null check m_player and m_videoElement before calling createVideoFullscreenLayer().

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::createVideoFullscreenLayer):
        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
        (WebCore::VideoFullscreenModelVideoElement::createVideoFullscreenLayer):

2020-03-31  Chris Dumez  <cdumez@apple.com>

        ASSERTION FAILED: m_wrapper on imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay.html
        https://bugs.webkit.org/show_bug.cgi?id=209684
        <rdar://problem/60987285>

        Reviewed by Darin Adler.

        I have not been able to reproduce so this is a speculative fix. HTMLMediaElement::virtualHasPendingActivity()
        was checking MainThreadGenericEventQueue::hasPendingEvents() but this would return false for a short amount
        of time where we've removed the last event from the queue and before we've actually fired the event. To
        address the issue, we now rely on MainThreadGenericEventQueue::hasPendingActivity() which keeps returning
        true after we've dequeued the last event, until we've fired it.

        No new tests, covered by imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay.html.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::virtualHasPendingActivity const):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::virtualHasPendingActivity const):
        * dom/GenericEventQueue.cpp:
        (WebCore::MainThreadGenericEventQueue::dispatchOneEvent):
        (WebCore::MainThreadGenericEventQueue::hasPendingActivity const):
        (WebCore::MainThreadGenericEventQueue::hasPendingEvents const): Deleted.
        * dom/GenericEventQueue.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::virtualHasPendingActivity const):
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::virtualHasPendingActivity const):

2020-03-31  Chris Lord  <clord@igalia.com>

        requestAnimationFrame and cancelAnimationFrame should be present on DedicatedWorkerGlobalScope
        https://bugs.webkit.org/show_bug.cgi?id=202525

        Reviewed by Simon Fraser.

        Implement AnimationFrameProvider on DedicatedWorkerGlobalScope,
        This allows use of requestAnimationFrame and cancelAnimationFrame
        inside a dedicated worker thread. This is useful to control animation
        when using OffscreenCanvas, and this implementation is only enabled
        with the OffscreenCanvas build flag and runtime setting.
        Specification: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#animation-frames

        No new tests. Covered by existing tests.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/RequestAnimationFrameCallback.h:
        * workers/DedicatedWorkerGlobalScope.cpp:
        (WebCore::DedicatedWorkerGlobalScope::requestAnimationFrame):
        (WebCore::DedicatedWorkerGlobalScope::cancelAnimationFrame):
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/DedicatedWorkerGlobalScope.idl:
        * workers/WorkerAnimationController.cpp: Added.
        * workers/WorkerAnimationController.h: Added.
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
        * workers/WorkerGlobalScope.h:
        (WebCore::WorkerGlobalScope::requestAnimationFrameEnabled const):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * workers/WorkerThread.cpp:
        (WebCore::WorkerParameters::isolatedCopy const):
        * workers/WorkerThread.h:
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::ServiceWorkerThread):

2020-03-31  Zalan Bujtas  <zalan@apple.com>

        [Tables] Infinite recursion in RenderTreeBuilder::attach
        https://bugs.webkit.org/show_bug.cgi?id=209771
        <rdar://problem/59923112>

        Reviewed by Simon Fraser.

        Let's construct a COLGROUP wrapper when a COL element is inserted into a <table>. The rest of the table code assumes such structure.
        (https://www.w3.org/TR/html52/tabular-data.html#the-col-element)

        Test: fast/table/anonymous-colgroup-simple.html

        * rendering/RenderTableCol.cpp:
        (WebCore::RenderTableCol::RenderTableCol):
        (WebCore::RenderTableCol::updateFromElement):
        * rendering/RenderTableCol.h:
        * rendering/updating/RenderTreeBuilderTable.cpp:
        (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):

2020-03-31  youenn fablet  <youenn@apple.com>

        Fix SDP filtering after https://trac.webkit.org/changeset/258545
        https://bugs.webkit.org/show_bug.cgi?id=209799

        Reviewed by Eric Carlson.

        Covered by updated test.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::filterSDP const):
        Do not return early in case of filtering of mDNS candidate inlined in SDP description.

2020-03-31  youenn fablet  <youenn@apple.com>

        Ensure that RealtimeMediaSource::setShouldApplyRotation is called on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=209797

        Reviewed by Eric Carlson.

        Hop to the main thread before calling setShouldApplyRotation on the source.

        * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
        (WebCore::RealtimeOutgoingVideoSource::setSource):
        (WebCore::RealtimeOutgoingVideoSource::applyRotation):

2020-03-31  Andres Gonzalez  <andresg_22@apple.com>

        The relative frame and hit test of isolated objects must be dispatched to the main thread.
        https://bugs.webkit.org/show_bug.cgi?id=209792

        Reviewed by Chris Fleizach.

        The relative frame of isolated objects must be calculated on the main
        thread because it requires the scroll ancestor to convert to the
        appropriate scroll offset. The relative frame cannot be cached because
        the scroll offset can change.
        Accordingly, the hit test cannot rely on a cached relative frame and
        must be dispatched to be computed on the main thread as well.

        * accessibility/AXObjectCache.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData): Do not cache the relative frame any longer.
        (WebCore::AXIsolatedObject::accessibilityHitTest const): Dispatched to the main thread.
        (WebCore::AXIsolatedObject::relativeFrame const): Dispatched to the main thread.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper position]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):

2020-03-31  Antti Koivisto  <antti@apple.com>

        Nullptr crash in InlineTextBox::emphasisMarkExistsAndIsAbove
        https://bugs.webkit.org/show_bug.cgi?id=207034

        Reviewed by Zalan Bujtas.

        The repro case was fixed in https://bugs.webkit.org/show_bug.cgi?id=209695.

        Test: editing/selection/selection-update-during-anonymous-inline-teardown.html

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):

        Also add a null check to be sure.

2020-03-31  Zan Dobersek  <zdobersek@igalia.com>

        [GTK][WPE] Jumpy rendering of fixed-element layers while scrolling
        https://bugs.webkit.org/show_bug.cgi?id=209466

        Reviewed by Carlos Garcia Campos.

        Avoid intermittent state application that can occur when asynchronous
        scrolling is done on the dedicated thread while the general scene update
        is being done in parallel on the composition thread, leading to partial
        scrolling updates that visually present themselves as e.g. fixed
        elements "jumping" around the view.

        Instead of the staging state of a given Nicosia::CompositionLayer, the
        scrolling nodes now update the base state with the given scrolling
        change. At the end of the update, inside the UpdateScope descructor,
        the updated states inside the scene are flushed into the staging phase
        before they are adopted by the composition thread.

        * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp:
        (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
        * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
        (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
        * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
        (Nicosia::CompositionLayer::accessStaging): Deleted.
        * platform/graphics/nicosia/NicosiaSceneIntegration.cpp:
        (Nicosia::SceneIntegration::SceneIntegration):
        (Nicosia::SceneIntegration::invalidate):
        (Nicosia::SceneIntegration::UpdateScope::~UpdateScope):
        * platform/graphics/nicosia/NicosiaSceneIntegration.h:
        (Nicosia::SceneIntegration::create):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::syncPosition):
        Don't signal the related attribute delta flag since this change is now
        strictly applied by the scrolling thread.
        (WebCore::CoordinatedGraphicsLayer::syncBoundsOrigin): Ditto.

2020-03-30  Simon Fraser  <simon.fraser@apple.com>

        Scroll latching state is not a stack
        https://bugs.webkit.org/show_bug.cgi?id=209790

        Reviewed by Zalan Bujtas.

        No-one ever called Page::popLatchingState(), so the fact that latchingState on Page
        was a stack was never important. Just make it a single state.

        * page/Page.cpp:
        (WebCore::Page::latchingState):
        (WebCore::Page::setLatchingState):
        (WebCore::Page::resetLatchingState):
        (WebCore::Page::removeLatchingStateForTarget):
        (WebCore::Page::pushNewLatchingState): Deleted.
        (WebCore::Page::popLatchingState): Deleted.
        * page/Page.h:
        (WebCore::Page::latchingStateStack const): Deleted.
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents):
        * page/scrolling/ScrollLatchingState.h:

2020-03-28  Simon Fraser  <simon.fraser@apple.com>

        ScrollLatchingState should use WeakPtr<Element>
        https://bugs.webkit.org/show_bug.cgi?id=209714

        Reviewed by Darin Adler.

        ScrollLatchingState shouldn't affect element lifetimes. Change it to use WeakPtr instead
        of RefPtr<>.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::defaultWheelEventHandler):
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents):
        * page/scrolling/ScrollLatchingState.cpp:
        (WebCore::ScrollLatchingState::setWheelEventElement):
        (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement):
        (WebCore::ScrollLatchingState::setScrollableContainer):
        * page/scrolling/ScrollLatchingState.h:

2020-03-30  Megan Gardner  <megan_gardner@apple.com>

        Update to new Data Detectors SPI
        https://bugs.webkit.org/show_bug.cgi?id=209788
        <rdar://problem/60690050>

        Reviewed by Tim Horton.

        Updating to a newer SPI to help Data Detectors. 
        No behavior change.

        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
        (WebCore::ServicesOverlayController::buildSelectionHighlight):

2020-03-30  John Wilander  <wilander@apple.com>

        Experimental: Enforce SameSite=strict for domains classified as bounce trackers
        https://bugs.webkit.org/show_bug.cgi?id=209761
        <rdar://problem/59394943>

        Reviewed by Brent Fulgham and Kate Cheney (informal).

        This experimental feature is part of Intelligent Tracking Prevention and only enabled if
        ITP (Resource Load Statistics) are. A new enum WebCore::SameSiteStrictEnforcementEnabled
        controls the new behavior with default setting WebCore::SameSiteStrictEnforcementEnabled::No.

        The features keeps a separate count of topFrameUniqueRedirectsToSinceSameSiteStrictEnforcement
        which builds up to a threshold. Once a domain goes above the threshold, its cookies are
        rewritten as SameSite=strict and the topFrameUniqueRedirectsToSinceSameSiteStrictEnforcement
        counter for that domain is reset, effectively giving the domain a new chance to change its
        behavior.

        Tests: http/tests/resourceLoadStatistics/enforce-samesite-strict-based-on-top-frame-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/enforce-samesite-strict-based-on-top-frame-unique-redirects-to.html

        * loader/ResourceLoadStatistics.h:
            New field topFrameUniqueRedirectsToSinceSameSiteStrictEnforcement.
        * page/Settings.yaml:
        * platform/network/NetworkStorageSession.h:
            New enum SameSiteStrictEnforcementEnabled.

2020-03-30  Devin Rousso  <drousso@apple.com>

        [CSS Selectors 4] Add support for `:is()` with the same logic for the existing `:matches()`
        https://bugs.webkit.org/show_bug.cgi?id=209707

        Reviewed by Antti Koivisto.

        Add `PseudoClassType::PseudoClassIs` and use it where `PseudoClassTyle::PseudoClassMatches`
        is already used now.

        Tests: fast/css/is-specificity-1.html
               fast/css/is-specificity-2.html
               fast/css/is-specificity-3.html
               fast/css/is-specificity-4.html
               fast/css/is-specificity-5.html
               fast/css/is-specificity-6.html
               fast/css/is-specificity-7.html
               fast/css/is-specificity-8.html
               fast/css/is-specificity-9.html
               fast/css/is-specificity-10.html
               fast/css/parsing-css-is-1.html
               fast/css/parsing-css-is-2.html
               fast/css/parsing-css-is-3.html
               fast/css/parsing-css-is-4.html
               fast/css/parsing-css-is-5.html
               fast/css/parsing-css-is-6.html
               fast/css/parsing-css-is-7.html
               fast/css/parsing-css-is-8.html
               fast/selectors/is-backtracking.html
               fast/selectors/is-complex.html
               fast/selectors/is-selector-list.html
               fast/selectors/is-selector-list-ending-with-never-matching-selectors.html
               fast/selectors/is-with-pseudo-element.html
               fast/selectors/pseudo-element-inside-is.html
               fast/selectors/querySelector-is.html
               imported/w3c/web-platform-tests/css/selectors/invalidation/is.html
               imported/w3c/web-platform-tests/css/selectors/is-nested.html
               imported/w3c/web-platform-tests/css/selectors/is-specificity.html

        * css/CSSSelector.h:
        * css/CSSSelector.cpp:
        (WebCore::simpleSelectorSpecificityInternal):
        (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
        (WebCore::CSSSelector::selectorText const):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively const):
        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::isOnlyPseudoClassFunction):
        (WebCore::CSSSelectorParser::consumePseudo):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):
        (WebCore::SelectorChecker::checkOne const):

        * inspector/InspectorStyleSheet.cpp:
        (WebCore::hasDynamicSpecificity):

        * features.json:

2020-03-30  Chris Dumez  <cdumez@apple.com>

        Overrides of ActiveDOMObject::hasPendingActivity() should not need to query the base class's hasPendingActivity()
        https://bugs.webkit.org/show_bug.cgi?id=209754

        Reviewed by Geoff Garen and Darin Adler.

        Overrides of ActiveDOMObject::hasPendingActivity() should not need to query the base
        class's hasPendingActivity(). This is error-prone and leads to bad bugs.

        To address the issue, ActiveDOMObject::hasPendingActivity() is no longer virtual and
        checks both m_pendingActivityCount and a virtual virtualHasPendingActivity() function.
        Subclasses now override virtualHasPendingActivity() and no longer need to query the
        base class's virtualHasPendingActivity().

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::virtualHasPendingActivity const):
        (WebCore::MediaKeySession::hasPendingActivity const): Deleted.
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        (WebCore::WebKitMediaKeySession::virtualHasPendingActivity const):
        (WebCore::WebKitMediaKeySession::hasPendingActivity const): Deleted.
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::virtualHasPendingActivity const):
        (WebCore::IDBDatabase::hasPendingActivity const): Deleted.
        * Modules/indexeddb/IDBDatabase.h:
        * Modules/indexeddb/IDBIndex.cpp:
        (WebCore::IDBIndex::virtualHasPendingActivity const):
        (WebCore::IDBIndex::hasPendingActivity const): Deleted.
        * Modules/indexeddb/IDBIndex.h:
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::virtualHasPendingActivity const):
        (WebCore::IDBObjectStore::hasPendingActivity const): Deleted.
        * Modules/indexeddb/IDBObjectStore.h:
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::virtualHasPendingActivity const):
        (WebCore::IDBRequest::hasPendingActivity const): Deleted.
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::virtualHasPendingActivity const):
        (WebCore::IDBTransaction::hasPendingActivity const): Deleted.
        * Modules/indexeddb/IDBTransaction.h:
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::virtualHasPendingActivity const):
        (WebCore::MediaRecorder::hasPendingActivity const): Deleted.
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::virtualHasPendingActivity const):
        (WebCore::MediaSource::hasPendingActivity const): Deleted.
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::virtualHasPendingActivity const):
        (WebCore::SourceBuffer::hasPendingActivity const): Deleted.
        * Modules/mediasource/SourceBuffer.h:
        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::virtualHasPendingActivity const):
        (WebCore::MediaDevices::hasPendingActivity const): Deleted.
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::virtualHasPendingActivity const):
        (WebCore::MediaStream::hasPendingActivity const): Deleted.
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::virtualHasPendingActivity const):
        (WebCore::MediaStreamTrack::hasPendingActivity const): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::virtualHasPendingActivity const):
        (WebCore::RTCPeerConnection::hasPendingActivity const): Deleted.
        * Modules/mediastream/RTCPeerConnection.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::virtualHasPendingActivity const):
        (WebCore::WebAnimation::hasPendingActivity const): Deleted.
        * animation/WebAnimation.h:
        * css/FontFace.cpp:
        (WebCore::FontFace::virtualHasPendingActivity const):
        (WebCore::FontFace::hasPendingActivity const): Deleted.
        * css/FontFace.h:
        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::hasPendingActivity const): Deleted.
        * dom/ActiveDOMObject.h:
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::virtualHasPendingActivity const):
        (WebCore::MessagePort::hasPendingActivity const): Deleted.
        * dom/MessagePort.h:
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::virtualHasPendingActivity const):
        (WebCore::FileReader::hasPendingActivity const): Deleted.
        * fileapi/FileReader.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::virtualHasPendingActivity const):
        (WebCore::HTMLMediaElement::hasPendingActivity const): Deleted.
        * html/HTMLMediaElement.h:
        * html/HTMLTrackElement.cpp:
        (WebCore::HTMLTrackElement::virtualHasPendingActivity const):
        (WebCore::HTMLTrackElement::hasPendingActivity const): Deleted.
        * html/HTMLTrackElement.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::hasPendingActivity const): Deleted.
        * html/canvas/WebGLRenderingContextBase.h:
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::virtualHasPendingActivity const):
        (WebCore::TrackListBase::hasPendingActivity const): Deleted.
        * html/track/TrackListBase.h:
        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::virtualHasPendingActivity const):
        (WebCore::IntersectionObserver::hasPendingActivity const): Deleted.
        * page/IntersectionObserver.h:
        * page/ResizeObserver.cpp:
        (WebCore::ResizeObserver::virtualHasPendingActivity const):
        (WebCore::ResizeObserver::hasPendingActivity const): Deleted.
        * page/ResizeObserver.h:
        * page/SuspendableTimer.cpp:
        (WebCore::SuspendableTimerBase::virtualHasPendingActivity const):
        (WebCore::SuspendableTimerBase::hasPendingActivity const): Deleted.
        * page/SuspendableTimer.h:
        * workers/Worker.cpp:
        (WebCore::Worker::virtualHasPendingActivity const):
        (WebCore::Worker::hasPendingActivity const): Deleted.
        * workers/Worker.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::virtualHasPendingActivity const):
        (WebCore::ServiceWorkerRegistration::hasPendingActivity const): Deleted.
        * workers/service/ServiceWorkerRegistration.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::virtualHasPendingActivity const):
        (WebCore::XMLHttpRequest::hasPendingActivity const): Deleted.
        * xml/XMLHttpRequest.h:

2020-03-30  Simon Fraser  <simon.fraser@apple.com>

        scrollIntoView() erroneously scrolls non-containing block scrollers
        https://bugs.webkit.org/show_bug.cgi?id=209715

        Reviewed by Zalan Bujtas.

        RenderLayer::scrollByRecursively() would just walk up the parent RenderLayer chain
        trying to scroll each one. However, this would hit overflow:scroll which wasn't in the
        containing block chain, erroneously scrolling unrelated scrollers.

        Fix by adding RenderLayer::enclosingLayerInContainingBlockOrder() and calling
        it from RenderLayer::enclosingScrollableLayer(). Also extend enclosingScrollableLayer()
        to make explicit 'include self' and frame-boundary crossing.

        In future, scrollByRecursively() should really be virtual on ScrollableArea, and implemented
        on its subclasses.

        Test: http/wpt/css/cssom-view/scrollintoview-containingblock-chain.html

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::enclosingLayerInContainingBlockOrder const):
        (WebCore::enclosingContainingBlockLayer):
        (WebCore::RenderLayer::enclosingScrollableLayer const):
        (WebCore::RenderLayer::scrollByRecursively):
        (WebCore::RenderLayer::scrollRectToVisible):
        (WebCore::RenderLayer::enclosingScrollableArea const):
        (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
        (WebCore::RenderLayer::calculateClipRects const):
        (WebCore::parentLayerCrossFrame): Deleted.
        * rendering/RenderLayer.h:

2020-03-30  Wenson Hsieh  <wenson_hsieh@apple.com>

        WebPasteboardProxy::SetPasteboardURL should fail gracefully when the copied NSURL is nil
        https://bugs.webkit.org/show_bug.cgi?id=209785
        <rdar://problem/61075986>

        Reviewed by Tim Horton.

        Harden PlatformPasteboard::setURL() against the possibility of a null NSURL when converting the given
        PasteboardURL's WebKit URL into a URL string using -[NSURL absoluteString].

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::setURL):

2020-03-27  Ryosuke Niwa  <rniwa@webkit.org>

        Assertion failure in HTMLFormElement::formElementIndex
        https://bugs.webkit.org/show_bug.cgi?id=209643

        Reviewed by Darin Adler.

        The bug was caused by FormAssociatedElement::findAssociatedForm finding a wrong form element
        when it's called on an element which appears later in the removed subtree.

        When we find the new form element to associate this element with, check to make sure its root
        element is that of the tree scope. This condition will be false if this element is in in the midst
        of being removed.

        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::findAssociatedForm):

2020-03-30  Don Olmstead  <don.olmstead@sony.com>

        Non-unified build fixes late March 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=209781

        Unreviewed build fix.

        * animation/ElementAnimationRareData.cpp:
        * dom/SimpleRange.cpp:
        * editing/VisiblePosition.cpp:
        * layout/blockformatting/BlockFormattingContext.cpp:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        * layout/invalidation/InvalidationState.cpp:
        * layout/tableformatting/TableFormattingContext.cpp:
        * page/FocusController.cpp:
        * page/PageConfiguration.cpp:
        * rendering/RenderBlock.cpp:
        * svg/SVGClipPathElement.cpp:
        * xml/parser/XMLDocumentParserLibxml2.cpp:

2020-03-30  Devin Rousso  <drousso@apple.com>

        Web Inspector: provide a way to log messages from the network process
        https://bugs.webkit.org/show_bug.cgi?id=204775

        Reviewed by Brian Burg.

        ITP can be influenced by multiple pages simultaneously, meaning that sending a console
        message to the Web Inspector that's connected to the page that caused a change may not be
        useful as developers often don't test in complete isolation. As such, having a way to
        broadcast a console message to all Web Inspectors ensures that any changes caused by any
        page are always able to be seen, no matter which page is being actively inspected.

        * loader/AdClickAttribution.h:
        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::parseConversionRequest):
        Add a console message to Web Inspector if there are any errors when parsing an ad click
        attribution link attribute.

2020-03-30  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, reverting r259158.

        This commit caused an assertion failure

        Reverted changeset:

        "Nullptr crash in InlineTextBox::emphasisMarkExistsAndIsAbove"
        https://bugs.webkit.org/show_bug.cgi?id=207034
        https://trac.webkit.org/changeset/259158

2020-03-30  Andres Gonzalez  <andresg_22@apple.com>

        [WebAccessibilityObjectWrapper remoteAccessibilityParentObject should be cached to avoid hitting the main thread often.
        https://bugs.webkit.org/show_bug.cgi?id=209576

        Reviewed by Chris Fleizach.

        [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] is
        called very often and thus is a performance hit in isolated tree mode
        since it has to be dispatched to the main thread. This change caches
        this value in AXIsolatedObject, so no need to dispatch to the main
        thread any longer.
        In addition, the PlatformWidget that was cached in a member variable,
        is now cached in the attribute map as well as the remoteParentObject.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::remoteParentObject const): Actual implementation of this method.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::platformWidget const): Deleted.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        (WebCore::AXIsolatedObject::propertyValue const):
        * accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
        (WebCore::AXIsolatedObject::remoteParentObject const):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]): No need to dispatch to main thread.
        (-[WebAccessibilityObjectWrapper scrollViewParent]):

2020-03-30  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Sleep disabling should be performed in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=209676

        Reviewed by Darin Adler.

        Remove unnecessary include.

        * platform/SleepDisabler.h:

2020-03-30  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: destroy UniqueIDBDatabase when it's not used
        https://bugs.webkit.org/show_bug.cgi?id=209532
        <rdar://problem/60906908>

        Reviewed by Geoffrey Garen.

        When all connections of a UniqueIDBDatabase object are closed and there are no pending reuqests, the 
        object may not be used any more. We should delete it for better memory use.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::deleteDatabase):
        (WebCore::IDBServer::IDBServer::establishTransaction):
        (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
        (WebCore::IDBServer::IDBServer::openDBRequestCancelled):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::tryClose):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2020-03-30  Jack Lee  <shihchieh_lee@apple.com>

        Division by zero in RenderBlockFlow::computeColumnCountAndWidth
        https://bugs.webkit.org/show_bug.cgi?id=209485
        <rdar://problem/60746109>

        Reviewed by Zalan Bujtas.

        When computing content width and height, set it to 0 if the computed size
        is negative.

        Test: fast/multicol/negativeColumnGap.html

        * rendering/RenderBox.h:
        (WebCore::RenderBox::contentWidth const):
        (WebCore::RenderBox::contentHeight const):

2020-03-30  Chris Dumez  <cdumez@apple.com>

        NetworkStorageSession::unregisterCookieChangeListenersIfNecessary() should use new CFNetwork SPI when available
        https://bugs.webkit.org/show_bug.cgi?id=209742
        <rdar://problem/61040492>

        Reviewed by Geoffrey Garen.

        NetworkStorageSession::unregisterCookieChangeListenersIfNecessary() should use new CFNetwork SPI when available.
        Using the old SPI on builds that no longer have it causes crashes.

        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::unregisterCookieChangeListenersIfNecessary):

2020-03-30  Devin Rousso  <drousso@apple.com>

        [Web Animations] Crash under `KeyframeEffect::getKeyframes` for a `DeclarativeAnimation`
        https://bugs.webkit.org/show_bug.cgi?id=209682
        <rdar://problem/60962458>

        Reviewed by Antoine Quint.

        Test: webanimations/css-animation-effect-target-change-and-get-keyframes-crash.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::getKeyframes):
        * inspector/agents/InspectorAnimationAgent.cpp:
        (WebCore::buildObjectForKeyframes):
        With the flexibility of the Web Animations API, it's possible for a `DeclarativeAnimation`
        to not have a `target`. As such, we should not expect it to exist, and should remove any
        `ASSERT` or unchecked dereferences.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::effectTimingDidChange):
        Drive-by: ensure that `InspectorInstrumentation` is called last.

2020-03-30  Michael Catanzaro  <mcatanzaro@gnome.org>

        Add user agent quirk for Red Hat Bugzilla
        https://bugs.webkit.org/show_bug.cgi?id=209484

        Reviewed by Adrian Perez de Castro.

        Red Hat Bugzilla displays a warning page when performing searches with WebKitGTK's standard
        user agent.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresFirefoxBrowser):

2020-03-30  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Sleep disabling should be performed in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=209676

        Reviewed by Darin Adler.

        Since sleep disabling is causing communication with the power management service, it should be performed in the UI process.
        This patch fixes this by creating a sleep disabler client, which will notify the UI process when a sleep disabler is being
        created and destroyed. In response to these messages, the UI process will perform the actual sleep disabling and enabling.
        A new sleep disabler class is created which wraps the PAL sleep disabler, and notifies the sleep disabler client when set.
        If the sleep disabler client is set, a PAL sleep disabler instance will not be created in the WebContent process, since this
        will then happen in the UI process.

        API test: WebKit.SleepDisabler

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateSleepDisabling):
        * html/HTMLMediaElement.h:
        * platform/SleepDisabler.cpp: Added.
        (WebCore::SleepDisabler::SleepDisabler):
        (WebCore::SleepDisabler::~SleepDisabler):
        * platform/SleepDisabler.h: Added.
        (WebCore::SleepDisabler::type const):
        * platform/SleepDisablerClient.cpp: Added.
        (WebCore::sleepDisablerClient):
        * platform/SleepDisablerClient.h: Added.
        (WebCore::SleepDisablerClient::~SleepDisablerClient):
        * platform/SleepDisablerIdentifier.h: Added.
        * testing/Internals.cpp:
        (WebCore::Internals::createSleepDisabler):
        (WebCore::Internals::destroySleepDisabler):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-30  Antoine Quint  <graouts@apple.com>

        Mark Pointer Events and Web Animations features as completed in https://webkit.org/status/
        https://bugs.webkit.org/show_bug.cgi?id=209730

        Reviewed by Antti Koivisto.

        Pointer Events and Web Animations have been completed already, mark those as Supported in https://webkit.org/status/.
        Additionally, we fix an alphabetical ordering issue.

        * features.json:

2020-03-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. [GTK][WPE] Media controls: Remove references to -webkit-media-controls-time-remaining-display

        * Modules/mediacontrols/mediaControlsAdwaita.css:
        (audio::-webkit-media-controls-current-time-display.hidden,):

2020-03-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] REGRESSION(r257775): Media controls current time label changes its size when it's updated
        https://bugs.webkit.org/show_bug.cgi?id=209593

        Reviewed by Xabier Rodriguez-Calvar.

        This regressed in r257775 for me, because my system font doesn't use fixed width for digits. We should try to
        use the tabular-nums font variant if available.

        * Modules/mediacontrols/mediaControlsAdwaita.css:
        (audio::-webkit-media-controls-current-time-display,): Add font-variant-numeric: tabular-nums;

2020-03-30  Zan Dobersek  <zdobersek@igalia.com>

        [WPE] Can't create WebGL context after r259139
        https://bugs.webkit.org/show_bug.cgi?id=209722

        Reviewed by Carlos Garcia Campos.

        Adjust the WebXRWebGLRenderingContext tuple depending on the WebGL2
        feature being enabled or not.

        * Modules/webxr/WebXRWebGLLayer.h:
        * Modules/webxr/WebXRWebGLLayer.idl:

2020-03-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [HarfBuzz] Not all CSS font features are applied
        https://bugs.webkit.org/show_bug.cgi?id=209591

        Reviewed by Adrian Perez de Castro.

        Implement font feature precedence algorithm for HarfBuzz, including features specified in font-face rule and
        font-variant settings that we were ignoring.

        7.2. Feature precedence
        https://www.w3.org/TR/css-fonts-3/#feature-precedence

        * platform/graphics/freetype/FontCacheFreeType.cpp:
        (WebCore::FontCache::createFontPlatformData): Add font features to be enanled to the font config pattern.
        * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
        * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
        (WebCore::setFeatureSettingsFromVariants): Helper to add font-variant settings.
        (WebCore::fontFeatures): Implement font feature precedence algorithm.
        (WebCore::findScriptForVerticalGlyphSubstitution): Use HB_TAG direftly.
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Pass FontPlatformData to fontFeatures().

2020-03-29  Antoine Quint  <graouts@apple.com>

        [AutoSizing] Bring back the old auto-sizing code as a deprecated codepath for compatibility reasons
        https://bugs.webkit.org/show_bug.cgi?id=209669
        <rdar://problem/60111081>

        Reviewed by Alan Bujtas and Darin Adler.

        We changed the auto-sizing code for webkit.org/b/196743 in r244098, but some clients need it and we bring it back
        via two exclusive auto-sizing mode: fixed-width (the existing mode) and size-to-content (the resurrected mode).

        * page/FrameView.cpp:
        (WebCore::FrameView::autoSizeIfEnabled):
        (WebCore::FrameView::performFixedWidthAutoSize):
        (WebCore::FrameView::performSizeToContentAutoSize):
        (WebCore::FrameView::enableFixedWidthAutoSizeMode):
        (WebCore::FrameView::enableSizeToContentAutoSizeMode):
        (WebCore::FrameView::enableAutoSizeMode):
        * page/FrameView.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::enableFixedWidthAutoSizeMode):
        (WebCore::Internals::enableAutoSizeMode): Deleted.
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-29  Darin Adler  <darin@apple.com>

        Move TextIterator::rangeFromLocationAndLength off of live ranges
        https://bugs.webkit.org/show_bug.cgi?id=209408

        Reviewed by Antti Koivisto.

        - Put CharacterRange into a header, CharacterRange.h.
        - Replaced CharacterOffset with direct uses of uint64_t.
          Because this can be a single offset into an entire document, use a
          64-bit integer so we don't limit an entire document to 2^32 characters;
          in theory this makes it so we can support a document with tons of
          text nodes that add up to more than 2^32.
        - Because CharacterRange uses 64-bit integers we can now convert more
          easily to and from NSRange and CFRange on Cocoa platforms.

        * Headers.cmake: Added CharacterRange.h.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
        Use CharacterRange, resolveCharacterLocation/Range.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (AXAttributeStringSetSpelling): Ditto.
        (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]): Ditto.

        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::collectTextRanges): Take SimpleRange.
        (WebCore::DocumentMarkerController::addMarker): Ditto.
        (WebCore::DocumentMarkerController::addDictationResultMarker): Ditto.
        (WebCore::DocumentMarkerController::addPlatformTextCheckingMarker): Ditto.
        * dom/DocumentMarkerController.h: Updated for above changes.

        * dom/Position.h: Export createLegacyEditingPosition so it can be used
        outside of WebCore.

        * dom/SimpleRange.cpp:
        (WebCore::fastIsCharacterData): Added. Could be moved to the Node class.
        (WebCore::length): Added. Could be moved to the Node class.
        (WebCore::makeRangeSelectingNodeContents): Added. Analogous to the
        Range::selectNodeContents function.
        * dom/SimpleRange.h: Updated for the above.

        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::applyAlternativeTextToRange):
        Use CharacterRange, resolveCharacterLocation/Range.
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle): Ditto.

        * editing/CharacterRange.h: Added.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs):
        Use CharacterRange, resolveCharacterLocation/Range.
        * editing/Editing.cpp:
        (WebCore::visiblePositionForIndex): Ditto.
        * editing/Editor.cpp:
        (WebCore::Editor::advanceToNextMisspelling): Ditto.
        (WebCore::correctSpellcheckingPreservingTextCheckingParagraph): Ditto.
        (WebCore::Editor::markAndReplaceFor): Ditto.
        (WebCore::Editor::changeBackToReplacedString): Ditto.
        (WebCore::Editor::scanRangeForTelephoneNumbers): Ditto.
        (WebCore::Editor::rangeForTextCheckingResult const): Ditto.
        * editing/TextCheckingHelper.cpp:
        (WebCore::findGrammaticalErrors): Ditto.
        (WebCore::findMisspellings): Ditto.
        (WebCore::TextCheckingParagraph::invalidateParagraphRangeValues): Ditto.
        (WebCore::TextCheckingParagraph::rangeLength const): Ditto.
        (WebCore::TextCheckingParagraph::subrange const): Ditto.
        (WebCore::TextCheckingParagraph::offsetTo const): Ditto.
        (WebCore::TextCheckingParagraph::text const): Ditto. Also use StringView.
        (WebCore::TextCheckingParagraph::checkingStart const): Ditto.
        (WebCore::TextCheckingParagraph::checkingEnd const): Ditto. Also compute
        this by adding start and length, and don't cache it.
        (WebCore::TextCheckingParagraph::checkingLength const): Ditto.
        (WebCore::TextCheckingParagraph::automaticReplacementStart const): Ditto.
        (WebCore::TextCheckingParagraph::automaticReplacementLength const): Ditto.
        (WebCore::TextCheckingHelper::findFirstMisspelling): Ditto.
        (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto.
        (WebCore::TextCheckingHelper::findFirstGrammarDetail const): Ditto.
        (WebCore::TextCheckingHelper::findFirstBadGrammar const): Ditto.
        (WebCore::TextCheckingHelper::isUngrammatical const): Ditto.
        (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange const): Ditto.
        (WebCore::TextCheckingHelper::markAllMisspellings): Ditto.
        (WebCore::TextCheckingHelper::markAllBadGrammar): Ditto.
        (WebCore::checkTextOfParagraph): Ditto.
        * editing/TextCheckingHelper.h: Updated for the above. Also got rid of
        m_checkingEnd since it's sufficient to cache the start and the length.
        Should come back later and use CharacterRange instead of 2x CharacterCount.

        * editing/TextIterator.cpp:
        (WebCore::characterCount): Use uint64_t.
        (WebCore::TextIterator::subrange): Deleted.
        (WebCore::TextIterator::rangeFromLocationAndLength): Deleted.
        (WebCore::clampedAdd): Added. Helps implement resolveCharacterRange in a way
        that can work with any character count without concern about overflow.
        (WebCore::resolveCharacterRange): Added. Replaces both subrange and
        rangeFromLocationAndLength, using an algorithm close to the one from
        the latter function, including workarounds it had. Replaced the boolean
        "forSelectionPreservation" with the TextIteratorBehavior options, which seems
        to make good sense at all the call sites.
        (WebCore::resolveCharacterLocation): Added. Like resolveCharacterRange, but
        instead of resolving CharacterRange to SimpleRange, resolves a character location
        to a BoundaryPoint. Made a separate function for this in case we later refactor
        for efficiency, but for now this simply calls resolveCharacterRange with a zero
        length range.

        * editing/TextIterator.h: Moved CharacterCount and CharagerRange into a
        separate header. Replaced TextIterator::rangeFromLocationAndLength and
        TextIterator::subrange with resolveCharacterLocation and resolveCharacterRange.

        * editing/cocoa/DataDetection.mm:
        (WebCore::detectItemAtPositionWithRange): Use CharacterRange,
        resolveCharacterLocation/Range.
        (WebCore::DataDetection::detectContentInRange): Ditto.
        * editing/cocoa/DictionaryLookup.mm:
        (WebCore::DictionaryLookup::rangeForSelection): Ditto.
        (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
        * editing/ios/DictationCommandIOS.cpp:
        (WebCore::DictationCommandIOS::doApply): Ditto.
        * editing/mac/DictionaryLookupLegacy.mm:
        (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
        * page/EventHandler.cpp:
        (WebCore::textDistance): Ditto.
        * page/Page.cpp:
        (WebCore::replaceRanges): Ditto.
        (WebCore::Page::replaceRangesWithText): Ditto.
        * platform/text/TextChecking.h: Ditto.
        * testing/Internals.cpp:
        (WebCore::Internals::rangeFromLocationAndLength): Ditto.
        (WebCore::Internals::subrange): Ditto.
        (WebCore::Internals::handleAcceptedCandidate): Ditto.

        * testing/Internals.h: Made location and length unsigned rather than signed.
        * testing/Internals.idl: Ditto.

2020-03-29  Rob Buis  <rbuis@igalia.com>

        Remove addHTTPOriginIfNeeded calls
        https://bugs.webkit.org/show_bug.cgi?id=209127

        Reviewed by Darin Adler.

        Remove unused code.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):

2020-03-29  Zalan Bujtas  <zalan@apple.com>

        [LFC] Replace parent() calls with containingBlock() where applicable.
        https://bugs.webkit.org/show_bug.cgi?id=209717

        Reviewed by Antti Koivisto.

        While they both return the same layout box (parent), it's more correct to call continingBlock().

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isOverflowVisible const):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::appendCell):

2020-03-29  Zalan Bujtas  <zalan@apple.com>

        [LFC] Layout::Box::parent() should return const ContainerBox&
        https://bugs.webkit.org/show_bug.cgi?id=209400
        <rdar://problem/60742432>

        Reviewed by Antti Koivisto.

        Layout tree is immutable during layout, so every box should be able to return a valid parent (except the ICB, but
        class InitialContainingBlock deletes parent() function anyway).

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::nextInlineLevelBoxToLayout):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::containingBlock const):
        (WebCore::Layout::Box::formattingContextRoot const):
        (WebCore::Layout::Box::initialContainingBlock const):
        (WebCore::Layout::Box::isOverflowVisible const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::parent const):
        * layout/layouttree/LayoutIterator.h:
        (WebCore::Layout::LayoutBoxTraversal::nextAncestorSibling):
        (WebCore::Layout::LayoutBoxTraversal::next):
        (WebCore::Layout::Traversal::firstWithin):
        (WebCore::Layout::Traversal::next):
        (WebCore::Layout::LayoutIterator<T>::traverseNext):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::appendCell):

2020-03-29  David Kilzer  <ddkilzer@apple.com>

        Windows build fix: Web Inspector: support editing cookie key/values from inspector
        https://bugs.webkit.org/show_bug.cgi?id=31157#c15
        <rdar://problem/19281523>

        * platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
        (WebCore::NetworkStorageSession::setCookie):
        - Add placeholder to fix build after r259173.

2020-03-28  Devin Rousso  <drousso@apple.com>

        Web Inspector: support editing cookie key/values from inspector
        https://bugs.webkit.org/show_bug.cgi?id=31157
        <rdar://problem/19281523>

        Reviewed by Timothy Hatcher.

        Test: http/tests/inspector/page/setCookie.html

        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::buildObjectForCookie):
        (WebCore::parseCookieObject): Added.
        (WebCore::InspectorPageAgent::setCookie): Added.

        * loader/CookieJar.h:
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::setRawCookie): Added.

2020-03-28  Simon Fraser  <simon.fraser@apple.com>

        Add a ScrollLatching log channel and improve some logging functionality
        https://bugs.webkit.org/show_bug.cgi?id=209706

        Reviewed by Darin Adler, David Kilzer.

        Add a "ScrollLatching" log channel. Make ScrollLatchingState and Node loggable.
        Make a convenience template class ValueOrNull<> which makes logging a pointer type convenient.

        Also change Page::pushNewLatchingState() to take the new latching state.

        * dom/Node.cpp:
        (WebCore::operator<<):
        * dom/Node.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::clearLatchedState):
        * page/Page.cpp:
        (WebCore::Page::pushNewLatchingState):
        (WebCore::Page::popLatchingState):
        (WebCore::Page::removeLatchingStateForTarget):
        * page/Page.h:
        (WebCore::Page::latchingStateStack const):
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::clearOrScheduleClearingLatchedStateIfNeeded):
        (WebCore::EventHandler::platformPrepareForWheelEvents):
        (WebCore::frameViewForLatchingState):
        (WebCore::EventHandler::platformCompleteWheelEvent):
        (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent):
        * page/scrolling/ScrollLatchingState.cpp:
        (WebCore::operator<<):
        * page/scrolling/ScrollLatchingState.h:
        (WebCore::ScrollLatchingState::wheelEventElement const):
        (WebCore::ScrollLatchingState::frame const):
        (WebCore::ScrollLatchingState::previousWheelScrolledElement const):
        (WebCore::ScrollLatchingState::scrollableContainer const):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::setOrClearLatchedNode):
        (WebCore::ScrollingTree::handleWheelEvent):
        * platform/Logging.h:

2020-03-28  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo] Unreviewed build fix for WinCairo Debug builds
        https://bugs.webkit.org/show_bug.cgi?id=209098

        It's broken since r259139 (Bug 209098).

        > ..\..\Source\WebCore\platform\graphics\texmap\TextureMapperGC3DPlatformLayer.cpp(101): error C2065: 'm_state': undeclared identifier

        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
        (WebCore::TextureMapperGC3DPlatformLayer::paintToTextureMapper): Replaced 'm_state' with 'm_context.m_state'.

2020-03-28  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, fix the watchOS build after r259151

        The declaration of Pasteboard(const String&) in Pasteboard.h is present for all PLATFORM(IOS_FAMILY), but the
        implementation is guarded by ENABLE(DRAG_SUPPORT). r259151 added a codepath that calls this constructor in
        IOS_FAMILY code, causing a linker error. Fix this by moving the implementation out of the ENABLE(DRAG_SUPPORT)
        guard, to match the declaration in the header.

        * platform/ios/PasteboardIOS.mm:

2020-03-27  Simon Fraser  <simon.fraser@apple.com>

        Sideways jiggles when scrolling the shelves on beta.music.apple.com
        https://bugs.webkit.org/show_bug.cgi?id=209696
        <rdar://problem/55092050>

        Reviewed by Anders Carlsson.
        
        If a scroll snapping animation was running, EventHandler::platformNotifyIfEndGesture() would
        reset the latching state. This was added in r190423, but not longer seems necessary
        according to manual testing, and the passing layout test.
        
        platformNotifyIfEndGesture() would be called at the end of the fingers-down scroll but
        before momentum, and resetting latching here would cause the momentum events to go to
        a new target, triggering incorrect scrolls.

        Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-phase-change-relatching.html

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformNotifyIfEndGesture):

2020-03-27  Simon Fraser  <simon.fraser@apple.com>

        Define ENABLE_WHEEL_EVENT_LATCHING and use it to wrap wheel event latching code
        https://bugs.webkit.org/show_bug.cgi?id=209693

        Reviewed by Zalan Bujtas.

        Replace some #if PLATFORM(MAC) with #if ENABLE(WHEEL_EVENT_LATCHING).

        ENABLE_WHEEL_EVENT_LATCHING is currently only enabled on macOS, but it's possible
        that it should be defined everywhere that ENABLE_KINETIC_SCROLLING is defined.
        This requires testing on WPE, GTK etc.

        * page/EventHandler.cpp:
        (WebCore::handleWheelEventInAppropriateEnclosingBox):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::clearLatchedState):
        (WebCore::EventHandler::defaultWheelEventHandler):
        * page/Page.cpp:
        * page/Page.h:

2020-03-28  Zalan Bujtas  <zalan@apple.com>

        [RenderTreeBuilder] Destroy the child first in RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers
        https://bugs.webkit.org/show_bug.cgi?id=209695

        Reviewed by Antti Koivisto.

        The render tree tear down direction is usually leaf first (there are some non-trivial cases where we end up going container first).
        Being able to access the ancestor chain helps with some final cleanup activities (e.g repaints).
        This patch makes the renderer-inside-an-anonymous-wrapper case similar to the normal case as we destroy the leaf renderer first.
        However the anonymous ancestor chain tear down is still container first (see r228606).      

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers):
        (WebCore::isAnonymousAndSafeToDelete): Deleted.
        (WebCore::findDestroyRootIncludingAnonymous): Deleted.

2020-03-28  Antti Koivisto  <antti@apple.com>

        Nullptr crash in InlineTextBox::emphasisMarkExistsAndIsAbove
        https://bugs.webkit.org/show_bug.cgi?id=207034

        Reviewed by Zalan Bujtas.

        Reduced test case by Zalan.

        Test: editing/selection/selection-update-during-anonymous-inline-teardown.html

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::setNeedsSelectionUpdateForRenderTreeChange):

        Don't clear the selection immediately, do it in updateAppearanceAfterLayoutOrStyleChange after render tree update/layout is done instead.
        This is safe as selection uses WeakPtrs to reference renderers.

        Renamed to emphasize the use case.

        (WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange):
        (WebCore::FrameSelection::setNeedsSelectionUpdate): Deleted.
        * editing/FrameSelection.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::willBeDestroyed):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::willBeDestroyed):
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::layout):
        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::detachFromRenderElement):

2020-03-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, reverting r259034.
        https://bugs.webkit.org/show_bug.cgi?id=209700

        Break StressGC bot (Requested by yusukesuzuki on #webkit).

        Reverted changeset:

        "IndexedDB: destroy UniqueIDBDatabase when it's not used"
        https://bugs.webkit.org/show_bug.cgi?id=209532
        https://trac.webkit.org/changeset/259034

2020-03-27  Simon Fraser  <simon.fraser@apple.com>

        Define ENABLE_WHEEL_EVENT_LATCHING and use it to wrap wheel event latching code
        https://bugs.webkit.org/show_bug.cgi?id=209693

        Reviewed by Zalan Bujtas.

        Replace some #if PLATFORM(MAC) with #if ENABLE(WHEEL_EVENT_LATCHING).

        ENABLE_WHEEL_EVENT_LATCHING is currently only enabled on macOS, but it's possible
        that it should be defined everywhere that ENABLE_KINETIC_SCROLLING is defined.
        This requires testing on WPE, GTK etc.

        * page/EventHandler.cpp:
        (WebCore::handleWheelEventInAppropriateEnclosingBox):
        (WebCore::EventHandler::handleWheelEvent):
        (WebCore::EventHandler::clearLatchedState):
        (WebCore::EventHandler::defaultWheelEventHandler):
        * page/Page.cpp:
        * page/Page.h:

2020-03-27  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in CompositeEditCommand::moveParagraphs when inserting OL into uneditable parent.
        https://bugs.webkit.org/show_bug.cgi?id=209641
        <rdar://problem/60915598>

        Reviewed by Ryosuke Niwa.

        Inserting BR in unlistifyParagraph() or OL/UL in listifyParagraph() would fail
        because their insertion position is uneditable. In this case BR/OL/UL becomes
        parentless and the code crashes later when their parent is dereferenced in 
        moveParagraphs(). 
        In unlistifyParagraph(), only insertNodeBefore() and insertNodeAfter() are used
        and both check parent of listNode for editability, so in order to avoid assertion 
        in the above functions, we check the editability of listNode before insertion.
        In listifyParagraph() it is hard to predict where the final insertion position would be,
        so we check the editability of the insertion position after it is finalized.

        Test: editing/inserting/insert-ol-uneditable-parent.html

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::unlistifyParagraph):
        (WebCore::InsertListCommand::listifyParagraph):

2020-03-27  Eugene But  <eugenebut@chromium.org>

        Fix null pointer crash in RenderBox::styleDidChange
        https://bugs.webkit.org/show_bug.cgi?id=208311

        Reviewed by Ryosuke Niwa.

        RenderBox::styleDidChange crashes when changing style for HTMLBodyElement element.
        Crash happens on dereferencing null document().documentElement()->renderer() pointer:

        if (.... || !documentElementRenderer->style().hasExplicitlySetWritingMode())) {

        That HTMLBodyElement was added as the second child of document, which is not allowed per spec: 
        
        If parent is a document, and any of the statements below, switched on node,
        are true, then throw a "HierarchyRequestError" DOMException:
            .......
            element
                parent has an element child that is not child or a doctype is following child.
            ......
        https://dom.spec.whatwg.org/#concept-node-replace

        This patch prevents adding HTMLBodyElement as the second child by running more strict checks
        inside WebCore::Document::canAcceptChild(). Previously canAcceptChild() would allow all
        Replace operations if new child had the same type as old child, even if old child has changed the parent.

        If old child has changed the parent (parent is not document), it means that child was removed from document
        and it is possible that mutation event handler has already added a new child to document. This is normal
        situation, but it means that canAcceptChild() can not short circuit only on comparing the types of old and
        new child, and has to run all checks listed in https://dom.spec.whatwg.org/#concept-node-replace
       
        Tests: fast/dom/add-document-child-during-document-child-replacement.html
               fast/dom/add-document-child-and-reparent-old-child-during-document-child-replacement.html

        * Source/WebCore/dom/Document.cpp:
        (WebCore::Document::canAcceptChild):

2020-03-27  Wenson Hsieh  <wenson_hsieh@apple.com>

        Web content processes should not be able to arbitrarily request pasteboard data from the UI process
        https://bugs.webkit.org/show_bug.cgi?id=209657
        <rdar://problem/59611585>

        Reviewed by Geoff Garen.

        Match macOS behavior in the iOS implementation of Pasteboard::createForCopyAndPaste by using the name of the
        general pasteboard by default, when initializing a Pasteboard for copying and pasting. In WebKit2, this allows
        us to grant permission to the web process when reading from the general pasteboard.

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

2020-03-27  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (r256577): Previous page continues to display after navigating to media document
        https://bugs.webkit.org/show_bug.cgi?id=209630
        <rdar://problem/60609318>

        Reviewed by Simon Fraser.

        Add a way for non-HTML documents to signal visually non-empty state (for example when media document constructs the controls for the media content.)

        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocumentParser::appendEntry):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocumentParser::createDocumentStructure):
        * html/PluginDocument.cpp:
        (WebCore::PluginDocumentParser::createDocumentStructure):
        * page/FrameView.cpp:
        (WebCore::FrameView::resetLayoutMilestones):
        (WebCore::FrameView::checkAndDispatchDidReachVisuallyNonEmptyState):
        * page/FrameView.h:

2020-03-27  Simon Fraser  <simon.fraser@apple.com>

        Change SVGRenderingContext::renderSubtreeToImageBuffer() to SVGRenderingContext::renderSubtreeToContext()
        https://bugs.webkit.org/show_bug.cgi?id=209679

        Reviewed by Said Abou-Hallawa.

        renderSubtreeToImageBuffer() just gets the context from the buffer, so change the name and signature
        and just pass a GraphicsContext.

        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::createTileImage const):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::renderSubtreeToContext):
        (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Deleted.
        * rendering/svg/SVGRenderingContext.h:
        * svg/graphics/filters/SVGFEImage.cpp:
        (WebCore::FEImage::platformApplySoftware):

2020-03-26  Yusuke Suzuki  <ysuzuki@apple.com>

        Use EnsureStillAliveScope to keep JSValues alive
        https://bugs.webkit.org/show_bug.cgi?id=209577

        Reviewed by Geoffrey Garen.

        Some of WebCore code is using JSC::Strong<> to ensure JSC value alive while doing some operations.
        But JSC::EnsureStillAliveScope is sufficient for this use case. This patch replaces these Strong<> use
        with JSC::EnsureStillAliveScope.

        * bindings/js/JSEventListener.h:
        (WebCore::JSEventListener::ensureJSFunction const):
        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::setWindow):
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::initScript):

2020-03-27  Kenneth Russell  <kbr@chromium.org>

        Use ANGLE_robust_client_memory to replace framebuffer/texture validation
        https://bugs.webkit.org/show_bug.cgi?id=209098

        Reviewed by Dean Jackson.

        Original patch by James Darpinian.

        Delegate most framebuffer, compressed texture, renderbuffer, draw call,
        clear, and ReadPixels validation to the ANGLE_robust_client_memory
        extension. Delegate much, but not all, texture validation as well.
        Remove tracking of textures' levels and immutability state, framebuffer
        size and format, and unrenderable texture units from WebCore; these are
        now handled by ANGLE. Hook up WebGL 2.0 draw/read framebuffer support
        and BlitFramebuffer.

        Disable WebGL 2.0 for non-ANGLE backends. It is infeasible to maintain
        correctness of GraphicsContextGLOpenGL and GraphicsContextGLOpenGLES
        under relaxed OpenGL ES 3.0 constraints.

        Covered by existing WebGL layout tests. Several more webgl/2.0.0 tests
        pass completely with this change.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::blitFramebuffer):
        (WebCore::WebGL2RenderingContext::getInternalformatParameter):
        (WebCore::WebGL2RenderingContext::readBuffer):
        (WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
        (WebCore::WebGL2RenderingContext::texStorage2D):
        (WebCore::WebGL2RenderingContext::clear):
        (WebCore::WebGL2RenderingContext::renderbufferStorage):
        (WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGLFramebuffer.cpp:
        * html/canvas/WebGLFramebuffer.h:
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::clear):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::create):
        (WebCore::WebGLRenderingContextBase::initializeNewContext):
        (WebCore::WebGLRenderingContextBase::clearIfComposited):
        (WebCore::WebGLRenderingContextBase::reshape):
        (WebCore::WebGLRenderingContextBase::bindFramebuffer):
        (WebCore::WebGLRenderingContextBase::bindTexture):
        (WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
        (WebCore::WebGLRenderingContextBase::compressedTexImage2D):
        (WebCore::WebGLRenderingContextBase::compressedTexSubImage2D):
        (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
        (WebCore::WebGLRenderingContextBase::deleteTexture):
        (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
        (WebCore::WebGLRenderingContextBase::drawArrays):
        (WebCore::WebGLRenderingContextBase::drawElements):
        (WebCore::WebGLRenderingContextBase::generateMipmap):
        (WebCore::WebGLRenderingContextBase::readPixels):
        (WebCore::WebGLRenderingContextBase::texImageSource2D):
        (WebCore::WebGLRenderingContextBase::texImage2DBase):
        (WebCore::WebGLRenderingContextBase::texImage2DImpl):
        (WebCore::WebGLRenderingContextBase::validateTexFunc):
        (WebCore::WebGLRenderingContextBase::texImage2D):
        (WebCore::WebGLRenderingContextBase::texSubImage2DImpl):
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType):
        (WebCore::WebGLRenderingContextBase::texSubImage2DBase):
        (WebCore::WebGLRenderingContextBase::copyTexImage2D):
        (WebCore::WebGLRenderingContextBase::texParameter):
        (WebCore::WebGLRenderingContextBase::getBoundReadFramebufferColorFormat):
        (WebCore::WebGLRenderingContextBase::getBoundReadFramebufferWidth):
        (WebCore::WebGLRenderingContextBase::getBoundReadFramebufferHeight):
        (WebCore::WebGLRenderingContextBase::validateTextureBinding):
        (WebCore::WebGLRenderingContextBase::validateTexFuncLevel):
        (WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
        (WebCore::WebGLRenderingContextBase::restoreCurrentTexture2D):
        (WebCore::WebGLRenderingContextBase::drawArraysInstanced):
        (WebCore::WebGLRenderingContextBase::drawElementsInstanced):
        (WebCore::WebGLRenderingContextBase::getBoundFramebufferColorFormat): Deleted.
        (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth): Deleted.
        (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight): Deleted.
        * html/canvas/WebGLRenderingContextBase.h:
        * html/canvas/WebGLTexture.cpp:
        (WebCore::WebGLTexture::WebGLTexture):
        (WebCore::WebGLTexture::setTarget):
        (WebCore::WebGLTexture::deleteObjectImpl):
        (WebCore::WebGLTexture::computeLevelCount):
        (WebCore::WebGLTexture::canGenerateMipmaps):
        * html/canvas/WebGLTexture.h:
        * platform/graphics/ExtensionsGL.h:
        * platform/graphics/angle/ExtensionsGLANGLE.cpp:
        (WebCore::ExtensionsGLANGLE::getBooleanvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getBufferParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getFloatvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getFramebufferAttachmentParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getIntegervRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getProgramivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getRenderbufferParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getShaderivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getTexParameterfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getTexParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getUniformfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getUniformivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getVertexAttribfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getVertexAttribivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getVertexAttribPointervRobustANGLE):
        (WebCore::ExtensionsGLANGLE::readPixelsRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texImage2DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texParameterfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texSubImage2DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::compressedTexImage2DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::compressedTexSubImage2DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::compressedTexImage3DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::compressedTexSubImage3DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texImage3DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texSubImage3DRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getQueryivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getQueryObjectuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getBufferPointervRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getIntegeri_vRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getInternalformativRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getVertexAttribIivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getVertexAttribIuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getActiveUniformBlockivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getInteger64vRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getInteger64i_vRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getBufferParameteri64vRobustANGLE):
        (WebCore::ExtensionsGLANGLE::samplerParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::samplerParameterfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getSamplerParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getSamplerParameterfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getFramebufferParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getProgramInterfaceivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getBooleani_vRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getMultisamplefvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getPointervRobustANGLERobustANGLE):
        (WebCore::wipeAlphaChannelFromPixels):
        (WebCore::ExtensionsGLANGLE::readnPixelsRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texParameterIivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::texParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getTexParameterIivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getTexParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::samplerParameterIivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::samplerParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getSamplerParameterIivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getSamplerParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getQueryObjectivRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getQueryObjecti64vRobustANGLE):
        (WebCore::ExtensionsGLANGLE::getQueryObjectui64vRobustANGLE):
        * platform/graphics/angle/ExtensionsGLANGLE.h:
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
        (WebCore::GraphicsContextGLOpenGL::readPixels):
        (WebCore::GraphicsContextGLOpenGL::readRenderingResults):
        (WebCore::GraphicsContextGLOpenGL::reshape):
        (WebCore::GraphicsContextGLOpenGL::bindFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::deleteFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::readBuffer):
        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:
        (WebCore::ExtensionsGLOpenGLCommon::getTranslatedShaderSourceANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getBooleanvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getBufferParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getFloatvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getFramebufferAttachmentParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getIntegervRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getProgramivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getRenderbufferParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getShaderivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getTexParameterfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getTexParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getUniformfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getUniformivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getVertexAttribfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getVertexAttribivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getVertexAttribPointervRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::readPixelsRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texImage2DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texParameterfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texSubImage2DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::compressedTexImage2DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::compressedTexSubImage2DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::compressedTexImage3DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::compressedTexSubImage3DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texImage3DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texSubImage3DRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getQueryivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getQueryObjectuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getBufferPointervRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getIntegeri_vRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getInternalformativRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getVertexAttribIivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getVertexAttribIuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getUniformuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getActiveUniformBlockivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getInteger64vRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getInteger64i_vRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getBufferParameteri64vRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::samplerParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::samplerParameterfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getFramebufferParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getProgramInterfaceivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getBooleani_vRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getMultisamplefvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getTexLevelParameterivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getTexLevelParameterfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getPointervRobustANGLERobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getnUniformfvRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getnUniformivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getnUniformuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texParameterIivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::texParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getTexParameterIivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getTexParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::samplerParameterIivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::samplerParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterIivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getSamplerParameterIuivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getQueryObjectivRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getQueryObjecti64vRobustANGLE):
        (WebCore::ExtensionsGLOpenGLCommon::getQueryObjectui64vRobustANGLE):
        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
        (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
        (WebCore::GraphicsContextGLOpenGL::readPixels):
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::prepareTexture):
        (WebCore::GraphicsContextGLOpenGL::readRenderingResults):
        (WebCore::GraphicsContextGLOpenGL::reshape):
        (WebCore::GraphicsContextGLOpenGL::bindFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::deleteFramebuffer):
        * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:
        (WebCore::GraphicsContextGLOpenGL::readPixels):
        (WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

2020-03-27  Chris Dumez  <cdumez@apple.com>

        HTMLTrackElement should be pending while it is waiting for LoadableTextTrack request
        https://bugs.webkit.org/show_bug.cgi?id=208798
        <rdar://problem/60325421>

        Reviewed by Geoffrey Garen.

        Have HTMLTrackElement and subclass ActiveDOMObject::hasPendingActivity() to keeps its
        wrapper alive if its in LOADING state and the page's script has relevant load events
        event listeners registered.

        No new tests, covered by media/track/track-disabled-addcue.html.

        * html/HTMLTrackElement.cpp:
        (WebCore::HTMLTrackElement::HTMLTrackElement):
        (WebCore::HTMLTrackElement::create):
        (WebCore::HTMLTrackElement::didCompleteLoad):
        (WebCore::HTMLTrackElement::readyState const):
        (WebCore::HTMLTrackElement::activeDOMObjectName const):
        (WebCore::HTMLTrackElement::eventListenersDidChange):
        (WebCore::HTMLTrackElement::hasPendingActivity const):
        (WebCore::HTMLTrackElement::readyState): Deleted.
        * html/HTMLTrackElement.h:
        * html/HTMLTrackElement.idl:

2020-03-27  Simon Fraser  <simon.fraser@apple.com>

        Hovering over countries at https://covidinc.io/ shows bizarre rendering artifacts
        https://bugs.webkit.org/show_bug.cgi?id=209635
        <rdar://problem/60935010>

        Reviewed by Said Abou-Hallawa.

        RenderSVGResourceClipper::applyClippingToContext() cached an ImageBuffer per RenderObject
        when using a image buffer mask. However, the function created and rendered into this image buffer
        using repaintRect, which can change between invocations. Painting with different repaintRects
        is very common when rendering into page tiles.

        The buffer can only be re-used if the inputs used to create the buffer (objectBoundingBox, absoluteTransform)
        are the same, so store those and compare them when determining when to use the cached buffer, and
        don't use repaintRect when setting up the buffer.

        This revealed another problem where renderers with visual overflow could be truncated by
        the clipping, tested by imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml, which occurred
        because RenderLayer::setupClipPath() used the 'svgReferenceBox' for the clipping bounds, which
        is the content box of the renderer excluding overflow. Fix this by using the bounds of the layer,
        which includes the bounds of descendants.

        Tests: svg/clip-path/clip-path-on-overflowing.html
               svg/clip-path/resource-clipper-multiple-repaints.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setupClipPath):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
        (WebCore::RenderSVGResourceClipper::addRendererToClipper):
        (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
        * rendering/svg/RenderSVGResourceClipper.h:

2020-03-27  Chris Dumez  <cdumez@apple.com>

        [StressGC] ASSERTION FAILED: m_wrapper under WebCore::MediaRecorder::dispatchError
        https://bugs.webkit.org/show_bug.cgi?id=209674
        <rdar://problem/60541201>

        Reviewed by Darin Adler.

        Keep the MediaRecorder wrapper alive while its state is not inactive (i.e. it is recording
        or paused), as it may still dispatch events.

        Also drop MediaRecorder::scheduleDeferredTask() and use the utility functions in
        ActiveDOMObject instead to achieve the same thing.

        No new tests, already covered by http/wpt/mediarecorder/MediaRecorder-onremovetrack.html.

        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::suspend):
        (WebCore::MediaRecorder::stopRecording):
        (WebCore::MediaRecorder::didAddOrRemoveTrack):
        (WebCore::MediaRecorder::hasPendingActivity const):
        (WebCore::MediaRecorder::scheduleDeferredTask): Deleted.
        * Modules/mediarecorder/MediaRecorder.h:

2020-03-27  Chris Dumez  <cdumez@apple.com>

        [StressGC] ASSERTION FAILED: m_wrapper under WebCore::WebGLRenderingContextBase::dispatchContextLostEvent
        https://bugs.webkit.org/show_bug.cgi?id=209660
        <rdar://problem/60541733>

        Reviewed by Darin Adler.

        Make HTMLCanvasElement an ActiveDOMObject since WebGLRenderingContextBase needs to dispatch events
        asynchronously on its canvas element. Update WebGLRenderingContextBase to use the HTML event loop
        to dispatch those events asynchronously instead of using suspendible timers.

        No new tests, already covered by webgl/max-active-contexts-webglcontextlost-prevent-default.html.

        * dom/TaskSource.h:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::create):
        (WebCore::HTMLCanvasElement::activeDOMObjectName const):
        * html/HTMLCanvasElement.h:
        * html/HTMLCanvasElement.idl:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
        (WebCore::WebGLRenderingContextBase::loseContextImpl):
        (WebCore::WebGLRenderingContextBase::scheduleTaskToDispatchContextLostEvent):
        (WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification):
        (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent): Deleted.
        (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent): Deleted.
        * html/canvas/WebGLRenderingContextBase.h:

2020-03-27  Simon Fraser  <simon.fraser@apple.com>

        Use Optional<> for a lazily-computed bounds rectangle
        https://bugs.webkit.org/show_bug.cgi?id=209659

        Reviewed by Zalan Bujtas.

        Replace LayoutRect& rootRelativeBounds, bool& rootRelativeBoundsComputed with Optional<LayoutRect>.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setupClipPath):
        (WebCore::RenderLayer::setupFilters):
        (WebCore::RenderLayer::paintLayerContents):
        * rendering/RenderLayer.h:

2020-03-27  Wenson Hsieh  <wenson_hsieh@apple.com>

        DragData::containsURL() should avoid reading URL strings from the pasteboard
        https://bugs.webkit.org/show_bug.cgi?id=209642
        Work towards <rdar://problem/59611585>

        Reviewed by Tim Horton.

        Refactor the implementation of DragData::containsURL(), such that in WebKit2, the web process never needs to
        reason about the value of any string data in the pasteboard. We move most of the Cocoa-specific logic in
        DragData::containsURL into PlatformPasteboard, and add new PasteboardStrategy methods in support of this. See
        below for more details. There should be no change in behavior; however, this has the minor benefit of reducing
        the number of sync IPC to 1 (2 in the case of macOS) in both containsURL and asURL.

        * platform/PasteboardStrategy.h:

        Add new strategy methods containsURLStringSuitableForLoading and urlStringSuitableForLoading, which are used in
        DragData::containsURL and DragData::asURL, respectively.

        * platform/PlatformPasteboard.h:
        * platform/cocoa/DragDataCocoa.mm:
        (WebCore::DragData::containsURL const):

        In Cocoa platforms, the argument to containsURL was effectively unused. Leave only the type behind, now that we
        don't need to plumb it through to asURL() anymore.

        (WebCore::DragData::asURL const):

        In both asURL and containsURL, use the new PasteboardStrategy helpers to get information about loadable URLs in
        the drag pasteboard. A bit of macOS-specific code remains here since it relies on DragData::fileNames() --
        information which is not present in the platform pasteboard.

        * platform/cocoa/PlatformPasteboardCocoa.mm:
        (WebCore::PlatformPasteboard::urlStringSuitableForLoading):

        Move the Cocoa-specific implementation of DragData::asURL into PlatformPasteboardCocoa, since the implementation
        is mostly the same (with some minor additions for macOS). The only minor changes here (and below, in
        containsURLStringSuitableForLoading) is the use of URL::protocolIsInHTTPFamily() instead of checking that
        -[NSURL scheme] is equal to either @"http" or @"https".

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::containsURLStringSuitableForLoading):

        Move the platform-dependent implementations of DragData::containsURL to PlatformPasteboardIOS and
        PlatformPasteboardMac. These implementations were already quite different, so this split into -IOS and -Mac
        files is cleaner than using #if and #else in the same method implementation.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::containsURLStringSuitableForLoading):

2020-03-27  Chris Dumez  <cdumez@apple.com>

        [StressGC] ASSERTION FAILED: m_wrapper under WebCore::MainThreadGenericEventQueue::dispatchOneEvent
        https://bugs.webkit.org/show_bug.cgi?id=209655
        <rdar://problem/60541442>

        Reviewed by Geoffrey Garen.

        TrackListBase should subclass ActiveDOMObject and keep its wrapper alive when there are pending
        events to be dispatched. TrackListBase has a queue to dispatch events asynchronously.

        No new tests, covered by media/track/track-remove-track.html.

        * html/track/AudioTrackList.cpp:
        (WebCore::AudioTrackList::activeDOMObjectName const):
        * html/track/AudioTrackList.h:
        * html/track/AudioTrackList.idl:
        * html/track/TextTrackList.cpp:
        (WebCore::TextTrackList::activeDOMObjectName const):
        * html/track/TextTrackList.h:
        * html/track/TextTrackList.idl:
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::TrackListBase):
        (WebCore::TrackListBase::hasPendingActivity const):
        * html/track/TrackListBase.h:
        * html/track/VideoTrackList.cpp:
        (WebCore::VideoTrackList::activeDOMObjectName const):
        * html/track/VideoTrackList.h:
        * html/track/VideoTrackList.idl:

2020-03-27  Rob Buis  <rbuis@igalia.com>

        Move applyUserAgentIfNeeded calls to a more central place
        https://bugs.webkit.org/show_bug.cgi?id=209587

        Reviewed by Darin Adler.

        Make main resource loads stop calling applyUserAgentIfNeeded
        and instead do it in the CachedResourceLoader.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::createRequest):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
        (WebCore::CachedResourceLoader::requestResource):
        * loader/cache/CachedResourceLoader.h:
        * loader/cache/CachedResourceRequest.cpp:
        (WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders):
        (WebCore::CachedResourceRequest::updateUserAgentHeader):
        (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders): Deleted.
        * loader/cache/CachedResourceRequest.h:

2020-03-27  youenn fablet  <youenn@apple.com>

        Filter DOMCache records in network process to reduce the number of records being sent to WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=209469
        <rdar://problem/55207565>

        Reviewed by Alex Christensen.

        Instead of retrieving all records and filtering them in WebProcess, WebProcess is now
        sending filtering options to NetworkProcess.
        In case of keys, ask network process to not send back any response.

        Covered by existing tests.

        * Headers.cmake:
        * Modules/cache/CacheStorageConnection.h:
        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::doMatch):
        (WebCore::DOMCache::matchAll):
        (WebCore::DOMCache::keys):
        (WebCore::DOMCache::queryCache):
        (WebCore::DOMCache::retrieveRecords): Deleted.
        (WebCore::DOMCache::queryCacheWithTargetStorage): Deleted.
        * Modules/cache/DOMCache.h:
        * Modules/cache/WorkerCacheStorageConnection.cpp:
        (WebCore::WorkerCacheStorageConnection::retrieveRecords):
        * Modules/cache/WorkerCacheStorageConnection.h:
        * WebCore.xcodeproj/project.pbxproj:
        * page/CacheStorageProvider.h:

2020-03-27  Miguel Gomez  <magomez@igalia.com>

        [WPE] Unnecessary gl synchronization when using an OpenMAX video decoder and GLES2
        https://bugs.webkit.org/show_bug.cgi?id=209647

        Reviewed by Adrian Perez de Castro.

        Don't perform the call to gst_gl_sync_meta_wait_cpu() when using an OpenMAX decoder,
        as we don't need synchronization in that case and the internal call to glFinish()
        casues an important fps drop.

        * platform/graphics/gstreamer/GStreamerCommon.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::GstVideoFrameHolder::waitForCPUSync):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

2020-03-27  Chris Lord  <clord@igalia.com>

        [GTK][WPE] Enable kinetic scrolling with async rendering
        https://bugs.webkit.org/show_bug.cgi?id=209230

        Reviewed by Žan Doberšek.

        Refactor ScrollAnimationKinetic so that it no longer depends on
        ScrollableArea, uses RunLoop::Timer and is responsible for tracking
        the history of scroll events. This allows it to be used in
        ScrollingTree*ScrollingNodeNicosia to provide kinetic scrolling when
        async scrolling is enabled, on GTK and WPE.

        No new tests, this just enables existing functionality in more situations.

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::scrollTo):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::ScrollingTreeFrameScrollingNodeNicosia):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::stopScrollAnimations):
        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::ScrollingTreeOverflowScrollingNodeNicosia):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::stopScrollAnimations):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
        * platform/ScrollAnimationKinetic.cpp:
        (WebCore::ScrollAnimationKinetic::ScrollAnimationKinetic):
        (WebCore::ScrollAnimationKinetic::appendToScrollHistory):
        (WebCore::ScrollAnimationKinetic::clearScrollHistory):
        (WebCore::ScrollAnimationKinetic::computeVelocity):
        (WebCore::ScrollAnimationKinetic::start):
        * platform/ScrollAnimationKinetic.h:
        * platform/generic/ScrollAnimatorGeneric.cpp:
        (WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric):
        (WebCore::ScrollAnimatorGeneric::scrollToOffsetWithoutAnimation):
        (WebCore::ScrollAnimatorGeneric::handleWheelEvent):
        (WebCore::ScrollAnimatorGeneric::willEndLiveResize):
        (WebCore::ScrollAnimatorGeneric::didAddVerticalScrollbar):
        (WebCore::ScrollAnimatorGeneric::didAddHorizontalScrollbar):
        * platform/generic/ScrollAnimatorGeneric.h:

2020-03-27  Michael Catanzaro  <mcatanzaro@gnome.org>

        Update Chrome and Firefox versions in user agent quirks
        https://bugs.webkit.org/show_bug.cgi?id=209631

        Reviewed by Carlos Garcia Campos.

        * platform/UserAgentQuirks.cpp:
        (WebCore::UserAgentQuirks::stringForQuirk):

2020-03-26  Don Olmstead  <don.olmstead@sony.com>

        [MSVC] Remove experimental lambda processor usage
        https://bugs.webkit.org/show_bug.cgi?id=209358

        Reviewed by Fujii Hironori.

        Fix build for Visual Studio scoping issue for lambdas. The experimental lambada
        processor did build this code but is now failing to build WebKit at all.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess):

2020-03-26  Peng Liu  <peng.liu6@apple.com>

        Swipe down gestures cause the video layer to stick for a moment before bouncing back into place
        https://bugs.webkit.org/show_bug.cgi?id=209610

        Reviewed by Eric Carlson.

        Fix an exit fullscreen animation issue by firing the end fullscreen event
        to let the page change the video element back to its original position/size
        before exiting fullscreen.

        Covered by existing tests.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::dispatchEvent):
        (WebCore::HTMLMediaElement::exitFullscreen):

2020-03-26  Michael Catanzaro  <mcatanzaro@gnome.org>

        Fix various compiler warnings
        https://bugs.webkit.org/show_bug.cgi?id=209438

        Reviewed by Darin Adler.

        * dom/Element.cpp: Fix -Wunused-variable warnings.
        (WebCore::Element::webAnimations const):
        (WebCore::Element::cssAnimations const):
        (WebCore::Element::transitions const):
        (WebCore::Element::hasCompletedTransitionsForProperty const):
        (WebCore::Element::hasRunningTransitionsForProperty const):
        (WebCore::Element::hasRunningTransitions const):
        * page/scrolling/ThreadedScrollingTree.cpp: Fix -Wunused-variable warning.
        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
        * platform/network/HTTPParsers.h: Fix -Wredundant-move warning.
        (WebCore::parseAccessControlAllowList):

2020-03-26  Sihui Liu  <sihui_liu@apple.com>

        REGRESSION(r259034): access to null UniqueIDBDatabase in UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection()
        https://bugs.webkit.org/show_bug.cgi?id=209618
        <rdar://problem/60919105>

        Reviewed by Geoffrey Garen.

        It's possible UniqueIDBDatabase is destroyed before UniqueIDBDatabaseConnection in 
        UniqueIDBDatabase::connectionClosedFromClient, so it's better not access 
        UniqueIDBDatabase in ~UniqueIDBDatabaseConnection() and let UniqueIDBDatabaseConnection have a IDBServer member.

        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFinishHandlingVersionChange):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::server):

2020-03-26  Daniel Bates  <dabates@apple.com>

        Remove hitTestOrder from ElementContext as it is no longer need
        https://bugs.webkit.org/show_bug.cgi?id=209561
        <rdar://problem/60888305>

        Reviewed by Wenson Hsieh.

        Revert the temporary workaround made in r257749 as <rdar://problem/59602885>
        has been fixed.

        * dom/ElementContext.h:
        (WebCore::ElementContext::encode const):
        (WebCore::ElementContext::decode):

2020-03-26  Tim Horton  <timothy_horton@apple.com>

        Pinch to zoom gesture has to be repeated twice if the cursor isn't moved between gestures
        https://bugs.webkit.org/show_bug.cgi?id=203132
        <rdar://problem/27439348>

        Reviewed by Simon Fraser.

        * page/EventHandler.h:

2020-03-26  Chris Dumez  <cdumez@apple.com>

        [StressGC] ASSERTION FAILED: m_wrapper under WebCore::HTMLMediaElement::dispatchEvent
        https://bugs.webkit.org/show_bug.cgi?id=209616
        <rdar://problem/60541294>

        Reviewed by Saam Barati.

        HTMLMediaElement::hasPendingActivity() should return true if there are pending tasks on
        m_playbackTargetIsWirelessQueue since the tasks we enqueue there dispatch events.

        No new tests, covered by media/modern-media-controls/placard-support/placard-support-airplay.html.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::hasPendingActivity const):

2020-03-26  Chris Dumez  <cdumez@apple.com>

        [ Mac wk1] ASSERTION FAILED: m_wrapper under WebCore::XMLHttpRequestUpload::dispatchProgressEvent
        https://bugs.webkit.org/show_bug.cgi?id=209560
        <rdar://problem/60887773>

        Reviewed by Geoffrey Garen.

        XMLHttpRequest::hasPendingActivity() was returning false if the XMLHttpRequest object did not
        have any relevant event listeners. However, the XMLHttpRequestUpload's wrapper lifetime is tried
        to the lifetime of its XMLHttpRequest wrapper. As a result, both the XMLHttpRequest and
        XMLHttpRequestUpload wrappers could get garbage collected if the XMLHttpRequest did not have a
        relevant listener, even though XMLHttpRequestUpload may have a relevant event listeners. We would
        then hit the assertion when trying to fire an event on this XMLHttpRequestUpload object.

        To address the issue, we update XMLHttpRequest::hasPendingActivity() to return false if both
        XMLHttpRequest AND XMLHttpRequestUpload have no relevant event listeners.

        No new tests, covered by imported/w3c/web-platform-tests/xhr/send-response-upload-event-progress.htm

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::hasPendingActivity const):
        * xml/XMLHttpRequestUpload.cpp:
        (WebCore::XMLHttpRequestUpload::eventListenersDidChange):
        * xml/XMLHttpRequestUpload.h:

2020-03-26  Ryosuke Niwa  <rniwa@webkit.org>

        Crash in RadioButtonGroups::requiredStateChanged
        https://bugs.webkit.org/show_bug.cgi?id=209585

        Reviewed by Zalan Bujtas.

        Like r254722, radio group could be null in RadioButtonGroups::requiredStateChanged. Added a null check.

        Test: fast/forms/update-required-state-on-radio-before-finalizing-tree-insertion-crash.html

        * dom/RadioButtonGroups.cpp:
        (WebCore::RadioButtonGroups::requiredStateChanged):

2020-03-26  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Fix missing NULL-check in setSyncOnClock
        https://bugs.webkit.org/show_bug.cgi?id=209609

        Unreviewed, simple fix.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::setSyncOnClock): Some systems are configured so that
        audio sinks are not available. Make sure not to crash when asking
        to sync with a NULL sink.

2020-03-26  Chris Dumez  <cdumez@apple.com>

        REGRESSION: ASSERTION FAILED: m_wrapper on storage/indexeddb/modern/abort-requests tests
        https://bugs.webkit.org/show_bug.cgi?id=209499
        <rdar://problem/60842165>

        Reviewed by Alex Christensen.

        IDBTransaction::hasPendingActivity() was failing to consult ActiveDOMObject::hasPendingActivity()
        so the JS wrapper would get garbage collected even though the ActiveDOMObject base class was
        aware of some pending activity.

        No new tests, unskipped existing tests.

        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::hasPendingActivity const):

2020-03-25  Ryosuke Niwa  <rniwa@webkit.org>

        Sequential focus navigation can't get out of a descendent of a slot element in a document tree
        https://bugs.webkit.org/show_bug.cgi?id=199633

        Reviewed by Darin Adler.

        The bug was caused by slot element outside a shadow tree not being treated as a focus navigation
        scope owner as specified in the HTML5 specification:
        https://html.spec.whatwg.org/multipage/interaction.html#focus-navigation-scope-owner

        Fixed the bug by treating it as such unless custom focusing behavior is used.

        Test: fast/shadow-dom/focus-across-slot-outside-shadow-tree.html

        * page/FocusController.cpp:
        (WebCore::isFocusScopeOwner):

2020-03-26  Kate Cheney  <katherine_cheney@apple.com>

        ScopeRuleSets::initializeUserStyle() should not add console logging if there are no injected user style sheets
        https://bugs.webkit.org/show_bug.cgi?id=209548
        <rdar://problem/60851745>

        Reviewed by Darin Adler.

        Logging when there are no injected user style sheets is unnecessary and confusing.

        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::initializeUserStyle):

2020-03-26  Alexey Proskuryakov  <ap@apple.com>

        REGRESSION(r259042): It creates some test failures (Requested by youenn on #webkit).
        Roll back the patch.

2020-03-26  Antti Koivisto  <antti@apple.com>

        REGRESSION (r254669): Expand media button doesn't work on first try on photos on reddit.com
        https://bugs.webkit.org/show_bug.cgi?id=209590
        <rdar://problem/60461809>

        Reviewed by Darin Adler.

        Image intrinsic size computed from width/height attributes is ignored during preferred width computation
        (used for float sizing in this case). This creates a mismatch between layout and preferred width computation,
        causing the final image size to be miscomputed.

        Test: fast/images/preferred-width-computation-with-attribute-intrinsic-size.html

        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::computePreferredLogicalWidths const):

        Compute attribute based intrinsic size already during preferred width computation if needed.

2020-03-26  Nikos Mouchtaris  <nmouchtaris@apple.com>

        Remove manual redacting of billing contact after wallet fix for rdar://problem/59075234
        https://bugs.webkit.org/show_bug.cgi?id=209557
        <rdar://problem/60883506>

        Reviewed by Andy Estes.

        Removed manual redaction of billing address after wallet fixed
        their redaction code.

        No new tests. Current tests cover this functionality.

        * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
        (WebCore::convert):

2020-03-26  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Adopt ScreenProperties class.
        https://bugs.webkit.org/show_bug.cgi?id=191767

        Reviewed by Brent Fulgham.

        On macOS, the ScreenProperties class is used to collect screen properties in the UI process
        and forward these to the Web process. We should also do this on iOS, in order to be able
        to block frontboard services.
 
        No new tests. Covered by existing tests.

        * Sources.txt:
        * platform/PlatformScreen.h:
        * platform/ScreenProperties.h:
        (WebCore::ScreenData::encode const):
        (WebCore::ScreenData::decode):
        * platform/ios/PlatformScreenIOS.mm:
        (WebCore::screenIsMonochrome):
        (WebCore::screenHasInvertedColors):
        (WebCore::screenSupportsExtendedColor):
        (WebCore::collectScreenProperties):
        * platform/mac/PlatformScreenMac.mm:
        (WebCore::primaryOpenGLDisplayMask):
        (WebCore::displayMaskForDisplay):
        (WebCore::primaryGPUID):
        (WebCore::gpuIDForDisplay):
        (WebCore::screenIsMonochrome):
        (WebCore::screenHasInvertedColors):
        (WebCore::screenDepth):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenRectForDisplay):
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):
        (WebCore::screenColorSpace):
        (WebCore::screenSupportsExtendedColor):
        (WebCore::screenProperties): Deleted.
        (WebCore::primaryScreenDisplayID): Deleted.
        (WebCore::setScreenProperties): Deleted.
        (WebCore::screenData): Deleted.
        (WebCore::getScreenProperties): Deleted.

2020-03-26  Rob Buis  <rbuis@igalia.com>

        Take into account referrer-policy in append Origin header algorithm
        https://bugs.webkit.org/show_bug.cgi?id=209066

        Reviewed by Youenn Fablet.

        Start taking into account referrer-policy in more places when we
        append the origin header [1]. To prevent computing SecurityOrigin
        needlessly add a helper function doesRequestNeedHTTPOriginHeader.

        [1] https://fetch.spec.whatwg.org/#append-a-request-origin-header

        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::populateFrameLoadRequest):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        (WebCore::FrameLoader::loadResourceSynchronously):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        (WebCore::FrameLoader::addHTTPOriginIfNeeded): Deleted.
        * loader/FrameLoader.h:
        * loader/NavigationScheduler.cpp:
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendPing):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
        * loader/cache/CachedResourceRequest.cpp:
        (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::doesRequestNeedHTTPOriginHeader):
        * platform/network/ResourceRequestBase.h:

2020-03-25  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: destroy UniqueIDBDatabase when it's not used
        https://bugs.webkit.org/show_bug.cgi?id=209532

        Reviewed by Geoffrey Garen.

        Reviewed by Geoffrey Garen.

        When all connections of a UniqueIDBDatabase object are closed and there are no pending reuqests, the 
        object may not be used any more. We should delete it for better memory use.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::removeUniqueIDBDatabase):
        (WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
        (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
        (WebCore::IDBServer::UniqueIDBDatabase::tryCloseAndRemoveFromServer):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2020-03-25  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
        https://bugs.webkit.org/show_bug.cgi?id=208532

        Reviewed by Darin Adler.

        In this layout test, the id of a <path> element changes. This <path> is
        referenced by a <textPath> element which is a child of a <pattern> element.
        The <pattern> element is used to fill a <rect> element.

        This patch ensures all clients (<rect>) of the resource ancestor (<pattern>)
        of any sub-resource (<textPath>) is marked for repaint when the id of a
        sub-sub-resource (<path>) changes.

        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::markAllClientsForRepaint):
        * rendering/svg/RenderSVGResourceContainer.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::buildPendingResourcesIfNeeded):
        (WebCore::SVGElement::invalidateInstances):
        Unrelated change. This is a leftover from r179807 which was converting a
        "do { } while();" statement to "while() { }" statement.

2020-03-25  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::Node::isDescendantOf when inserting list
        https://bugs.webkit.org/show_bug.cgi?id=209529
        <rdar://problem/60693542>

        Reviewed by Darin Adler.

        The visible positions may be null if the DOM tree is altered before an edit command is applied. 
        Add null check for visible positions at the beginning of InsertListCommand::doApply.

        Test: editing/inserting/insert-list-during-node-removal-crash.html

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::doApply):

2020-03-25  Alexey Shvayka  <shvaikalesh@gmail.com>

        Invalid numeric and named references should be early syntax errors
        https://bugs.webkit.org/show_bug.cgi?id=178175

        Reviewed by Ross Kirsling.

        Accounts for changes of YarrParser's Delegate interface, no behavioral changes.
        resetForReparsing() is never called because we disable numeric backrefences
        and named forward references (see arguments of Yarr::parse() call).

        Test: TestWebKitAPI.ContentExtensionTest.ParsingFailures

        * contentextensions/URLFilterParser.cpp:
        (WebCore::ContentExtensions::PatternParser::resetForReparsing):
        (WebCore::ContentExtensions::URLFilterParser::addPattern):
        (WebCore::ContentExtensions::PatternParser::isValidNamedForwardReference): Deleted.

2020-03-25  Pinki Gyanchandani  <pgyanchandani@apple.com>

        CanvasRenderingContext2D.putImageData() should not process neutered ImageData
        https://bugs.webkit.org/show_bug.cgi?id=208303

        Reviewed by Said Abou-Hallawa.

        Test: fast/canvas/canvas-putImageData-neutered-ImageData.html

        The crash happens when putImageData is called on a neutered ImageData object. 
        Added a check to exit from CanvasRenderingContext2D.putImageData() function when ImageData object is neutered.

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::putImageData):

2020-03-25  Chris Dumez  <cdumez@apple.com>

        Use JSC::EnsureStillAliveScope RAII object in the generated bindings code
        https://bugs.webkit.org/show_bug.cgi?id=209552

        Reviewed by Yusuke Suzuki.

        Use JSC::EnsureStillAliveScope RAII object in the generated bindings code
        instead of explicit ensureStillAlive() calls. This makes the bindings
        generator code simpler and results in nicer generated code too.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateParametersCheck):
        (GenerateWriteBarriersForArguments):
        (GenerateImplementationFunctionCall):
        (GenerateEnsureStillAliveCallsForArguments): Deleted.
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::jsMapLikePrototypeFunctionGetBody):
        (WebCore::jsMapLikePrototypeFunctionHasBody):
        (WebCore::jsMapLikePrototypeFunctionForEachBody):
        (WebCore::jsMapLikePrototypeFunctionSetBody):
        (WebCore::jsMapLikePrototypeFunctionDeleteBody):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::jsSetLikePrototypeFunctionHasBody):
        (WebCore::jsSetLikePrototypeFunctionForEachBody):
        (WebCore::jsSetLikePrototypeFunctionAddBody):
        (WebCore::jsSetLikePrototypeFunctionDeleteBody):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
        (WebCore::jsTestDOMJITPrototypeFunctionItemBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructorConstructor::construct):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::jsTestEventTargetPrototypeFunctionItemBody):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
        (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::construct):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorNamedConstructor::construct):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjConstructor::construct):
        (WebCore::callJSTestObj1):
        (WebCore::callJSTestObj2):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
        (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
        (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
        (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
        (WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
        (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
        (WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
        (WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
        (WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
        (WebCore::jsTestObjPrototypeFunctionConvert1Body):
        (WebCore::jsTestObjPrototypeFunctionConvert2Body):
        (WebCore::jsTestObjPrototypeFunctionConvert3Body):
        (WebCore::jsTestObjPrototypeFunctionConvert4Body):
        (WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
        (WebCore::jsTestObjPrototypeFunctionAnyBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
        (WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
        (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
        (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::constructJSTestOverloadedConstructors1):
        (WebCore::constructJSTestOverloadedConstructors2):
        (WebCore::constructJSTestOverloadedConstructors3):
        (WebCore::constructJSTestOverloadedConstructors4):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
        (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEventConstructor::construct):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::construct):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
        (WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
        (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):

2020-03-25  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, fix the watchOS build after r259008

        Put a call to Pasteboard::nameOfDragPasteboard behind ENABLE(DRAG_SUPPORT); additionally, update an out-of-date
        comment to reflect the fact that arbitrary UIPasteboards can be converted to a list of NSItemProviders, whose
        data can be traversed in fidelity order.

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

2020-03-25  Simon Fraser  <simon.fraser@apple.com>

        Flashing and partly visible elements
        https://bugs.webkit.org/show_bug.cgi?id=204605

        Reviewed by Zalan Bujtas.

        If, during a compositing update, a layer becomes non-composited, then we repaint its
        location in its new target compositing layer. However, that layer might be in the list
        of BackingSharingState's layers that may paint into backing provided by some ancestor,
        so they'd be in a limbo state where their repaint target was unknown. We'd erroneously
        repaint in some ancestor, resulting in missing content.

        Fix by having BackingSharingState track a set of layers that can't be repainted currently
        because their ancestor chain contains a maybe-sharing layer, and repaint them when
        the backing sharing state is resolved.

        This is only an issue during RenderLayerCompositor::computeCompositingRequirements()
        when the backing sharing state is being computed, so most repaints are not affected.

        Test: compositing/shared-backing/repaint-into-shared-backing.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::BackingSharingState::isPotentialBackingSharingLayer const):
        (WebCore::RenderLayerCompositor::BackingSharingState::addLayerNeedingRepaint):
        (WebCore::RenderLayerCompositor::BackingSharingState::endBackingSharingSequence):
        (WebCore::RenderLayerCompositor::BackingSharingState::issuePendingRepaints):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::updateBacking):
        (WebCore::RenderLayerCompositor::updateLayerCompositingState):
        (WebCore::RenderLayerCompositor::layerRepaintTargetsBackingSharingLayer const):
        * rendering/RenderLayerCompositor.h:

2020-03-25  Chris Dumez  <cdumez@apple.com>

        Event listeners registered with 'once' option may get garbage collected too soon
        https://bugs.webkit.org/show_bug.cgi?id=209504
        <rdar://problem/60541567>

        Reviewed by Yusuke Suzuki.

        In EventTarget::innerInvokeEventListeners, if the listener we're about to call is a one-time
        listener (has 'once' flag set), we would first unregister the event listener and then call
        it, as per the DOM specification. However, once unregistered, the event listener is no longer
        visited for GC purposes and its internal JS Function may get garbage collected before we get
        a chance to call it.

        To address the issue, we now make sure the JS Function (and its wrapper) stay alive for the
        duration of the scope using ensureStillAliveHere().

        Test: http/tests/inspector/network/har/har-page-aggressive-gc.html

        * bindings/js/JSEventListener.h:
        * dom/EventListener.h:
        (WebCore::EventListener::jsFunction const):
        (WebCore::EventListener::wrapper const):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::innerInvokeEventListeners):

2020-03-25  Wenson Hsieh  <wenson_hsieh@apple.com>

        Rename "data interaction pasteboard" to "drag and drop pasteboard"
        https://bugs.webkit.org/show_bug.cgi?id=209556

        Reviewed by Tim Horton.

        "Data interaction" is an obsolete term for drag and drop on iOS, and was meant only to be used early on in
        development. Replace this with the more descriptive name "drag and drop pasteboard", and additionally hide the
        name behind a Cocoa-only Pasteboard helper method so that each call site won't need to repeat the string.

        * platform/Pasteboard.h:
        * platform/cocoa/DragDataCocoa.mm:
        (WebCore::DragData::DragData):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::nameOfDragPasteboard):
        (WebCore::Pasteboard::createForDragAndDrop):
        (WebCore::Pasteboard::respectsUTIFidelities const):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::PlatformPasteboard):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::nameOfDragPasteboard):

2020-03-25  Frank Yang  <guowei_yang@apple.com>

        Unprefix -webkit-text-orientation
        https://bugs.webkit.org/show_bug.cgi?id=196139

        Reviewed by Myles C. Maxfield

        In order to unprefix -webkit-text-orientation to be text-orientation, 
        a new property, "text-orientation" is added to CSSProperties.json. 
        I didn't use alias because the prefixed version still supports non-standard values, 
        and we want the unprefixed version to strictly follow the specs.
        However only adding a new property is not enough because -webkit-text-orientation
        is a high-priority property, and without extra logic, the CSS property 
        "last-one-wins" ordering rule cannot be enforced because high-priority properties 
        are applied to elements in the order they appear in the generated CSSPropertyNames.cpp file. 
        Therefore a codegen flag, "related-property" is added to both 
        -webkit-text-orientation and text-orientation to point to each other, 
        so that when applying high priorities, the algorithm will know that the 
        two properties are modifying the same style of the element (in our case, text orientation)
        and thus the CSS property "last-one-wins" ordering rule will take effect. 

        This code change also helps future developments when we want to unprefix other high-priority properties.

        Tests: fast/text/orientation-inheritance.html
               fast/text/orientation-mixed-unprefix.html
               fast/text/orientation-sideways-prefix-unprefix.html
               fast/text/orientation-sideways-unprefix.html
               fast/text/orientation-upright-unprefix.html
               fast/text/test-orientation-parsing-001.html
               fast/text/text-orientation-parse-competition.html
               fast/text/text-orientation-parse.html
               imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001.html

        * css/CSSComputedStyleDeclaration.cpp: 
            - added support for parsing "text-orientation"
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
            - added a new RenderStyle, CSSPropertyTextOrientation 
        * css/CSSProperties.json: 
            - added a new codegen property, "related-property"
        * css/makeprop.pl: 
            - added new rules for generating code to parse related properties
        (addProperty):
            - inserts new rule in the generated code to parse related properties
        * css/parser/CSSParserFastPaths.cpp:
            - Specified the CSS property values that the unprefixed "text-orientation" can take
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
            - Only supports the standard values for text-orientation
        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
            - Added switch case value CSSPropertyTextOrientation
        * css/parser/CSSParserImpl.cpp: 
            - Added rules to treat related properties differently
        (WebCore::filterProperties):
            - For related rules that are also high priority, 
              if we saw one in the property list, we will mark all the related property 
              as seen, in order to enforce the "last-one-wins" ordering rule
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyValueTextOrientation):
            - added functionality to parse the newly added "text-orientation" property

2020-03-25  Simon Fraser  <simon.fraser@apple.com>

        Remove CompositingChangeRepaint which was always CompositingChangeRepaintNow
        https://bugs.webkit.org/show_bug.cgi?id=209551

        Reviewed by Zalan Bujtas.

        All callers to updateBacking() passed CompositingChangeRepaintNow, so remove this argument
        and the enum.

        No behavior change.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::layerStyleChanged):
        (WebCore::RenderLayerCompositor::updateBacking):
        (WebCore::RenderLayerCompositor::updateLayerCompositingState):
        * rendering/RenderLayerCompositor.h:

2020-03-25  Sergio Villar Senin  <svillar@igalia.com>

        Unreviewed build fix for GTK.

        In wkb.ug/209536 we replaced ENABLE_WEBGL by ENABLE_WEBXR for cmake
        builds. We just forgot to do it the same for derived sources.

        * Sources.txt: replaced ENABLE_WEBGL by ENABLE_WEBXR.

2020-03-25  youenn fablet  <youenn@apple.com>

        Fix build after https://trac.webkit.org/changeset/258977/webkit
        https://bugs.webkit.org/show_bug.cgi?id=209545

        Unreviewed.

        * dom/Document.cpp:
        (WebCore::Document::visibilityStateChanged):
        Add ENABLE(MEDIA_STREAM) compilation flag.

2020-03-25  Frank Yang  <guowei_yang@apple.com>

        WebKit uses Alphabetic Baseline when "-webkit-text-orientation" is "mixed" in Vertical Writing Mode
        https://bugs.webkit.org/show_bug.cgi?id=208824

        Reviewed by Myles C. Maxfield.

        According to the CSS documentation, https://drafts.csswg.org/css-writing-modes/#text-orientation and 
        https://drafts.csswg.org/css-writing-modes/#text-baselines "In vertical typographic mode, 
        the central baseline is used as the dominant baseline when text-orientation is mixed or upright. 
        Otherwise the alphabetic baseline is used." 

        However, InlineFlowBox::requiresIdeographicsBaseline returns true only when text orientation is 
        "upright", meaning it applies the same baseline for mixed and sideways text orientation.
        Therefore, a new clause is added to check if text-orientation is "mixed" 

        Currently in our implementation, text orientation is determinted by the following:
                - mixed:    FontDescription returns Vertical   and   nonCJKGlyphOrientation returns Mixed
                - upright:  FontDescription returns Vertical   and   nonCJKGlyphOrientation returns Upright
                - sideways: FontDescription returns Horizontal and   nonCJKGlyphOrientation returns Mixed
        Original code only checks if FontDescription returns Vertical and nonCJKGlyphOrientation returns Mixed, which
        is only checking if text orientation is "upright", and returns true for requiresIdeographicBaseline, treating        
        "mixed" and "sideways" the same, requesting alphabetic baseline, which is incorrect.

        Therefore, to correct this bahavior, change the code so that requiresIdeographicsBaseline returns true either 
        when text-orientation is "mixed" or "upright". Equivalently, we return true when FontDescription returns Vertical
        false otherwise. 

        Test: imported/w3c/web-platform-tests/css/css-writing-modes/

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::requiresIdeographicBaseline const):

2020-03-25  Sergio Villar Senin  <svillar@igalia.com>

        Use ENABLE_WEBXR to guard WebXR IDL files in CMakeLists.txt
        https://bugs.webkit.org/show_bug.cgi?id=209536

        Reviewed by Darin Adler.

        * CMakeLists.txt: replaced ENABLE_WEBGL by ENABLE_WEBXR.

2020-03-25  Kate Cheney  <katherine_cheney@apple.com>

        App-bound domain checks should provide more debugging details at script evaluation sites
        https://bugs.webkit.org/show_bug.cgi?id=209521
        <rdar://problem/60837954>

        Reviewed by Chris Dumez.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeScriptInWorld):
        Return makeUnexpected object with an error message instead of null to
        provide more details as to why the executeScriptInWorld()
        call was not completed. Also add console logging and release logging.
 
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptImmediately):
        There is no option to return an exception here, so this patch adds
        console logging and release logging.

2020-03-25  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r251385): box-shadow interferes with backdrop-filter
        https://bugs.webkit.org/show_bug.cgi?id=208070
        <rdar://problem/59683152>

        Reviewed by Dean Jackson.

        updateClippingStrategy() compares the rounded rect passed in with the geometry
        of the first layer argument, so the rect needs to have a zero origin. We do
        the same computation in GraphicsLayerCA::updateContentsRects().

        Test: compositing/filters/backdrop-filter-rect.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):

2020-03-25  Wenson Hsieh  <wenson_hsieh@apple.com>

        Avoid querying pasteboard strings while dragging content over a potential drop target
        https://bugs.webkit.org/show_bug.cgi?id=209531

        Reviewed by Tim Horton and Ryosuke Niwa.

        A couple of places in WebCore currently use PasteboardStrategy::stringForType() to query for pasteboard URL
        strings. These call sites attempt to read URL strings (using both readString and stringForType) for the purposes
        of checking whether or not we should avoid exposing the URL string to web content (note that in the case of
        containsPlainText, we actually check whether or not the string is empty, which depends on whether or not the
        string is safe to expose to the web -- e.g., not a file URL).

        This is incompatible with some changes in the near future which will prevent the web content process from
        reading any data from the pasteboard, if a paste or drop action has not yet been performed. To address this
        issue, we introduce an alternate PasteboardStrategy method, containsStringSafeForDOMToReadForType, which returns
        (for a given platform pasteboard type) whether or not a string that can be safely exposed to bindings exists.

        Rather than allow the web process to read the entire string, limit it to just this true/false answer.

        * platform/PasteboardStrategy.h:
        * platform/PlatformPasteboard.h:
        * platform/cocoa/DragDataCocoa.mm:
        (WebCore::DragData::containsPlainText const):

        Use containsStringSafeForDOMToReadForType instead of stringForType.

        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::Pasteboard::fileContentState):

        Use containsStringSafeForDOMToReadForType instead of readString.

        * platform/cocoa/PlatformPasteboardCocoa.mm:
        (WebCore::PlatformPasteboard::containsStringSafeForDOMToReadForType const):

2020-03-25  Ting-Wei Lan  <lantw44@gmail.com>

        [GTK] Add user agent quirk for auth.mayohr.com
        https://bugs.webkit.org/show_bug.cgi?id=209378

        Reviewed by Michael Catanzaro.

        This site blocks the login page completely and asks the user to download
        Google Chrome when using our standard user agent. It only blocks the
        login page. After logging in, it works fine without user agent quirks.

        Note that it is required to hide Version/X from the user agent string
        for the site to recognize it as a valid Chrome user agent. Since Chrome
        itself does not use Version/X, it should be safe to modify the existing
        quirk instead of adding a new one to handle it.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresChromeBrowser):
        (WebCore::urlRequiresNoSafariVersion):
        (WebCore::UserAgentQuirks::quirksForURL):
        (WebCore::UserAgentQuirks::stringForQuirk):
        * platform/UserAgentQuirks.h:
        * platform/glib/UserAgentGLib.cpp:
        (WebCore::buildUserAgentString):

2020-03-25  Youenn Fablet  <youenn@apple.com>

        Audio fails to capture stream in WebRTC if AudioSession gets interrupted
        https://bugs.webkit.org/show_bug.cgi?id=208516
        <rdar://problem/60020467>

        Reviewed by Eric Carlson.

        In case of page going to hidden, continue calling each capture factory to mute the corresponding sources if needed.
        In case of page being visible again, reset all tracks according page muted state. This allows restarting tracks that have been
        muted while page was hidden (video tracks or suspended audio tracks).

        Since tracks can go to muted when visibility changes, we no longer return early when setting the muted state of a page to the same value.
        Instead we apply it which ensures we comply with what UIProcess wants.

        We start removing the concept of a RealtimeMediaSource be interrupted. Instead we use muting of sources.
        This allows UIProcess or the page to override any muted state, for instance if page goes in foreground again.

        We update the AudioSharedUnit to allow restarting capture even if suspended.
        This ensures that we are able to restart capturing even if we do not receive the audio session end of interruption.
        Also, this notification sometimes takes a long time to happen and we do not want to wait for it when user is interacting with the page.
        A future refactoring will further remove RealtimeMediaSource interrupted-related code.

        Manually tested.

        * dom/Document.cpp:
        (WebCore::Document::visibilityStateChanged):
        * page/Page.cpp:
        (WebCore::Page::setMuted):
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::isInterrupted const):
        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::setInterrupted):
        (WebCore::RealtimeMediaSource::setMuted):
        * platform/mediastream/mac/BaseAudioSharedUnit.cpp:
        (WebCore::BaseAudioSharedUnit::startProducingData):
        (WebCore::BaseAudioSharedUnit::resume):
        (WebCore::BaseAudioSharedUnit::suspend):

2020-03-25  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Remove noisy warning about broken LC support
        https://bugs.webkit.org/show_bug.cgi?id=209472

        Reviewed by Philippe Normand.

        * platform/graphics/gstreamer/GStreamerCommon.cpp:
        (WebCore::initializeGStreamer): There's no seemingly nice way of
        ensuring this message is issued once in WebKit the
        lifetime. Issuing multiple times is upsetting users. We can't rely
        on Gst logging at this point, and there's no established story of
        using the LOG_CHANNEL stuff on WPE/GTK ports for suppressible
        WebKit message AFAICT.

2020-03-24  Andres Gonzalez  <andresg_22@apple.com>

        Avoid multiple unnecessary updates of the IsolatedTree.
        https://bugs.webkit.org/show_bug.cgi?id=209409

        Reviewed by Chris Fleizach.

        AXObjectCache::notificationPostTimerFired was updating the isolated tree
        in every single notification, causing a big performance hit.
        This change filters out repeated notifications for the same node, thus
        reducing significantly the number of times the isolated tree is updated.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::notificationPostTimerFired):
        (WebCore::AXObjectCache::postNotification):
        (WebCore::AXObjectCache::postTextStateChangeNotification):
        (WebCore::AXObjectCache::generateIsolatedTree):
        (WebCore::AXObjectCache::updateIsolatedTree):
        (WebCore::appendIfNotContainsMatching): Helper function that might be
        added to WTF::Vector.
        (WebCore::createIsolatedTreeHierarchy): Became AXIsolatedTree::createSubtree
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::childrenIDs):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::removeTreeForPageID):
        (WebCore::AXIsolatedTree::generateSubtree):
        (WebCore::AXIsolatedTree::createSubtree):
        (WebCore::AXIsolatedTree::updateNode): Updates only the given node.
        (WebCore::AXIsolatedTree::updateSubtree): Recreates the entire subtree.
        (WebCore::AXIsolatedTree::updateChildren): Updates the associated object,
        recreating only the children that are added and removing the ones that
        are no longer present in the AX tree.
        (WebCore::AXIsolatedTree::removeNode):
        (WebCore::AXIsolatedTree::removeSubtree):
        (WebCore::AXIsolatedTree::appendNodeChanges):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/AXIsolatedTree.h:

2020-03-24  John Wilander  <wilander@apple.com>

        Build fix for deprecated DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection
        https://bugs.webkit.org/show_bug.cgi?id=209530
        <rdar://problem/60855794>

        Unreviewed build fix. Solution suggested by Darin Adler.

        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
            Use of DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection put between
            ALLOW_DEPRECATED_DECLARATIONS_BEGIN and ALLOW_DEPRECATED_DECLARATIONS_END.
        (WebCore::ServicesOverlayController::buildSelectionHighlight):
            Use of DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection put between
            ALLOW_DEPRECATED_DECLARATIONS_BEGIN and ALLOW_DEPRECATED_DECLARATIONS_END.

2020-03-24  Zalan Bujtas  <zalan@apple.com>

        [MultiColumn] Infinite recursion in RenderBlockFlow::relayoutToAvoidWidows
        https://bugs.webkit.org/show_bug.cgi?id=209527
        <rdar://problem/56993589>

        Reviewed by Simon Fraser.

        This patch expands on r204980. This is yet another case when we can't possibly accommodate widows in the current column.

        Test: fast/multicol/page-cant-accommodate-widow-crash.html

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):

2020-03-24  Wenson Hsieh  <wenson_hsieh@apple.com>

        Rename DragDataMac and DragImageMac to DragDataCocoa and DragImageCocoa
        https://bugs.webkit.org/show_bug.cgi?id=209523

        Reviewed by Megan Gardner.

        Rename DragDataMac to DragDataCocoa, and DragImageMac to DragImageCocoa. These files contain logic relevant to
        both macOS and iOS, and as such, belong in platform/cocoa rather than platform/mac.

        No change in behavior.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/DragDataCocoa.mm: Renamed from Source/WebCore/platform/mac/DragDataMac.mm.
        (WebCore::rtfPasteboardType):
        (WebCore::rtfdPasteboardType):
        (WebCore::stringPasteboardType):
        (WebCore::urlPasteboardType):
        (WebCore::htmlPasteboardType):
        (WebCore::colorPasteboardType):
        (WebCore::pdfPasteboardType):
        (WebCore::tiffPasteboardType):
        (WebCore::DragData::DragData):
        (WebCore::DragData::containsURLTypeIdentifier const):
        (WebCore::DragData::canSmartReplace const):
        (WebCore::DragData::containsColor const):
        (WebCore::DragData::containsFiles const):
        (WebCore::DragData::numberOfFiles const):
        (WebCore::DragData::asFilenames const):
        (WebCore::DragData::containsPlainText const):
        (WebCore::DragData::asPlainText const):
        (WebCore::DragData::asColor const):
        (WebCore::DragData::containsCompatibleContent const):
        (WebCore::DragData::containsPromise const):
        (WebCore::DragData::containsURL const):
        (WebCore::DragData::asURL const):
        * platform/cocoa/DragImageCocoa.mm: Renamed from Source/WebCore/platform/mac/DragImageMac.mm.
        (WebCore::dragImageSize):
        (WebCore::deleteDragImage):
        (WebCore::scaleDragImage):
        (WebCore::dissolveDragImageToFraction):
        (WebCore::createDragImageFromImage):
        (WebCore::createDragImageIconForCachedImageFilename):
        (WebCore::dragOffsetForLinkDragImage):
        (WebCore::anchorPointForLinkDragImage):
        (WebCore::LinkImageLayout::LinkImageLayout):
        (WebCore::createDragImageForLink):
        (WebCore::createDragImageForColor):
        * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:

        Unrelated build fix due to changing unified sources.

2020-03-24  Jer Noble  <jer.noble@apple.com>

        REGRESSION(r258314): Leak in MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer()
        https://bugs.webkit.org/show_bug.cgi?id=209519

        Reviewed by Eric Carlson.

        Obey the "copy" rule and adopt the results of -copyPixelBufferForSourceTime:sourceTimeForDisplay:.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer):

2020-03-24  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Customize a bit more on the macOS LocalAuthentication prompt
        https://bugs.webkit.org/show_bug.cgi?id=208703
        <rdar://problem/60136974>

        Reviewed by Brent Fulgham.

        Part 2.

        This patch adds a different LocalAuthentication prompt title for getAssertion.
        It also polishes the text used for makeCredential.

        Besides that, it also enhances the iOS title strings.

        * en.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::getAssertionTouchIDPromptTitle):
        * platform/LocalizedStrings.h:

2020-03-24  Chris Dumez  <cdumez@apple.com>

        Function passed to addEventListener may get garbage collected before the event listener is even added
        https://bugs.webkit.org/show_bug.cgi?id=209445

        Reviewed by Yusuke Suzuki.

        Function passed to addEventListener may get garbage collected before the event listener is even added.
        The issue is that the JS bindings for addEventListener() would first create a JSEventListener to store
        the JSC Function that was passed in and then add this JSEventListener as an event listener on the
        EventTarget. The JSC function held by JSEventListener is supposed to get visited by
        JSEventListener::visitJSFunction() which gets called by EventTarget::visitJSEventListeners() which
        gets called every time an EventTarget wrapper gets visited. The issue is that when the JSEventListener
        gets created, the JSEventListener is not yet connected to its EventTarget and thus
        EventTarget::visitJSEventListeners() would not visit it. However, the constructor of JSEventListener
        would issue a write barrier on that JSC Function.

        Several changes were made to address this issue in the generated bindings:
        1. We now create a local variable (named argumentX, X being argument index) for each argument that gets
           passed in to an operation
        2. At the end of the operation implementation, we call ensureStillAliveHere() on each JSValue argument
           to make sure they stay alive until the end of the operation
        3. For EventListeners / EventHandlers, we also issue a write barrier at the end of the operation
           implementation, when it is safe to do so. Now that we do this here in the bindings, I dropped the
           code in the JSEventListener constructor to issue the write barrier (as this was too early).

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::JSEventListener):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GetOperationReturnedParameterName):
        (GenerateAttributeSetterBodyDefinition):
        (GenerateParametersCheck):
        (GenerateEnsureStillAliveCallsForArguments):
        (GenerateImplementationFunctionCall):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::jsMapLikePrototypeFunctionGetBody):
        (WebCore::jsMapLikePrototypeFunctionHasBody):
        (WebCore::jsMapLikePrototypeFunctionEntriesBody):
        (WebCore::jsMapLikePrototypeFunctionKeysBody):
        (WebCore::jsMapLikePrototypeFunctionValuesBody):
        (WebCore::jsMapLikePrototypeFunctionForEachBody):
        (WebCore::jsMapLikePrototypeFunctionSetBody):
        (WebCore::jsMapLikePrototypeFunctionDeleteBody):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionEntriesBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionKeysBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionValuesBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionEntriesBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionKeysBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionValuesBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::jsSetLikePrototypeFunctionHasBody):
        (WebCore::jsSetLikePrototypeFunctionEntriesBody):
        (WebCore::jsSetLikePrototypeFunctionKeysBody):
        (WebCore::jsSetLikePrototypeFunctionValuesBody):
        (WebCore::jsSetLikePrototypeFunctionForEachBody):
        (WebCore::jsSetLikePrototypeFunctionAddBody):
        (WebCore::jsSetLikePrototypeFunctionDeleteBody):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod1Body):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethod2Body):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::jsTestCEReactionsStringifierPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
        (WebCore::jsTestDOMJITPrototypeFunctionItemBody):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructorConstructor::construct):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::jsTestEventTargetPrototypeFunctionItemBody):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
        (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::construct):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
        (WebCore::jsTestInterfacePrototypeFunctionTakeNodesBody):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorNamedConstructor::construct):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
        (WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjConstructor::construct):
        (WebCore::callJSTestObj1):
        (WebCore::callJSTestObj2):
        (WebCore::setJSTestObjOnfooSetter):
        (WebCore::setJSTestObjOnwebkitfooSetter):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
        (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
        (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
        (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
        (WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionByteMethodBody):
        (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodBody):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionLongMethodBody):
        (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionObjMethodBody):
        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
        (WebCore::jsTestObjInstanceFunctionUnforgeableMethodBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
        (WebCore::jsTestObjPrototypeFunctionNullableStringMethodBody):
        (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethodBody):
        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectBody):
        (WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
        (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
        (WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
        (WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObjBody):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObjExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpacesBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
        (WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
        (WebCore::jsTestObjPrototypeFunctionGetSVGDocumentBody):
        (WebCore::jsTestObjPrototypeFunctionConvert1Body):
        (WebCore::jsTestObjPrototypeFunctionConvert2Body):
        (WebCore::jsTestObjPrototypeFunctionConvert3Body):
        (WebCore::jsTestObjPrototypeFunctionConvert4Body):
        (WebCore::jsTestObjPrototypeFunctionMutablePointFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
        (WebCore::jsTestObjPrototypeFunctionAnyBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
        (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
        (WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
        (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
        (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::constructJSTestOverloadedConstructors1):
        (WebCore::constructJSTestOverloadedConstructors2):
        (WebCore::constructJSTestOverloadedConstructors3):
        (WebCore::constructJSTestOverloadedConstructors4):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
        (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEventConstructor::construct):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturningBody):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::jsTestStringifierPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifierBody):
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifierBody):
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToStringBody):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::construct):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
        (WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
        (WebCore::jsTestTypedefsPrototypeFunctionPointFunctionBody):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
        (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):

2020-03-24  Alex Christensen  <achristensen@webkit.org>

        Add console message when legacy TLS is used
        https://bugs.webkit.org/show_bug.cgi?id=209444

        Reviewed by Darin Adler.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didReceiveResponse):
        Indent less, add host to inspector, add release logging without host.

2020-03-24  Antoine Quint  <graouts@apple.com>

        [Web Animations] Clean timeline headers up
        https://bugs.webkit.org/show_bug.cgi?id=209482

        Reviewed by Antti Koivisto.

        The AnimationTimeline::removeAnimationsForElement() method isn't used and DocumentTimeline::applyPendingAcceleratedAnimations()
        is only used internally in DocumentTimeline so it can be made private.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::removeAnimationsForElement): Deleted.
        * animation/AnimationTimeline.h:
        * animation/DocumentTimeline.h:

2020-03-24  Antoine Quint  <graouts@apple.com>

        [iOS+macOS Debug] ASSERTION FAILED: m_effects.isEmpty() in WebCore::KeyframeEffectStack::~KeyframeEffectStack()
        https://bugs.webkit.org/show_bug.cgi?id=208718
        <rdar://problem/59956433>

        Reviewed by Darin Adler.

        This assertion is only valid in the case where elements with relevant animations are still alive when the document is
        torn down. However, it's fine to have an Element be destroyed with a relevant animation while its document is still alive.

        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::~KeyframeEffectStack):

2020-03-23  Simon Fraser  <simon.fraser@apple.com>

        Safari jetsams with repeated drawImage/getImageData
        https://bugs.webkit.org/show_bug.cgi?id=207957

        Reviewed by Tim Horton.

        SubimageCacheWithTimer used a DeferrableOneShotTimer to clear itself, but if content
        adds an entry to the cache on every frame (as might content drawing video frames into a canvas)
        then the cache was never cleared. Nor was it cleared via a memory warning.

        Fix by tracking cache entries by age, and using a repeating timer to prune old images
        from the cache. Also hook up the cache to the memory pressure handler, which clears it.

        Reduce the timer frequency from 1s to 500ms, since that was observed to reduce the memory use
        on the provided testcase from ~600M to ~350M, making jetsam less likely.

        Rename m_images to m_imageCounts to make its role clearer.

        * page/cocoa/MemoryReleaseCocoa.mm:
        (WebCore::platformReleaseMemory):
        * platform/graphics/cg/SubimageCacheWithTimer.cpp:
        (WebCore::SubimageCacheWithTimer::clear):
        (WebCore::SubimageCacheAdder::translate):
        (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
        (WebCore::SubimageCacheWithTimer::pruneCacheTimerFired):
        (WebCore::SubimageCacheWithTimer::prune):
        (WebCore::SubimageCacheWithTimer::subimage):
        (WebCore::SubimageCacheWithTimer::clearImageAndSubimages):
        (WebCore::SubimageCacheWithTimer::clearAll):
        (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired): Deleted.
        * platform/graphics/cg/SubimageCacheWithTimer.h:

2020-03-23  Stephan Szabo  <stephan.szabo@sony.com>

        [WinCairo][PlayStation] Failure to build with ENABLE_XSLT=OFF
        https://bugs.webkit.org/show_bug.cgi?id=209454

        Reviewed by Ross Kirsling.

        No new tests, build fix.

        * xml/parser/XMLDocumentParserLibxml2.cpp:

2020-03-23  Zalan Bujtas  <zalan@apple.com>

        becu.org: Placeholder text "Search" is cut off
        https://bugs.webkit.org/show_bug.cgi?id=209447
        <rdar://problem/45951728>

        Reviewed by Simon Fraser.

        'line-height: initial' ensures that that the placeholder text is visible and properly positioned when the input itself has
        incompatible values. This is also what Chrome has in their UA stylesheet.

        Test: fast/forms/placeholder-content-line-height.html

        * css/html.css:
        (input::placeholder):

2020-03-23  Simon Fraser  <simon.fraser@apple.com>

        [mac-wk1] fast/scrolling/arrow-key-scroll-in-rtl-document.html is a flaky timeout
        https://bugs.webkit.org/show_bug.cgi?id=209427

        Reviewed by Wenson Hsieh.

        In WebKit1, arrow-key scrolls are instantaneous, so scrolling is complete before the test
        registers the 'monitor wheel events' callback. However, nothing triggers a subsequent rendering
        update, so the test never completes.

        Fix by having WheelEventTestMonitor::setTestCallbackAndStartMonitoring() trigger a rendering
        update.

        * page/WheelEventTestMonitor.cpp:
        (WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):

2020-03-23  Zalan Bujtas  <zalan@apple.com>

        [LFC] Layout::Box::initialContainingBlock() should return const InitialContainingBlock&
        https://bugs.webkit.org/show_bug.cgi?id=209406
        <rdar://problem/60749715>

        Reviewed by Antti Koivisto.

        Use is<InitialContainingBlock> where applicable.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):
        (WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::absoluteDisplayBox):
        * layout/invalidation/InvalidationState.cpp:
        (WebCore::Layout::InvalidationState::markNeedsUpdate):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesBlockFormattingContext const):
        (WebCore::Layout::Box::containingBlock const):
        (WebCore::Layout::Box::formattingContextRoot const):
        (WebCore::Layout::Box::initialContainingBlock const):
        (WebCore::Layout::Box::isInFormattingContextOf const):
        (WebCore::Layout::Box::isOverflowVisible const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isInitialContainingBlock const):
        (WebCore::Layout::Box::isInlineTextBox const):
        (WebCore::Layout::Box::isLineBreakBox const):
        (WebCore::Layout::Box::isReplacedBox const):
        * layout/layouttree/LayoutInitialContainingBlock.cpp:
        (WebCore::Layout::InitialContainingBlock::InitialContainingBlock):
        * layout/layouttree/LayoutInlineTextBox.cpp:
        (WebCore::Layout::InlineTextBox::InlineTextBox):
        * layout/layouttree/LayoutLineBreakBox.cpp:
        (WebCore::Layout::LineBreakBox::LineBreakBox):
        * layout/layouttree/LayoutReplacedBox.cpp:
        (WebCore::Layout::ReplacedBox::ReplacedBox):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputLayoutBox):

2020-03-23  Justin Fan  <justin_fan@apple.com>

        [ Mac wk2 Debug ] webgpu/whlsl/vector-compare.html is flaky crashing.
        https://bugs.webkit.org/show_bug.cgi?id=209024

        Reviewed by Myles C. Maxfield.

        Prevent GPUBindGroup destructor from accidentally dereferencing GPUBindGroupAllocator too many times
        if the owning GPUDevice has already been destroyed. A GPUBindGroupAllocator should reset whenever its
        spawned GPUBindGroups are all cleaned up. 

        Covered by existing tests.

        * platform/graphics/gpu/GPUBindGroupAllocator.h:
        * platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm:
        (WebCore::GPUBindGroupAllocator::allocateAndSetEncoders):
        (WebCore::GPUBindGroupAllocator::tryReset):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::GPUBindGroup::~GPUBindGroup):

2020-03-23  Wenson Hsieh  <wenson_hsieh@apple.com>

        Remove the unused method PasteboardStrategy::uniqueName()
        https://bugs.webkit.org/show_bug.cgi?id=209452

        Reviewed by Tim Horton.

        This was introduced in <https://trac.webkit.org/r107844>, where it was used in the implementation of
        Editor::newGeneralClipboard. However, this was subsequently removed in <https://trac.webkit.org/r150351>.

        No change in behavior.

        * platform/PasteboardStrategy.h:
        * platform/PlatformPasteboard.h:
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::uniqueName): Deleted.
        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::uniqueName): Deleted.

2020-03-23  Alex Christensen  <achristensen@webkit.org>

        Add console message when legacy TLS is used
        https://bugs.webkit.org/show_bug.cgi?id=209444

        Reviewed by Darin Adler.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didReceiveResponse):

2020-03-23  John Wilander  <wilander@apple.com>

        Add the capability to change all of a website's cookies to SameSite=Strict
        https://bugs.webkit.org/show_bug.cgi?id=209369
        <rdar://problem/60710690>

        Reviewed by Alex Christensen and David Kilzer.

        Test: http/tests/resourceLoadStatistics/set-all-cookies-to-same-site-strict.html

        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):
            Stub function for non-Cocoa platforms.
        * platform/network/NetworkStorageSession.h:
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::setAllCookiesToSameSiteStrict):
        * testing/Internals.h:
            Added code to expose SameSite=None and path properties of cookies.
            However, they don't seem to carry over so I'll have to revisit the
            internal workings.

2020-03-23  Michael Catanzaro  <mcatanzaro@gnome.org>

        [WPE][GTK] Allow distributors to brand user agent
        https://bugs.webkit.org/show_bug.cgi?id=162611

        Unreviewed, un-break my previous commit.

        * platform/glib/UserAgentGLib.cpp:
        (WebCore::standardUserAgent):

2020-03-23  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] compositing/overflow/dynamic-composited-scrolling-status.html asserts
        https://bugs.webkit.org/show_bug.cgi?id=209440
        <rdar://problem/60705261>

        Reviewed by Wenson Hsieh.

        nonFastScrollableRectsForTesting() needs to eagerly update event regions after r258528,
        as we do for touchEventRectsForEventForTesting().

        Also renamed the function so it's clear that it's for testing only.

        * page/Page.cpp:
        (WebCore::Page::nonFastScrollableRectsForTesting):
        (WebCore::Page::nonFastScrollableRects): Deleted.
        * page/Page.h:
        * testing/Internals.cpp:
        (WebCore::Internals::nonFastScrollableRects const):

2020-03-24  James Darpinian  <jdarpinian@chromium.org>

        Set important EGL context attributes
        https://bugs.webkit.org/show_bug.cgi?id=208724

        Reviewed by Dean Jackson.

        Re-landing this change after r258875.

        These EGL context attributes are important to make ANGLE's validation correct for
        WebGL contexts. ROBUST_RESOURCE_INITIALIZATION is especially important; the lack
        of it may be a root cause of some of the test flakiness we have seen. With this
        change WebKit's EGL context attributes now match Chromium's for ANGLE/WebGL
        contexts.

        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

2020-03-23  Michael Catanzaro  <mcatanzaro@gnome.org>

        [GTK] Allow distributors to brand user agent
        https://bugs.webkit.org/show_bug.cgi?id=162611

        Reviewed by Adrian Perez de Castro.

        * platform/glib/UserAgentGLib.cpp:
        (WebCore::buildUserAgentString):

2020-03-23  Dean Jackson  <dino@apple.com>

        [WebGL] Skip vertexAttrib0 simulation when using ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=209416
        <rdar://problem/60765734>

        Reviewed by Antoine Quint.

        When using ANGLE as a backend, we do not need to simulate a
        missing vertexAttrib0 at the WebGL layer, since ANGLE will
        handle it for us.

        This causes a couple of tests to begin passing (they were marked as
        failures). It also allows us to re-land r258025, which was rolled
        out in r258226.

        * html/canvas/WebGL2RenderingContext.cpp: Wrap any code that does vertexAttrib0
        simulation in a !USE(ANGLE).
        (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
        (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
        (WebCore::WebGLRenderingContextBase::validateDrawArrays):
        (WebCore::WebGLRenderingContextBase::validateDrawElements):
        (WebCore::WebGLRenderingContextBase::drawArrays):
        (WebCore::WebGLRenderingContextBase::drawElements):
        (WebCore::WebGLRenderingContextBase::getActiveUniform):
        (WebCore::WebGLRenderingContextBase::getVertexAttrib):
        (WebCore::WebGLRenderingContextBase::vertexAttribfImpl):
        (WebCore::WebGLRenderingContextBase::vertexAttribfvImpl):
        * html/canvas/WebGLRenderingContextBase.h:
        * html/canvas/WebGLVertexArrayObjectBase.cpp:
        (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):

2020-03-23  Darin Adler  <darin@apple.com>

        Change TextIterator::rangeLength to not require a live range
        https://bugs.webkit.org/show_bug.cgi?id=209207

        Reviewed by Antti Koivisto.

        - Renamed TextIterator::rangeLength to characterCount.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::rangeMatchesTextNearRange): Use characterCount.
        (WebCore::resetNodeAndOffsetForReplacedNode): Ditto.
        (WebCore::AXObjectCache::nextCharacterOffset): Ditto.
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::AXObjectCache::nodeTextChangePlatformNotification): Ditto.
        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
        (rangeLengthForObject): Ditto.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _convertToNSRange:]): Ditto.

        * dom/SimpleRange.h: Export another constructor.

        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::applyAlternativeTextToRange):
        Use characterCount.
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle): Ditto.
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
        * editing/Editing.cpp:
        (WebCore::indexForVisiblePosition): Ditto.
        * editing/TextCheckingHelper.cpp:
        (WebCore::TextCheckingParagraph::rangeLength const): Ditto.
        (WebCore::TextCheckingParagraph::offsetTo const): Ditto.
        (WebCore::TextCheckingParagraph::checkingStart const): Ditto.
        (WebCore::TextCheckingParagraph::checkingEnd const): Ditto.
        (WebCore::TextCheckingParagraph::checkingLength const): Ditto.
        (WebCore::TextCheckingParagraph::automaticReplacementStart const): Ditto.
        (WebCore::TextCheckingParagraph::automaticReplacementLength const): Ditto.
        (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto.
        (WebCore::TextCheckingHelper::isUngrammatical const): Ditto.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::rangeLength): Deleted.
        (WebCore::characterCount): Like the baove but the argument is SimpleRange
        and return is CharacterCount. Even though each individual node is limited
        to 32-bit size, ranges covering multiple nodes could have a count of
        characters that exceeds 32 bits, so CharacterCount is size_t.
        (WebCore::TextIterator::getLocationAndLengthFromRange): Use characterCount.

        * editing/TextIterator.h: Added characterCount function,
        CharacterCount and CharacterRange types. Removed TextIterator::rangeLength.
        Added FIXME comments about the next steps.

        * editing/VisiblePosition.cpp:
        (WebCore::makeBoundaryPoint): Added.
        * editing/VisiblePosition.h: Added makeBoundaryPoint. Also removed
        extraneous forward declarations and moved some function bodies out of the
        class definition.

        * editing/VisibleUnits.cpp:
        (WebCore::distanceBetweenPositions): Changed return type to ptrdiff_t.
        Use characterCount.
        * editing/VisibleUnits.h: Updated for the above.

        * editing/cocoa/DataDetection.mm:
        (WebCore::detectItemAtPositionWithRange): Use characterCount.
        * editing/cocoa/DictionaryLookup.mm:
        (WebCore::DictionaryLookup::rangeForSelection): Ditto.
        (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
        * editing/ios/DictationCommandIOS.cpp:
        (WebCore::DictationCommandIOS::doApply): Ditto.
        * editing/mac/DictionaryLookupLegacy.mm:
        (WebCore::DictionaryLookup::rangeForSelection): Ditto.
        (WebCore::DictionaryLookup::rangeAtHitTestResult): Ditto.
        * page/EventHandler.cpp:
        (WebCore::textDistance): Ditto.

2020-03-23  youenn fablet  <youenn@apple.com>

        Rename blankURL to aboutBlankURL
        https://bugs.webkit.org/show_bug.cgi?id=209344

        Reviewed by Darin Adler.

        No change of behavior.

        * dom/Document.cpp:
        (WebCore::Document::setURL):
        (WebCore::Document::completeURL const):
        (WebCore::Document::ensureTemplateDocument):
        * dom/Document.h:
        (WebCore::Document::urlForBindings const):
        * dom/InlineStyleSheetOwner.cpp:
        (WebCore::parserContextForElement):
        * dom/Node.cpp:
        (WebCore::Node::baseURI const):
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::WebContentReader::readWebArchive):
        * editing/markup.cpp:
        (WebCore::createFragmentFromMarkup):
        * html/DOMURL.cpp:
        (WebCore::DOMURL::create):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::openURL):
        (WebCore::HTMLFrameElementBase::location const):
        * html/parser/XSSAuditor.cpp:
        (WebCore::XSSAuditor::filterScriptToken):
        (WebCore::XSSAuditor::filterObjectToken):
        (WebCore::XSSAuditor::filterParamToken):
        (WebCore::XSSAuditor::filterEmbedToken):
        (WebCore::XSSAuditor::filterFormToken):
        (WebCore::XSSAuditor::filterInputToken):
        (WebCore::XSSAuditor::filterButtonToken):
        (WebCore::XSSAuditor::isLikelySafeResource):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::maybeLoadEmpty):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::serverRedirectSourceForHistory const):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadWithDocumentLoader):
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::currentItemShouldBeReplaced const):
        (WebCore::HistoryController::initializeItem):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::requestFrame):
        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::createFromSelection):
        * page/Location.cpp:
        (WebCore::Location::url const):
        * page/SecurityPolicy.cpp:
        (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
        * platform/win/ClipboardUtilitiesWin.cpp:
        (WebCore::markupToCFHTML):
        * svg/SVGImageLoader.cpp:
        (WebCore::SVGImageLoader::sourceURI const):

2020-03-23  youenn fablet  <youenn@apple.com>

        Remove DOMCache::m_records
        https://bugs.webkit.org/show_bug.cgi?id=209425

        Reviewed by Alex Christensen.

        We do not need to keep references of FetchRequest and FetchResponse since we clone them before exposing them.
        For that reason, remove m_records and directly use records given from the CacheStorageConnection.
        Minor refactoring to modernize/improve code readability.

        This is a first step towards a future refactoring that will reduce the sending of records from network process to web process
        based on the request parameters: record filtering will be done in network process instead of web process.

        No change of behavior.

        * Modules/cache/DOMCache.cpp:
        (WebCore::createResponse):
        (WebCore::DOMCache::doMatch):
        (WebCore::DOMCache::cloneResponses):
        (WebCore::DOMCache::matchAll):
        (WebCore::createRequest):
        (WebCore::DOMCache::keys):
        (WebCore::DOMCache::retrieveRecords):
        (WebCore::DOMCache::queryCache):
        (WebCore::DOMCache::queryCacheWithTargetStorage):
        (WebCore::DOMCache::batchDeleteOperation):
        (WebCore::DOMCache::batchPutOperation):
        (WebCore::copyRequestRef): Deleted.
        (WebCore::queryCacheMatch): Deleted.
        (WebCore::DOMCache::updateRecords): Deleted.
        * Modules/cache/DOMCache.h:

2020-03-23  Rob Buis  <rbuis@igalia.com>

        XMLHttpRequest: getAllResponseHeaders() sorting
        https://bugs.webkit.org/show_bug.cgi?id=200565

        Reviewed by Darin Adler.

        Sort headers using the ASCII-uppercase header name as key but use ASCII-lowercase header
        names in the string result.

        Nehavior matches Firefox and Chrome.

        Test: imported/web-platform-tests/xhr/getallresponseheaders.htm

        [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getAllResponseHeaders const):

2020-03-23  Truitt Savell  <tsavell@apple.com>

        Unreviewed, reverting r258847.

        Broke testing on Mac Debug with an Assert

        Reverted changeset:

        "[LFC] Layout::Box::initialContainingBlock() should return
        const InitialContainingBlock&"
        https://bugs.webkit.org/show_bug.cgi?id=209406
        https://trac.webkit.org/changeset/258847

2020-03-23  Kate Cheney  <katherine_cheney@apple.com>

        Add checks for app-bound navigations when evaluating user style sheets
        https://bugs.webkit.org/show_bug.cgi?id=209368
        <rdar://problem/60204230>

        Reviewed by Brent Fulgham.

        * page/Page.cpp:
        (WebCore::Page::injectUserStyleSheet):
        If the style sheet is for a specific WebView, it will have a pageID
        and we can check for app-bound navigation in the page object.

        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::initializeUserStyle):
        If the user style sheet is being applied to all WebViews, we can check for 
        for a page's existence and navigation state here before the style sheet is
        updated.

2020-03-23  Antoine Quint  <graouts@apple.com>

        DocumentTimeline / CSSTransition objects are leaking on CNN.com
        https://bugs.webkit.org/show_bug.cgi?id=208069
        <rdar://problem/59680143>

        Reviewed by Darin Adler.

        Integrating post-commit review feedback from Darin. 

        * testing/Internals.cpp:
        (WebCore::Internals::animationWithIdExists const):

2020-03-23  Chris Dumez  <cdumez@apple.com>

        Port window.postMessage to the HTML event loop
        https://bugs.webkit.org/show_bug.cgi?id=209359

        Reviewed by Alex Christensen.

        Port window.postMessage to the HTML event loop instead of using a 0-timer.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willPostMessageImpl):
        (WebCore::InspectorInstrumentation::didPostMessageImpl):
        (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
        (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
        (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willPostMessage):
        (WebCore::InspectorInstrumentation::didPostMessage):
        (WebCore::InspectorInstrumentation::didFailPostMessage):
        (WebCore::InspectorInstrumentation::willDispatchPostMessage):
        (WebCore::InspectorInstrumentation::didDispatchPostMessage):
        * inspector/agents/WebDebuggerAgent.cpp:
        (WebCore::WebDebuggerAgent::willPostMessage):
        (WebCore::WebDebuggerAgent::didPostMessage):
        (WebCore::WebDebuggerAgent::didFailPostMessage):
        (WebCore::WebDebuggerAgent::willDispatchPostMessage):
        (WebCore::WebDebuggerAgent::didDispatchPostMessage):
        (WebCore::WebDebuggerAgent::didClearAsyncStackTraceData):
        * inspector/agents/WebDebuggerAgent.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::postMessage):
        (WebCore::PostMessageTimer::PostMessageTimer): Deleted.
        (WebCore::PostMessageTimer::event): Deleted.
        (WebCore::PostMessageTimer::targetOrigin const): Deleted.
        (WebCore::PostMessageTimer::stackTrace const): Deleted.
        (WebCore::DOMWindow::postMessageTimerFired): Deleted.
        * page/DOMWindow.h:

2020-03-23  Zalan Bujtas  <zalan@apple.com>

        [LFC] Layout::Box::initialContainingBlock() should return const InitialContainingBlock&
        https://bugs.webkit.org/show_bug.cgi?id=209406
        <rdar://problem/60749715>

        Reviewed by Antti Koivisto.

        Use is<InitialContainingBlock> where applicable.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):
        (WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::absoluteDisplayBox):
        * layout/invalidation/InvalidationState.cpp:
        (WebCore::Layout::InvalidationState::markNeedsUpdate):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesBlockFormattingContext const):
        (WebCore::Layout::Box::containingBlock const):
        (WebCore::Layout::Box::formattingContextRoot const):
        (WebCore::Layout::Box::initialContainingBlock const):
        (WebCore::Layout::Box::isInFormattingContextOf const):
        (WebCore::Layout::Box::isOverflowVisible const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isInitialContainingBlock const):
        (WebCore::Layout::Box::isInlineTextBox const):
        (WebCore::Layout::Box::isLineBreakBox const):
        (WebCore::Layout::Box::isReplacedBox const):
        * layout/layouttree/LayoutInitialContainingBlock.cpp:
        (WebCore::Layout::InitialContainingBlock::InitialContainingBlock):
        * layout/layouttree/LayoutInlineTextBox.cpp:
        (WebCore::Layout::InlineTextBox::InlineTextBox):
        * layout/layouttree/LayoutLineBreakBox.cpp:
        (WebCore::Layout::LineBreakBox::LineBreakBox):
        * layout/layouttree/LayoutReplacedBox.cpp:
        (WebCore::Layout::ReplacedBox::ReplacedBox):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputLayoutBox):

2020-03-23  Jer Noble  <jer.noble@apple.com>

        [MSE] Handle the case where AVStreamDataParser packages sync and non-sync samples together in a CMSampleBufferRef.
        https://bugs.webkit.org/show_bug.cgi?id=209365
        <rdar://problem/60625209>

        Reviewed by Eric Carlson.

        AVStreamDataParser will package together muliple samples into a single CMSampleBufferRef for efficiency's sake. When
        this occurs, it may include sync and non-sync samples together into the same CMSampleBufferRef, which is problematic
        as we consider a CMSampleBufferRef to be "sync" only when every sample inside the buffer is also sync.

        To handle this scenario, when receiving a CMSampleBufferRef from AVStreamDataParser, first check whether that buffer
        is "homogeneous", meaning every sample within the buffer has the same effective MediaSample flags. Then, if the buffer
        is not homogenous, break the buffer into muliple homogenious CMSampleBufferRefs. Then, each of those resulting buffers
        is passed up to SourceBuffer as a MediaSample individually.

        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
        (WebCore::isCMSampleBufferAttachmentRandomAccess):
        (WebCore::isCMSampleBufferRandomAccess):
        (WebCore::isCMSampleBufferAttachmentNonDisplaying):
        (WebCore::isCMSampleBufferNonDisplaying):
        (WebCore::MediaSampleAVFObjC::flags const):
        (WebCore::MediaSampleAVFObjC::isHomogeneous const):
        (WebCore::MediaSampleAVFObjC::divideIntoHomogeneousSamples):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):

2020-03-23  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Clean and explain first sample PTS hack
        https://bugs.webkit.org/show_bug.cgi?id=209335

        Reviewed by Philippe Normand.

        MediaSample::applyPtsOffset() had a rather confusing name, so it has
        been changed to something more descriptive of its actual function:
        extendToTheBeginning().

        Also, its only argument has been removed, as it's always zero.

        An explanation of the hack has also been added.

        This patch introduces no behavior changes.

        * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
        (WebCore::MediaSampleGStreamer::extendToTheBeginning):
        (WebCore::MediaSampleGStreamer::applyPtsOffset): Deleted.
        * platform/graphics/gstreamer/MediaSampleGStreamer.h:
        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
        (WebCore::AppendPipeline::appsinkNewSample):

2020-03-23  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove unused LayoutAncestorIterator class
        https://bugs.webkit.org/show_bug.cgi?id=209401
        <rdar://problem/60743144>

        Reviewed by Sam Weinig.

        * WebCore.xcodeproj/project.pbxproj:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        * layout/displaytree/DisplayPainter.cpp:
        * layout/layouttree/LayoutAncestorIterator.h: Removed.
        * layout/layouttree/LayoutChildIterator.h:
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::last const): Deleted.
        * layout/layouttree/LayoutIterator.h:
        (WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren): Deleted.
        (WebCore::Layout::Traversal::lastChild): Deleted.
        (WebCore::Layout::Traversal::previousSibling): Deleted.
        (WebCore::Layout::Traversal::findAncestorOfType): Deleted.
        (WebCore::Layout::LayoutIterator<T>::traversePreviousSibling): Deleted.
        (WebCore::Layout::LayoutIterator<T>::traverseAncestor): Deleted.
        * layout/layouttree/LayoutTreeBuilder.cpp:

2020-03-23  Antoine Quint  <graouts@apple.com>

        [Web Animations] Refactor cancelDeclarativeAnimationsForElement and willDestroyRendererForElement on AnimationTimeline
        https://bugs.webkit.org/show_bug.cgi?id=209423

        Reviewed by Antti Koivisto.

        The methods cancelDeclarativeAnimationsForElement and willDestroyRendererForElement on AnimationTimeline did the same
        thing save for the argument passed to WebAnimation::cancel(). We now refactor those two methods into a single
        cancelDeclarativeAnimationsForElement method with an argument to set whether cancelation should be silent.
        As a result, we also change WebAnimation::cancel() to have a single flavor instead of one without an argument and one
        with the silent argument.

        No test because there is no change in visible behavior.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::elementWasRemoved):
        (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
        (WebCore::AnimationTimeline::willDestroyRendererForElement): Deleted.
        * animation/AnimationTimeline.h:
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::cancel):
        * animation/DeclarativeAnimation.h:
        * animation/WebAnimation.cpp:
        * animation/WebAnimation.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::tearDownRenderers):

2020-03-23  Youenn Fablet  <youenn@apple.com>

        AudioTrackPrivateMediaStream recovers from a muted track very late
        https://bugs.webkit.org/show_bug.cgi?id=209411

        Reviewed by Eric Carlson.

        In case of a muted track, the AudioSampleDataSource is not pushed any new sample.
        When unmuting the tracks, pulled samples will be zeroes for some time until the newly pushed samples are used.
        To fix this, we pause the audio player whenever muted/disabled/ended and restart playing when unmuted/enabled.
        Manually tested.

        * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
        (WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):

2020-03-23  Youenn Fablet  <youenn@apple.com>

        AudioMediaStreamTrackRendererCocoa does not recover from AudioSession interruption
        https://bugs.webkit.org/show_bug.cgi?id=209412

        Reviewed by Eric Carlson.

        In case there is an AudioSession interruption, like the app is in the background
        and another app starts to play audio, AudioMediaStreamTrackRendererCocoa will not restart playing audio.
        Fix this by clearing the AudioUnit when starting since the renderer is paused during the interruption.
        This ensures resuming from the interruption in a clean state.

        Manually tested.

        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
        (WebCore::AudioMediaStreamTrackRendererCocoa::start):

2020-03-23  youenn fablet  <youenn@apple.com>

        MediaDevices::refreshDevices should take device type into account
        https://bugs.webkit.org/show_bug.cgi?id=209417
        <rdar://problem/60521332>

        Reviewed by Eric Carlson.

        Now that we set deviceId to the empty string when media capture is not granted,
        we can have two devices with the same ID. We also need to handle the device type.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::refreshDevices):

2020-03-23  Zalan Bujtas  <zalan@apple.com>

        [LFC] Box::establishesBlockFormattingContext should check isInitialContainingBlock
        https://bugs.webkit.org/show_bug.cgi?id=209390
        <rdar://problem/60735021>

        Reviewed by Antti Koivisto.

        It's more correct to call isInitialContainingBlock() to check if the current box is the ICB.

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesBlockFormattingContext const):
        (WebCore::Layout::Box::initialContainingBlock const):

2020-03-23  Antoine Quint  <graouts@apple.com>

        [Web Animations] ElementAnimationRareData is created too frequently
        https://bugs.webkit.org/show_bug.cgi?id=209415

        Reviewed by Antti Koivisto.

        The various accessors on Element to access transitions and animations will ensure there is a backing
        ElementAnimationRareData object. However, in a lot of cases, such as when we consider whether CSS
        Transitions should be created, updated or removed under AnimationTimeline::updateCSSTransitionsForElement(),
        we end up not needing to actually access the data structures on ElementAnimationRareData.

        We now make the various methods on Element to access transitions and animations `const T*` and add ensure*()
        methods to access the collections for modification. We also add methods to query whether there are running or
        completed transitions at all or for a given property.

        No test because there is no change in visible behavior.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationWasAddedToElement):
        (WebCore::AnimationTimeline::animationWasRemovedFromElement):
        (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
        (WebCore::AnimationTimeline::animationsForElement const):
        (WebCore::AnimationTimeline::willDestroyRendererForElement):
        (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
        * animation/AnimationTimeline.h:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::transitionDidComplete):
        * dom/Element.cpp:
        (WebCore::Element::webAnimations const):
        (WebCore::Element::cssAnimations const):
        (WebCore::Element::transitions const):
        (WebCore::Element::hasCompletedTransitionsForProperty const):
        (WebCore::Element::hasRunningTransitionsForProperty const):
        (WebCore::Element::hasRunningTransitions const):
        (WebCore::Element::ensureWebAnimations):
        (WebCore::Element::ensureCSSAnimations):
        (WebCore::Element::ensureTransitions):
        (WebCore::Element::ensureCompletedTransitionsByProperty):
        (WebCore::Element::ensureRunningTransitionsByProperty):
        (WebCore::Element::webAnimations): Deleted.
        (WebCore::Element::cssAnimations): Deleted.
        (WebCore::Element::transitions): Deleted.
        (WebCore::Element::completedTransitionsByProperty): Deleted.
        (WebCore::Element::runningTransitionsByProperty): Deleted.
        * dom/Element.h:

2020-03-23  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Fail gracefully in the absence of a WebVTT encoder.
        https://bugs.webkit.org/show_bug.cgi?id=209290

        Reviewed by Philippe Normand.

        Covered by existing tests.

        * platform/graphics/gstreamer/GStreamerCommon.cpp:
        (WebCore::initializeGStreamer): Gets rid of "plugin not found"
        errors. It's not an error to have potentially broken AAC decoders,
        but it's nice to give a clear warning.
        * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
        (webkit_text_combiner_class_init):
        (webkitTextCombinerNew): Check for the "subenc" *plugin*. This
        check indirectly tells us the "webvttenc" *element* will exist.

2020-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] AsyncScrolling: horizontal scrolling is inverted
        https://bugs.webkit.org/show_bug.cgi?id=208638

        Reviewed by Adrian Perez de Castro.

        Scrolling down should scroll to the right and up to the left..

        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent): Invert also the x axis.
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent): Ditto.

2020-03-23  Antoine Quint  <graouts@apple.com>

        [Web Animations] Fix the typo for ElementAnimationRareData::completedTransitionByProperty()
        https://bugs.webkit.org/show_bug.cgi?id=209413

        Reviewed by Antti Koivisto.

        There can be several completed transitions by property, so renaming this property to completedTransitionsByProperty.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::transitionDidComplete):
        * animation/ElementAnimationRareData.h:
        (WebCore::ElementAnimationRareData::completedTransitionsByProperty):
        (WebCore::ElementAnimationRareData::completedTransitionByProperty): Deleted.
        * dom/Element.cpp:
        (WebCore::Element::completedTransitionsByProperty):
        (WebCore::Element::completedTransitionByProperty): Deleted.
        * dom/Element.h:

2020-03-22  Antoine Quint  <graouts@apple.com>

        DocumentTimeline / CSSTransition objects are leaking on CNN.com
        https://bugs.webkit.org/show_bug.cgi?id=208069
        <rdar://problem/59680143>

        Reviewed by Simon Fraser, Geoffrey Garen and Darin Adler.

        Test: webanimations/leak-css-animation.html

        We add a test feature that lets use query the availability of a given WebAnimation by its "id" property in the WebAnimation::instances list.
        We also fix some build issues that appeared with a change in UnifiedSources order.

        * animation/ElementAnimationRareData.cpp:
        (WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup):
        * animation/ElementAnimationRareData.h:
        (WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup): Deleted.
        * animation/WebAnimation.h:
        * testing/Internals.cpp:
        (WebCore::Internals::animationWithIdExists const):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-22  Antoine Quint  <graouts@apple.com>

        [ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing.
        https://bugs.webkit.org/show_bug.cgi?id=209239
        <rdar://problem/60591358>

        Reviewed by Simon Fraser.

        This test was made flaky by r257417, the initial fix for webkit.org/b/208069. A new, appropriate fix for that bug is in the works. In the
        meantime we revert r257417 in this patch.

        The reason this test became flaky is that it features the following code:

            animB.timeline = new DocumentTimeline({
              originTime:
                document.timeline.currentTime - 100 * MS_PER_SEC - animB.startTime,
            });

        In this case the only reference to the created DocumentTimeline is through `animB.timeline`. But because r257417 made the timeline reference from
        WebAnimation a weak reference, in some cases, if GC kicks in, the timeline would be dereferenced and the test would fail. We restore that relationship
        to its previous state, which is a strong reference.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::setTimeline):
        (WebCore::WebAnimation::setTimelineInternal):
        (WebCore::WebAnimation::enqueueAnimationEvent):
        (WebCore::WebAnimation::acceleratedStateDidChange):
        (WebCore::WebAnimation::timeline const): Deleted.
        * animation/WebAnimation.h:
        (WebCore::WebAnimation::timeline const):

2020-03-22  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce InitialContainingBox class
        https://bugs.webkit.org/show_bug.cgi?id=209399
        <rdar://problem/60741767>

        Reviewed by Antti Koivisto.

        ICB is the top level containing block. This helps to make sure we don't accidentally call parent() on the ICB.
        This is also a preparation for "const Box& Layout::Box::parent()".

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/integration/LayoutIntegrationBoxTree.cpp:
        (WebCore::LayoutIntegration::BoxTree::BoxTree):
        (): Deleted.
        * layout/integration/LayoutIntegrationBoxTree.h:
        (WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
        (WebCore::LayoutIntegration::BoxTree::rootLayoutBox):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isInitialContainingBlock const): Deleted.
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isInitialContainingBlock const):
        * layout/layouttree/LayoutContainerBox.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildLayoutTree):

2020-03-22  Zalan Bujtas  <zalan@apple.com>

        [LFC] Layout::Box::containingBlock should return a const ContainerBox&
        https://bugs.webkit.org/show_bug.cgi?id=209381
        <rdar://problem/60732278>

        Reviewed by Antti Koivisto.

        Layout tree is immutable during layout, so every box should be able to return a valid containing block (except the ICB).
        (This patch also removes the unused isDescendantOf() function and renames isDescendantOfFormattingRoot to isInFormattingContextOf).

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::isHeightAuto):
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
        (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        (WebCore::Layout::initialContainingBlock): Deleted.
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::absoluteDisplayBox):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
        (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
        (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::bottom const):
        (WebCore::Layout::FloatingState::top const):
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::FloatItem::isInFormattingContextOf const):
        (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const): Deleted.
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::containingBlock const):
        (WebCore::Layout::Box::formattingContextRoot const):
        (WebCore::Layout::Box::isInFormattingContextOf const):
        (WebCore::Layout::Box::isDescendantOf const): Deleted.
        (WebCore::Layout::Box::isContainingBlockDescendantOf const): Deleted.
        * layout/layouttree/LayoutBox.h:

2020-03-21  Said Abou-Hallawa  <sabouhallawa@apple.com>

        An animated PNG plays the frames one time more than the image loopCount
        https://bugs.webkit.org/show_bug.cgi?id=205640

        Reviewed by Darin Adler.

        Make the repetitionCount calculation for GIFs different from it for other
        image formats.

        Tests: fast/images/animated-gif-loop-count.html
               fast/images/animated-png-loop-count.html

        * platform/graphics/cg/ImageDecoderCG.cpp:
        (WebCore::ImageDecoderCG::repetitionCount const):
        * platform/graphics/cg/UTIRegistry.cpp:
        (WebCore::isGIFImageType):
        * platform/graphics/cg/UTIRegistry.h:

2020-03-21  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
        https://bugs.webkit.org/show_bug.cgi?id=209251
        <rdar://problem/60103614>

        Reviewed by Darin Adler.

        In this case, which is a valid scenario, we are looking for sibling of an AccessibilityRenderObject through the parent of its renderer, which happens to be of <RenderView>. Since <RenderView> has no parent, we need to skip calling isInlineWithContinuation with a null parent, by adding null check.

        Test: fast/frames/iframe-empty-doc-crash.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::nextSibling const):

2020-03-21  Philippe Normand  <pnormand@igalia.com>

        Make the MediaSample::toJSONString method generic
        https://bugs.webkit.org/show_bug.cgi?id=209287

        Reviewed by Eric Carlson.

        It is generic and thus can be shared to sub-classes.

        * platform/MediaSample.h:
        (WebCore::MediaSample::toJSONString const):
        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

2020-03-21  Zalan Bujtas  <zalan@apple.com>

        telerik.com: Placeholder text is misaligned in search text box
        https://bugs.webkit.org/show_bug.cgi?id=209371
        <rdar://problem/45945564>

        Reviewed by Antti Koivisto.

        Let the placeholder box do its own vertical positioning/sizing.
        The placeholder box's height is currently set to the height of the editable renderer (sibling box), so when the ::placeholder has
        a large font-size set, the text is oddly positioned and gets cut off (the placeholder box has 'overflow: hidden' UA style).
        This patch makes the placeholder box center aligned and sized based on the used size (matches both Chrome and FF).

        Test: fast/forms/placeholder-content-center.html

        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::layout):

2020-03-20  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r258679): [ Mac ] fast/scrolling/arrow-key-scroll-in-rtl-document.html is failing and timing out
        https://bugs.webkit.org/show_bug.cgi?id=209299

        Reviewed by Daniel Bates.

        fast/scrolling/arrow-key-scroll-in-rtl-document.html is unusual in that it uses monitorWheelEvents()
        but then issues arrow key presses.

        WebCore responds to arrow keys via WebEditorClient::handleKeyboardEvent() calling down into
        WebPage::scroll() which ends up in FrameView::requestScrollPositionUpdate() and bounces to the
        scrolling thread. This isn't tracked by existing 'defer' reasons on WheelEventTestMonitor, so add a
        new defer reason that covers the period for adding the requested scroll go the scrolling state tree,
        and responding to it in the scrolling thread.

        * page/WheelEventTestMonitor.cpp:
        (WebCore::operator<<):
        * page/WheelEventTestMonitor.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):
        * page/scrolling/ThreadedScrollingTree.h:

2020-03-20  David Kilzer  <ddkilzer@apple.com>

        Content-Type & Nosniff Ignored on XML External Entity Resources
        <https://webkit.org/b/191171>
        <rdar://problem/45763222>

        Reviewed by Darin Adler.

        Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
        * platform/MIMETypeRegistry.h:
        (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.
        - Checks for XML external entity MIME types.

        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::externalEntityMimeTypeAllowedByNosniff): Add.
        - Checks whether the MIME type is valid based on the presence of
          the "X-Content-Type-Options: nosniff" header.
        (WebCore::openFunc):
        - Drop the contents of the resource that was returned and print
          an error message to the Web Inspector console if
          externalEntityMimeTypeAllowedByNosniff() says the MIME type is
          not allowed.

2020-03-20  Alex Christensen  <achristensen@webkit.org>

        CORS-disabling SPI introduced in r253978 should make responses non-opaque
        https://bugs.webkit.org/show_bug.cgi?id=209351
        <rdar://problem/60024850>

        Reviewed by Chris Dumez.

        Covered by making the API test actually check that response content is readable.

        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::responseReceived):

2020-03-20  Jer Noble  <jer.noble@apple.com>

        Ensure media cache directory is created before passing to AVURLAsset.
        https://bugs.webkit.org/show_bug.cgi?id=209341

        Reviewed by Eric Carlson.

        Sandbox changes require the media cache directory to be created before passing to
        AVFoundation, to ensure that a sandbox extension is allowed to be created for that
        directory.

        When the mediaCacheDirectory is empty or null, no longer specify a temporary directory. This
        allows clients to disable caching by specifying an empty string for the cache directory.
        Since now assetCacheForPath() can return nil, update all the call sites to handle that
        possibility. Add a new method, ensureAssetCacheExistsAtPath() which tries to create a
        directory at the specified path, and returns nil if that is not possible. This ensures the
        cache path exists before adding the AVAssetCache to the AVURLAsset options dictionary.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::assetCacheForPath):
        (WebCore::ensureAssetCacheExistsForPath):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

2020-03-20  David Kilzer  <ddkilzer@apple.com>

        Fix name of "X-Content-Type:" HTTP header in console logging
        <https://webkit.org/b/209348>

        Reviewed by Devin Rousso.

        * css/StyleSheetContents.cpp:
        (WebCore::StyleSheetContents::parseAuthorStyleSheet):
        * dom/LoadableClassicScript.cpp:
        (WebCore::LoadableClassicScript::notifyFinished):
        * workers/WorkerScriptLoader.cpp:
        (WebCore::WorkerScriptLoader::validateWorkerResponse):
        - Change "X-Content-Type:" to "X-Content-Type-Options:" to fix
          the name of the header.

2020-03-20  Ali Juma  <ajuma@chromium.org>

        Intersection Observer intersections are wrong with zooming
        https://bugs.webkit.org/show_bug.cgi?id=209264

        Reviewed by Simon Fraser.

        An IntersectionObserver's rootMargin is expressed in CSS pixels,
        but we weren't accounting for page zoom. Fix this by multiplying
        the root margin by the zoom factor.

        Test: intersection-observer/root-margin-with-zoom.html

        * dom/Document.cpp:
        (WebCore::expandRootBoundsWithRootMargin):
        (WebCore::computeIntersectionState):

2020-03-20  Don Olmstead  <don.olmstead@sony.com>

        [GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
        https://bugs.webkit.org/show_bug.cgi?id=208963

        Reviewed by Eric Carlson.

        Add a PlatformLayerContainer definition for use within the GPU Process code.
        Migrate to using over typedef in the file.

        * platform/graphics/PlatformLayer.h:

2020-03-20  Andres Gonzalez  <andresg_22@apple.com>

        Isolated tree updates must happen after AXObject has finished handling notifications.
        https://bugs.webkit.org/show_bug.cgi?id=209354

        Reviewed by Chris Fleizach.

        Isolated tree updates were happening in AXObjectCache::postNotification,
        but that is too early because the AXObject tree is updated during
        notificationPostTimerFired. Thus, moved the updates to after all
        AXObject tree updates have been done.
        In addition, fixed the check for replacement of the IsolatedObject in
        AXIsolatedTree::applyPendingChanges, which now happens only if the old
        and new objects have the same platform wrapper.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::notificationPostTimerFired):
        (WebCore::AXObjectCache::postNotification):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::applyPendingChanges):

2020-03-20  Andres Gonzalez  <andresg_22@apple.com>

        Fix for retrieving focus in isolated tree mode.
        https://bugs.webkit.org/show_bug.cgi?id=209336

        Reviewed by Chris Fleizach.

        Focused object requests can come on the secondary thread before the
        isolated tree has been generated. Thus, AXObjectCache::isolatedTreeFocusedObject
        needs to generate the isolated tree if it doesn't exist, similar to
        isolatedTreeRootObject.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::isolatedTreeFocusedObject):
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::getOrCreateIsolatedTree const):
        (WebCore::AXObjectCache::isolatedTreeRootObject):
        * accessibility/AXObjectCache.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::focusedUIElement const):
        * accessibility/isolatedtree/AXIsolatedTree.h:
        m_pendingFocusedNodeID wasn't being initialized, which was causing
        random crashes when accessing the HashMap of isolated objects for a
        spurious AXID.

2020-03-20  Tim Horton  <timothy_horton@apple.com>

        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
        https://bugs.webkit.org/show_bug.cgi?id=209307

        Reviewed by Andy Estes.

        * Configurations/FeatureDefines.xcconfig:

2020-03-20  youenn fablet  <youenn@apple.com>

        Add routines to check about:blank and about:srcdoc URLs
        https://bugs.webkit.org/show_bug.cgi?id=209174

        Reviewed by Alex Christensen.

        * Modules/fetch/FetchRequest.cpp:
        (WebCore::computeReferrer):
        * dom/Document.cpp:
        (WebCore::isURLPotentiallyTrustworthy):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::location const):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument const):
        * page/SecurityPolicy.cpp:
        (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):

2020-03-20  Chris Dumez  <cdumez@apple.com>

        [iOS] Articles on NYTimes.com get truncated when switching between MobileSafari and another app
        https://bugs.webkit.org/show_bug.cgi?id=209321
        <rdar://problem/59763843>

        Reviewed by Tim Horton.

        Articles on NYTimes.com get truncated when switching between MobileSafari and another app
        (multitasking). The reason is that when you home out of MobileSafari, snapshots of the
        web view are taken at various sizes and we were firing 5 resizes events at the page as a
        result. Those resize events were confusing the logic on NYTimes.com and causing it to
        truncate the article.

        To address the issue, we stop firing resize events at the page if the resize is happening
        during the snapshotting sequence.

        * page/FrameView.cpp:
        (WebCore::FrameView::sendResizeEventIfNeeded):
        * page/Page.h:
        (WebCore::Page::shouldFireResizeEvents const):
        (WebCore::Page::setShouldFireResizeEvents):

2020-03-20  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, reverting r258748.

        This commit broke the Catalina build

        Reverted changeset:

        "Upstream a variety of Cocoa-platform HAVE and ENABLE macros"
        https://bugs.webkit.org/show_bug.cgi?id=209307
        https://trac.webkit.org/changeset/258748

2020-03-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Avoid infinite loop when stuck on partial content
        https://bugs.webkit.org/show_bug.cgi?id=209312
        <rdar://problem/59954605>

        Reviewed by Simon Fraser.

        Speculative fix to address infinite loop/running out of inline run vector capacity at InlineFormattingContext::setDisplayBoxesForLine.
        (Checking if we managed to progress on the content while having partial runs.)

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::LineLayoutContext::handleFloatsAndInlineContent):

2020-03-20  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] White-list vp09 in the codec registry
        https://bugs.webkit.org/show_bug.cgi?id=209288

        Reviewed by Xabier Rodriguez-Calvar.

        * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
        (WebCore::GStreamerRegistryScanner::initialize):

2020-03-20  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in RenderObject::RenderObjectBitfields::isBox when current renderer is the RenderView
        https://bugs.webkit.org/show_bug.cgi?id=209251
        <rdar://problem/60103614>

        Reviewed by Antti Koivisto.

        It’s perfectly fine to call AccessibilityRenderObject::nextSibling on the RenderView (empty document) and since the RenderView has no sibling, let’s just early return with nullptr.

        Test: fast/frames/iframe-empty-doc-crash.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::nextSibling const):

2020-03-20  Mike Gorse  <mgorse@suse.com>

        Fix build with gstreamer 1.12
        https://bugs.webkit.org/show_bug.cgi?id=209296

        Reviewed by Philippe Normand.

        No new tests (build fix only).

        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        (webKitGLVideoSinkChangeState): Add GST_VERSION_CHECK around check for
        GST_STATE_CHANGE_READY_TO_READY.

2020-03-20  Philippe Normand  <pnormand@igalia.com>

        [Unix] Allow runtime release logging levels configuration
        https://bugs.webkit.org/show_bug.cgi?id=209286

        Reviewed by Adrian Perez de Castro.

        Setting to a comma-separated list like in this example should now work as expected:

        WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...

        * platform/unix/LoggingUnix.cpp:
        (WebCore::logLevelString):

2020-03-19  Simon Fraser  <simon.fraser@apple.com>

        Some scroll snapping tests are still flaky
        https://bugs.webkit.org/show_bug.cgi?id=165196

        Reviewed by Wenson Hsieh.

        WheelEventTestMonitor could trigger too early if the main thread was bogged down, delaying
        the firing of the m_updateNodeScrollPositionTimer scheduled from
        AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll().

        Fix by extending the life of the "ScrollingThreadSyncNeeded" reason until after the m_updateNodeScrollPositionTimer
        has fired

        Fixes flakiness of tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
        and others.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::noteScrollingThreadSyncCompleteForNode):
        (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

2020-03-19  Peng Liu  <peng.liu6@apple.com>

        Safari video gravity changes performance improvements
        https://bugs.webkit.org/show_bug.cgi?id=209316

        Reviewed by Eric Carlson.

        Remove an unnecessary (and harmful) call of setVideoLayerFrame in WebAVPlayerLayer:layoutSublayers.

        When a video with the gravity AVLayerVideoGravityResizeAspectFill needs to enter the
        picture-in-picture mode from fullscreen, the extra call of setVideoLayerFrame will send
        an extra IPC message to the Web process to set the video layer bounds. So the [CATransaction commit]
        will need to wait for three property changes to complete - two in the Web process, and one in the
        UI process. The interval of the two property changes in the Web process is over 100 ms, because we
        delay the call of resolveBounds (which calls the second setVideoLayerFrame) at least 100 ms
        in WebAVPlayerLayer:layoutSublayers. That leads to long durations of core animation commits.
        In the test, the longest duration of commits is over 500 ms. After applying this patch,
        the longest duration in the test is about 50 ms.

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

2020-03-19  Tim Horton  <timothy_horton@apple.com>

        Upstream a variety of Cocoa-platform HAVE and ENABLE macros
        https://bugs.webkit.org/show_bug.cgi?id=209307

        Reviewed by Andy Estes.

        * Configurations/FeatureDefines.xcconfig:

2020-03-19  Sunny He  <sunny_he@apple.com>

        ScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAllowedInSubtree asserts in WebKit1
        https://bugs.webkit.org/show_bug.cgi?id=209165

        Reviewed by Ryosuke Niwa.

        Under very intricate sequences of event dispatch in WebKit1, it is
        possible for security asserts to be triggered even if there is no
        underlying security issue soley due to the design patterns of
        WebKit1.

        No new tests since the conditions for reproduction are very delicate
        and difficult to reliably capture in a test case.

        * dom/ScriptDisallowedScope.h:
        (WebCore::ScriptDisallowedScope::isEventAllowedInMainThread):
        (WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):

2020-03-19  Tim Horton  <timothy_horton@apple.com>

        Upstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
        https://bugs.webkit.org/show_bug.cgi?id=209305

        Reviewed by Andy Estes.

        * platform/mac/BlacklistUpdater.mm:

2020-03-19  Javier Fernandez  <jfernandez@igalia.com>

        [css-grid] Changes in grid or elements inside the grid affects margin on other elements in the grid
        https://bugs.webkit.org/show_bug.cgi?id=209203

        Reviewed by Darin Adler.

        We should ignore the previously computed auto margins wheneven a relayout is performed.

        Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html
               imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html

        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
        (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):

2020-03-19  Andres Gonzalez  <andresg_22@apple.com>

        Remove caching of isOnScreen since it is not used.
        https://bugs.webkit.org/show_bug.cgi?id=209306

        Reviewed by Chris Fleizach.

        AXIsolatedObject was caching isOnScreen and it wasn't used. It has a
        performance impact since it needs to run on the main thread. thus this
        change removes it from the cache.

        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        * accessibility/isolatedtree/AXIsolatedObject.h:

2020-03-19  Andres Gonzalez  <andresg_22@apple.com>

        URL needs to be isolatedCopied when cached in AXIsolatedObject.
        https://bugs.webkit.org/show_bug.cgi?id=209298

        Reviewed by Chris Fleizach.

        AXIsolatedObject needs to isolatedCopy the URL property in order to use
        it on the secondary thread.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):

2020-03-19  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Add an API returns description of verification errors.
        https://bugs.webkit.org/show_bug.cgi?id=208913

        Reviewed by Fujii Hironori.

        WKCertificateInfoCopyVerificationErrorDescription returns the description of SSL verification error as human readable string.
        Browser can display more precise error information with this API.

        API Test: Curl.CertificateAPI

        * platform/network/curl/CertificateInfo.h:
        * platform/network/curl/CertificateInfoCurl.cpp:
        (WebCore::CertificateInfo::verificationErrorDescription const):

2020-03-19  Tim Horton  <timothy_horton@apple.com>

        Implement support for cursor interactions on iPad
        https://bugs.webkit.org/show_bug.cgi?id=209268

        Reviewed by Darin Adler.

        No new tests in this patch, just upstreaming. Will attempt to enable
        some macOS mouse event tests on iOS in the future, though.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isNews):
        (WebCore::IOSApplication::isStocks):
        (WebCore::IOSApplication::isFeedly):
        Add some bundle ID checks needed in WebKit.

2020-03-19  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject implementation of the title method.
        https://bugs.webkit.org/show_bug.cgi?id=209291

        Reviewed by Chris Fleizach.

        - Implements AXIsolatedObgject::title.
        - Modified implementation of AXIsolatedObject::titleAttributeValue to
        use its appropriate key.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::title const): Deleted.
        * accessibility/isolatedtree/AXIsolatedObject.h:

2020-03-19  Chris Fleizach  <cfleizach@apple.com>

        AX: VO and safari: can't press the play button
        https://bugs.webkit.org/show_bug.cgi?id=209249

        Reviewed by Darin Adler.

        Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

        If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
        and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

        * accessibility/ios/AccessibilityObjectIOS.mm:
        (WebCore::AccessibilityObject::hasTouchEventListener const):

2020-03-19  Andres Gonzalez  <andresg_22@apple.com>

        [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
        https://bugs.webkit.org/show_bug.cgi?id=209284

        Reviewed by Chris Fleizach.

        - Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
        - [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
        (-[WebAccessibilityObjectWrapper windowElement:]):

2020-03-19  Antoine Quint  <graouts@apple.com>

        [Web Animations] Mark promises as handled when rejected
        https://bugs.webkit.org/show_bug.cgi?id=209240
        <rdar://problem/60592305>

        Reviewed by Youenn Fablet.

        Implementing the spec change discussed in https://github.com/w3c/csswg-drafts/issues/4556.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::cancel):
        (WebCore::WebAnimation::resetPendingTasks):

2020-03-19  Charlie Turner  <cturner@igalia.com>

        Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
        https://bugs.webkit.org/show_bug.cgi?id=209146

        Reviewed by Darin Adler.

        Warning fixes, no new tests.

        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::MediaKeys):
        * Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar
        is platform-specific.
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):
        * platform/graphics/texmap/TextureMapperGL.cpp:
        (WebCore::TextureMapperGLData::getStaticVBO):
        * platform/mediastream/RealtimeVideoSource.h:
        * platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are
        still virtual methods in this class, but no virtual destructor. Since
        this won't be subclassed further (I doubt, anyway!) lets make it final
        and plug the bug.
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
        * platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See
        AudioCapturer.
        * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
        (WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
        (WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.
        * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The
        encoder was being used uninitialized, and hence codec support can not
        be working as intended. Fix that bug.
        (WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
        (WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
        (WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::setCookies):
        * rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa
        platform where the crash is being seen. On GTK these traps generate
        warning spam and we don't see the crash here.
        * rendering/RenderThemeAdwaita.h:
        * testing/Internals.cpp:
        (WebCore::Internals::readPreferenceInteger):
        (WebCore::Internals::encodedPreferenceValue):
        (WebCore::Internals::getUTIFromMIMEType):
        (WebCore::Internals::getUTIFromTag):

2020-03-19  Antoine Quint  <graouts@apple.com>

        onwebkit{animation, transition}XX handlers missing from Document
        https://bugs.webkit.org/show_bug.cgi?id=206170
        <rdar://problem/58596373>

        Reviewed by Youenn Fablet.

        We now specify the non-standard CSS Animations and CSS Transitions event handlers on DocumentAndElementEventHandlers.idl rather than Element.idl
        such that they specified on both Element and Document.

        * dom/DocumentAndElementEventHandlers.idl:
        * dom/Element.idl:

2020-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Media controls numeric position value is not automatically updated during playback
        https://bugs.webkit.org/show_bug.cgi?id=209051

        Reviewed by Philippe Normand.

        The time label is not updated because updateTime() thinks the media controls are hidden when not hovered, but
        for audio elements the controls are always visible.

        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (Controller.prototype.controlsAreAlwaysVisible): Return true for audio elements.

2020-03-19  Enrique Ocaña González  <eocanha@igalia.com>

        [GTK] media/track/track-automatic-subtitles.html is timing out
        https://bugs.webkit.org/show_bug.cgi?id=116957

        Reviewed by Adrian Perez de Castro.

        Moved CaptionUserPreferencesMediaAF::textTrackSelectionScore() implementation
        to the CaptionUserPreferencesMedia superclass.

        Tested by existing test.

        * page/CaptionUserPreferences.cpp:
        (WebCore::CaptionUserPreferences::textTrackSelectionScore const):
        * page/CaptionUserPreferencesMediaAF.cpp:
        * page/CaptionUserPreferencesMediaAF.h:

2020-03-19  Philippe Normand  <pnormand@igalia.com>

        [GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support

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

2020-03-19  youenn fablet  <youenn@apple.com>

        Make URL::path() return a StringView
        https://bugs.webkit.org/show_bug.cgi?id=209173

        Reviewed by Alex Christensen.

        Update code according new path return type.

        * Modules/plugins/YouTubePluginReplacement.cpp:
        (WebCore::processAndCreateYouTubeURL):
        (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):
        * html/Autofill.cpp:
        (WebCore::AutofillData::createFromHTMLFormControlElement):
        * html/URLUtils.h:
        (WebCore::URLUtils<T>::pathname const):
        * loader/FormSubmission.cpp:
        (WebCore::appendMailtoPostFormDataToURL):
        * loader/appcache/ManifestParser.cpp:
        (WebCore::manifestPath):
        * page/Location.cpp:
        (WebCore::Location::pathname const):
        * page/UserContentURLPattern.cpp:
        (WebCore::MatchTester::MatchTester):
        (WebCore::UserContentURLPattern::matchesPath const):
        * page/csp/ContentSecurityPolicySource.cpp:
        (WebCore::ContentSecurityPolicySource::pathMatches const):
        * platform/network/curl/CookieJarDB.cpp:
        (WebCore::CookieJarDB::searchCookies):
        (WebCore::CookieJarDB::deleteCookie):
        * platform/network/curl/CookieUtil.cpp:
        (WebCore::CookieUtil::defaultPathForURL):
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
        * platform/text/TextEncoding.cpp:
        (WebCore::decodeURLEscapeSequences):
        * platform/text/TextEncoding.h:
        * workers/WorkerLocation.cpp:
        (WebCore::WorkerLocation::pathname const):
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::addRegistration):
        * workers/service/ServiceWorkerJob.cpp:
        (WebCore::ServiceWorkerJob::validateServiceWorkerResponse):
        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::doPushChanges):

2020-03-18  Peng Liu  <peng.liu6@apple.com>

        The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
        https://bugs.webkit.org/show_bug.cgi?id=204979

        Reviewed by Jer Noble.

        A follow-up patch to fix build failures.
        This patch also removes a meaningless line in the dealloc of WebAVPlayerViewController.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerViewController initWithFullscreenInterface:]):
        (-[WebAVPlayerViewController dealloc]):
        (VideoFullscreenInterfaceAVKit::doEnterFullscreen):

2020-03-18  Andres Gonzalez  <andresg_22@apple.com>

        Use helper function retainPtr(T*) instead of creating one.
        https://bugs.webkit.org/show_bug.cgi?id=209269

        Reviewed by Chris Fleizach.

        This is acorrection to patch in bug: https://bugs.webkit.org/show_bug.cgi?id=209247.
        Use the existing retainPtr helper funtion instead of creating a new helper.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper windowElement:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
        (-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
        (-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        (retainWrapper): Deleted.

2020-03-18  Zalan Bujtas  <zalan@apple.com>

        [Multicolumn] RenderListItem::positionListMarker should not fail when the list marker is inside a spanner.
        https://bugs.webkit.org/show_bug.cgi?id=209262
        <rdar://problem/58447665>

        Reviewed by Simon Fraser.

        When the list marker is in a column spanner and as a result it gets moved under the column flow, the
        normal "let's find the list item by walking up on the ancestor chain" does not work anymore.
        We need to check if this list marker is inside a spanner and climb up on the ancestor chain by
        using the spanner placeholder position (see RenderListMarker::parentBox).
        This patch also moves the marker's overflow computation from the list item to the marker.

        Test: fast/multicol/list-item-marker-inside-column-spanner.html

        * rendering/RenderListItem.cpp:
        (WebCore::RenderListItem::addOverflowFromChildren):
        (WebCore::RenderListItem::positionListMarker): Deleted.
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::parentBox):
        (WebCore::RenderListMarker::addOverflowFromListMarker):
        (WebCore::RenderListMarker::layout):
        * rendering/RenderListMarker.h:

2020-03-18  Simon Fraser  <simon.fraser@apple.com>

        eventSender.monitorWheelEvents() is very fragile
        https://bugs.webkit.org/show_bug.cgi?id=197819
        <rdar://problem/51319456>

        Reviewed by Tim Horton.

        Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
        adding back changes from r257844 that were reverted in r258558.
        
        First, have EventSendingController keep track of whether it's seen then "end" event
        for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
        now waits until it sees these, which prevents premature triggering which was a common cause of
        failure before.
        
        Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
        for completion in a callout from the end of Page::updateRendering(), which makes it test
        and fire at a more consistent time.
        
        Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
        can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
        used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
        also resulting in a premature trigger.

        * Modules/applepay/ApplePaySession.cpp: Unified sources!
        * dom/WindowEventLoop.cpp: Unified sources!
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
        * page/Page.cpp:
        (WebCore::Page::doAfterUpdateRendering):
        (WebCore::Page::wheelEventTestMonitor const):
        (WebCore::Page::clearWheelEventTestMonitor):
        (WebCore::Page::isMonitoringWheelEvents const):
        (WebCore::Page::ensureWheelEventTestMonitor):
        * page/Page.h:
        (WebCore::Page::wheelEventTestMonitor const): Deleted.
        (WebCore::Page::clearWheelEventTestMonitor): Deleted.
        (WebCore::Page::isMonitoringWheelEvents const): Deleted.
        * page/WheelEventTestMonitor.cpp:
        (WebCore::WheelEventTestMonitor::WheelEventTestMonitor):
        (WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
        (WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):
        (WebCore::WheelEventTestMonitor::deferForReason):
        (WebCore::WheelEventTestMonitor::removeDeferralForReason):
        (WebCore::WheelEventTestMonitor::receivedWheelEvent):
        (WebCore::WheelEventTestMonitor::scheduleCallbackCheck):
        (WebCore::WheelEventTestMonitor::checkShouldFireCallbacks):
        (WebCore::operator<<):
        (WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer): Deleted.
        (WebCore::WheelEventTestMonitor::triggerTestTimerFired): Deleted.
        * page/WheelEventTestMonitor.h:
        (WebCore::WheelEventTestMonitorCompletionDeferrer::WheelEventTestMonitorCompletionDeferrer):
        (WebCore::WheelEventTestMonitorCompletionDeferrer::~WheelEventTestMonitorCompletionDeferrer):
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
        (WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const): Deleted.
        (WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const): Deleted.
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::startMonitoringWheelEvents):
        (WebCore::ScrollingCoordinator::stopMonitoringWheelEvents):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::setWheelEventTestMonitor):
        (WebCore::ScrollingTree::receivedWheelEvent):
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
        (WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason): Deleted.
        (WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason): Deleted.
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        (WebCore::ScrollingCoordinatorMac::startMonitoringWheelEvents):
        (WebCore::ScrollingCoordinatorMac::stopMonitoringWheelEvents):
        * page/scrolling/mac/ScrollingTreeMac.h:
        * page/scrolling/mac/ScrollingTreeMac.mm:
        (ScrollingTreeMac::setWheelEventTestMonitor):
        (ScrollingTreeMac::receivedWheelEvent):
        (ScrollingTreeMac::deferWheelEventTestCompletionForReason):
        (ScrollingTreeMac::removeWheelEventTestCompletionDeferralForReason):
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::setWheelEventMonitorTestCallbackAndStartMonitoring):
        (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Deleted.
        * testing/js/WebCoreTestSupport.h:

2020-03-18  Fujii Hironori  <Hironori.Fujii@sony.com>

        AuthenticatorResponseData::decode should check bufferIsLargeEnoughToContain before allocating buffers
        https://bugs.webkit.org/show_bug.cgi?id=209133

        Reviewed by Darin Adler.

        Check bufferIsLargeEnoughToContain with the decoded size before
        allocating buffers.

        Replaced ArrayBuffer::create with ArrayBuffer::tryCreate, and
        added a null check.

        * Modules/webauthn/AuthenticatorResponseData.h:
        (WebCore::encodeArrayBuffer): Added.
        (WebCore::decodeArrayBuffer): Added.
        (WebCore::AuthenticatorResponseData::encode const):
        (WebCore::AuthenticatorResponseData::decode):

2020-03-18  Andres Gonzalez  <andresg_22@apple.com>

        Several TextMarker attributes need to run on the main thread.
        https://bugs.webkit.org/show_bug.cgi?id=209247

        Reviewed by Chris Fleizach.

        - Dispatch several TextMarker parameterized attributes to the main
        thread.
        - Added helper methods to return TextMarkers and TextMarkerRanges for
        diffferent units of text such as word or sentence.
        - Added a helper function, retainWrapper to make code a bit more
        readable in lambda definitions.

        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::textMarkerForVisiblePosition):
        (WebCore::textMarkerRangeFromVisiblePositions):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (retainWrapper):
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper windowElement:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
        (-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
        (-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2020-03-18  Zalan Bujtas  <zalan@apple.com>

        [MultiColumn] Ignore spanner boxes inside <legend>
        https://bugs.webkit.org/show_bug.cgi?id=209248
        <rdar://problem/51857865>

        Reviewed by Simon Fraser.

        <legend> boxes don't participate in the multicolumn flow, they are simply ignored.
        This patch ensures that we don't include their descendants in the spanner construction.
        <column>some<legend><div spanner></div></legend>content</column> <- the "spanner" div won't span the column content. 

        Test: fast/multicol/spanner-inside-legend-crash.html

        * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
        (WebCore::isValidColumnSpanner):

2020-03-18  Yusuke Suzuki  <ysuzuki@apple.com>

        Add a way to mark a rejected promise as handled
        https://bugs.webkit.org/show_bug.cgi?id=209241

        Reviewed by Michael Saboff.

        This adds an interface using JSPromise::rejectAsHandled to DOMPromise classes.

        * bindings/js/DOMPromiseProxy.h:
        (WebCore::DOMPromiseProxy<IDLType>::reject):
        (WebCore::DOMPromiseProxy<IDLVoid>::reject):
        (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::reject):
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::DeferredPromise::callFunction):
        (WebCore::DeferredPromise::reject):
        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DeferredPromise::reject):
        (WebCore::DeferredPromise::rejectWithCallback):
        (WebCore::DOMPromiseDeferredBase::reject):
        (WebCore::DOMPromiseDeferredBase::rejectType):

2020-03-18  youenn fablet  <youenn@apple.com>

        WebPage should own a Ref<WebFrame>
        https://bugs.webkit.org/show_bug.cgi?id=209235

        Reviewed by Geoffrey Garen.

        * loader/FrameLoaderStateMachine.h:
        Export committedFirstRealDocumentLoad/

2020-03-18  Eugene But  <eugenebut@chromium.org>

        Fix ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash
        https://bugs.webkit.org/show_bug.cgi?id=208312
        
        Reviewed by Ryosuke Niwa

        ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren
        was crashing on dereferencing m_firstNodeInserted pointer. Before the crash
        ReplaceSelectionCommand::InsertedNodes object received the following calls:

        respondToNodeInsertion() with node A, which set m_firstNodeInserted and m_lastNodeInserted to A
        willRemoveNode() with node B, which left m_firstNodeInserted and m_lastNodeInserted unchanged (A)
        (node A was destroyed setting m_firstNodeInserted and m_lastNodeInserted to null)
        respondToNodeInsertion() with node C, which set m_firstNodeInserted and m_lastNodeInserted to C
        willRemoveNodePreservingChildren() with node C, which set m_firstNodeInserted to null and crashed

        This patch checks m_firstNodeInserted before dereferencing and sets m_lastNodeInserted to null if
        m_firstNodeInserted became null. It seems like having non-null value for m_lastNodeInserted would
        be an invalid state.

        Test: editing/pasteboard/insert-apple-style-span-after-timeout.html

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):

2020-03-18  Youenn Fablet  <youenn@apple.com>

        CrossOriginPreflightResultCacheItem::allows methods should not use out parameters
        https://bugs.webkit.org/show_bug.cgi?id=209224

        Reviewed by Alex Christensen.

        Instead of having an out parameter for the error description, either return whether there is an error or not.
        Covered by existing tests.

        * loader/CrossOriginPreflightResultCache.cpp:
        (WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
        (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):
        (WebCore::CrossOriginPreflightResultCacheItem::validateCrossOriginHeaders const):
        (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
        (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders const): Deleted.
        * loader/CrossOriginPreflightResultCache.h:

2020-03-18  Peng Liu  <peng.liu6@apple.com>

        The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
        https://bugs.webkit.org/show_bug.cgi?id=204979

        Reviewed by Jer Noble.

        Since [AVPlayerViewControl isPictureInPicturePossible] can be NO initially, we may fail to enter
        the Picture-in-Picture mode.

        This patch implements the mechanism to observe [AVPlayerViewControl isPictureInPicturePossible] after
        a user requests to enter the Picture-in-Picture mode, and call [AVPlayerViewController startPictureInPicture]
        when [AVPlayerViewController isPictureInPicturePossible] changes to YES.
        A timer is added to monitor the status. If [AVPlayerViewController isPictureInPicturePossible] does not
        change to YES in 0.5 second, we will give up the attempt.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerViewController initWithFullscreenInterface:]):
        (-[WebAVPlayerViewController dealloc]):
        (-[WebAVPlayerViewController MY_NO_RETURN]):
        (VideoFullscreenInterfaceAVKit::doEnterFullscreen):

2020-03-18  Frederic Wang  <fwang@igalia.com>

        frame/iframe scrolling attribute does to recognize value "noscroll" or "off"
        https://bugs.webkit.org/show_bug.cgi?id=208570

        Reviewed by Rob Buis.

        Tests: imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute.html
               imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values.html

        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::scrollingMode const): Treat "noscroll" and "off" the same as "no".

2020-03-18  Chris Dumez  <cdumez@apple.com>

        [ Mac wk2 ] http/wpt/beacon/beacon-quota.html is flaky failing
        https://bugs.webkit.org/show_bug.cgi?id=207894
        <rdar://problem/59551688>

        Reviewed by Geoffrey Garen.

        Add internals API exposing the number of inflight beacon loads for a given navigator object
        so that the test can rely on it.

        * Modules/beacon/NavigatorBeacon.h:
        * testing/Internals.cpp:
        (WebCore::Internals::inflightBeaconsCount const):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-18  Frederic Wang  <fwang@igalia.com>

        [intersection-observer] Accept a Document as an explicit root
        https://bugs.webkit.org/show_bug.cgi?id=208047

        Reviewed by Rob Buis.

        No new tests, no behavior change.

        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::create):
        (WebCore::IntersectionObserver::IntersectionObserver):
        * page/IntersectionObserver.h:
        (WebCore::IntersectionObserver::root const):

2020-03-18  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove the build warnings below since r256756
        warning: unused parameter ‘foo’ [-Wunused-parameter]

        no new tests, no new behaviours.

        * testing/Internals.cpp:
        (WebCore::Internals::readPreferenceInteger):
        (WebCore::Internals::encodedPreferenceValue):
        (WebCore::Internals::getUTIFromMIMEType):
        (WebCore::Internals::getUTIFromTag):

2020-03-18  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove the build warning below since r256196
        warning: variable ‘highlightEnd’ set but not used [-Wunused-but-set-variable]

        no new tests, no new behaviours.

        * rendering/HighlightData.cpp:
        (WebCore::HighlightData::highlightStateForRenderer):

2020-03-18  youenn fablet  <youenn@apple.com>

        Make sure a preflight fails if response headers are invalid
        https://bugs.webkit.org/show_bug.cgi?id=208924

        Reviewed by Alex Christensen.

        Implement https://fetch.spec.whatwg.org/#cors-preflight-fetch-0 step 7.3.
        In case header parsing is wrong, fail the preflight with a meaningful message.
        Update parsing of headers to return an Optional so that parsing error is handled as a nullopt.
        Minor refactoring to return Expected/Optional for error handlng instead of passing an out parameter.
        Also, adding preflight cache entry if it is valid, no matter whether preflight succeeds or not.

        Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.html
               imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-response-validation.any.worker.html

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::validatePreflightResponse):
        * loader/CrossOriginPreflightResultCache.cpp:
        (WebCore::CrossOriginPreflightResultCacheItem::create):
        (WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
        * loader/CrossOriginPreflightResultCache.h:
        (WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
        * platform/network/HTTPParsers.h:
        (WebCore::parseAccessControlAllowList):
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::filter):
        (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

2020-03-18  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove the build warning below since r258458
        warning: unused variable ‘frame’ [-Wunused-variable]

        No new tests, no new behaviors.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didReceiveResponse):

2020-03-18  youenn fablet  <youenn@apple.com>

        FrameLoader should own its FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=208918

        Reviewed by Geoff Garen.

        Update Frame/FrameLoader constructors to get a UniqueRef<FrameLoaderClient>.
        This makes the lifetime management much clearer and allows some WebKit1/WebKit2 clean-up.

        Covered by existing tests.

        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::~FrameLoader):
        (WebCore::FrameLoader::init):
        (WebCore::FrameLoader::initForSynthesizedDocument):
        (WebCore::FrameLoader::didExplicitOpen):
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::finishedParsing):
        (WebCore::FrameLoader::loadArchive):
        (WebCore::FrameLoader::setOpener):
        (WebCore::FrameLoader::provisionalLoadStarted):
        (WebCore::FrameLoader::loadInSameDocument):
        (WebCore::FrameLoader::prepareForLoadStart):
        (WebCore::FrameLoader::setupForReplace):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::willLoadMediaElementURL):
        (WebCore::FrameLoader::reloadWithOverrideEncoding):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::setDocumentLoader):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
        (WebCore::FrameLoader::clientRedirected):
        (WebCore::FrameLoader::closeOldDataSources):
        (WebCore::FrameLoader::willChangeTitle):
        (WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameLoader::didReachLayoutMilestone):
        (WebCore::FrameLoader::didReachVisuallyNonEmptyState):
        (WebCore::FrameLoader::frameLoadCompleted):
        (WebCore::FrameLoader::checkLoadComplete):
        (WebCore::FrameLoader::userAgent const):
        (WebCore::FrameLoader::dispatchOnloadEvents):
        (WebCore::FrameLoader::detachViewsAndDocumentLoader):
        (WebCore::FrameLoader::receivedMainResourceError):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
        (WebCore::FrameLoader::loadedResourceFromMemoryCache):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        (WebCore::FrameLoader::cancelledError const):
        (WebCore::FrameLoader::blockedByContentBlockerError const):
        (WebCore::FrameLoader::blockedError const):
        (WebCore::FrameLoader::blockedByContentFilterError const):
        (WebCore::FrameLoader::connectionProperties):
        (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
        (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
        (WebCore::FrameLoader::didChangeTitle):
        (WebCore::FrameLoader::dispatchDidCommitLoad):
        (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
        (WebCore::FrameLoader::completePageTransitionIfNeeded):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        (WebCore::Frame::create):
        * page/Frame.h:
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/PageConfiguration.cpp:
        (WebCore::PageConfiguration::PageConfiguration):
        * page/PageConfiguration.h:
        * workers/service/context/SWContextManager.cpp:
        * workers/service/context/SWContextManager.h:

2020-03-18  Philippe Normand  <pnormand@igalia.com>

        [GTK][WPE] Migrate to Flatpak-based dev SDK
        https://bugs.webkit.org/show_bug.cgi?id=205658

        Reviewed by Carlos Alberto Lopez Perez.

        * platform/text/hyphen/HyphenationLibHyphen.cpp:
        (WebCore::scanTestDictionariesDirectoryIfNecessary): Check for flatpak-installed dictionaries.

2020-03-17  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Crash in CSSPrimitiveValue::cleanup
        https://bugs.webkit.org/show_bug.cgi?id=208316

        Reviewed by Ryosuke Niwa.

        Added a NULL check before calling deref() for CSSUnitType :: CSS_CALC.

        During initialization of CSSCalcValue, createCSS returns nullptr when processing min() operator
        and there is a category mismatch between length and percent for min() operator
        as seen in this newly added test case.

        Test: editing/execCommand/primitive-value-cleanup-minimal.html

        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::cleanup):

2020-03-17  Fujii Hironori  <Hironori.Fujii@sony.com>

        SerializedScriptValue::decode should check bufferIsLargeEnoughToContain before allocating a buffer
        https://bugs.webkit.org/show_bug.cgi?id=209132

        Reviewed by Darin Adler.

        * bindings/js/SerializedScriptValue.h:
        (WebCore::SerializedScriptValue::decode): Added bufferIsLargeEnoughToContain check.
        Added a null check for Gigacage::tryMalloc.

2020-03-17  Chris Fleizach  <cfleizach@apple.com>

        AX: WebKit crashes with VO and keyboard support fails on encapsulated radio button components.
        https://bugs.webkit.org/show_bug.cgi?id=208844
        <rdar://problem/60252659>

        Reviewed by Darin Adler.

        Test: accessibility/mac/crash-bounds-for-range.html

        Don't access renderer if nil in getInlineBoxAndOffset.

        * dom/Position.cpp:
        (WebCore::Position::getInlineBoxAndOffset const):

2020-03-17  Eric Carlson  <eric.carlson@apple.com>

        TextTrackBase should validate language before setting m_validBCP47Language
        https://bugs.webkit.org/show_bug.cgi?id=209094
        <rdar://problem/60439603>

        Unreviewed, address post-commit review comments.

        * html/track/TrackBase.cpp:
        (WebCore::TrackBase::setLanguage): Use makeString instead of StringBuilder.

2020-03-17  Eric Carlson  <eric.carlson@apple.com>

        TextTrackBase should validate language before setting m_validBCP47Language
        https://bugs.webkit.org/show_bug.cgi?id=209094
        <rdar://problem/60439603>

        Reviewed by Jer Noble.
        
        Test: media/track/track-bcp-language.html

        * html/track/TextTrack.idl:
        * html/track/TrackBase.cpp:
        (WebCore::TrackBase::TrackBase): Don't set m_validBCP47Language unless the language is valid.
        (WebCore::TrackBase::setLanguage): Clear m_validBCP47Language if the language is invalid. 
        Restructure the code to use early returns.
        (WebCore::TrackBase::validBCP47Language const): Deleted.
        * html/track/TrackBase.h:
        (WebCore::TrackBase::validBCP47Language const):
        * testing/Internals.cpp:
        (WebCore::Internals::textTrackBCP47Language):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-17  Alex Christensen  <achristensen@webkit.org>

        REGRESSION(r254856) Add exception for window.openDatabase to not masquerade as undefined in currently shipping Jesus Calling Devotional app
        https://bugs.webkit.org/show_bug.cgi?id=209160
        <rdar://problem/60297073>

        Reviewed by Geoff Garen.

        Manually verified this fixes the app, which compares typeof openDatabase with 'undefined'
        Going forward, we intend to completely remove WebSQL, so this is a temporary exception to our removal strategy.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::openDatabase const):
        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isJesusCalling):

2020-03-17  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedTree removal should set all nodes to be removed on AX secondary thread.
        https://bugs.webkit.org/show_bug.cgi?id=209169

        Reviewed by Chris Fleizach.

        - AXIsolatedTree::removeTreeForPageID is called on the main thread but
        it should not remove the nodes in the main thread, but instead add them
        to the pending changes to be removed on the secondary thread. This was
        causing the problem of empty new trees when the old tree would go away
        but the client was holding a reference to an object that has been
        disconnected and thus had no children.
        - In addition, this change fixes an isolated tree mode crash in AccessibilityMenuList.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::~AXObjectCache):
        * accessibility/AccessibilityMenuList.cpp:
        (WebCore::AccessibilityMenuList::isCollapsed const):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::removeTreeForPageID):

2020-03-17  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, reverting r257844.

        this revision caused a test to start timing out

        Reverted changeset:

        "(r256513) [ Mac ] fast/scrolling/programmatic-scroll-to-zero-
        zero.html is a flaky failure"
        https://bugs.webkit.org/show_bug.cgi?id=207948
        https://trac.webkit.org/changeset/257844

2020-03-17  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, reverting r258339.
        https://bugs.webkit.org/show_bug.cgi?id=209179

        "Is it sometimes breaking rendering" (Requested by youenn on
        #webkit).

        Reverted changeset:

        "FrameLoader should own its FrameLoaderClient"
        https://bugs.webkit.org/show_bug.cgi?id=208918
        https://trac.webkit.org/changeset/258339

2020-03-17  Philippe Normand  <pnormand@igalia.com>

        RELEASE_LOG should not be Cocoa specific
        https://bugs.webkit.org/show_bug.cgi?id=195182

        Reviewed by Konstantin Tokarev.

        WPE/GTK build fixes related with Release logging support.

        * bridge/npruntime_internal.h:
        * dom/ScriptedAnimationController.cpp:
        (WebCore::throttlingReasonToString):
        * page/PerformanceLogging.cpp:
        (WebCore::toString):
        * page/PerformanceMonitor.cpp:
        (WebCore::stringForCPUSamplingActivityState):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
        (WebCore::MediaPlayerPrivateGStreamer::logChannel const):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogIdentifier):
        (WebCore::MediaPlayerPrivateGStreamer::mediaPlayerLogger):
        * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
        (WebCore::CDMProxyClearKey::cencDecryptSubsampled):
        (WebCore::CDMProxyClearKey::initializeGcrypt):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
        (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
        (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
        (WebCore::MediaSourceGStreamer::addSourceBuffer):
        (WebCore::MediaSourceGStreamer::logChannel const):
        * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
        (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
        (WebCore::SourceBufferPrivateGStreamer::logChannel const):
        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
        * platform/mediastream/AudioMediaStreamTrackRenderer.cpp:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::computeLogLevel):
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::getRawCookies const):

2020-03-17  youenn fablet  <youenn@apple.com>

        Safari doesn't insert mDNS candidates to SDP
        https://bugs.webkit.org/show_bug.cgi?id=209050
        <rdar://problem/60419936>

        Reviewed by Eric Carlson.

        Instead of removing host candidate lines in SDP, replace the host IP address by the corresponding mDNS name.
        Covered by updated test.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::extractIPAddress):
        (WebCore::PeerConnectionBackend::filterSDP const):
        (WebCore::PeerConnectionBackend::finishedRegisteringMDNSName):
        * Modules/mediastream/PeerConnectionBackend.h:

2020-03-17  Philippe Normand  <pnormand@igalia.com>

        [GStreamer][MSE] Playback rate update support
        https://bugs.webkit.org/show_bug.cgi?id=208454

        Reviewed by Xabier Rodriguez-Calvar.

        Implement playback rate update support for the MSE player. Also
        includes drive-by logging cleanups.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
        (WebCore::MediaPlayerPrivateGStreamer::setRate):
        (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::pipeline const):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updatePlaybackRate): Deleted.
        (WebCore::MediaPlayerPrivateGStreamerMSE::setRate): Deleted.
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

2020-03-16  Simon Fraser  <simon.fraser@apple.com>

        Remove the zero-delay ScrollingCoordinatorMac commit timer
        https://bugs.webkit.org/show_bug.cgi?id=209164

        Reviewed by Zalan Bujtas.

        The scrolling tree on macOS should just commit at rendering update time. There's no need
        for a separate zero-delay timer.

        Tested by existing tests.

        * page/scrolling/mac/ScrollingCoordinatorMac.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
        (WebCore::ScrollingCoordinatorMac::pageDestroyed):
        (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
        (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
        (WebCore::ScrollingCoordinatorMac::commitTreeState): Deleted.

2020-03-16  Simon Fraser  <simon.fraser@apple.com>

        Add a bit more UIHitTesting logging, and make it possible to dump EventRegions from WebKit
        https://bugs.webkit.org/show_bug.cgi?id=209058

        Reviewed by Antti Koivisto.

        Export operator<<(TextStream&, const EventRegion&) so it can be used from Webkit.

        * rendering/EventRegion.h:

2020-03-16  Tim Horton  <timothy_horton@apple.com>

        Remove a 'using namespace WebCore' in MediaSessionManagerCocoa
        https://bugs.webkit.org/show_bug.cgi?id=209162

        Reviewed by Simon Fraser.

        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        Unified source cleanliness. Not currently causing any trouble, but
        it did when I changed something locally!

2020-03-16  ChangSeok Oh  <changseok@webkit.org>

        A change event gets dispatched when textarea gets changed without focus
        https://bugs.webkit.org/show_bug.cgi?id=202144

        Reviewed by Ryosuke Niwa.

        A crash happens in WebCore::ValidationMessage::buildBubbleTree. An immediate reason
        is that DOM tree is modified in buildBubbleTree triggered by a timer.
        The function calls document.updateLayout() that causes a change event
        for textarea to fire when something changed in the textarea.
        This bug is not reproduced on Mac because buildBubbleTree is not called.
        See ValidationMessage::setMessage.
        On the other hand, the root cause of this issue is triggering the change event
        for textarea even if it is not focused when a change is made. This behavior
        is different to what Gecko and Chromium do. When loading the test, they do not
        trigger the change event although the textarea is filled by the script
        since the textarea is not focused. Only when we manually make a change (meaning
        the textarea is focused by user input), the event gets dispatched. To fix it,
        setChangedSinceLastFormControlChangeEvent(true) is moved below the focus check
        in HTMLTextAreaElement::subtreeHasChanged();

        Test: fast/forms/textfield-onchange-without-focus.html

        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::subtreeHasChanged):

2020-03-16  Simon Fraser  <simon.fraser@apple.com>

        Update touch event regions once per frame
        https://bugs.webkit.org/show_bug.cgi?id=209153

        Reviewed by Zalan Bujtas.

        Call document->updateTouchEventRegions() once at the end of Page::updateRendering() instead
        of relying on a timer.

        Also rename the functions called from Internal to make it clear they are testing-only.

        Page::scrollingStateTreeAsText() needs to eagerly update event regions because they are input
        to the scrolling tree.

        * dom/Document.cpp:
        (WebCore::Document::Document):
        * page/Page.cpp:
        (WebCore::Page::scrollingStateTreeAsText):
        (WebCore::Page::touchEventRectsForEventForTesting):
        (WebCore::Page::passiveTouchEventListenerRectsForTesting):
        (WebCore::Page::doAfterUpdateRendering):
        (WebCore::Page::touchEventRectsForEvent): Deleted.
        (WebCore::Page::passiveTouchEventListenerRects): Deleted.
        * page/Page.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
        * testing/Internals.cpp:
        (WebCore::Internals::touchEventRectsForEvent):
        (WebCore::Internals::passiveTouchEventListenerRects):

2020-03-15  Darin Adler  <darin@apple.com>

        Move most of TextIterator off of live ranges
        https://bugs.webkit.org/show_bug.cgi?id=209129

        Reviewed by Antti Koivisto.

        - Change almost all arguments and return values of functions in TextIterator.h
          to use SimpleRange instead of live ranges. Exceptions are an overload of plainText
          TextIterator::rangeLength, TextIterator::rangeFromLocationAndLength,
          TextIterator::getLocationAndLengthFromRange, and TextIterator::subrange. Those
          five are a little trickier to convert, so I will do them each in separate patches.

        - Go with the flow in adding an include of Node.h to BoundaryPoint.h. I had avoided
          this in the initial version, but now it seems practical to just leave it that way.
          This led to removing BoundaryPoint.cpp and moving all functions to the header.

        - Converted many member functions of the Position class from using int to unsigned
          for offsets. The DOM specifies unsigned for offsets, but for some reason we used
          int for them a lot historically, even though negative numbers don't make sense.
          New classes like StaticRange, SimpleRange, and BoundaryPoint are already using
          unsigned exclusively and we'll eventually convert everything.

        - Remove includes of SimpleRange.h from files that also include TextIterator.h,
          now that TextIterator.h pulls it in.

        * Sources.txt: Removed BoundaryPoint.cpp.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::traverseToOffsetInRange): Updated to pass a reference
        to a range rather than a pointer, after null-checking it.
        (WebCore::AXObjectCache::lengthForRange): Ditto.
        (WebCore::AXObjectCache::nextBoundary): Ditto.
        (WebCore::AXObjectCache::previousBoundary): Ditto.
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::stringForRange const): Ditto.
        (WebCore::AccessibilityObject::stringForVisiblePositionRange): Ditto.
        (WebCore::AccessibilityObject::lengthForVisiblePositionRange const): Ditto.

        * accessibility/AccessibilityObjectInterface.h: Removed an extra include.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
        Updated to pass a reference to a range rather than a pointer, after null-checking it.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]): Ditto.

        * dom/BoundaryPoint.cpp: Removed.

        * dom/BoundaryPoint.h: Removed redundant includes and forward declarations
        since we're now committing to including "Node.h" here. Moved functions
        all out of the .cpp file and made them inlines.

        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::collectTextRanges): Pass a reference to
        a range instead of a pointer.

        * dom/Position.cpp:
        (WebCore::Position::Position): Take unsigned.
        (WebCore::Position::moveToPosition): Ditto.
        (WebCore::Position::moveToOffset): Ditto.
        (WebCore::Position::parentAnchoredEquivalent const): Cast to unsigned.
        (WebCore::Position::anchorTypeForLegacyEditingPosition): Take unsigned.
        (WebCore::Position::previous const): Use unsigned.
        (WebCore::Position::next const): Ditto.
        (WebCore::Position::uncheckedPreviousOffset): Take unsigned.
        (WebCore::Position::uncheckedPreviousOffsetForBackwardDeletion): Ditto.
        (WebCore::Position::uncheckedNextOffset): Ditto.
        (WebCore::Position::atLastEditingPositionForNode const): Cast to unsigned.
        (WebCore::Position::atEndOfTree const): Ditto.
        (WebCore::Position::rendersInDifferentPosition const): Added casts to
        unsigned and also removed unneeded redundant checks. In a place where
        we had already checked that both nodes were the same and both offsets
        were different, we were checking the types of both nodes (but they are
        the same so only need to check one) and we were checking that both
        offsets were different (but we already knew they were different).
        (WebCore::searchAheadForBetterMatch): Use unsigned.
        (WebCore::Position::getInlineBoxAndOffset const): Ditto.
        (WebCore::Position::equals const): Removed a cast to int.
        (WebCore::makeBoundaryPoint): Moved this function here so now it can be
        used in more places.

        * dom/Position.h: Changed many argument types to unsigned. Moved declarations
        of all the functions up above all the inline implementations of the functions
        to separate interface from implementation a bit better. Wrote a FIXME about
        the name createLegacyEditingPosition. Moved makeBoundaryPoint here and exported
        it from WebCore so we can use it from more places.

        * dom/Range.cpp:
        (WebCore::createLiveRange): Moved these functions here from SimpleRange.cpp
        because a live range is more advanced concept, so makes more sense for live
        range to know about simple range rather than vice versa.

        * dom/Range.h: Removed some unneeded includes and forward declarations.
        Added a FIXME about renaming to LiveRange. Moved the createLiveRange
        functions here. Moved declarations of functions above inline function bodies.

        * dom/SimpleRange.cpp:
        (WebCore::createLiveRange): Moved to Range.cpp.

        * dom/SimpleRange.h: Exported the constructor. Removed unneeded overload
        that takes a Range*.

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
        Refactored code a bit and use unsigned.
        (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical): Use unsigned.

        * editing/Editing.cpp:
        (WebCore::visibleImageElementsInRangeWithNonLoadedImages): Use a reference
        to a range rather than a pointer.

        * editing/Editing.h: Added a forward declaration of Range that now seems to
        be needed to compile.

        * editing/Editor.cpp:
        (WebCore::Editor::selectedText const): Call makeBoundaryPoint twice here to
        convert two Position objects into a SimpleRange.

        * editing/HTMLInterchange.cpp: Removed some extra includes.
        (WebCore::convertHTMLTextToInterchangeFormat): Use variadic
        StringBuilder::append.

        * editing/TextIterator.cpp:
        (WebCore::firstNode): Added. We use this instead of Range::firstNode.
        If we find we need it outside TextIterator we can find a header for it.
        Not sure it would be great to add it to in BoundaryPoint.h, nor is it
        obviously better as a BoundaryPoint member function.
        (WebCore::TextIterator::TextIterator): Cut down on the extra constructors
        and have the single remaining one take a SimpleRange.
        (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
        Ditto. Also change some int to unsigned.
        (WebCore::CharacterIterator::CharacterIterator): Ditto.
        (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator): Ditto.
        (WebCore::WordAwareIterator::WordAwareIterator): Ditto.
        (WebCore::TextIterator::rangeLength): Since this is one of the functions
        that still takes a live range pointer, updated it to check for null and
        pass a reference rather than a pointer.
        (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
        (WebCore::hasAnyPlainText): Removed now-unneeded call to createLiveRange.
        (WebCore::plainText): Updated the main implementation to take a SimpleRange,
        eliminating the version that takes two Position objects, but keeping the
        one that takes a live range pointer for now.
        (WebCore::plainTextReplacingNoBreakSpace): Removed all but the one, and
        have that one take a SimpleRange.

        * editing/TextIterator.h: Removed the include of SimpleRange.h. Also
        Updated for the changes above, eliminating five different constructors
        that take a live range and also overloads that take two Position objects.

        * editing/TextManipulationController.cpp:
        (WebCore::ParagraphContentIterator::ParagraphContentIterator):
        Call makeBoundaryPoint twice here to convert two Position objects into
        a SimpleRange.

        * editing/VisibleSelection.cpp: Removed an include.

        * editing/VisibleUnits.cpp:
        (WebCore::suffixLengthForRange): Pass a reference to a range known to
        not be null.
        (WebCore::previousBoundary): Ditto.
        (WebCore::nextBoundary): Ditto.

        * editing/cocoa/DataDetection.mm:
        (WebCore::buildQuery): Take a SimpleRange.
        (WebCore::DataDetection::detectContentInRange): Added a null check on
        a live range and pass a reference to it.
        * editing/cocoa/DictionaryLookup.mm:
        (WebCOre::DictionaryLookup::rangeAtHitTestResult): Ditto.

        * editing/cocoa/HTMLConverter.mm:
        (WebCore::editingAttributedStringFromRange): Pass a reference to a range
        known to not be null.
        * page/TextIndicator.cpp:
        (WebCore::estimatedTextColorsForRange): Ditto.
        (WebCore::containsOnlyWhiteSpaceText): Ditto.
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::interpretationsForCurrentRoot const): Ditto.

        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::selectedText const): Added a null check on
        a live range and pass a reference to it.

2020-03-16  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Crash in CSSValue::isPrimitiveValue
        https://bugs.webkit.org/show_bug.cgi?id=208309

        Reviewed by Ryosuke Niwa.

        Added a NULL check before dereferencing value in ApplyStyleCommand::computedFontSize

        Test: editing/execCommand/primitive-value.html

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::computedFontSize):

2020-03-16  Megan Gardner  <megan_gardner@apple.com>

        Color Picker crashes on touch
        https://bugs.webkit.org/show_bug.cgi?id=209086

        Reviewed by Darin Adler.

        Vector sizing lost in refactor. Not perfomance sensitive code, so just expanding vector as needed.

        Test: fast/forms/color/color-input-activate-crash.html

        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::suggestedColors const):

2020-03-16  Simon Fraser  <simon.fraser@apple.com>

        Remove FrameView::scheduleRenderingUpdate()
        https://bugs.webkit.org/show_bug.cgi?id=209109

        Reviewed by Antti Koivisto.

        FrameView::scheduleRenderingUpdate() called through to compositor(), but that just
        turned around to call scheduleRenderingUpdate() via Page. So Remove it and change
        callers to call Page::scheduleRenderingUpdate() directly.

        * page/FrameView.cpp:
        (WebCore::FrameView::setViewExposedRect):
        (WebCore::FrameView::scheduleRenderingUpdate): Deleted.
        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::scheduleRenderingUpdate):
        * page/Page.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::scheduleRenderingUpdate):

2020-03-16  Simon Fraser  <simon.fraser@apple.com>

        Commit Xcode-modified xcfilelist.

        New WebXR idl files.

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:

2020-03-14  Simon Fraser  <simon.fraser@apple.com>

        Factor some post-updateRendering code into its own function
        https://bugs.webkit.org/show_bug.cgi?id=209108

        Reviewed by Antti Koivisto.

        Make a new function to hold code that needs to do post update-rendering work.
        It asserts that the layout is clean at the end.

        * page/Page.cpp:
        (WebCore::Page::updateRendering):
        (WebCore::Page::doAfterUpdateRendering):
        * page/Page.h:

2020-03-16  Daniel Bates  <dabates@apple.com>

        ASSERTION FAILURE: !result.innerNode() || (request.resultIsElementList() && result.listBasedTestResult().size()) in RenderLayer::hitTestContents()
        https://bugs.webkit.org/show_bug.cgi?id=209112

        Reviewed by Darin Adler.

        Fix rect-based hit testing (e.g. used in the impl of document.elementsFromPoint()) of ::before
        and ::after pseudo elements. Same issue as in r133330, updateHitTestResult() and addNodeToRectBasedTestResult()
        are using different "hit" nodes. In particular, RenderObject::updateHitTestResult() knows how to
        reason about ::before and ::after pseudo elements, but addNodeToRectBasedTestResult() cannot.
        Standardize the concept of the node used for hit testing from something-specifically added to RenderBlock
        in r133330 to all renderers. Have both updateHitTestResult() and addNodeToRectBasedTestResult()
        make use of this concept so that they consider the same hit node.

        Test: fast/dom/nodesFromRect/pseudo-empty-svg-image-crash.html

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::hitTest):
        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::nodeAtPoint):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::nodeAtPoint):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::nodeAtPoint):
        Update code to call nodeForHitTest() to keep the code behavior we have today. Note that RenderElement::element()
        and RenderText::textNode() just cast the return value of RenderObject::node().
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::nodeForHitTest const): Remove special case for RenderView now that I added RenderView::nodeForHitTest().
        Moreover, this special case was returning the document even though RenderView::updateHitTestResult() hit
        test the document element. See remarks for RenderView::nodeForHitTest() for more details.
        * rendering/RenderBlock.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::nodeAtPoint): Use nodeForHitTest(). This fixes the bug. Currently, updateHitTestResult()
        knows that when RenderObject::node() is nullptr and the parent renderer is for generated content that it can
        walk up the hierarchy to find the hit PseudoElement. But in the call to addNodeToListBasedTestResult(), RenderObject::element()
        was passed, which is nullptr for an anonymous node, and addNodeToListBasedTestResult() doesn't have enough info
        to know that this means generated content was hit and hence it is not able to find the PseudoElement. This
        disagreement caused the assertion failure because updateHitTestResult() would update the inner node, but
        addNodeToListBasedTestResult() would not add a node to the set.
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::hitTestCulledInline): Use nodeForHitTest().
        (WebCore::RenderInline::updateHitTestResult): Update code as needed to use nodeForHitTest(). Also while I
        am here fix up code style of comment and rename the local from element to node to match the return value
        of nodeForHitTest().
        * rendering/RenderMultiColumnSet.cpp:
        (WebCore::RenderMultiColumnSet::nodeForHitTest const): Added.
        (WebCore::RenderMultiColumnSet::updateHitTestResult): Update code as needed to use nodeForHitTest().
        * rendering/RenderMultiColumnSet.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::nodeForHitTest const): Added.
        (WebCore::RenderObject::updateHitTestResult): Update code as needed to use nodeForHitTest().
        * rendering/RenderObject.h:
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::nodeAtPoint): Ditto.
        * rendering/RenderView.cpp:
        (WebCore::RenderView::nodeForHitTest const): Added. This overrides RenderBlock::nodeForHitTest(), which
        following r155370 was returning the document as the hit test node even though RenderView::updateHitTestResult()
        considered the document element as the hit node for a RenderView. As a result of this change, the rect-based
        hit testing no longer returns the document (seen in test results as #document) in the list of nodes.
        (WebCore::RenderView::updateHitTestResult): Update code as needed to use nodeForHitTest().
        * rendering/RenderView.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::hitTestFlow): Ditto.
        * rendering/svg/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::nodeAtFloatPoint): Ditto.
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::nodeAtFloatPoint): Ditto.
        * rendering/svg/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::nodeAtPoint): Ditto.
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::nodeAtFloatPoint): Ditto.
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::nodeAtPoint): Ditto.

2020-03-16  Youenn Fablet  <youenn@apple.com>

        Make CoreAudioCaptureSourceFactoryIOS an AudioSession::InterruptionObserver
        https://bugs.webkit.org/show_bug.cgi?id=209138

        Reviewed by Eric Carlson.

        Instead of listening to Audiosession interruptions, CoreAudioCaptureSourceFactoryIOS is now relying on AudioSession directly.
        This allows removing some duplicate code.
        No change of behavior.

        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
        * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
        (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
        (WebCore::CoreAudioCaptureSourceFactoryIOS::CoreAudioCaptureSourceFactoryIOS):
        (WebCore::CoreAudioCaptureSourceFactoryIOS::~CoreAudioCaptureSourceFactoryIOS):
        (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]): Deleted.

2020-03-16  Youenn Fablet  <youenn@apple.com>

        Apply rotation at source level if WebRTC sink ask so
        https://bugs.webkit.org/show_bug.cgi?id=205645

        Reviewed by Eric Carlson.

        Add a virtual method to RealtimeMediaSource to pass the information that the sink prefers the frames to be rotated before sending them.
r       By default, the method does nothing and RealtimeOutgoingVideoSource will continue to do the rotation itself.
        Update ImageRotationSessionVT to be more easily usable by users having MediaSample instead of CVPixelBuffer.
        Update RealtimeOutgoingVideoSource to use that routine: whenever applying rotation is needed,
        it will ask its track source to apply rotation. If the track source cannot do it, it will do it on its own.

        Test: webrtc/video-rotation-no-cvo.html

        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/cv/ImageRotationSessionVT.h:
        (WebCore::operator==):
        (WebCore::operator!=):
        * platform/graphics/cv/ImageRotationSessionVT.mm:
        (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
        (WebCore::ImageRotationSessionVT::initialize):
        (WebCore::ImageRotationSessionVT::rotate):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
        (WebCore::RealtimeOutgoingVideoSource::setSource):
        (WebCore::RealtimeOutgoingVideoSource::applyRotation):
        (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
        * platform/mediastream/RealtimeOutgoingVideoSource.h:

2020-03-16  youenn fablet  <youenn@apple.com>

        Audio is not played from an audio element when the srcObject object has unstarted video tracks
        https://bugs.webkit.org/show_bug.cgi?id=207041
        <rdar://problem/59084745>

        Reviewed by Eric Carlson.

        In case MediaPlayer is an audio element, we should just make it as if there is no video track in the stream.

        Test: imported/w3c/web-platform-tests/webrtc/audio-video-element-playing.html

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeVideoTrack const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didPassCORSAccessCheck const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

2020-03-16  youenn fablet  <youenn@apple.com>

        RTCRtpSender of kind video should have a null dtmf attribute
        https://bugs.webkit.org/show_bug.cgi?id=209135

        Reviewed by Eric Carlson.

        Test: imported/w3c/web-platform-tests/webrtc/RTCRtpSender.https.html

        * Modules/mediastream/RTCRtpSender.cpp:
        (WebCore::RTCRtpSender::dtmf):

        * rendering/line/LineLayoutTraversal.h: Removed some unneeded includes.
        * testing/Internals.cpp: Ditto.

2020-03-13  Sergio Villar Senin  <svillar@igalia.com>

        [WebXR] IDLs, stubs and build configuration for WPE
        https://bugs.webkit.org/show_bug.cgi?id=208702

        Reviewed by Dean Jackson.

        Added the IDLs defined by the spec with very basic empty implementations to get them
        built. Apart from that a very basic implementation of the required platform code using
        OpenXR API was also added.

        No new tests as no new functionality was really added (empty implementations). However
        follow up patches will import the already available WPT tests for WebXR.

        Largely based on previous work by Žan Doberšek.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig: Added ENABLE_WEBXR off by default.
        * DerivedSources.make:
        * Modules/webxr/NavigatorWebXR.cpp: Added.
        (WebCore::NavigatorWebXR::xr):
        (WebCore::NavigatorWebXR::from):
        * Modules/webxr/NavigatorWebXR.h: Added.
        * Modules/webxr/NavigatorWebXR.idl: Added.
        * Modules/webxr/WebXRBoundedReferenceSpace.cpp: Added.
        (WebCore::WebXRBoundedReferenceSpace::boundsGeometry const):
        * Modules/webxr/WebXRBoundedReferenceSpace.h: Added.
        * Modules/webxr/WebXRBoundedReferenceSpace.idl: Added.
        * Modules/webxr/WebXRFrame.cpp: Added.
        (WebCore::WebXRFrame::create):
        (WebCore::WebXRFrame::WebXRFrame):
        (WebCore::WebXRFrame::session const):
        (WebCore::WebXRFrame::getViewerPose):
        (WebCore::WebXRFrame::getPose):
        * Modules/webxr/WebXRFrame.h: Added.
        * Modules/webxr/WebXRFrame.idl: Added.
        * Modules/webxr/WebXRInputSource.cpp: Added.
        (WebCore::WebXRInputSource::create):
        (WebCore::WebXRInputSource::WebXRInputSource):
        (WebCore::WebXRInputSource::handedness const):
        (WebCore::WebXRInputSource::targetRayMode const):
        (WebCore::WebXRInputSource::targetRaySpace const):
        (WebCore::WebXRInputSource::gripSpace const):
        (WebCore::WebXRInputSource::profiles const):
        * Modules/webxr/WebXRInputSource.h: Added.
        * Modules/webxr/WebXRInputSource.idl: Added.
        * Modules/webxr/WebXRInputSourceArray.cpp: Added.
        (WebCore::WebXRInputSourceArray::length const):
        (WebCore::WebXRInputSourceArray::item const):
        * Modules/webxr/WebXRInputSourceArray.h: Added.
        * Modules/webxr/WebXRInputSourceArray.idl: Added.
        * Modules/webxr/WebXRPose.cpp: Added.
        (WebCore::WebXRPose::create):
        (WebCore::WebXRPose::WebXRPose):
        (WebCore::WebXRPose::transform const):
        (WebCore::WebXRPose::emulatedPosition const):
        * Modules/webxr/WebXRPose.h: Added.
        * Modules/webxr/WebXRPose.idl: Added.
        * Modules/webxr/WebXRReferenceSpace.cpp: Added.
        (WebCore::WebXRReferenceSpace::WebXRReferenceSpace):
        (WebCore::WebXRReferenceSpace::getOffsetReferenceSpace):
        * Modules/webxr/WebXRReferenceSpace.h: Added.
        * Modules/webxr/WebXRReferenceSpace.idl: Added.
        * Modules/webxr/WebXRRenderState.cpp: Added.
        (WebCore::WebXRRenderState::create):
        (WebCore::WebXRRenderState::WebXRRenderState):
        (WebCore::WebXRRenderState::depthNear const):
        (WebCore::WebXRRenderState::depthFar const):
        (WebCore::WebXRRenderState::inlineVerticalFieldOfView const):
        (WebCore::WebXRRenderState::baseLayer const):
        * Modules/webxr/WebXRRenderState.h: Added.
        * Modules/webxr/WebXRRenderState.idl: Added.
        * Modules/webxr/WebXRRigidTransform.cpp: Added.
        (WebCore::WebXRRigidTransform::create):
        (WebCore::WebXRRigidTransform::WebXRRigidTransform):
        (WebCore::WebXRRigidTransform::position const):
        (WebCore::WebXRRigidTransform::orientation const):
        (WebCore::WebXRRigidTransform::matrix const):
        (WebCore::WebXRRigidTransform::inverse const):
        * Modules/webxr/WebXRRigidTransform.h: Added.
        * Modules/webxr/WebXRRigidTransform.idl: Added.
        * Modules/webxr/WebXRSession.cpp: Added.
        (WebCore::WebXRSession::environmentBlendMode const):
        (WebCore::WebXRSession::visibilityState const):
        (WebCore::WebXRSession::renderState const):
        (WebCore::WebXRSession::inputSources const):
        (WebCore::WebXRSession::updateRenderState):
        (WebCore::WebXRSession::requestReferenceSpace):
        (WebCore::WebXRSession::requestAnimationFrame):
        (WebCore::WebXRSession::cancelAnimationFrame):
        (WebCore::WebXRSession::end):
        (WebCore::WebXRSession::activeDOMObjectName const):
        (WebCore::WebXRSession::stop):
        * Modules/webxr/WebXRSession.h: Added.
        * Modules/webxr/WebXRSession.idl: Added.
        * Modules/webxr/WebXRSpace.cpp: Added.
        (WebCore::WebXRSpace::WebXRSpace):
        * Modules/webxr/WebXRSpace.h: Added.
        * Modules/webxr/WebXRSpace.idl: Added.
        * Modules/webxr/WebXRSystem.cpp: Added.
        (WebCore::WebXRSystem::create):
        (WebCore::WebXRSystem::WebXRSystem):
        (WebCore::WebXRSystem::isSessionSupported):
        (WebCore::WebXRSystem::requestSession):
        (WebCore::WebXRSystem::activeDOMObjectName const):
        (WebCore::WebXRSystem::stop):
        * Modules/webxr/WebXRSystem.h: Added.
        * Modules/webxr/WebXRSystem.idl: Added.
        * Modules/webxr/WebXRView.cpp: Added.
        (WebCore::WebXRView::create):
        (WebCore::WebXRView::WebXRView):
        (WebCore::WebXRView::eye const):
        (WebCore::WebXRView::projectionMatrix const):
        (WebCore::WebXRView::transform const):
        * Modules/webxr/WebXRView.h: Added.
        * Modules/webxr/WebXRView.idl: Added.
        * Modules/webxr/WebXRViewerPose.cpp: Added.
        (WebCore::WebXRViewerPose::create):
        (WebCore::WebXRViewerPose::views const):
        * Modules/webxr/WebXRViewerPose.h: Added.
        * Modules/webxr/WebXRViewerPose.idl: Added.
        * Modules/webxr/WebXRViewport.cpp: Added.
        (WebCore::WebXRViewport::create):
        (WebCore::WebXRViewport::x const):
        (WebCore::WebXRViewport::y const):
        (WebCore::WebXRViewport::width const):
        (WebCore::WebXRViewport::height const):
        * Modules/webxr/WebXRViewport.h: Added.
        * Modules/webxr/WebXRViewport.idl: Added.
        * Modules/webxr/WebXRWebGLLayer.cpp: Added.
        (WebCore::WebXRWebGLLayer::create):
        (WebCore::WebXRWebGLLayer::WebXRWebGLLayer):
        (WebCore::WebXRWebGLLayer::antialias const):
        (WebCore::WebXRWebGLLayer::ignoreDepthValues const):
        (WebCore::WebXRWebGLLayer::framebuffer const):
        (WebCore::WebXRWebGLLayer::framebufferWidth const):
        (WebCore::WebXRWebGLLayer::framebufferHeight const):
        (WebCore::WebXRWebGLLayer::getViewport):
        (WebCore::WebXRWebGLLayer::getNativeFramebufferScaleFactor):
        * Modules/webxr/WebXRWebGLLayer.h: Added.
        * Modules/webxr/WebXRWebGLLayer.idl: Added.
        * Modules/webxr/XREnvironmentBlendMode.h: Added.
        * Modules/webxr/XREnvironmentBlendMode.idl: Added.
        * Modules/webxr/XREye.h: Added.
        * Modules/webxr/XREye.idl: Added.
        * Modules/webxr/XRFrameRequestCallback.h: Added.
        * Modules/webxr/XRFrameRequestCallback.idl: Added.
        * Modules/webxr/XRHandedness.h: Added.
        * Modules/webxr/XRHandedness.idl: Added.
        * Modules/webxr/XRInputSourceEvent.cpp: Added.
        (WebCore::XRInputSourceEvent::create):
        (WebCore::XRInputSourceEvent::XRInputSourceEvent):
        (WebCore::XRInputSourceEvent::frame const):
        (WebCore::XRInputSourceEvent::inputSource const):
        (WebCore::XRInputSourceEvent::buttonIndex const):
        * Modules/webxr/XRInputSourceEvent.h: Added.
        * Modules/webxr/XRInputSourceEvent.idl: Added.
        * Modules/webxr/XRInputSourcesChangeEvent.cpp: Added.
        (WebCore::XRInputSourcesChangeEvent::create):
        (WebCore::XRInputSourcesChangeEvent::XRInputSourcesChangeEvent):
        (WebCore::XRInputSourcesChangeEvent::session const):
        (WebCore::XRInputSourcesChangeEvent::added const):
        (WebCore::XRInputSourcesChangeEvent::removed const):
        * Modules/webxr/XRInputSourcesChangeEvent.h: Added.
        * Modules/webxr/XRInputSourcesChangeEvent.idl: Added.
        * Modules/webxr/XRReferenceSpaceEvent.cpp: Added.
        (WebCore::XRReferenceSpaceEvent::create):
        (WebCore::XRReferenceSpaceEvent::XRReferenceSpaceEvent):
        (WebCore::XRReferenceSpaceEvent::referenceSpace const):
        (WebCore::XRReferenceSpaceEvent::transform const):
        * Modules/webxr/XRReferenceSpaceEvent.h: Added.
        * Modules/webxr/XRReferenceSpaceEvent.idl: Added.
        * Modules/webxr/XRReferenceSpaceType.h: Added.
        * Modules/webxr/XRReferenceSpaceType.idl: Added.
        * Modules/webxr/XRRenderStateInit.h: Added.
        * Modules/webxr/XRRenderStateInit.idl: Added.
        * Modules/webxr/XRSessionEvent.cpp: Added.
        (WebCore::XRSessionEvent::create):
        (WebCore::XRSessionEvent::XRSessionEvent):
        (WebCore::XRSessionEvent::session const):
        * Modules/webxr/XRSessionEvent.h: Added.
        * Modules/webxr/XRSessionEvent.idl: Added.
        * Modules/webxr/XRSessionInit.h: Added.
        * Modules/webxr/XRSessionInit.idl: Added.
        * Modules/webxr/XRSessionMode.h: Added.
        * Modules/webxr/XRSessionMode.idl: Added.
        * Modules/webxr/XRTargetRayMode.h: Added.
        * Modules/webxr/XRTargetRayMode.idl: Added.
        * Modules/webxr/XRVisibilityState.h: Added.
        * Modules/webxr/XRVisibilityState.idl: Added.
        * Modules/webxr/XRWebGLLayerInit.h: Added.
        * Modules/webxr/XRWebGLLayerInit.idl: Added.
        * PlatformWPE.cmake: Added OpenXR libraries and include paths.
        * Sources.txt: Added new cpp files.
        * WebCore.xcodeproj/project.pbxproj: Added new files.
        * bindings/IDLTypes.h: Added SequenceStorageType.
        * bindings/js/JSDOMConvertSequences.h:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/EventNames.h:
        * dom/EventNames.in: Added WebXR events.
        * dom/EventTargetFactory.in: Added WebXR event targets.
        * page/RuntimeEnabledFeatures.h: Added new runtime feature for WebXR.
        (WebCore::RuntimeEnabledFeatures::setWebXREnabled):
        (WebCore::RuntimeEnabledFeatures::webXREnabled const):
        * platform/xr/PlatformXR.cpp: Added.
        * platform/xr/PlatformXR.h: Added.
        * platform/xr/openxr/PlatformXR.cpp: Added.
        (PlatformXR::createStructure): Utility function to create OpenXR structs.
        (PlatformXR::resultToString): Translates OpenXR error codes to strings.
        (PlatformXR::Instance::Impl::Impl):
        (PlatformXR::Instance::Impl::~Impl):
        (PlatformXR::Instance::singleton):

2020-03-16  Zan Dobersek  <zdobersek@igalia.com>

        [Cairo] Path copy constructor and operator must also copy over CTM
        https://bugs.webkit.org/show_bug.cgi?id=183327

        Reviewed by Carlos Garcia Campos.

        Cairo implementations of Path copy constructor and assignment operator
        must also copy over the current transformation matrix that's maintained
        on the source path's cairo_t context.

        cairo_copy_path() copies the current path off of a Cairo context, but
        during that also transforms every point on the path through inverse of
        the CTM, back into user coordinates. For copying to be done correctly,
        the copied path must be transformed through the CTM when it's appended
        to the target Cairo context. For that reason the CTM has to be copied
        over from source to target context before the path is copied and
        appended.

        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::Path):
        (WebCore::Path::operator=):

2020-03-16  youenn fablet  <youenn@apple.com>

        Unique origins should not be Potentially Trustworthy
        https://bugs.webkit.org/show_bug.cgi?id=209049

        Reviewed by Darin Adler.

        Unique origins should not be considered trustworthy as per https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy.

        Test: http/tests/security/iframe-unique-origin.https.html

        * dom/Document.cpp:
        (WebCore::Document::isSecureContext const):
        Removed check for top level origins as we make all unique origins not trusted.
        * page/SecurityOrigin.cpp:

2020-03-16  youenn fablet  <youenn@apple.com>

        Remove the use of empty WebRTC sources for receiver tracks
        https://bugs.webkit.org/show_bug.cgi?id=209061

        Reviewed by Eric Carlson.

        We no longer need to create receivers with empty sources since we now always have a libwebrtc receiver from which we can get the track.
        We remove that code path.
        This sldo allows using the right track parameters from the start, like track id.

        Covered by existing and rebased tests.

        * Modules/mediastream/RTCPeerConnection.h:
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::addPendingTrackEvent):
        (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
        (WebCore::LibWebRTCMediaEndpoint::newTransceiver):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::createReceiver):
        (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
        (WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):
        (WebCore::LibWebRTCPeerConnectionBackend::newRemoteTransceiver):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
        (WebCore::LibWebRTCRtpReceiverBackend::createSource):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
        * platform/mediastream/RealtimeIncomingAudioSource.cpp:
        (WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):
        * platform/mediastream/RealtimeIncomingAudioSource.h:
        * platform/mediastream/RealtimeIncomingVideoSource.cpp:
        (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
        * platform/mediastream/RealtimeIncomingVideoSource.h:
        * testing/MockLibWebRTCPeerConnection.h:
        (WebCore::MockMediaStreamTrack::state const):
        (WebCore::MockRtpReceiver::SetObserver):

2020-03-16  Hurnjoo Lee  <hurnjoo.lee@samsung.com>, Fujii Hironori  <Hironori.Fujii@sony.com>, Carlos Garcia Campos  <cgarcia@igalia.com>

        [Cairo][SVG] marker-mid isn't shown on a joint of rectilinearly connected line-to path segments
        https://bugs.webkit.org/show_bug.cgi?id=113849

        Reviewed by Adrian Perez de Castro.

        Marker-mid of svg is not displayed because path elements that added to
        cairo backend are optimized. If the new line_to has same slope with
        the previous path element, then the path element is joined to previous
        path element.

        Example:

        added path elements : moveto(-5,-2), lineto(0,-2), lineto(5,-2)
        cairo_path_data : moveto(-5,-2), lineto(5, -2)

        This patch stores all of path informations separately in order to avoid
        this problem. When generating positions of markers, we use stored path
        informations instead of cairo_path_data.

        When a new operation can't be directly stored in an ElementPath, we fallback to use cairo_path_data() in
        Path::apply().

        * platform/graphics/Path.h: Add new constructor that receives a cairo context, make ensureCairoPath() private
        and add m_elements member.
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::Font::platformPathForGlyph const): Create a cairo context for the path and use the new constructor
        that receives a RefPtr<cairo_t>&&.
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::Path): Initialize m_elements to an empty vector when created without a cairo context.
        (WebCore::Path::operator=): Also copy m_elements.
        (WebCore::Path::clear): Initialize m_elements to an empty vector.
        (WebCore::Path::translate): Apply the translate to elements in m_elements.
        (WebCore::Path::appendElement): Helper to add an operation to m_elements.
        (WebCore::Path::moveToSlowCase): Call appendElement() if m_elements is not nullopt.
        (WebCore::Path::addLineToSlowCase): Ditto.
        (WebCore::Path::addRect): Ditto.
        (WebCore::Path::addQuadCurveToSlowCase): Ditto.
        (WebCore::Path::addBezierCurveToSlowCase): Ditto.
        (WebCore::Path::addArcSlowCase): Set m_elements to nullopt.
        (WebCore::Path::addArcTo): Ditto.
        (WebCore::Path::addEllipse): Ditto.
        (WebCore::Path::addPath): Ditto.
        (WebCore::Path::closeSubpath): Call appendElement() if m_elements is not nullopt.
        (WebCore::Path::applySlowCase const): Use elements from m_elements if it's not nullopt, otherwise fallback to
        use cairo_path_data.
        (WebCore::Path::transform): Apply the transform to elements in m_elements.

2020-03-16  Rob Buis  <rbuis@igalia.com>

        Remove addHTTPOriginIfNeeded calls
        https://bugs.webkit.org/show_bug.cgi?id=209127

        Reviewed by Darin Adler.

        Remove addHTTPOriginIfNeeded calls since they are get requests and navigations and the spec [1]
        indicates that the Origin header should not be written out, making these calls no-ops.

       [1] https://fetch.spec.whatwg.org/#append-a-request-origin-header

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::changeLocation):
        (WebCore::FrameLoader::loadURL):

2020-03-16  Rob Buis  <rbuis@igalia.com>

        Simplify ChromeClient.createWindow
        https://bugs.webkit.org/show_bug.cgi?id=209123

        Reviewed by Darin Adler.

        Simplify ChromeClient.createWindow by removing the FrameLoadRequest parameter.
        It was only passed for its ResourceRequest member, which can also be obtained
        from the NavigationAction parameter.

        * loader/EmptyClients.h:
        * loader/FrameLoader.cpp:
        (WebCore::createWindow):
        * page/Chrome.cpp:
        (WebCore::Chrome::createWindow const):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::openNewWindow):

2020-03-15  Fujii Hironori  <Hironori.Fujii@sony.com>

        KeyedDecoderGeneric fails to allocate Vector while decoding broken data
        https://bugs.webkit.org/show_bug.cgi?id=207324

        Reviewed by Darin Adler.

        There were three crash bugs in it.

        KeyedDecoderGeneric was trying to allocate a buffer without
        ensuring the size wouldn't exceed the decoding data size by using
        bufferIsLargeEnoughToContain.

        It was trying to push an itme into the top dictionary of emtpy
        m_dictionaryStack when EndObject tag would appear without the
        preceding BeginObject tag.

        It was trying to push an item into the top array of empty
        m_arrayStack when EndArray tag would appear without the preceding
        BeginArray tag.

        Tests: TestWebKitAPI: KeyedCoding.DecodeRandomData

        * platform/generic/KeyedDecoderGeneric.cpp:
        (WebCore::readString):
        (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric):
        Check bufferIsLargeEnoughToContain(size) before allocating a Vector with size.
        Check if m_dictionaryStack and m_arrayStack are empty.

2020-03-15  Chris Dumez  <cdumez@apple.com>

        [DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOptions::enableBackForwardCache
        https://bugs.webkit.org/show_bug.cgi?id=207481
        <rdar://problem/59331661>

        Reviewed by Darin Adler.

        Add a support for a new excludeFromInternalSetting option in Settings.yaml and use it for
        'usesBackForwardCache' setting. This means that script will no longer be able to toggle
        this particular setting via internals.settings JS API. Tests wanting to turn on the
        back / forward cache are supposed to use the following:
        <!-- webkit-test-runner [ enableBackForwardCache=true ] -->

        Using internals.settings JS API to turn on the back/forward cache would not work well
        with WebKit2 because of process-swap-on-navigation. Support for it in WK1 / DRT was
        causing flakiness because of a conflict between the 2 ways of enabling the setting.

        * Scripts/GenerateSettings.rb:
        * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
        * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
        * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
        * page/Settings.yaml:

2020-03-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Add basic column span support for content box width
        https://bugs.webkit.org/show_bug.cgi?id=209120
        <rdar://problem/60463424>

        Reviewed by Antti Koivisto.

        Take the column spanning into account when computing the content width for the table cell.
        [content box width = column width(1) + column width(2) + .. + column width(spanning value) + ((spanning value - 1) * horizontal spacing)]

        Test: fast/layoutformattingcontext/table-colspan-simple.html

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::positionTableCells):
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::appendCell):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::CellInfo::startColumn const):
        (WebCore::Layout::TableGrid::CellInfo::endColumn const):
        (WebCore::Layout::TableGrid::CellInfo::startRow const):
        (WebCore::Layout::TableGrid::CellInfo::endRow const):
        (WebCore::Layout::TableGrid::CellInfo::columnSpan const):
        (WebCore::Layout::TableGrid::CellInfo::rowSpan const):

2020-03-15  Yusuke Suzuki  <ysuzuki@apple.com>

        Should not use variable-length-array (VLA)
        https://bugs.webkit.org/show_bug.cgi?id=209043

        Reviewed by Mark Lam.

        * Configurations/Base.xcconfig:
        * crypto/mac/SerializedCryptoKeyWrapMac.mm:
        (WebCore::wrapSerializedCryptoKey):
        (WebCore::unwrapSerializedCryptoKey):
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getInternalformatParameter):
        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
        (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
        * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
        (WebCore::updateDisplayID):
        (WebCore::ScreenDisplayCaptureSourceMac::screenCaptureDevices):

2020-03-14  Brent Fulgham  <bfulgham@apple.com>

        Add missing checks needed for AppBound Quirk
        https://bugs.webkit.org/show_bug.cgi?id=209117
        <rdar://problem/60460097>

        Reviewed by John Wilander.

        The checks for the 'NeedsInAppBrowserPrivacyQuirks' flag added in r258101 was incomplete.
        Two additional call sites need to check the state of the flag.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeScriptInWorld): Add missing check for the quirk.
        * loader/FrameLoaderClient.h: Add new API for the 'NeedsInAppBrowserPrivacyQuirks'
        debug flag.
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptImmediately): Ditto.

2020-03-10  Darin Adler  <darin@apple.com>

        Change all return values in TextIterator header from live ranges to SimpleRange
        https://bugs.webkit.org/show_bug.cgi?id=208906

        Reviewed by Antti Koivisto.

        This is another step in moving off of live ranges for WebKit internals.

        - Change return values of remaining functions that were returning live ranges in
          the TextIterator header to return SimpleRange.
        - Change some arguments from live ranges to SimpleRange.
        - At some call sites, use createLiveRange to convert the SimpleRange into a live
          range (for now), but at others update the code to use SimpleRange.
        - Renamed a version of findPlainText that returns a boolean to containsPlainText.
        - Convert call sites that were using createLiveRange just to use the
          Range::startPosition and Range::endPosition functions to instead use a new
          overload of the createLegacyEditingPosition function that can be used with
          SimpleRange::start and SimpleRange::end because it takes a BoundaryPoint.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::rangeMatchesTextNearRange): Return Optional<SimpleRange>
        and take SimpleRange argument.
        (WebCore::AXObjectCache::previousBoundary): Updated since
        SimplifiedBackwardsTextIterator::range now returns SimpleRange.
        * accessibility/AXObjectCache.h: Updated for the above.

        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::containsText const): Updated for name change.
        Now containsPlainText instead of findPlainText.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
        Use createLegacyEditingPosition instead of createLiveRange.
        (-[WebAccessibilityObjectWrapper rangeFromMarkers:withText:]): Use createLiveRange.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        Use createLegacyEditingPosition instead of createLiveRange.

        * dom/Position.cpp:
        (WebCore::createLegacyEditingPosition): Added an overload that takes a BoundaryPoint.
        * dom/Position.h: Updated for the above, also removed unneeded includes and forward
        declarations.

        * editing/Editing.cpp:
        (WebCore::visiblePositionForIndexUsingCharacterIterator): Updated since
        CharacterIterator::range is now a SimpleRange, use createLegacyEditingPosition.

        * editing/Editor.cpp:
        (WebCore::Editor::advanceToNextMisspelling): Updated since CharacterIterator::range
        is now a SimpleRange.
        (WebCore::Editor::rangeOfString): Updated since findPlainText now returns a
        SimpleRange; use createLiveRange.
        (WebCore::Editor::countMatchesForText): Ditto.

        * editing/TextIterator.cpp:
        (WebCore::SimplifiedBackwardsTextIterator::range const): Return a SimpleRange.
        (WebCore::CharacterIterator::range const): Ditto.
        (WebCore::characterSubrange): Updated since CharacterIterator::range returns
        a SimpleRange. Use createLiveRange.
        (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator): Cut down
        code here by initializing data members in the class definition.
        (WebCore::BackwardsCharacterIterator::range const): Return a SimpleRange.
        (WebCore::WordAwareIterator::WordAwareIterator): Cut down code here by
        initializing data members in the class definition.
        (WebCore::hasAnyPlainText): Take a SimpleRange, use createLiveRange.
        (WebCore::plainTextUsingBackwardsTextIteratorForTesting): Take a SimpleRange,
        use createLiveRange.
        (WebCore::collapsedToBoundary): Take and return a SimpleRange.
        (WebCore::findPlainTextMatches): Take a SimpleRange, use createLiveRange.
        (WebCore::rangeForMatch): Take and return a SimpleRange.
        (WebCore::findClosestPlainText): Ditto.
        (WebCore::findPlainText): Ditto.
        (WebCore::containsPlainText): Renamed from findPlainText since this returns
        a boolean, not a found location of some text.
        * editing/TextIterator.h: Updated for the above. Also changed some data
        members to use unsigned for offsets rather than int.

        * editing/TextManipulationController.cpp:
        (WebCore::ParagraphContentIterator::startPosition): Use
        createLegacyEditingPosition instead of createLiveRange.
        (WebCore::ParagraphContentIterator::endPosition): Ditto.

        * editing/VisiblePosition.h: Added a forward declaration here since Position.h
        no longer forward declares it.

        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::appendTrailingWhitespace): Updated since
        CharacterIterator::range is now a SimpleRange, use createLegacyEditingPosition.
        * editing/VisibleUnits.cpp:
        (WebCore::previousBoundary): Ditto.
        (WebCore::nextBoundary): Ditto.

        * testing/Internals.cpp:
        (WebCore::Internals::rangeOfStringNearLocation): Updated since
        findClosestPlainText now returns a SimpleRange, use createLiveRange.

2020-03-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Fill in the gaps with anonymous table cell boxes
        https://bugs.webkit.org/show_bug.cgi?id=209114
        <rdar://problem/60458806>

        Reviewed by Antti Koivisto.

        17.5 Visual layout of table contents
        A "missing cell" is a cell in the row/column grid that is not
        occupied by an element or pseudo-element. Missing cells are rendered
        as if an anonymous table-cell box occupied their position in the grid.
        (https://www.w3.org/TR/CSS22/tables.html)

        This helps to keep TableGrid an actual grid.

        Test: fast/layoutformattingcontext/table-missing-cells-simple.html

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildTableStructure):

2020-03-14  Peng Liu  <peng.liu6@apple.com>

        Cleanup RenderMediaControls.cpp and RenderMediaControlElements.cpp
        https://bugs.webkit.org/show_bug.cgi?id=209008

        Reviewed by Daniel Bates.

        Merge RenderMediaControls.[h|cpp] and RenderMediaControlElements.[h|cpp].
        Remove class RenderMediaVolumeSliderContainer because we can use RenderBlockFlow
        to render MediaControlTextTrackContainerElement.

        No new tests, no functional change.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/shadow/MediaControlElementTypes.cpp:
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
        * rendering/RenderMediaControlElements.cpp: Removed.
        * rendering/RenderMediaControlElements.h: Removed.
        * rendering/RenderMediaControls.cpp:
        (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
        (WebCore::RenderMediaVolumeSliderContainer::layout):
        (WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer):
        (WebCore::RenderMediaControlTimelineContainer::layout):
        * rendering/RenderMediaControls.h:
        * rendering/RenderThemeMac.mm:

2020-03-14  Daniel Bates  <dabates@apple.com>

        Share HitTestResult::addNodeToListBasedTestResult() impl for LayoutRect and FloatRect overloads
        https://bugs.webkit.org/show_bug.cgi?id=209107

        Reviewed by Brady Eidson.

        Remove code duplication for adding a node to the result set.

        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::addNodeToListBasedTestResultCommon): Added.
        (WebCore::HitTestResult::addNodeToListBasedTestResult): Write in terms of addNodeToListBasedTestResultCommon().
        * rendering/HitTestResult.h:

2020-03-14  Zalan Bujtas  <zalan@apple.com>

        [Tree building] Reset the fragmented flow status before calling child.willBeRemovedFromTree.
        https://bugs.webkit.org/show_bug.cgi?id=209100
        <rdar://problem/60434672>

        Reviewed by Simon Fraser.

        ::willBeRemovedFromTree() assumes all the cleanup has happened and it's the final step before calling d'tor.
        It clears m_fragmentList that resetFragmentedFlowStateOnRemoval() later checks for consistency (m_fragmentList.contains(fragment)).

        Test: fast/multicol/reparent-fragment-flow-content.html

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::detachFromRenderElement):

2020-03-14  Rob Buis  <rbuis@igalia.com>

        Set Origin header value to null rather than omitting it
        https://bugs.webkit.org/show_bug.cgi?id=186030

        Reviewed by Youenn Fablet.

        For every redirect, addHTTPOriginIfNeeded should be called to
        make sure that the tainted origin logic is applied [1, Step 10] and
        thus the request after redirect has the correct Origin header.

        Make AppleWin treat 308 redirects like 307 and so keeping http
        methods across redirects. This is similar to
        https://bugs.webkit.org/show_bug.cgi?id=154348.

        [1] https://fetch.spec.whatwg.org/#concept-http-network-or-cache-fetch

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addHTTPOriginIfNeeded):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
        * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
        (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):

2020-03-14  Ryosuke Niwa  <rniwa@webkit.org>

        Call SVGTRefElement::buildPendingResource in SVGElement::didFinishInsertingNode
        https://bugs.webkit.org/show_bug.cgi?id=208981

        Reviewed by Antti Koivisto.

        This patch moves the call to SVGTRefElement::buildPendingResource from SVGElement::insertedIntoAncestor
        to SVGElement::didFinishInsertingNode.

        * svg/SVGElement.cpp:
        (WebCore::SVGElement::insertedIntoAncestor): Return true when the element has a pending resource ID.
        (WebCore::SVGElement::didFinishInsertingNode): Added. Calls buildPendingResourcesIfNeeded.
        * svg/SVGElement.h:

2020-03-13  Said Abou-Hallawa  <said@apple.com>

        SVGMatrix should have the access right of its owner SVGTransform always
        https://bugs.webkit.org/show_bug.cgi?id=207462

        Reviewed by Simon Fraser.

        The SVGMatrix needs to be reattached to its owner SVGTransform when the
        access right of this owner changes. The access right of the owner changes
        when it gets attached to or detached from a higher level owner.

        Test: svg/dom/SVGTransformList-anim-read-only.html

        * svg/SVGTransform.h:
        * svg/properties/SVGProperty.h:
        (WebCore::SVGProperty::attach):
        (WebCore::SVGProperty::detach):
        (WebCore::SVGProperty::reattach):

2020-03-13  Alex Christensen  <achristensen@webkit.org>

        WKWebView._negotiatedLegacyTLS should be correct after back/forward navigations
        https://bugs.webkit.org/show_bug.cgi?id=209011
        <rdar://problem/59370588>

        Reviewed by Youenn Fablet.

        This is basically r258343 but for legacy TLS negotiation instead of plaintext HTTP use.

        * dom/SecurityContext.h:
        (WebCore::SecurityContext::usedLegacyTLS const):
        (WebCore::SecurityContext::setUsedLegacyTLS):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::usedLegacyTLS const):
        (WebCore::CachedFrame::setUsedLegacyTLS): Deleted.
        * history/CachedFrame.h:
        (WebCore::CachedFrame::usedLegacyTLS const): Deleted.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::commitProvisionalLoad):
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::includeCertificateInfo const):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::setUsedLegacyTLS):

2020-03-13  Zalan Bujtas  <zalan@apple.com>

        [Tree building] Block::attachIgnoringContinuation should allow inline tables as before child container
        https://bugs.webkit.org/show_bug.cgi?id=209095
        <rdar://problem/59837588>

        Reviewed by Simon Fraser.

        It's perfectly valid to have an inline table as the anonymous container for the before child.
        It'll get wrapped inside an anonymous block right before we insert the block box candidate, so
        the final result will be something like:

        new block level child (this is the child we are inserting)
        anonymous block wrapper
          inline table (this is the before child's inline container)
            before child 

        Test: fast/table/before-child-is-inline-table.html

        * rendering/updating/RenderTreeBuilderBlock.cpp:
        (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):

2020-03-13  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [GPU Process] GraphicsContextStateChange::apply() should process ShadowsIgnoreTransformsChange before processing ShadowChange
        https://bugs.webkit.org/show_bug.cgi?id=209071

        Reviewed by Darin Adler.

        Ensure GraphicsContextStateChange::apply() calls shadowsIgnoreTransforms()
        before calling setLegacyShadow() or setShadow().

        Test: This patch fixes the following tests when running:
        "run-webkit-tests --internal-feature RenderCanvasInGPUProcessEnabled"
            fast/canvas/canvas-image-shadow.html
            fast/canvas/canvas-scale-drawImage-shadow.html
            fast/canvas/canvas-scale-fillPath-shadow.html
            fast/canvas/canvas-scale-fillRect-shadow.html
            fast/canvas/canvas-scale-shadowBlur.html
            fast/canvas/canvas-transforms-fillRect-shadow.html
            fast/canvas/fillText-shadow.html

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::apply const):

2020-03-13  John Wilander  <wilander@apple.com>

        Remove unused code related to removePrevalentDomains()
        https://bugs.webkit.org/show_bug.cgi?id=209078
        <rdar://problem/59681984>

        Reviewed by Brent Fulgham.

        The various removePrevalentDomains() functions and its IPC endpoint are unused and should be removed.

        No new tests. Just dead code removal.

        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::removePrevalentDomains): Deleted.
        * platform/network/NetworkStorageSession.h:

2020-03-13  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Push applicationSDKVersion() down from WebCore into WTF
        https://bugs.webkit.org/show_bug.cgi?id=209030

        Reviewed by Simon Fraser.

        * html/HTMLObjectElement.cpp:
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
        * platform/RuntimeApplicationChecks.h:
        * platform/Timer.cpp:
        (WebCore::shouldSuppressThreadSafetyCheck):
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::applicationSDKVersionOverride): Deleted.
        (WebCore::setApplicationSDKVersion): Deleted.
        (WebCore::applicationSDKVersion): Deleted.

2020-03-13  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Customize a bit more on the macOS LocalAuthentication prompt
        https://bugs.webkit.org/show_bug.cgi?id=208703
        <rdar://problem/60136974>

        Reviewed by Darin Adler.

        * en.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::touchIDPromptTitle):
        * platform/LocalizedStrings.h:
        Adds a new formatted UI string to help with RP ID.

2020-03-13  Peng Liu  <peng.liu6@apple.com>

        Safari sometimes crashes when switch video into PiP mode
        https://bugs.webkit.org/show_bug.cgi?id=208904

        Reviewed by Simon Fraser.

        With this patch, MediaControlTextTrackContainerElement won't paint its subtree
        to an image buffer (for the captions in video fullscreen or picture-in-picture mode)
        when the cues are updated. Instead, it only sets the flag m_needsGenerateTextTrackRepresentation
        to true after running layout based on the new cues. After that, it paints its subtree
        to an image buffer if needed at the end of Page::updateRendering() when the layout is clean.
        TextTrackRepresentationCocoa will use the image buffer to set the content of the layer
        for captions in video fullscreen or picture-in-picture mode.

        MediaControlTextTrackContainerElement class is responsible for rendering the captions in both:
        1) a video player in the inline mode.
        2) a video player in "video fullscreen" or picture-in-picture mode.
        This patch refactors some functions to make their responsibilities clear.

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::updateTextTrackRepresentationImageIfNeeded):
        * Modules/mediacontrols/MediaControlsHost.h:
        * dom/Document.cpp:
        (WebCore::Document::setMediaElementShowingTextTrack):
        (WebCore::Document::clearMediaElementShowingTextTrack):
        (WebCore::Document::updateTextTrackRepresentationImageIfNeeded):
        * dom/Document.h:

        Functions textTracksAreReady(), textTrackReadyStateChanged() and configureTextTrackDisplay()
        should be wrapped with "#if ENABLE(VIDEO_TRACK)".
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setTextTrackRepresentation):
        (WebCore::HTMLMediaElement::textTracksAreReady const):
        (WebCore::HTMLMediaElement::textTrackReadyStateChanged):
        (WebCore::HTMLMediaElement::configureTextTrackDisplay):
        (WebCore::HTMLMediaElement::updateTextTrackRepresentationImageIfNeeded):
        * html/HTMLMediaElement.h:

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationImageIfNeeded):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationIfNeeded):
        (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackStyle):
        (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen):
        (WebCore::MediaControlTextTrackContainerElement::updateVideoDisplaySize):
        (WebCore::MediaControlTextTrackContainerElement::updateSizes):
        (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
        (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Deleted.
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationStyle): Deleted.
        (WebCore::MediaControlTextTrackContainerElement::layoutIfNecessary): Deleted.
        (WebCore::MediaControlTextTrackContainerElement::updateCueStyles): Deleted.
        * html/shadow/MediaControlElements.h:
        * html/shadow/MediaControls.cpp:
        (WebCore::MediaControls::updateTextTrackRepresentationImageIfNeeded):
        * html/shadow/MediaControls.h:
        * page/Page.cpp:
        (WebCore::Page::updateRendering):
        * rendering/RenderMediaControlElements.cpp:
        (WebCore::RenderMediaControlTextTrackContainer::RenderMediaControlTextTrackContainer):
        (WebCore::RenderMediaControlTextTrackContainer::layout):
        (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): Deleted.
        (WebCore::RenderTextTrackContainerElement::layout): Deleted.
        * rendering/RenderMediaControlElements.h:

2020-03-13  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, reverting r258391.

        Breaks internal builds.

        Reverted changeset:

        "Apply rotation at source level if WebRTC sink ask so"
        https://bugs.webkit.org/show_bug.cgi?id=205645
        https://trac.webkit.org/changeset/258391

2020-03-13  Kate Cheney  <katherine_cheney@apple.com>

        Report all third party loads on a per-page basis
        https://bugs.webkit.org/show_bug.cgi?id=209032
        <rdar://problem/60397323>

        Reviewed by Chris Dumez.

        Test: http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html

        Rename this function to more accurately reflect its purpose of sending
        loaded registrable domains to the WebPage.

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * loader/FrameLoaderClient.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequestInternal):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):

2020-03-13  Antti Koivisto  <antti@apple.com>

        Remove AffectedByDrag style flag
        https://bugs.webkit.org/show_bug.cgi?id=209054

        Reviewed by Simon Fraser.

        As a followup to r258321, remove the last remaining user action related AffectedBy flag.

        This also cleans out a bunch of scetchy, risky code from render tree (style invalidation!).

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::createDragImage const):
        * dom/Element.cpp:
        (WebCore::Element::isUserActionElementDragged const):
        (WebCore::Element::setBeingDragged):

        Move dragged state for render tree to Element where it belongs.

        (WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
        * dom/Element.h:
        (WebCore::Element::isBeingDragged const):
        (WebCore::Element::descendantsAffectedByPreviousSibling const):
        (WebCore::Element::setDescendantsAffectedByPreviousSibling):
        (WebCore::Element::childrenAffectedByDrag const): Deleted.
        (WebCore::Element::setChildrenAffectedByDrag): Deleted.
        * dom/Node.h:
        * dom/UserActionElementSet.h:
        (WebCore::UserActionElementSet::isBeingDragged):
        (WebCore::UserActionElementSet::setBeingDragged):

        Invalidate using PseudoClassChangeInvalidation that doesn't require any flags.

        * platform/DragImage.cpp:
        (WebCore::ScopedNodeDragEnabler::ScopedNodeDragEnabler):
        (WebCore::ScopedNodeDragEnabler::~ScopedNodeDragEnabler):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::updateDragState): Deleted.
        * rendering/RenderBlock.h:
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::updateDragState): Deleted.
        * rendering/RenderInline.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::updateDragState): Deleted.
        (WebCore::RenderObject::setIsDragging): Deleted.
        * rendering/RenderObject.h:
        (WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
        (WebCore::RenderObject::isDragging const): Deleted.
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::RenderStyle):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::NonInheritedFlags::operator== const):
        (WebCore::RenderStyle::affectedByDrag const): Deleted.
        (WebCore::RenderStyle::setAffectedByDrag): Deleted.
        * style/StyleRelations.cpp:
        (WebCore::Style::commitRelationsToRenderStyle):
        (WebCore::Style::commitRelations):
        * style/StyleRelations.h:

2020-03-13  Andres Gonzalez  <andresg_22@apple.com>

        [WebAccessibilityObjectWrapper renderWidgetChildren] does not need to run on main thread.
        https://bugs.webkit.org/show_bug.cgi?id=209053
        <rdar://problem/60349440>

        Reviewed by Chris Fleizach.

        Since we are caching the platform widget in IsolatedMode (NSView),
        there is no need to dispatch renderWidgetChildren to the main thread.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper renderWidgetChildren]):

2020-03-13  Ryosuke Niwa  <rniwa@webkit.org>

        Crash in TextIterator::node via TextManipulationController::replace
        https://bugs.webkit.org/show_bug.cgi?id=209048

        Reviewed by Wenson Hsieh.

        The crash was caused by item.start being null in TextManipulationController::replace for a paragraph
        consisting of just an image because TextManipulationController::observeParagraphs never may never set
        startOfCurrentParagraph in such a case (content.isTextContent can be false for an image!).

        Fixed the bug by setting startOfCurrentParagraph to a position before the current content's node
        when inserting a token for a RenderReplaced if it's null.

        Test: TextManipulation.CompleteTextManipulationShouldReplaceContentsAroundParagraphWithJustImage

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::observeParagraphs):

2020-03-13  Michael Catanzaro  <mcatanzaro@gnome.org>

        -Wredundant-move in CSSPropertyParserHelpers.cpp
        https://bugs.webkit.org/show_bug.cgi?id=209019

        Reviewed by Youenn Fablet.

        Silence compiler warning by removing improper WTFMove().

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):

2020-03-13  Youenn Fablet  <youenn@apple.com>

        Apply rotation at source level if WebRTC sink ask so
        https://bugs.webkit.org/show_bug.cgi?id=205645

        Reviewed by Eric Carlson.

        Add a virtual method to RealtimeMediaSource to pass the information that the sink prefers the frames to be rotated before sending them.
r       By default, the method does nothing and RealtimeOutgoingVideoSource will continue to do the rotation itself.
        Update ImageRotationSessionVT to be more easily usable by users having MediaSample instead of CVPixelBuffer.
        Update RealtimeOutgoingVideoSource to use that routine: whenever applying rotation is needed,
        it will ask its track source to apply rotation. If the track source cannot do it, it will do it on its own.

        Test: webrtc/video-rotation-no-cvo.html

        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/cv/ImageRotationSessionVT.h:
        (WebCore::operator==):
        (WebCore::operator!=):
        * platform/graphics/cv/ImageRotationSessionVT.mm:
        (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
        (WebCore::ImageRotationSessionVT::initialize):
        (WebCore::ImageRotationSessionVT::rotate):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
        (WebCore::RealtimeOutgoingVideoSource::setSource):
        (WebCore::RealtimeOutgoingVideoSource::applyRotation):
        (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
        * platform/mediastream/RealtimeOutgoingVideoSource.h:

2020-03-13  youenn fablet  <youenn@apple.com>

        Remove use of PlatformMediaSession types in AudioSession
        https://bugs.webkit.org/show_bug.cgi?id=208995

        Reviewed by Eric Carlson.

        Remove type for beginInterruption since AudioSession always trigger system interruptions.
        Have a dedicated type for endInterruption.
        No change of behavior.

        * platform/audio/AudioSession.cpp:
        (WebCore::AudioSession::beginInterruption):
        (WebCore::AudioSession::endInterruption):
        * platform/audio/AudioSession.h:
        * platform/audio/ios/AudioSessionIOS.mm:
        (-[WebInterruptionObserverHelper interruption:]):
        (WebCore::AudioSession::beginInterruption):
        (WebCore::AudioSession::endInterruption):
        * platform/audio/ios/MediaSessionManagerIOS.h:

2020-03-13  Antti Koivisto  <antti@apple.com>

        Remove unused affectedBy style flags
        https://bugs.webkit.org/show_bug.cgi?id=209009

        Reviewed by Antoine Quint.

        These flags are unused after r258321. Remove the flags and the code that generates them.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addStyleRelationFunction):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasFocusWithin):
        * dom/Element.cpp:
        (WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
        (WebCore::Element::resetStyleRelations):
        * dom/Element.h:
        (WebCore::Element::styleAffectedByEmpty const):
        (WebCore::Element::descendantsAffectedByPreviousSibling const):
        (WebCore::Element::setStyleAffectedByEmpty):
        (WebCore::Element::setDescendantsAffectedByPreviousSibling):
        (WebCore::Element::styleAffectedByActive const): Deleted.
        (WebCore::Element::styleAffectedByFocusWithin const): Deleted.
        (WebCore::Element::childrenAffectedByHover const): Deleted.
        (WebCore::Element::setStyleAffectedByFocusWithin): Deleted.
        (WebCore::Element::setChildrenAffectedByHover): Deleted.
        (WebCore::Element::setStyleAffectedByActive): Deleted.
        * dom/Node.h:
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::RenderStyle):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::affectedByDrag const):
        (WebCore::RenderStyle::NonInheritedFlags::operator== const):
        (WebCore::RenderStyle::affectedByHover const): Deleted.
        (WebCore::RenderStyle::affectedByActive const): Deleted.
        (WebCore::RenderStyle::setAffectedByHover): Deleted.
        (WebCore::RenderStyle::setAffectedByActive): Deleted.
        * style/StyleRelations.cpp:
        (WebCore::Style::commitRelationsToRenderStyle):
        (WebCore::Style::commitRelations):
        * style/StyleRelations.h:
        * style/StyleSharingResolver.cpp:
        (WebCore::Style::SharingResolver::canShareStyleWithElement const):

        Compare the hasFocusWithin bit instead.

2020-03-12  Yusuke Suzuki  <ysuzuki@apple.com>

        Report crashed cell in jsCast in debug builds
        https://bugs.webkit.org/show_bug.cgi?id=209041
        <rdar://problem/59705631>

        Reviewed by Mark Lam.

        We should take JSLock when touching JSC::VM.

        * page/MemoryRelease.cpp:
        (WebCore::logMemoryStatisticsAtTimeOfDeath):
        * page/PerformanceLogging.cpp:
        (WebCore::PerformanceLogging::memoryUsageStatistics):

2020-03-12  Cathie Chen  <cathiechen@igalia.com>

        REGRESSION(r255957): Element with scroll-behavior:smooth isn't draggable after r255957
        https://bugs.webkit.org/show_bug.cgi?id=208566

        Reviewed by Simon Fraser and Frédéric Wang.

        To perform smooth scroll, RenderLayer::scrollRectToVisible checks the value of scroll-behavior.
        It starts an animated scrolling if scroll-behavior is smooth.
        On the other hand, the drag action would start an autoscroll if the element is scrollable.
        The autoscroll uses m_autoscrollTimer which is a repeating timer, when the timer fired it calls
        scrollRectToVisible with different positions.
        So if performing autoscroll on scroll-bahavior: smooth element, there are two nested animations.
        When timer fired, scrollRectToVisible is called, because of scroll-behavior:smooth, it starts
        animated scrolling not instant scrolling. Then there's the next timer fired, the previous
        animated scrolling would be canceled. Eventually, the element becomes un-draggable.
        To fix this, while performing autoscroll, scrollRectToVisible shouldn't trigger animated scrolling
        no matter what the value of scroll-behavior is.

        Test: fast/events/drag-smooth-scroll-element.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):
        (WebCore::RenderLayer::autoscroll):
        * rendering/RenderLayer.h:

2020-03-12  Zalan Bujtas  <zalan@apple.com>

        RenderTreeNeedsLayoutChecker asserts with imported/w3c/web-platform-tests/css/css-position/position-absolute-crash-chrome-005.html
        https://bugs.webkit.org/show_bug.cgi?id=209022
        <rdar://problem/60390647>

        Reviewed by Simon Fraser.

        Fix the case when
        1. the block level box is no longer the containing block for its out-of-flow descendants and
        2. the new containing block does not get marked dirty because there's a re-layout boundary (overflow: hidden)
        between the old and the new containing block.

        Test: fast/block/containing-block-for-out-of-flow-becomes-static.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::removePositionedObjectsIfNeeded):
        (WebCore::RenderBlock::removePositionedObjects):

2020-03-12  Ryosuke Niwa  <rniwa@webkit.org>

        Crash in TextManipulationController::replace
        https://bugs.webkit.org/show_bug.cgi?id=209021

        Reviewed by Wenson Hsieh.

        This patch addresses two issues that can lead to a crash in TextManipulationController::replace.

        The biggest issue here is that commonAncestor can be a descendent of insertionPoint's containerNode.
        Addressed this issue by computing the first node to remove in the same traveral where commonAncestor
        is computed by way of remembering the very first content node (firstContentNode). This also lets us
        eliminate the secondary, redundant traversal to discover all the nodes to remove.

        In addition, the set of nodes to remove could sometimes contain commonAncestor and its ancestors.
        This patch addresses this issue by removing all inclusive ancestors of commonAncestor from nodesToRemove.

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::replace):

2020-03-12  Per Arne Vollan  <pvollan@apple.com>

        [macOS] _AXSApplicationAccessibilityEnabled should not be called
        https://bugs.webkit.org/show_bug.cgi?id=208953

        Reviewed by Brent Fulgham.

        The function _AXSApplicationAccessibilityEnabled and the notification kAXSApplicationAccessibilityEnabledNotification
        exist on macOS, but they do not have the same behavior as on iOS, and should not be used in the same way. Using this
        function and notification on macOS was introduced in <https://bugs.webkit.org/show_bug.cgi?id=208690>, and this patch
        partially reverts this behavior.

        API test: WebKit.IsRemoteUIAppForAccessibility

        * testing/Internals.cpp:
        (WebCore::Internals::isRemoteUIAppForAccessibility):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/Internals.mm:
        (WebCore::Internals::isRemoteUIAppForAccessibility):

2020-03-12  Andres Gonzalez  <andresg_22@apple.com>

        Cache the ScrollView platformWidget to avoid [WebAccessibilityObjectWrapper scrollViewParent] hitting the main thread too often.
        https://bugs.webkit.org/show_bug.cgi?id=209010

        Reviewed by Chris Fleizach.

        - [WebAccessibilityObjectWrapper scrollViewParent] is called very often
        and blocks the AXThread to retrieve a value from the main thread. This
        change caches the PlatformWidget for the corresponding ScrollView (an
        NSView) to avoid hitting the main thread that often.
        - In Addition, made the ScrollView member of AccessibilityScrollView a
        WeakPtr instead of a naked pointer.
        - Removed an unused lock from AXIsolatedObject and the const qualifier
        from the return value of stringAttributeValue which is unnecessary.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityScrollView.cpp:
        (WebCore::AccessibilityScrollView::AccessibilityScrollView):
        (WebCore::AccessibilityScrollView::platformWidget const):
        (WebCore::AccessibilityScrollView::widgetForAttachmentView const):
        (WebCore::AccessibilityScrollView::webAreaObject const):
        (WebCore::AccessibilityScrollView::documentFrameView const):
        (WebCore::AccessibilityScrollView::parentObject const):
        (WebCore::AccessibilityScrollView::parentObjectIfExists const):
        (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable const):
        * accessibility/AccessibilityScrollView.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::stringAttributeValue const):
        (WebCore::AXIsolatedObject::platformWidget const):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper scrollViewParent]):

2020-03-12  Andres Gonzalez  <andresg_22@apple.com>

        Attributes SelectionTextMarkerRange and Start/EndTextMarker need to run on the main thread.
        https://bugs.webkit.org/show_bug.cgi?id=208996

        Reviewed by Chris Fleizach.

        Covered by existing tests.

        Dispatch to the main thread the computation of these accessibility attributes.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2020-03-12  Andres Gonzalez  <andresg_22@apple.com>

        AX: Isolated tree: Crash in URL retrieval
        https://bugs.webkit.org/show_bug.cgi?id=208942
        <rdar://problem/60337588>

        Reviewed by Chris Fleizach.

        Test: accessibility/url-test.html

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::url const): Check for m_renderer
        before dereferencing and re-use the associated Node. Also fixes the last
        type check and downcast that were using different types.

2020-03-12  Alex Christensen  <achristensen@webkit.org>

        WKWebView.hasOnlySecureContent should be correct after back/forward navigations
        https://bugs.webkit.org/show_bug.cgi?id=207609
        <rdar://problem/59371252>

        Reviewed by Ryosuke Niwa.

        The web process informs the UI process of insecure content loads when http resources are requested from https pages.
        The web process also remembers that this happened.
        Rather than ask the UI process during a navigation, which can sometimes get information about the wrong navigation,
        just use the remembered values.  We will need to do something for legacy TLS loads too, but I left that code as it is
        for this patch.  Another is coming soon.

        Covered by API tests.

        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::setUsedLegacyTLS):
        (WebCore::CachedFrame::hasInsecureContent const):
        (WebCore::CachedFrame::setHasInsecureContent): Deleted.
        * history/CachedFrame.h:
        (WebCore::CachedFrame::hasInsecureContent const): Deleted.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::commitProvisionalLoad):

2020-03-12  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r257938): Some pointerevents/ios/touch-action-region tests started to fail
        https://bugs.webkit.org/show_bug.cgi?id=209005
        <rdar://problem/60337239>

        Reviewed by Tim Horton, Wenson Hsieh.

        We need to continue to paint event regions if there are touch-action elements.

        Tested by existing tests.

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

2020-03-12  youenn fablet  <youenn@apple.com>

        FrameLoader should own its FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=208918

        Reviewed by Geoffrey Garen.

        Update Frame/FrameLoader constructors to get a UniqueRef<FrameLoaderClient>.
        This makes the lifetime management much clearer and allows some WebKit1/WebKit2 clean-up.

        Covered by existing tests.

        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::~FrameLoader):
        (WebCore::FrameLoader::init):
        (WebCore::FrameLoader::initForSynthesizedDocument):
        (WebCore::FrameLoader::didExplicitOpen):
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::finishedParsing):
        (WebCore::FrameLoader::loadArchive):
        (WebCore::FrameLoader::setOpener):
        (WebCore::FrameLoader::provisionalLoadStarted):
        (WebCore::FrameLoader::loadInSameDocument):
        (WebCore::FrameLoader::prepareForLoadStart):
        (WebCore::FrameLoader::setupForReplace):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::willLoadMediaElementURL):
        (WebCore::FrameLoader::reloadWithOverrideEncoding):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::setDocumentLoader):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::clientRedirectCancelledOrFinished):
        (WebCore::FrameLoader::clientRedirected):
        (WebCore::FrameLoader::closeOldDataSources):
        (WebCore::FrameLoader::willChangeTitle):
        (WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameLoader::didReachLayoutMilestone):
        (WebCore::FrameLoader::didReachVisuallyNonEmptyState):
        (WebCore::FrameLoader::frameLoadCompleted):
        (WebCore::FrameLoader::checkLoadComplete):
        (WebCore::FrameLoader::userAgent const):
        (WebCore::FrameLoader::dispatchOnloadEvents):
        (WebCore::FrameLoader::detachViewsAndDocumentLoader):
        (WebCore::FrameLoader::receivedMainResourceError):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
        (WebCore::FrameLoader::loadedResourceFromMemoryCache):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        (WebCore::FrameLoader::cancelledError const):
        (WebCore::FrameLoader::blockedByContentBlockerError const):
        (WebCore::FrameLoader::blockedError const):
        (WebCore::FrameLoader::blockedByContentFilterError const):
        (WebCore::FrameLoader::connectionProperties):
        (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
        (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
        (WebCore::FrameLoader::didChangeTitle):
        (WebCore::FrameLoader::dispatchDidCommitLoad):
        (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
        (WebCore::FrameLoader::completePageTransitionIfNeeded):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        (WebCore::Frame::create):
        * page/Frame.h:
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/PageConfiguration.cpp:
        (WebCore::PageConfiguration::PageConfiguration):
        * page/PageConfiguration.h:
        * workers/service/context/SWContextManager.cpp:
        * workers/service/context/SWContextManager.h:

2020-03-11  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r254054): finance.google.com watch list renders initially then disappears for 5+ seconds before reappearing
        https://bugs.webkit.org/show_bug.cgi?id=208972
        <rdar://problem/59727171>

        Reviewed by Zalan Bujtas.
        
        After r254054 we could get a style change in which opacity was unchanged, but
        hasAutoUsedZIndex() in the style changed (because Adjuster::adjustAnimatedStyle() can set it).

        In this case we failed to trigger layout, which means that we failed to recompute visual
        overflow when a layer changed from being self-painting to non-self-painting (which affects
        visual overflow computation and has hasAutoUsedZIndex() as input). We'd thus fail to paint some
        renderers because their visual overflow didn't intersect the paint dirty rect.

        Fix by having RenderStyle::changeRequiresLayout() return true if hasAutoUsedZIndex() differs
        between the styles. This has minimal performance impact; rareNonInheritedDataChangeRequiresLayout()
        already returns true if opacity, filters and other stacking-context-affecting properties change.

        Test: fast/overflow/animation-recompute-overflow.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::addOverflowFromChild):
        (WebCore::RenderBox::addLayoutOverflow):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeRequiresLayout const):

2020-03-12  Daniel Bates  <dabates@apple.com>

        FocusController::setFocusedElement() should tell client of refocused element
        https://bugs.webkit.org/show_bug.cgi?id=208880

        Reviewed by Wenson Hsieh.

        If the specified new focus element is non-nullptr and is already focused then tell the client
        that the element was re-focused so that it may update its input state, if needed. On iOS, this
        lets the UI process evaluate again whether to start an input session (i.e. bring up the keyboard),
        which may have been disallowed when the element was originally focused (say, it was programmatically
        focused and there was no hardware keyboard attached).

        * page/FocusController.cpp:
        (WebCore::FocusController::setFocusedElement):

2020-03-12  Rob Buis  <rbuis@igalia.com>

        Implement wildcard behavior for Cross-Origin-Expose-Headers
        https://bugs.webkit.org/show_bug.cgi?id=208800

        Reviewed by Youenn Fablet.

        Implement wildcard behavior for Cross-Origin-Expose-Headers [1] while also
        checking for credentials mode.

        Test: imported/w3c/web-platform-tests/xhr/cors-expose-star.sub.any.html

        [1] https://fetch.spec.whatwg.org/#ref-for-concept-response-cors-exposed-header-name-list%E2%91%A2

        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::create):
        (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
        (WebCore::FetchResponse::BodyLoader::start):
        * Modules/fetch/FetchResponse.h:
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::didReceiveResponse):
        (WebCore::DocumentThreadableLoader::didFinishLoading):
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::filter):
        (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
        * platform/network/ResourceResponseBase.h:

2020-03-12  youenn fablet  <youenn@apple.com>

        Remove no longer used code in LibWebRTCMediaEndpoint to handle remote streams
        https://bugs.webkit.org/show_bug.cgi?id=208919

        Reviewed by Eric Carlson.

        These stream APIs are legacy now and not useful anymore.
        Stop implementing the corresponding callbacks and remove related code.
        Coverd by existing tests.

        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): Deleted.
        (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack): Deleted.
        (WebCore::LibWebRTCMediaEndpoint::OnAddStream): Deleted.
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:

2020-03-12  Pavel Feldman  <pavel.feldman@gmail.com>

        [Curl] sort out MS vs Seconds confusion in Cookies
        https://bugs.webkit.org/show_bug.cgi?id=208964

        Reviewed by Don Olmstead.

        Making sure curl parser is storing expires using millis in the code. Using consistent time
        functions around the changed code.
 
        * platform/network/curl/CookieJarDB.cpp:
        (WebCore::CookieJarDB::searchCookies):
        (WebCore::CookieJarDB::getAllCookies):
        (WebCore::CookieJarDB::setCookie):
        * platform/network/curl/CookieUtil.cpp:
        (WebCore::CookieUtil::parseExpiresMS):
        (WebCore::CookieUtil::parseCookieAttributes):

2020-03-12  youenn fablet  <youenn@apple.com>

        Move AudioSession interruption listener code to AudioSession
        https://bugs.webkit.org/show_bug.cgi?id=208714

        Reviewed by Jer Noble.

        Move AudioSession interruption detection code from MediaSessionManagerIOS helper to AudioSessionIOS.
        Add interruption observer capabilities to AudioSession and make MediaSessionManagerIOS an observer of it.
        Manually tested.

        * platform/audio/AudioSession.cpp:
        (WebCore::AudioSession::addInterruptionObserver):
        (WebCore::AudioSession::removeInterruptionObserver):
        (WebCore::AudioSession::beginInterruption):
        (WebCore::AudioSession::endInterruption):
        * platform/audio/AudioSession.h:
        * platform/audio/ios/AudioSessionIOS.mm:
        (-[WebInterruptionObserverHelper initWithCallback:]):
        (-[WebInterruptionObserverHelper dealloc]):
        (-[WebInterruptionObserverHelper clearCallback]):
        (-[WebInterruptionObserverHelper interruption:]):
        (WebCore::AudioSessionPrivate::AudioSessionPrivate):
        (WebCore::AudioSessionPrivate::~AudioSessionPrivate):
        (WebCore::AudioSession::addInterruptionObserver):
        (WebCore::AudioSession::removeInterruptionObserver):
        (WebCore::AudioSession::beginInterruption):
        (WebCore::AudioSession::endInterruption):
        * platform/audio/ios/MediaSessionHelperIOS.h:
        * platform/audio/ios/MediaSessionHelperIOS.mm:
        (-[WebMediaSessionHelper initWithCallback:]):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):

2020-03-12  Antti Koivisto  <antti@apple.com>

        Accurate style invalidation for user action pseudo classes
        https://bugs.webkit.org/show_bug.cgi?id=208859
        <rdar://problem/55196888>

        Reviewed by Zalan Bujtas.

        Currently :hover, :focus, :focus-within and :active lack fine grained invalidation using
        rule sets like we do with class and attribute selectors.

        This can be added easily following the same pattern.

        Tests: fast/selectors/style-invalidation-hover-change-descendants.html
               fast/selectors/style-invalidation-hover-change-siblings.html
               fast/selectors/style-invalidation-focus-change-descendants.html
               fast/selectors/style-invalidation-focus-change-siblings.html
               fast/selectors/style-invalidation-focus-within-change-descendants.html
               fast/selectors/style-invalidation-focus-within-change-siblings.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Element.cpp:
        (WebCore::Element::setActive):
        (WebCore::Element::setFocus):
        (WebCore::Element::setHasFocusWithin):
        (WebCore::Element::setHovered):

        Use PseudoClassChangeInvalidation.

        * dom/Element.h:
        (WebCore::Element::setHasFocusWithin): Deleted.
        * page/FrameViewLayoutContext.cpp:
        (WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker):
        * style/PseudoClassChangeInvalidation.cpp: Added.
        (WebCore::Style::PseudoClassChangeInvalidation::computeInvalidation):

        Compute invalidation rule set for a pseudo class change.

        (WebCore::Style::PseudoClassChangeInvalidation::invalidateStyleWithRuleSets):
        * style/PseudoClassChangeInvalidation.h: Added.
        (WebCore::Style::PseudoClassChangeInvalidation::PseudoClassChangeInvalidation):
        (WebCore::Style::PseudoClassChangeInvalidation::~PseudoClassChangeInvalidation):
        * style/RuleFeature.cpp:
        (WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
        (WebCore::Style::RuleFeatureSet::collectFeatures):

        Collect pseudo class features, similar to classes/attributes.

        (WebCore::Style::RuleFeatureSet::add):
        (WebCore::Style::RuleFeatureSet::clear):
        (WebCore::Style::RuleFeatureSet::shrinkToFit):
        * style/RuleFeature.h:
        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::collectFeatures const):
        (WebCore::Style::ensureInvalidationRuleSets):

        Make more generic to allow enum key.

        (WebCore::Style::ScopeRuleSets::pseudoClassInvalidationRuleSets const):

        Create pseudo class invalidation ruleset.

        * style/StyleScopeRuleSets.h:

2020-03-12  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [GPU Process] GraphicsContextStateChange must accumulate fill and stroke fields as single properties
        https://bugs.webkit.org/show_bug.cgi?id=208971

        Reviewed by Simon Fraser.

        Setting the fill or the stroke should set one field: color, gradient or
        pattern. When detecting a change any of them, accumulate() should copy
        all of the fields from the source state to the destination state.

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::accumulate):
        * platform/graphics/GraphicsContext.h:

2020-03-11  Antoine Quint  <graouts@webkit.org>

        AnimationTimeline should not have multiple HashMaps with raw Element* keys
        https://bugs.webkit.org/show_bug.cgi?id=208079
        <rdar://problem/59687906>

        Reviewed by Ryosuke Niwa.

        We introduce a new ElementAnimationRareData class that holds the KeyframeEffectStack previously owned by ElementRareData as well as a few maps and lists
        owned by AnimationTimeline which would use raw Element pointers as keys. Specifically, this is what changed:

        - AnimationTimeline::m_elementToRunningCSSTransitionByCSSPropertyID → ElementAnimationRareData::runningTransitionByProperty()
        - AnimationTimeline::m_elementToCompletedCSSTransitionByCSSPropertyID → ElementAnimationRareData::completedTransitionByProperty()
        - AnimationTimeline::m_elementToCSSAnimationsCreatedByMarkupMap → ElementAnimationRareData::animationsCreatedByMarkup()
        - AnimationTimeline::m_elementToCSSTransitionsMap → ElementAnimationRareData::transitions()
        - AnimationTimeline::m_elementToCSSAnimationsMap → ElementAnimationRareData::cssAnimations()
        - AnimationTimeline::m_elementToAnimationsMap → ElementAnimationRareData::webAnimations()

        For convenience, these new members are exposed via Element directly.

        No change in behavior, so no new tests.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/AnimationPlaybackEventInit.h:
        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationWasAddedToElement):
        (WebCore::removeCSSTransitionFromMap):
        (WebCore::AnimationTimeline::animationWasRemovedFromElement):
        (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
        (WebCore::AnimationTimeline::animationsForElement const):
        (WebCore::AnimationTimeline::removeCSSAnimationCreatedByMarkup):
        (WebCore::AnimationTimeline::willDestroyRendererForElement):
        (WebCore::AnimationTimeline::elementWasRemoved):
        (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
        (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
        (WebCore::propertyInStyleMatchesValueForTransitionInMap):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
        (WebCore::removeAnimationFromMapForElement): Deleted.
        (WebCore::AnimationTimeline::ensureRunningTransitionsByProperty): Deleted.
        * animation/AnimationTimeline.h:
        * animation/ComputedEffectTiming.h:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::transitionDidComplete):
        * animation/ElementAnimationRareData.cpp: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
        (WebCore::ElementAnimationRareData::ElementAnimationRareData):
        (WebCore::ElementAnimationRareData::~ElementAnimationRareData):
        (WebCore::ElementAnimationRareData::ensureKeyframeEffectStack):
        * animation/ElementAnimationRareData.h: Added.
        (WebCore::ElementAnimationRareData::keyframeEffectStack):
        (WebCore::ElementAnimationRareData::webAnimations):
        (WebCore::ElementAnimationRareData::cssAnimations):
        (WebCore::ElementAnimationRareData::transitions):
        (WebCore::ElementAnimationRareData::animationsCreatedByMarkup):
        (WebCore::ElementAnimationRareData::setAnimationsCreatedByMarkup):
        (WebCore::ElementAnimationRareData::completedTransitionByProperty):
        (WebCore::ElementAnimationRareData::runningTransitionsByProperty):
        * animation/KeyframeEffect.h:
        * animation/OptionalEffectTiming.h:
        * animation/WebAnimation.h:
        * animation/WebAnimationTypes.h: Copied from Source/WebCore/animation/WebAnimationUtilities.h.
        (WebCore::WebAnimationsMarkableDoubleTraits::isEmptyValue):
        (WebCore::WebAnimationsMarkableDoubleTraits::emptyValue):
        * animation/WebAnimationUtilities.h:
        (WebCore::WebAnimationsMarkableDoubleTraits::isEmptyValue): Deleted.
        (WebCore::WebAnimationsMarkableDoubleTraits::emptyValue): Deleted.
        * dom/Element.cpp:
        (WebCore::Element::animationRareData const):
        (WebCore::Element::ensureAnimationRareData):
        (WebCore::Element::keyframeEffectStack const):
        (WebCore::Element::ensureKeyframeEffectStack):
        (WebCore::Element::hasKeyframeEffects const):
        (WebCore::Element::webAnimations):
        (WebCore::Element::cssAnimations):
        (WebCore::Element::transitions):
        (WebCore::Element::animationsCreatedByMarkup):
        (WebCore::Element::setAnimationsCreatedByMarkup):
        (WebCore::Element::completedTransitionByProperty):
        (WebCore::Element::runningTransitionsByProperty):
        * dom/Element.h:
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::elementAnimationRareData):
        (WebCore::ElementRareData::useTypes const):
        (WebCore::ElementRareData::ensureAnimationRareData):
        (WebCore::ElementRareData::keyframeEffectStack): Deleted.
        (WebCore::ElementRareData::setKeyframeEffectStack): Deleted.
        * dom/Node.cpp:
        (WebCore::stringForRareDataUseType):
        * dom/NodeRareData.h:

2020-03-11  Jer Noble  <jer.noble@apple.com>

        Adopt AVSampleBufferVideoOutput
        https://bugs.webkit.org/show_bug.cgi?id=208951

        Reviewed by Eric Carlson.

        Adopt AVSampleBufferVideoOutput, used for extracting decoded samples from an AVSampleBufferDisplayLayer.

        Rather than use a separate decompression session when we need to, e.g., paint samples into WebGL, we will
        add a AVSBVO to the AVSBDL and use it to extract CVPixelBuffers when asked.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isVideoOutputAvailable const):

2020-03-11  Andres Gonzalez  <andresg_22@apple.com>

        Removed unused textElements member from AccessibilityText structure.
        https://bugs.webkit.org/show_bug.cgi?id=208967

        Reviewed by Chris Fleizach.

        The textElements member of AccessibilityText is not used by any client
        and its computation is causing crashes in IsolatedTree mode. So this
        change removes it.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::titleElementText const):
        (WebCore::AccessibilityNodeObject::ariaLabeledByText const):
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityText::AccessibilityText):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::accessibilityText const):
        * accessibility/isolatedtree/AXIsolatedObject.h:

2020-03-11  Don Olmstead  <don.olmstead@sony.com>

        Non-unified build fixes early March 2020 edition Take 2
        https://bugs.webkit.org/show_bug.cgi?id=208968

        Unreviewed build fix.

        * editing/TextIterator.cpp:
        * editing/TextIterator.h:
        * editing/TextManipulationController.cpp:
        * editing/VisibleSelection.cpp:
        * editing/VisibleUnits.cpp:

2020-03-11  Wenson Hsieh  <wenson_hsieh@apple.com>

        Large single select elements are incorrectly sized
        https://bugs.webkit.org/show_bug.cgi?id=208966

        Reviewed by Tim Horton.

        Adjusts several size and margin values for menu lists (i.e. the default appearance of non-multiple select
        elements) to reflect recent changes in macOS. Additionally, adds a workaround for <rdar://problem/60350699>,
        which causes text inside many form controls (including select buttons) to be incorrectly sized.

        * platform/mac/ThemeMac.h:
        * platform/mac/ThemeMac.mm:
        (WebCore::ThemeMac::systemFontSizeFor):
        (WebCore::ThemeMac::controlFont const):
        * rendering/RenderThemeMac.mm:

        Replace calls to +[NSFont systemFontSizeForControlSize:] with `ThemeMac::systemFontSizeFor(NSControlSize size)`
        in order to work around <rdar://problem/60350699>.

        (WebCore::RenderThemeMac::updateCachedSystemFontDescription const):
        (WebCore::RenderThemeMac::setFontFromControlSize const):
        (WebCore::RenderThemeMac::controlSizeForSystemFont const):
        (WebCore::RenderThemeMac::popupButtonMargins const):
        (WebCore::menuListButtonSizes):

2020-03-11  Canhai Chen  <canhai_chen@apple.com>

        AX: accessibilityReplaceRange:withText: doesn't post an AXValueChanged notification like when typing with kb
        https://bugs.webkit.org/show_bug.cgi?id=208332
        <rdar://problem/58489685>

        Reviewed by Chris Fleizach.

        When accessibilityReplaceRange:withText: is called to insert or replace text, there should be a
        AXValueChanged notification posted with the correct user info to notify the AX client that the text value
        has been changed with detailed info about the change.

        Post a notification in Editor::replaceSelectionWithFragment for EditAction::Insert edit type 
        with replaced text and selection.

        Add a new test for text replacement value change notification in editable div, text input, and textarea,
        including direct text insertion and replace-and-insert.

        Test: accessibility/mac/replace-text-with-range-value-change-notification.html

        * editing/Editor.cpp:
        (WebCore::Editor::replaceSelectionWithFragment):
        * editing/ReplaceSelectionCommand.h:
        (WebCore::ReplaceSelectionCommand::documentFragmentPlainText const):

2020-03-11  Andres Gonzalez  <andresg_22@apple.com>

        AX: Isolated tree: enabling secondary thread for the wrong clients
        https://bugs.webkit.org/show_bug.cgi?id=208950

        Reviewed by Chris Fleizach.

        Removed incorrect call to _AXUIElementUseSecondaryAXThread and wrap it
        in initializeSecondaryAXThread with the appropriate checks.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::isolatedTreeFocusedObject):
        (WebCore::AXObjectCache::initializeSecondaryAXThread):
        (WebCore::AXObjectCache::isolatedTreeRootObject):
        * accessibility/AXObjectCache.h:

2020-03-11  Jer Noble  <jer.noble@apple.com>

        [EME] Issue an "encrypted" event when a new encrypted initialization segment is encountered
        https://bugs.webkit.org/show_bug.cgi?id=208923

        Reviewed by Eric Carlson.

        When AVStreamDataParser encounters an initialization segment indicating encrypted content, it
        will issue a -streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID: message
        to its delegate. If the parser is already associated with an AVContentKeySession, it will instead
        allow the session to handle the initialization segment and the delagete method will not be called.

        When the latter situation occurs, we can detect that the -didProvideRequest callback did not
        occur due to the client calling MediaKeySession.generateRequest() and therefore must have been
        due to parsing an encrypted segment. In response, store the request in a list of "unexpected"
        requests to be checked the next time a MediaKeySession tries to generateRequest(). Then, we will
        pass the initalizationData and type to HTMLMediaElement through a new client interface, where it
        will use that initializationData to issue an "encrypted" event. If the client passes that same
        initializationData back into MediaKeySession, the "unexpected" request can be found, and re-used.

        Drive-by fixes: Added a ton of debug logging messages to the CDMPrivate classes.

        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::CDM::CDM):
        * Modules/encryptedmedia/CDM.h:
        * Modules/encryptedmedia/CDMClient.h:
        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::create):
        (WebCore::MediaKeySession::MediaKeySession):
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
        (WebCore::MediaKeySystemAccess::createMediaKeys):
        * Modules/encryptedmedia/MediaKeySystemAccess.h:
        * Modules/encryptedmedia/MediaKeySystemAccess.idl:
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::MediaKeys):
        (WebCore::MediaKeys::createSession):
        (WebCore::MediaKeys::setServerCertificate):
        (WebCore::MediaKeys::attachCDMClient):
        (WebCore::MediaKeys::detachCDMClient):
        (WebCore::MediaKeys::attemptToResumePlaybackOnClients):
        (WebCore::MediaKeys::unrequestedInitializationDataReceived):
        (WebCore::MediaKeys::nextChildIdentifier const):
        * Modules/encryptedmedia/MediaKeys.h:
        (WebCore::MediaKeys::create): Deleted.
        (WebCore::MediaKeys::cdmInstance): Deleted.
        (WebCore::MediaKeys::cdmInstance const): Deleted.
        * Modules/encryptedmedia/MediaKeys.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::cdmClientUnrequestedInitializationDataReceived):
        * html/HTMLMediaElement.h:
        * platform/encryptedmedia/CDMFactory.h:
        * platform/encryptedmedia/CDMInstance.h:
        (WebCore::CDMInstance::setClient):
        (WebCore::CDMInstance::clearClient):
        (WebCore::CDMInstance::setLogger):
        * platform/encryptedmedia/CDMInstanceSession.h:
        (WebCore::CDMInstanceSession::setLogger):
        (WebCore::CDMInstanceSession::setClient):
        * platform/encryptedmedia/CDMPrivate.h:
        (WebCore::CDMPrivate::setLogger):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::logChannel):
        (WebCore::CDMPrivateFairPlayStreaming::setLogger):
        (WebCore::CDMPrivateFairPlayStreaming::supportsConfiguration const):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::logChannel):
        (WebCore::initTypeForRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setLogger):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::takeUnexpectedKeyRequestForInitializationData):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setServerCertificate):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setClient):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::clearClient):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequests):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRenewingRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvidePersistableRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didFailToProvideRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::requestDidSucceed):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::shouldRetryRequestForReason):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::groupSessionIdentifierChanged):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForRequest const):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::setLogger):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::setClient):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::hasRequest const):

2020-03-11  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Formalize the Keychain schema
        https://bugs.webkit.org/show_bug.cgi?id=183533
        <rdar://problem/43347926>

        Reviewed by Brent Fulgham.

        Covered by new test contents within existing files.

        * Modules/webauthn/AuthenticatorAssertionResponse.cpp:
        (WebCore::AuthenticatorAssertionResponse::create):
        (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
        * Modules/webauthn/AuthenticatorAssertionResponse.h:
        Modifies the constructors to accept userEntity.name.

        * Modules/webauthn/cbor/CBORValue.h:
        Adds a FIXME.

        * testing/MockWebAuthenticationConfiguration.h:
        (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl:
        Modifies the test infra to use Credential ID as the unique identifier for a credential instead of
        the original combination of RP ID and user handle.

2020-03-11  Daniel Bates  <dabates@apple.com>

        REGRESSION (r257502): HitTestLocation::HitTestLocation(const FloatPoint&, const FloatQuad&) should set m_isRectBased to true
        https://bugs.webkit.org/show_bug.cgi?id=208947

        Reviewed by Wenson Hsieh.

        Partial revert of r257502. I accidentally removed initialization of m_isRectBased when refactoring
        the code in HitTestLocation::HitTestLocation(const FloatPoint&, const FloatQuad&). Revert this to
        be faithful to the code before my change.

        * rendering/HitTestLocation.cpp:

2020-03-11  Myles C. Maxfield  <mmaxfield@apple.com>

        icloud.com Notes text in titles and headings is distorted
        https://bugs.webkit.org/show_bug.cgi?id=208908
        <rdar://problem/58874371>

        Reviewed by Zalan Bujtas.

        icloud.com Notes determines if a font has finished loading by measuring it repeatedly.
        Depending on the state of the page, we may slice the text differently in different
        circumstances. These slices are all supposed to sum together equivalently, but
        floating point precision may cause the results to be slightly off.

        WidthIterator::applyFontTransforms() was summing a large list of numbers, and then
        subtracting the same large list of numbers. A more robust design would be to sum
        it twice, and then subtract the two sums.

        Test: fast/text/shaping-width-precision.html

        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::applyFontTransforms):

2020-03-11  Zalan Bujtas  <zalan@apple.com>

        SVG filter triggers unstable layout.
        https://bugs.webkit.org/show_bug.cgi?id=207444
        rdar://problem/59297004

        Reviewed by Simon Fraser.

        SVG filter code marks DOM nodes dirty and schedules style recalc outside of the SVG root
        while in layout. This could lead to unstable layout and cause battery drain.
        (See webkit.org/b/208903)

        * rendering/RenderLayer.cpp: Remove filterNeedsRepaint(). It's a dangerously misleading name and should
        not be part of RenderLayer.
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerFilters.cpp:
        (WebCore::RenderLayerFilters::notifyFinished):
        * rendering/svg/RenderSVGResourceContainer.cpp:
        (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
        (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):

2020-03-11  Antoine Quint  <graouts@webkit.org>

        [Mac wk2 Release] imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html flaky fail
        https://bugs.webkit.org/show_bug.cgi?id=206746
        <rdar://problem/58867580>

        Reviewed by Dean Jackson.

        Because we could end up in situation where localTime was very marginally smaller than endTime inside of WebAnimation::play(), we would end up
        with an unresolved hold time and we would return before calling WebAnimation::timingDidChange() and thus scheduling an animation update from
        the timeline because we'd assume it was paused. As a result, the animation would never end and the test would wait for a "finish" event which
        would never come.

        We now account for an epsilon value when comparing times to account for such situations.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::play):

2020-03-11  Chris Dumez  <cdumez@apple.com>

        Defer async scripts until DOMContentLoaded or first paint, whichever comes first
        https://bugs.webkit.org/show_bug.cgi?id=208896

        Reviewed by Darin Adler.

        Defer async scripts until DOMContentLoaded or first paint, whichever comes first. In
        Bug 207698, we deferred them until DOMContentLoaded, as a first-paint optimization.
        However, this seems overly aggressive on pages like wikipedia and it is sufficient
        to defer those scripts until first-paint to get the performance win.

        * dom/Document.cpp:
        (WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const):
        * page/Settings.yaml:

2020-03-11  Jack Lee  <shihchieh_lee@apple.com>

        Consolidate detachment of document timeline into Document::commonTeardown.
        https://bugs.webkit.org/show_bug.cgi?id=208786
        <rdar://problem/59936716>

        Reviewed by Ryosuke Niwa.

        Move detachment of DocumentTimeline to Document::commonTeardown(). 

        No new tests. Covered by existing document tests.

        * dom/Document.cpp:
        (WebCore::Document::removedLastRef):
        (WebCore::Document::commonTeardown):
        (WebCore::Document::prepareForDestruction):

2020-03-11  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, reverting r258263.
        https://bugs.webkit.org/show_bug.cgi?id=208922

        it is breaking internal builds (Requested by youenn on
        #webkit).

        Reverted changeset:

        "Move AudioSession interruption listener code to AudioSession"
        https://bugs.webkit.org/show_bug.cgi?id=208714
        https://trac.webkit.org/changeset/258263

2020-03-11  youenn fablet  <youenn@apple.com>

        Move AudioSession interruption listener code to AudioSession
        https://bugs.webkit.org/show_bug.cgi?id=208714

        Reviewed by Jer Noble.

        Move AudioSession interruption detection code from MediaSessionManagerIOS helper to AudioSessionIOS.
        Add interruption observer capabilities to AudioSession and make MediaSessionManagerIOS an observer of it.
        Manually tested.

        * platform/audio/AudioSession.cpp:
        (WebCore::AudioSession::addInterruptionObserver):
        (WebCore::AudioSession::removeInterruptionObserver):
        (WebCore::AudioSession::beginInterruption):
        (WebCore::AudioSession::endInterruption):
        * platform/audio/AudioSession.h:
        * platform/audio/ios/AudioSessionIOS.mm:
        (-[WebInterruptionObserverHelper initWithCallback:]):
        (-[WebInterruptionObserverHelper dealloc]):
        (-[WebInterruptionObserverHelper clearCallback]):
        (-[WebInterruptionObserverHelper interruption:]):
        (WebCore::AudioSessionPrivate::AudioSessionPrivate):
        (WebCore::AudioSessionPrivate::~AudioSessionPrivate):
        (WebCore::AudioSession::addInterruptionObserver):
        (WebCore::AudioSession::removeInterruptionObserver):
        (WebCore::AudioSession::beginInterruption):
        (WebCore::AudioSession::endInterruption):
        * platform/audio/ios/MediaSessionHelperIOS.h:
        * platform/audio/ios/MediaSessionHelperIOS.mm:
        (-[WebMediaSessionHelper initWithCallback:]):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):

2020-03-11  Jack Lee  <shihchieh_lee@apple.com>

        Crash in KeyframeEffect::getAnimatedStyle
        https://bugs.webkit.org/show_bug.cgi?id=208318
        <rdar://problem/59848234>

        Reviewed by Antoine Quint.

        Quit getAnimatedStyle if element is rendererless.

        Test: fast/animation/keyframe-rendererless-element-crash.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::getAnimatedStyle):

2020-03-11  Youenn Fablet  <youenn@apple.com>

        [iOS] Unskip fast/mediastream tests
        https://bugs.webkit.org/show_bug.cgi?id=208636

        Reviewed by Eric Carlson.

        Add label to the settings so that we correctly send this information back to WebProcess.
        Covered by existing tests.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::settings):
        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::settings):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::settings):

2020-03-10  Tomoki Imai  <Tomoki.Imai@sony.com>

        [OpenSSL] Implement WebCrypto APIs for AES-CTR and AES-KW
        https://bugs.webkit.org/show_bug.cgi?id=208186

        Reviewed by Fujii Hironori.

        Added WebCrypto implementations for the following algorithms with OpenSSL.
        - AES-CTR
        - AES-KW

        Enabled WebCrypto LayoutTests for AES-CTR and AES-KW.

        * crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:
        (WebCore::aesAlgorithm): Added. Helper function to select which AES-CTR algorithm to be used by checking key size.
        (WebCore::crypt): Added. Helper function shared by platformEncrypt/platformDecrypt.
        (WebCore::CryptoAlgorithmAES_CTR::platformEncrypt): Implemented.
        (WebCore::CryptoAlgorithmAES_CTR::platformDecrypt): Implemented.
        * crypto/openssl/CryptoAlgorithmAES_KWOpenSSL.cpp:
        (WebCore::aesAlgorithm): Added. Helper function to select which AES-KW algorithm to be used by checking key size.
        (WebCore::cryptWrapKey):  Added. Helper function for platformWrapKey.
        (WebCore::cryptUnwrapKey): Added. Helper function for platformUnwrapKey.
        (WebCore::CryptoAlgorithmAES_KW::platformWrapKey): Implemented.
        (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey): Implemented.
        * crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp:
        (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Registered CryptoAlgorithmAES_CTR and CryptoAlgorithmAES_KW.

2020-03-10  Don Olmstead  <don.olmstead@sony.com>

        [GPU Process] Work towards compiling out on non-Cocoa ports
        https://bugs.webkit.org/show_bug.cgi?id=208899

        Reviewed by Darin Adler.

        Add in additional headers required for GPU Process build.

        * Headers.cmake:

2020-03-08  Darin Adler  <darin@apple.com>

        Make TextIterator::range return a SimpleRange
        https://bugs.webkit.org/show_bug.cgi?id=208797

        Reviewed by Don Olmstead.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::traverseToOffsetInRange): Updated since
        TextIterator::range returns a SimpleRange. Also use TextIterator::node where
        appropriate instead of repeating the code for it here.
        (WebCore::AXObjectCache::lengthForRange): Use TextIterator::node.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::stringForRange const): Use TextIterator::node.
        (WebCore::AccessibilityObject::stringForVisiblePositionRange): Ditto.
        (WebCore::AccessibilityObject::lengthForVisiblePositionRange const): Ditto.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
        Use TextIterator::node and createLiveRange.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added include
        of SimpleRange and removed "using namespace HTMLNames".
        (AXAttributeStringSetStyle): Use HTMLNames namespace explicitly.
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        Use TextIterator::node.
        (-[WebAccessibilityObjectWrapper subrole]): Use HTMLNames namespace explicitly.

        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::collectTextRanges): Use createLiveRange
        here since we don't want to convert move the class to SimpleRange at this time.

        * dom/Position.cpp: Added include of Range.h.

        * dom/RangeBoundaryPoint.h: Removed a bogus "const" on the return value of
        RangeBoundaryPoint::toPosition.

        * editing/TextIterator.cpp:
        (WebCore::BitStack::BitStack): Deleted.
        (WebCore::BitStack::size const): Deleted.
        (WebCore::TextIterator::range const): Return a SimpleRange.
        (WebCore::TextIterator::node const): Updated for the above.
        (WebCore::CharacterIterator::range const): Use SimpleRange right up until the
        return statement, where we do createLiveRange. Will come back and remove that soon.
        (WebCore::TextIterator::rangeFromLocationAndLength): Use createLiveRange in
        one place, SimpleRange in another.

        * editing/TextIterator.h: Removed include of "Range.h" since we can just use
        a forward declaration instead. Removed unneeded forward declarations. Simplified
        the BitStack and TextIteratorCopyableText classes by initializing data members
        and removing explicit definitions of the constructors and destructors. Took out
        a stray "explicit" that wasn't needed. Changed the return value of
        TextIterator::range to SimpleRange.

        * editing/TextManipulationController.cpp:
        (WebCore::ParagraphContentIterator::ParagraphContentIterator): Call
        createLiveRange.
        (WebCore::ParagraphContentIterator::advance): Ditto.
        (WebCore::ParagraphContentIterator::startPosition): Ditto.
        (WebCore::ParagraphContentIterator::endPosition): Ditto.

        * editing/cocoa/DataDetection.mm:
        (WebCore::DataDetection::detectContentInRange): Use createLiveRange.

        * editing/cocoa/HTMLConverter.mm:
        (WebCore::editingAttributedStringFromRange): Use SimpleRange instead
        of a live range.

2020-03-10  Simon Fraser  <simon.fraser@apple.com>

        Track "scrolling scope" on RenderLayers
        https://bugs.webkit.org/show_bug.cgi?id=208620

        Reviewed by Zalan Bujtas.
        
        The scrolling scope code added in r257920 failed to recompute m_contentsScrollingScope
        when hasCompositedScrollableOverflow() changed, causing bugs on gmail.

        Recompute the m_contentsScrollingScope to match or not match the m_boxScrollingScope
        based on whether the layer is composited-scrollable.

        Test: fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPosition):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::isScrolledByOverflowScrollLayer):

2020-03-10  Don Olmstead  <don.olmstead@sony.com>

        Non-unified build fixes early March 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=208897

        Unreviewed build fix.

        * Modules/mediacontrols/MediaControlsHost.h:
        * dom/BoundaryPoint.h:
        * dom/StaticRange.cpp:
        * editing/FrameSelection.cpp:
        * loader/cache/CachedResourceRequest.cpp:
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:

2020-03-10  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in CompositeEditCommand::moveParagraphWithClones when indenting non-enclosed elements.
        https://bugs.webkit.org/show_bug.cgi?id=208628
        <rdar://problem/52011509>

        Reviewed by Ryosuke Niwa.

        When indenting a non-enclosed paragraph, quit if start of contents is not a descendant or sibling of outer block.

        Test: fast/editing/indent-non-enclosed-element-crash.html

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::indentIntoBlockquote):

2020-03-10  Stephan Szabo  <stephan.szabo@sony.com>

        [PlayStation] incomplete type 'WebCore::ScrollingStateFrameScrollingNode' named in nested name specifier
        https://bugs.webkit.org/show_bug.cgi?id=208882

        Reviewed by Simon Fraser.

        No new tests, build fix.

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
          Add include of ScrollingStateFrameScrollingNode
          when ENABLE(SCROLLING_THREAD) is true.

2020-03-10  Alex Christensen  <achristensen@webkit.org>

        Build fix.

        * platform/audio/ios/MediaSessionHelperIOS.mm:
        (MediaSessionHelperiOS::providePresentingApplicationPID):
        Fix an unused parameter warning.

2020-03-10  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r257920): inbox flickers and disappears when scrolling gmail
        https://bugs.webkit.org/show_bug.cgi?id=208883
        rdar://problem/60287447

        Partially revert r257920 since it caused gmail scrolling flickers.

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

2020-03-10  Dean Jackson  <dino@apple.com>

        Set important EGL context attributes
        https://bugs.webkit.org/show_bug.cgi?id=208724
        <rdar://problem/60168306>

        Temporarily revert r258025 while investigating a crash.

        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

2020-03-10  youenn fablet  <youenn@apple.com>

        Make sure that ServiceWorkerFrameLoaderClient lifetime exceeds its frame lifetime
        https://bugs.webkit.org/show_bug.cgi?id=208855
        <rdar://problem/60187332>

        Reviewed by Geoffrey Garen.

        Add lifetime management of the loader client to SWContextManager instead of its connection, which has a shorter lifetime.
        No JS observable change of behavior.

        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::addServiceWorkerFrameLoaderClient):
        (WebCore::SWContextManager::removeServiceWorkerFrameLoaderClient):
        * workers/service/context/SWContextManager.h:

2020-03-10  Jer Noble  <jer.noble@apple.com>

        Add logging for Modern EME methods.
        https://bugs.webkit.org/show_bug.cgi?id=205519

        Reviewed by Eric Carlson.

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::create):
        (WebCore::MediaKeySession::MediaKeySession):
        (WebCore::MediaKeySession::generateRequest):
        (WebCore::MediaKeySession::load):
        (WebCore::MediaKeySession::update):
        (WebCore::MediaKeySession::close):
        (WebCore::MediaKeySession::remove):
        (WebCore::MediaKeySession::sessionClosed):
        (WebCore::MediaKeySession::logChannel const):
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::createSession):
        (WebCore::MediaKeys::setServerCertificate):
        * Modules/encryptedmedia/MediaKeys.h:
        * Modules/encryptedmedia/MediaKeys.idl:
        * Modules/encryptedmedia/NavigatorEME.cpp:
        (WTF::LogArgument<Vector<T>>::toString):
        (WTF::LogArgument<Optional<T>>::toString):
        (WebCore::NavigatorEME::requestMediaKeySystemAccess):
        (WebCore::tryNextSupportedConfiguration):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/encryptedmedia/CDMLogging.cpp: Added.
        (WebCore::toJSONObject):
        (WebCore::toJSONString):
        (WTF::LogArgument<WebCore::CDMKeySystemConfiguration>::toString):
        (WTF::LogArgument<WebCore::CDMMediaCapability>::toString):
        (WTF::LogArgument<WebCore::CDMRestrictions>::toString):
        (WTF::LogArgument<WebCore::CDMEncryptionScheme>::toString):
        (WTF::LogArgument<WebCore::CDMKeyStatus>::toString):
        (WTF::LogArgument<WebCore::CDMMessageType>::toString):
        (WTF::LogArgument<WebCore::CDMRequirement>::toString):
        (WTF::LogArgument<WebCore::CDMSessionType>::toString):
        * platform/encryptedmedia/CDMLogging.h: Added.
        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

2020-03-10  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove the special DisplayList handling in CanvasRenderingContext2DBase
        https://bugs.webkit.org/show_bug.cgi?id=208828

        Reviewed by Myles C. Maxfield.

        Remove DisplayListDrawingContext and use DisplayList::DrawingContext
        instead. Remove 'tracksDisplayListReplay' since it is always 'false'.
        Remove contextDisplayListMap() since items are added to it only if
        'tracksDisplayListReplay' is true which never happens.

        * html/CustomPaintCanvas.cpp:
        (WebCore::CustomPaintCanvas::getContext):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::~CanvasRenderingContext2DBase):
        (WebCore::CanvasRenderingContext2DBase::paintRenderingResultsToCanvas):
        (WebCore::CanvasRenderingContext2DBase::drawingContext const):
        (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): Deleted.
        (WebCore::contextDisplayListMap): Deleted.
        (WebCore::CanvasRenderingContext2DBase::setTracksDisplayListReplay): Deleted.
        (WebCore::CanvasRenderingContext2DBase::displayListAsText const): Deleted.
        (WebCore::CanvasRenderingContext2DBase::replayDisplayListAsText const): Deleted.
        * html/canvas/CanvasRenderingContext2DBase.h:
        (WebCore::CanvasRenderingContext2DBase::tracksDisplayListReplay const): Deleted.
        * platform/graphics/displaylists/DisplayListDrawingContext.h:

2020-03-10  Jer Noble  <jer.noble@apple.com>

        [MSE] Use CMSampleBufferGetOutputPresentationTimeStamp / CMSampleBufferGetOutputDuration for all presentation times and durations
        https://bugs.webkit.org/show_bug.cgi?id=208827

        Reviewed by Eric Carlson.

        CMSampleBufferGetOutputPresentationTimeStamp takes into account pre-roll trim durations and
        movie edit lists, and as such, should be used as the "correct" value for "presentation
        time".

        outputPresentationTime() is inconsistently used, so rather than replacing all references of
        outputPresentationTime() with presentationTime(), simply redefine presetationTime() in terms
        of CMSampleBufferGetPresentationTimeStamp() and remove outputPresentationTime() entirely.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime):
        * platform/MediaSample.h:
        (WebCore::MediaSample::outputPresentationTime const): Deleted.
        (WebCore::MediaSample::outputDuration const): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::calculateTimelineOffset):
        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
        (WebCore::MediaSampleAVFObjC::presentationTime const):
        (WebCore::MediaSampleAVFObjC::duration const):
        (WebCore::MediaSampleAVFObjC::outputDuration const):
        (WebCore::MediaSampleAVFObjC::dump const):
        (WebCore::MediaSampleAVFObjC::toJSONString const):
        (WebCore::MediaSampleAVFObjC::outputPresentationTime const): Deleted.
        * platform/mediastream/RealtimeVideoCaptureSource.cpp:
        (WebCore::RealtimeVideoCaptureSource::adaptVideoSample):

2020-03-10  Chris Dumez  <cdumez@apple.com>

        Add release logging for when a navigation by a third-party (or untrusted) iframe is blocked
        https://bugs.webkit.org/show_bug.cgi?id=208863

        Reviewed by Youenn Fablet.

        Add release logging for when a navigation by a third-party (or untrusted) iframe is blocked, to
        help identify potential regressions in behavior.

        * dom/Document.cpp:
        (WebCore::Document::canNavigate):
        (WebCore::Document::frameID const):
        (WebCore::Document::isAlwaysOnLoggingAllowed const):
        * dom/Document.h:

2020-03-10  youenn fablet  <youenn@apple.com>

        Remove SampleBufferDisplayLayer sync IPC
        https://bugs.webkit.org/show_bug.cgi?id=208804

        Reviewed by Eric Carlson.

        Add an initialize method to initialize the sample buffer display layer.
        It takes a completion handler so that the initialization can be asynchronous.
        Update the player to, on initialization callback, create the necessary observers and hook the fullscreen manager.

        Update MediaPlayerPrivateMediaStreamAVFObjC to no longer expose rootLayer and rootLayerBoundsDidChange.
        This was used by the root layer observer.
        Instead, pass the root layer to the observer when starting the observer and pass a callback to the observer.
        Covered by existing tests.

        * platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp:
        (WebCore::SampleBufferDisplayLayer::create):
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
        (WebCore::LocalSampleBufferDisplayLayer::create):
        (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::initialize):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (-[WebRootSampleBufferBoundsChangeListener initWithCallback:]):
        (-[WebRootSampleBufferBoundsChangeListener invalidate]):
        (-[WebRootSampleBufferBoundsChangeListener begin:]):
        (-[WebRootSampleBufferBoundsChangeListener stop]):
        (-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
        (-[WebRootSampleBufferBoundsChangeListener initWithParent:]): Deleted.
        (-[WebRootSampleBufferBoundsChangeListener begin]): Deleted.
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const): Deleted.

2020-03-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Cairo] Use std::unique_ptr for cairo_path_t
        https://bugs.webkit.org/show_bug.cgi?id=208808

        Reviewed by Sergio Villar Senin.

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::clipForPatternFilling):
        (WebCore::Cairo::drawPathShadow):
        * platform/graphics/cairo/CairoUniquePtr.h:
        (WebCore::CairoPtrDeleter<cairo_path_t>::operator() const):
        * platform/graphics/cairo/CairoUtilities.cpp:
        (WebCore::appendPathToCairoContext):
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::Path):
        (WebCore::Path::operator=):
        (WebCore::Path::addPath):
        (WebCore::Path::applySlowCase const):

2020-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>

        [Cairo] Remove PlatformPathCairo
        https://bugs.webkit.org/show_bug.cgi?id=208807

        Reviewed by Darin Adler.

        We have a class CairoPath defined in PlatformPathCairo.h that simply wraps a cairo_t. We can use the cairo_t
        directly as PlatformPath and simplify the cairo path implementation.

        * platform/SourcesCairo.txt:
        * platform/graphics/Path.h:
        (WebCore::Path::platformPath const):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::fillRectWithRoundedHole):
        (WebCore::Cairo::fillPath):
        (WebCore::Cairo::strokePath):
        (WebCore::Cairo::clipPath):
        * platform/graphics/cairo/CairoUtilities.cpp:
        (WebCore::appendWebCorePathToCairoContext):
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::Font::platformPathForGlyph const):
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::Path):
        (WebCore::Path::ensurePlatformPath):
        (WebCore::Path::operator=):
        (WebCore::Path::clear):
        (WebCore::Path::isEmptySlowCase const):
        (WebCore::Path::currentPointSlowCase const):
        (WebCore::Path::translate):
        (WebCore::Path::moveToSlowCase):
        (WebCore::Path::addLineToSlowCase):
        (WebCore::Path::addRect):
        (WebCore::Path::addQuadCurveTo):
        (WebCore::Path::addBezierCurveTo):
        (WebCore::Path::addArcSlowCase):
        (WebCore::Path::addArcTo):
        (WebCore::Path::addEllipse):
        (WebCore::Path::addPath):
        (WebCore::Path::closeSubpath):
        (WebCore::Path::boundingRectSlowCase const):
        (WebCore::Path::strokeBoundingRect const):
        (WebCore::Path::contains const):
        (WebCore::Path::strokeContains const):
        (WebCore::Path::applySlowCase const):
        (WebCore::Path::transform):
        * platform/graphics/cairo/PlatformPathCairo.cpp: Removed.
        * platform/graphics/cairo/PlatformPathCairo.h: Removed.

2020-03-10  youenn fablet  <youenn@apple.com>

        [iOS] Make sure a MediStreamTrack clone does not interrupt the being cloned track
        https://bugs.webkit.org/show_bug.cgi?id=208634

        Reviewed by Eric Carlson.

        Covered by reenabled tests.

        * platform/mediastream/RealtimeMediaSourceFactory.h:
        (WebCore::SingleSourceFactory::activeSource): .

2020-03-10  youenn fablet  <youenn@apple.com>

        Remove sync IPC when creating a remote capture source
        https://bugs.webkit.org/show_bug.cgi?id=208816

        Reviewed by Eric Carlson.

        Add a whenInitialized method to allow for async creation of realtime media source.
        Use this method when creating a MediaStream for getUserMedia/getDisplayMedia.
        Covered by existing tests.

        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::create):
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeMediaSourceCenter.cpp:
        (WebCore::RealtimeMediaSourceCenter::createMediaStream):

2020-03-10  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, !USE(GSTREAMER_GL) build fix after r258197.
        
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::GstVideoFrameHolder::platformLayerBuffer):

2020-03-10  Philippe Normand  <philn@igalia.com>

        [GStreamer][GL] External OES textures rendering support
        https://bugs.webkit.org/show_bug.cgi?id=208572

        Reviewed by Žan Doberšek.

        For hardware that contains native YUV samplers, some drivers may
        only support external-oes import of YUV textures, so by supporting
        this texture target in the MediaPlayer we can avoid some costly
        operations in the pipeline.

        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        (webKitGLVideoSinkSetMediaPlayerPrivate):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::platformLayerBuffer):
        (WebCore::MediaPlayerPrivateGStreamer::paint):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
        (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
        * platform/graphics/texmap/TextureMapperGL.cpp:
        (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
        (WebCore::TextureMapperGL::drawTextureExternalOES):
        * platform/graphics/texmap/TextureMapperGL.h:
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
        (WebCore::TextureMapperPlatformLayerBuffer::clone):
        (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
        * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
        (WebCore::TextureMapperShaderProgram::create):
        * platform/graphics/texmap/TextureMapperShaderProgram.h:

2020-03-10  Rob Buis  <rbuis@igalia.com>

        Align with Origin header changes
        https://bugs.webkit.org/show_bug.cgi?id=199261

        Reviewed by Darin Adler.

        Call generateOriginHeader in more places so that we comply
        more with "append a request `Origin` header" algorithm [1].

        Test: imported/w3c/web-platform-tests/fetch/origin/assorted.window.html

        [1] https://fetch.spec.whatwg.org/#append-a-request-origin-header

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::submitForm):
        * loader/cache/CachedResourceRequest.cpp:
        (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):

2020-03-09  Yusuke Suzuki  <ysuzuki@apple.com>

        REGRESSION: (r257905) [ Mac wk2 Debug ] ASSERTION FAILED: !m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction
        https://bugs.webkit.org/show_bug.cgi?id=208642

        Reviewed by Darin Adler.

        This patch fixes stale assertions and comments in JSEventListener.h, which has various problems.

        1. This assertion is saying, "If m_wrapper is dead, m_jsFunction must be dead". This is wrong. Given that we have conservative
           GC, JSC never guarantees such a condition. Even if m_wrapper is dead, m_jsFunction can be alive by various reasons: conservative
           GC finds it, user code stores this function somewhere reachable from the root, etc.
           The reason why this wrong assertion exists here is because the JSEventListener code and assertion assume that m_jsFunction is nullptr
           when it is not initialized, and once it is initialized, it should be non nullptr. This is wrong because Weak<> can collect it if it
           is not retained. This `!m_jsFunction` check mixes "it is not initialized" and "it is already initialized but collected".
           The correct assertion should be checking `m_wrapper` and `m_jsFunction` are alive (not checking deadness, which is not guaranteed) if
           the event-listener is once initialized. This patch adds m_isInitialized member to track this status separately from `m_wrapper` and
           `m_jsFunction`.
        2. JSEventListener::jsFunction has `if (!m_jsFunction)` condition. But this is not correct. This can revive JSFunction if it is collected
           because m_wrapper is gone or some way, but this is not expected behavior. The correct way is checking `m_isInitialized`. Once the event-listener
           is initialized, keeping m_wrapper and m_jsFunction alive is the responsibility of JSEventListener's owner.
        3. The comments about "zombie m_jsFunctions" is wrong. We are using JSC::Weak<>. So if the object gets collected, it returns
           nullptr, not getting a zombie pointer.
        4. We are emitting write-barrier in a wrong order. In the heavily stressed scenario, it is possible that concurrent marking
           scans JSEventListener just after we emit the write-barrier, and this marking misses the assigned value. We must emit
           a write-barrier after the assignment. If the write-barrier code is written after the assignment, it correctly offers memory
           fence to ensure this ordering.
        5. We also remove "world is not normal, anything is allowed" assertion. The assertion is allowing non-normal world to get dead m_wrapper.
           But skipping event handlers only in non-normal world does not make sense. And it is originally added as a hack to avoid assertions
           caused by non-normal world.

        While we are not sure which test is causing, it seems that we found a real bug by fixing this assertion[1].

        [1]: https://bugs.webkit.org/show_bug.cgi?id=208798

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::JSEventListener):
        (WebCore::JSEventListener::visitJSFunction):
        * bindings/js/JSEventListener.h:
        (WebCore::JSEventListener::wrapper const):
        (WebCore::JSEventListener::setWrapperWhenInitializingJSFunction const):
        (WebCore::JSEventListener::jsFunction const):
        (WebCore::JSEventListener::setWrapper const): Deleted.
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::initializeJSFunction const):

2020-03-09  Zalan Bujtas  <zalan@apple.com>

        [LayoutTests] Do not expose didAddHorizontal/VerticalScrollbar and willRemoveHorizontal/VerticalScrollbar
        https://bugs.webkit.org/show_bug.cgi?id=208833
        <rdar://problem/60244801>

        Reviewed by Simon Fraser.

        didAdd* and willRemove* functions are triggered by layout. Optimal layouts can happen at any point of time.
        Tests should not rely on the number/order of layouts unless they are specifically designed
        to test e.g. lack of layouts (see internals.layoutCount).
        It's sufficient to dump the mouse entered/moved/etc actions only.

        * platform/mock/ScrollAnimatorMock.cpp:
        (WebCore::ScrollAnimatorMock::didAddVerticalScrollbar):
        (WebCore::ScrollAnimatorMock::didAddHorizontalScrollbar):
        (WebCore::ScrollAnimatorMock::willRemoveVerticalScrollbar):
        (WebCore::ScrollAnimatorMock::willRemoveHorizontalScrollbar):

2020-03-09  Simon Fraser  <simon.fraser@apple.com>

        ASSERT(!m_textCheckingRequest) on editing/spelling/spellcheck-async-remove-frame.html
        https://bugs.webkit.org/show_bug.cgi?id=126606

        Reviewed by Wenson Hsieh.

        SpellChecker's sequence numbers need to be unique between frames, because they are sent out
        to EditorClient which may be one per web view, move from a per-SpellChecker int to
        TextCheckingRequestIdentifier.

        Change terminology from "sequence" to "identifier" and use Optional in
        TextCheckingRequestData to represent the unset state.

        Tested by existing tests.

        * editing/SpellChecker.cpp:
        (WebCore::SpellCheckRequest::SpellCheckRequest):
        (WebCore::SpellCheckRequest::didSucceed):
        (WebCore::SpellCheckRequest::didCancel):
        (WebCore::SpellCheckRequest::setCheckerAndIdentifier):
        (WebCore::SpellChecker::SpellChecker):
        (WebCore::SpellChecker::requestCheckingFor):
        (WebCore::SpellChecker::didCheck):
        (WebCore::SpellChecker::didCheckSucceed):
        (WebCore::SpellChecker::didCheckCancel):
        (WebCore::SpellCheckRequest::setCheckerAndSequence): Deleted.
        * editing/SpellChecker.h:
        (WebCore::SpellChecker::lastRequestIdentifier const):
        (WebCore::SpellChecker::lastProcessedIdentifier const):
        (WebCore::SpellChecker::lastRequestSequence const): Deleted.
        (WebCore::SpellChecker::lastProcessedSequence const): Deleted.
        * platform/text/TextChecking.h:
        (WebCore::TextCheckingRequestData::TextCheckingRequestData):
        (WebCore::TextCheckingRequestData::identifier const):
        (WebCore::TextCheckingRequestData::sequence const): Deleted.
        * testing/Internals.cpp:
        (WebCore::Internals::lastSpellCheckRequestSequence):
        (WebCore::Internals::lastSpellCheckProcessedSequence):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-09  Don Olmstead  <don.olmstead@sony.com>

        Remove obsolete feature flags
        https://bugs.webkit.org/show_bug.cgi?id=208830

        Reviewed by Alex Christensen.

        Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
        are no longer used.

        * Configurations/FeatureDefines.xcconfig:
        * editing/cocoa/AlternativeTextUIController.h: USE(DICTION_ALTERNATIVES) -> USE(DICTION_ALTERNATIVES)
        * html/TextFieldInputType.cpp: ENABLE(DATALIST) -> ENABLE(DATALIST_ELEMENT)
        (WebCore::TextFieldInputType::destroyShadowSubtree):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: ENABLE(WEBBPU) typo

2020-03-09  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (257846) Crash on maps.google.com under Element::isVisibleWithoutResolvingFullStyle
        https://bugs.webkit.org/show_bug.cgi?id=208841
        <rdar://problem/60238539>

        Reviewed by Simon Fraser.

        Resolve the computed style for the composed ancestors when not available.

        * dom/Element.cpp:
        (WebCore::Element::isVisibleWithoutResolvingFullStyle const):

2020-03-09  Andres Gonzalez  <andresg_22@apple.com>

        Remove required setting for libAccessibility.
        https://bugs.webkit.org/show_bug.cgi?id=208836
        <rdar://problem/60227703>

        Reviewed by Chris Fleizach.

        Made libAccessibility an optional library for Webcore since
        accessibility is soft linking it.

        * WebCore.xcodeproj/project.pbxproj:

2020-03-09  Chris Dumez  <cdumez@apple.com>

        Unreviewed, drop forward declaration that is no longer needed after r258159.

        * xml/XMLHttpRequestProgressEventThrottle.h:

2020-03-09  Chris Dumez  <cdumez@apple.com>

        Align garbage collection for XMLHttpRequest objects with the specification
        https://bugs.webkit.org/show_bug.cgi?id=208481

        Reviewed by Ryosuke Niwa.

        Align garbage collection for XMLHttpRequest objects with the specification:
        - https://xhr.spec.whatwg.org/#garbage-collection

        We now override ActiveDOMObject::hasPendingActivity() to match exactly the text
        in the specification:
        """
        An XMLHttpRequest object must not be garbage collected if its state is either
        opened with the send() flag set, headers received, or loading, and it has one or
        more event listeners registered whose type is one of readystatechange, progress,
        abort, error, load, timeout, and loadend.
        """

        Previously, we were trying to implement this behavior with ActiveDOMObject's
        setPendingActivity() / unsetPendingActivity() but this was error and leak prone.
        It was also keeping the JS wrapper alive too long in the cases where the JS
        does not have any event listeners. If the JS has not event listeners, then we
        can collect the JS wrapper, we just need to keep the implementation
        XMLHttpRequest object for the duration of the load.

        No new tests, covered by existing test such as:
        fast/xmlhttprequest/xmlhttprequest-gc.html

        * dom/EventTarget.cpp:
        (WebCore::EventTarget::addEventListener):
        (WebCore::EventTarget::removeEventListener):
        (WebCore::EventTarget::removeAllEventListeners):
        * dom/EventTarget.h:
        (WebCore::EventTarget::eventListenersDidChange):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::XMLHttpRequest):
        (WebCore::XMLHttpRequest::changeState):
        (WebCore::XMLHttpRequest::open):
        (WebCore::XMLHttpRequest::prepareToSend):
        (WebCore::XMLHttpRequest::createRequest):
        (WebCore::XMLHttpRequest::abort):
        (WebCore::XMLHttpRequest::internalAbort):
        (WebCore::XMLHttpRequest::networkError):
        (WebCore::XMLHttpRequest::didFail):
        (WebCore::XMLHttpRequest::didFinishLoading):
        (WebCore::XMLHttpRequest::didReachTimeout):
        (WebCore::XMLHttpRequest::contextDestroyed):
        (WebCore::XMLHttpRequest::eventListenersDidChange):
        (WebCore::XMLHttpRequest::hasPendingActivity const):
        * xml/XMLHttpRequest.h:
        * xml/XMLHttpRequestProgressEventThrottle.cpp:
        (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventWhenPossible):
        (WebCore::XMLHttpRequestProgressEventThrottle::suspend):
        (WebCore::XMLHttpRequestProgressEventThrottle::resume):
        * xml/XMLHttpRequestProgressEventThrottle.h:

2020-03-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Creating paths that are single-segment bezier or quad curves should not require a CGPath allocation
        https://bugs.webkit.org/show_bug.cgi?id=208812

        Reviewed by Tim Horton.

        Extend the inline path data mechanism introduced in r258118 to encompass two more cases of simple path objects:
        single-segment quad and bezier curves. In these scenarios, we can simply store the start point, end point, and
        one or two control points (respectively). See below for more details; there should be no change in behavior.

        * platform/graphics/InlinePathData.h:

        Add the new inline path data types to the variant. Note that does not increase the size of the InlinePathData
        variant, nor does it increase the size of Path, since the variant is already 32 bytes large due to ArcData.

        (WebCore::QuadCurveData::encode const):
        (WebCore::QuadCurveData::decode):
        (WebCore::BezierCurveData::encode const):
        (WebCore::BezierCurveData::decode):

        Add encoders and decoders for QuadCurveData and BezierCurveData.

        * platform/graphics/Path.cpp:
        (WebCore::Path::apply const):

        In the cases where we have quad and bezier curves, we can apply the path without having to fall back to
        allocating a platform path object.

        (WebCore::Path::currentPoint const):

        Return endPoint in both of the new inline curve cases.

        (WebCore::Path::elementCount const):

        Return 2 in both of the new cases.

        (WebCore::Path::addQuadCurveTo):
        (WebCore::Path::addBezierCurveTo):

        If the path is null (we haven't modified anything yet) or the path was only moved to some location, stuff
        information about the quad or bezier curve into inline data on Path and avoid creating a CGPath on CoreGraphics
        platforms (and other types of platform paths elsewhere).

        * platform/graphics/Path.h:
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::addQuadCurveToSlowCase):
        (WebCore::Path::addBezierCurveToSlowCase):
        (WebCore::Path::addQuadCurveTo): Deleted.
        (WebCore::Path::addBezierCurveTo): Deleted.
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::createCGPath const):
        (WebCore::Path::addQuadCurveToSlowCase):
        (WebCore::Path::addBezierCurveToSlowCase):

        Add -SlowCase suffixes to these methods, and move the main implementation of addQuadCurve and addBezierCurve
        into platform-agnostic code in Path.cpp where we update the inline path data and bail early if appropriate, and
        otherwise fall back to addQuadCurveToSlowCase or addBezierCurveToSlowCase.

        (WebCore::Path::addQuadCurveTo): Deleted.
        (WebCore::Path::addBezierCurveTo): Deleted.
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::addQuadCurveToSlowCase):
        (WebCore::Path::addBezierCurveToSlowCase):
        (WebCore::Path::addQuadCurveTo): Deleted.
        (WebCore::Path::addBezierCurveTo): Deleted.

2020-03-09  Antoine Quint  <graouts@apple.com>

        Remove the compile-time flag for Pointer Events
        https://bugs.webkit.org/show_bug.cgi?id=208821
        <rdar://problem/60223471>

        Reviewed by Dean Jackson.

        * Configurations/FeatureDefines.xcconfig:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::touchActionFlagsToCSSValue):
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::operator OptionSet<TouchAction> const):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeTouchAction):
        (WebCore::CSSPropertyParser::parseSingleValue):
        * dom/Document.cpp:
        (WebCore::Document::prepareMouseEvent):
        (WebCore::Document::invalidateRenderingDependentRegions):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::dispatchPointerEventIfNeeded):
        (WebCore::Element::allowsDoubleTapGesture const):
        (WebCore::Element::removedFromAncestor):
        * dom/Element.h:
        * dom/Element.idl:
        * dom/EventNames.in:
        * dom/NavigatorMaxTouchPoints.idl:
        * dom/PointerEvent.cpp:
        * dom/PointerEvent.h:
        * dom/PointerEvent.idl:
        * dom/ios/PointerEventIOS.cpp:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::pointerCaptureElementDidChange):
        (WebCore::EventHandler::prepareMouseEvent):
        * page/EventHandler.h:
        * page/Navigator.h:
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::didChangeMainDocument):
        * page/Page.h:
        (WebCore::Page::inspectorController const):
        (WebCore::Page::pointerCaptureController const):
        * page/PointerCaptureController.cpp:
        * page/PointerCaptureController.h:
        * page/PointerLockController.cpp:
        (WebCore::PointerLockController::requestPointerLock):
        * platform/TouchAction.h:
        * rendering/EventRegion.cpp:
        (WebCore::EventRegion::operator== const):
        (WebCore::EventRegion::unite):
        (WebCore::EventRegion::translate):
        (WebCore::operator<<):
        * rendering/EventRegion.h:
        (WebCore::EventRegion::encode const):
        (WebCore::EventRegion::decode):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        (WebCore::patternForTouchAction):
        (WebCore::RenderLayerBacking::paintDebugOverlays):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::effectiveTouchActions const):
        (WebCore::RenderStyle::setEffectiveTouchActions):
        (WebCore::RenderStyle::initialTouchActions):
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator== const):
        * rendering/style/StyleRareNonInheritedData.h:
        * style/StyleAdjuster.cpp:
        (WebCore::Style::isScrollableOverflow):
        (WebCore::Style::computeEffectiveTouchActions):
        (WebCore::Style::Adjuster::adjust const):
        * style/StyleBuilderConverter.h:
        (WebCore::Style::BuilderConverter::convertTouchAction):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement):

2020-03-09  Rob Buis  <rbuis@igalia.com>

        Rename urlSelected to changeLocation
        https://bugs.webkit.org/show_bug.cgi?id=208529

        Reviewed by Darin Adler.

        Rename urlSelected to changeLocation and remove the existing
        changeLocation. The name changeLocation is more intuitive
        than urlSelected.

        No new tests -- no new or changed functionality.

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::handleClick):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::handleClick):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::changeLocation):
        (WebCore::FrameLoader::urlSelected): Deleted.
        * loader/FrameLoader.h:
        * loader/NavigationScheduler.cpp:
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::defaultEventHandler):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):

2020-03-09  youenn fablet  <youenn@apple.com>

        Log error in clearNowPlayingInfo/setNowPlayingInfo
        https://bugs.webkit.org/show_bug.cgi?id=208805

        Reviewed by Eric Carlson.

        No change of behavior.

        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::clearNowPlayingInfo):
        (MediaSessionManagerCocoa::setNowPlayingInfo):

2020-03-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Do not floor the computed intrinsic width values
        https://bugs.webkit.org/show_bug.cgi?id=208796
        <rdar://problem/60209522>

        Reviewed by Antti Koivisto.

        Floored intrinsic values could lead to unexpected line breaks.
        (This happens because IFC uses float currently, while other layout systems use LayoutUnit.)

        Test: fast/layoutformattingcontext/absolute-positioned-simple-table3.html

        * layout/LayoutUnits.h:
        (WebCore::Layout::ceiledLayoutUnit):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineFormattingContext.h:

2020-03-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Do no try to distribute extra space in case of shrink to fit (max preferred width).
        https://bugs.webkit.org/show_bug.cgi?id=208795
        <rdar://problem/60208329>

        Reviewed by Antti Koivisto.

        When we shrink-to-fit the table and it isn't constrained by the containing block's width, we
        should use the maximum width instead of trying to distribute the space.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
        * layout/tableformatting/TableFormattingContext.h:

2020-03-07  Darin Adler  <darin@apple.com>

        Begin moving off of live ranges for WebKit internals
        https://bugs.webkit.org/show_bug.cgi?id=208432

        Reviewed by Daniel Bates.

        The DOM Range class is a live range. The live updating feature of these ranges mean
        they are expensive to create and destroy and also make all DOM mutation more expensive
        while they are alive. We will be able to speed up, likely measurable on Speedometer,
        if we can cut down uses of live ranges.

        - Refactored the StaticRange class to create two new structs.
        - The BoundaryPoint struct implements what the DOM standard calls a boundary point:
          a node and offset. Similar to the RangeBoundaryPoint class, which supports
          being the boundary point of a live range, but simpler and not live.
        - The SimpleRange struct implements what the DOM standard calls a range (not a live
          range). Like StaticRange but without reference counting and DOM binding.
        - Since StaticRange is derived publicly from SimpleRange you can pass either to any
          function that takes a SimpleRange. And since there is a constructor to create a
          SimpleRange from a Range you can pass a Range to those functions too.
        - Renamed StaticRange::createFromRange to StaticRange::create.

        * Headers.cmake: Added BoundaryPoint.h, SimpleRange.h, and StaticRange.h.
        * Sources.txt: Added BoundaryPoint.cpp and SimpleRange.cpp.
        * WebCore.xcodeproj/project.pbxproj: Added BoundaryPoint.cpp/h and SimpleRange.cpp/h.

        * dom/BoundaryPoint.cpp: Added.
        * dom/BoundaryPoint.h: Added.
        * dom/SimpleRange.cpp: Added.
        * dom/SimpleRange.h: Added.

        * dom/StaticRange.cpp:
        (WebCore::StaticRange::StaticRange): Take an rvalue reference to a SimpleRange.
        (WebCore::StaticRange::create): Ditto. Changed the other overloads to create
        a SimpleRange first then call through to the main one.
        (WebCore::isDocumentTypeOrAttr): Wrote a much more efficient version of this.
        The old version called the virtual function nodeType twice. This calls it at
        most once, and mostly doesn't call it at all.
        * dom/StaticRange.h: Simplified this class, putting most of the actual range
        logic into the base class. Note that this change eliminated the peculiar code
        that in the == operator that compared nodes using isEqualNode instead of using
        node identity. There was no one who needed that other behavior. Also fixed
        mistaken use of unsigned long in StaticRange::Init. It's unsigned long in
        the IDL file, but confusingly that's just unsigned in .cpp files.

        * dom/StaticRange.idl: Tweaked formatting.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::targetRanges const): Updated for rename
        of StaticRange::create.
        * editing/ReplaceRangeWithTextCommand.cpp:
        (WebCore::ReplaceRangeWithTextCommand::doApply): Updated since VisibleSelection
        takes SimpleRange now.
        (WebCore::ReplaceRangeWithTextCommand::targetRanges const): Updated for
        rename of StaticRange::create.
        * editing/SpellingCorrectionCommand.cpp:
        (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): Updated
        since a selection now takes a SimpleRange&, not a StaticRange.
        (WebCore::SpellingCorrectionCommand::targetRanges const): Updated for
        rename of StaticRange::create.
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::willAddTypingToOpenCommand): Ditto.

        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::VisibleSelection): Use SimpleRange
        instead of StaticRange and Range.
        * editing/VisibleSelection.h: Updated for the above.

        * editing/mac/EditorMac.mm: Added include.
        * page/DragController.cpp: Ditto.
        * page/TextIndicator.cpp: Ditto.
        (WebCore::TextIndicator::createWithRange): Updated since VisibleSelection
        takes SimpleRange now.

        * page/mac/EventHandlerMac.mm:
        (WebCore::InlineTextBox::collectMarkedTextsForHighlights): Tweaked coding
        style a bit.

2020-03-08  Per Arne Vollan  <pvollan@apple.com>

        Unreviewed, speculative link fix.

        * platform/cocoa/UTTypeRecordSwizzler.mm:

2020-03-08  Per Arne Vollan  <pvollan@apple.com>

        Unreviewed, speculative link fix.

        * platform/cocoa/UTTypeRecordSwizzler.mm:

2020-03-08  Konstantin Tokarev  <annulen@yandex.ru>

        [CMake] Unreviewed build fix for Mac port

        * PlatformMac.cmake:

2020-03-08  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Mapping to UTI from tag and tag class should be performed in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=208783

        Reviewed by Brent Fulgham.

        This mapping should be done in the UI process, since it is using a system service that will no longer be available
        in the WebContent process. To achieve this, the method +[UTTypeRecord typeRecordWithTagOverride] is swizzled in
        the WebContent process, and is using the cached mapping sent from the UI process.

        API test: WebKit.UTIFromTag

        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/UTTypeRecordSwizzler.h: Added.
        (WebCore::UTTypeItem::encode const):
        (WebCore::UTTypeItem::decode):
        * platform/cocoa/UTTypeRecordSwizzler.mm: Added.
        (-[WebUTTypeRecord setIdentifier:]):
        (WebCore::vectorOfUTTypeRecords):
        (WebCore::typeRecordWithTagOverride):
        (WebCore::createVectorOfUTTypeItem):
        (WebCore::setVectorOfUTTypeItem):
        (WebCore::swizzleUTTypeRecord):
        * platform/network/mac/UTIUtilities.h:
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::UTIFromTag):
        * testing/Internals.cpp:
        (WebCore::Internals::getUTIFromTag):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/Internals.mm:
        (WebCore::Internals::getUTIFromTag):

2020-03-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Lazily generate CGPaths for some simple types of paths, such as arcs and lines
        https://bugs.webkit.org/show_bug.cgi?id=208464
        <rdar://problem/59963226>

        Reviewed by Daniel Bates, Darin Adler and Tim Horton.

        When the GPU process is enabled and used to render the canvas element, some canvas-related subtests in
        MotionMark see significant performance regressions. One of the reasons for this is that in the process of
        decoding display list items that contain `WebCore::Path`s in the GPU process, we end up allocating a new CGPath
        for each WebCore::Path. This dramatically increases page demand and memory usage in the GPU process in contrast
        to shipping WebKit, due to the fact that all of these CGPaths allocated up-front, and must all exist somewhere
        in the heap upon decoding the display list.

        In contrast, in shipping WebKit, each call to stroke the current canvas path (i.e. invoking
        GraphicsContext::strokePath) is succeeded by clearing the path, which deallocates the CGPath backing the WebCore
        Path. The next time a CGPath needs to be created, CoreGraphics is free to then allocate the new CGPath at the
        address of the previous CGPath which was just destroyed, which prevents us from dirtying more pages than
        necessary. This phenomenon affects most of the canvas-related MotionMark subtests to some degree, though the
        impact is most noticeable with Canvas Lines.

        On top of all this, a significant portion of time is also spent calling CGPathApply and converting the resulting
        CGPathElements into serializable data when encoding each WebCore Path.

        To mitigate these two issues and restore the wins we get from memory locality when drawing paths in large
        quantities, we can:

        1.  In the case of simple paths, stuff some information about how each path was created as inline data on
            WebCore::Path itself, as a new data member. For now, this only encompasses lines, arcs, and moves (Paths
            where only `Path::moveTo` was invoked), but may be expanded in the future to include ellipses and rects.
            This allows us to achieve two things: (a) make encoding cheaper by not requiring a walk through all of
            CGPath's elements, and (b) make decoding cheaper by just initializing the Path using inline data, rather
            than having to create a new CGPath.

        2.  When painting the StrokePath display list item, just discard `m_path` after we're done painting with it.
            This, in conjunction with (1), means that the CGPath backing the WebCore::Path in the GPU process is only
            created when we're just about to paint (i.e. when calling into strokePath()), and destroyed right after
            we're done painting with it.

        See below for details. There should be no change in behavior.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/InlinePathData.h: Added.
        (WebCore::MoveData::encode const):
        (WebCore::MoveData::decode):
        (WebCore::LineData::encode const):
        (WebCore::LineData::decode):
        (WebCore::ArcData::encode const):
        (WebCore::ArcData::decode):

        Introduce InlinePathData, a Variant of several different inline data types, each of which represents one simple
        path type that is stored using only inline data. This includes line segments (a start point and an end point),
        as well as arcs (which, in addition to a center and start and end angles) also includes an optional offset,
        which represents the current position of the path at the time "addArc" was called.

        For instance, in the following scenario, the path would have an arc that is offset by (100, 0); if filled, it
        would result in a composite shape resembling a semicircle on top of a triangle:

        path.moveTo(100, 0);
        path.addArc(100, 100, 50, 0, PI, false);
        context.fill(path);

        When a Path is initialized (or after it is cleared), it starts off with neither a CGPath nor inline data. Moving
        the path causes it to store inline MoveData; calling calling `addLineTo` or `addArc` then replaces the inline
        data with either LineData or ArcData.

        If, at any point, the path changes in a different way (i.e. neither line, arc, nor move), we clear out the
        inline data and fall back to just representing the path data using the CGPath (m_path).

        * platform/graphics/Path.cpp:

        Refactor the following 10 methods: moveTo, addLineTo, addArc, isEmpty, currentPoint, apply, elementCount,
        hasCurrentPoint, fastBoundingRect, and boundingRect such that their implementations are now in platform-agnostic
        code in Path.cpp. Logic in this platform-agnostic code will generally attempt to use inline path data to compute
        an answer (or apply the requested mutations) without having to initialize the platform path representation.
        Failing this, we fall back to calling -SlowCase versions of these methods, which will exercise the appropriate
        APIs on each platform.

        (WebCore::Path::elementCountSlowCase const):
        (WebCore::Path::apply const):
        (WebCore::Path::isEmpty const):
        (WebCore::Path::hasCurrentPoint const):
        (WebCore::Path::currentPoint const):
        (WebCore::Path::elementCount const):
        (WebCore::Path::addArc):
        (WebCore::Path::addLineTo):
        (WebCore::Path::moveTo):

        In the case of these three methods for mutating a path, if we've either only moved the path or haven't touched
        it at all, we can get away with only updating our inline path data, and avoid creating a CGPath.

        (WebCore::Path::boundingRect const):
        (WebCore::Path::fastBoundingRect const):
        (WebCore::Path::boundingRectFromInlineData const):
        (WebCore::Path::polygonPathFromPoints):
        * platform/graphics/Path.h:
        (WebCore::Path::encode const):
        (WebCore::Path::decode):

        Teach Path::encode and Path::decode to respectively serialize and deserialize WebCore::Path by consulting only
        the inline data, if it is present. For simple types of paths, this decreases the cost of both IPC encoding and
        decoding, but adds a negligible amount of overhead in the case where the path is non-inline.

        (WebCore::Path::hasInlineData const):
        (WebCore::Path::hasAnyInlineData const):
        (WebCore::Path::isNull const): Deleted.
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::isEmptySlowCase const):
        (WebCore::Path::currentPointSlowCase const):
        (WebCore::Path::moveToSlowCase):
        (WebCore::Path::addLineToSlowCase):
        (WebCore::Path::addArcSlowCase):
        (WebCore::Path::boundingRectSlowCase const):
        (WebCore::Path::applySlowCase const):
        (WebCore::Path::fastBoundingRectSlowCase const):
        (WebCore::Path::isNull const):
        (WebCore::Path::isEmpty const): Deleted.
        (WebCore::Path::hasCurrentPoint const): Deleted.
        (WebCore::Path::currentPoint const): Deleted.
        (WebCore::Path::moveTo): Deleted.
        (WebCore::Path::addLineTo): Deleted.
        (WebCore::Path::addArc): Deleted.
        (WebCore::Path::boundingRect const): Deleted.
        (WebCore::Path::apply const): Deleted.
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::createCGPath const):

        Add a helper method that is invoked when the Path is asked for a CGPath. In this case, if there is inline data,
        we need to lazily create the path and apply any inline path data we've accumulated. Once we're done applying the
        inline data, set a flag (m_needsToApplyInlineData) to false to avoid re-applying inline data to the path.

        (WebCore::Path::platformPath const):
        (WebCore::Path::ensurePlatformPath):

        When ensurePlatformPath is invoked, we are about to mutate our CGPath in such a way that it can't be expressed
        in terms of inline data (at least, not with the changes in this patch). Clear out the inline path data in this
        case, and apply the CGPath mutations that were previously stashed away in inline path data.

        (WebCore::Path::isNull const):

        A path is now considered null if it is not only missing a CGPath, but also does not have any inline path data.
        This maintains the invariant that `isNull()` is true iff the `platformPath()` returns 0x0.

        (WebCore::Path::Path):
        (WebCore::Path::swap):

        Update the constructors and `swap` helper method (used by assignment operators) to account for the new members.

        (WebCore::Path::contains const):
        (WebCore::Path::transform):
        (WebCore::zeroRectIfNull):
        (WebCore::Path::boundingRectSlowCase const):
        (WebCore::Path::fastBoundingRectSlowCase const):
        (WebCore::Path::moveToSlowCase):
        (WebCore::Path::addLineToSlowCase):
        (WebCore::Path::addArcSlowCase):
        (WebCore::Path::clear):

        When clearing Path, instead of setting `m_path` to a newly allocated CGPath, simply reset it to null. This
        ensures that if we then apply some changes that can be expressed using only inline path data, we avoid having to
        update the CGPath, and instead just update the inline path data.

        (WebCore::Path::isEmptySlowCase const):
        (WebCore::Path::currentPointSlowCase const):
        (WebCore::Path::applySlowCase const):
        (WebCore::Path::elementCountSlowCase const):
        (WebCore::Path::boundingRect const): Deleted.
        (WebCore::Path::fastBoundingRect const): Deleted.
        (WebCore::Path::moveTo): Deleted.
        (WebCore::Path::addLineTo): Deleted.
        (WebCore::Path::addArc): Deleted.
        (WebCore::Path::isEmpty const): Deleted.
        (WebCore::Path::hasCurrentPoint const): Deleted.
        (WebCore::Path::currentPoint const): Deleted.
        (WebCore::Path::apply const): Deleted.
        (WebCore::Path::elementCount const): Deleted.
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::StrokePath::apply const):

        Throw out the current WebCore::Path after we're done painting with it (see (2) in the above ChangeLog entry).

        * platform/graphics/displaylists/DisplayListItems.h:
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::boundingRectSlowCase const):
        (WebCore::Path::fastBoundingRectSlowCase const):
        (WebCore::Path::moveToSlowCase):
        (WebCore::Path::addLineToSlowCase):
        (WebCore::Path::addArcSlowCase):
        (WebCore::Path::isEmptySlowCase const):
        (WebCore::Path::currentPointSlowCase const):
        (WebCore::Path::applySlowCase const):
        (WebCore::Path::isNull const):
        (WebCore::Path::boundingRect const): Deleted.
        (WebCore::Path::fastBoundingRect const): Deleted.
        (WebCore::Path::moveTo): Deleted.
        (WebCore::Path::addLineTo): Deleted.
        (WebCore::Path::addArc): Deleted.
        (WebCore::Path::isEmpty const): Deleted.
        (WebCore::Path::hasCurrentPoint const): Deleted.
        (WebCore::Path::currentPoint const): Deleted.
        (WebCore::Path::apply const): Deleted.

2020-03-08  Konstantin Tokarev  <annulen@yandex.ru>

        [CMake] Some fixes for building Mac port
        https://bugs.webkit.org/show_bug.cgi?id=208770

        Reviewed by Don Olmstead.

        * PlatformMac.cmake:

2020-03-08  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of AccessibilitySupport AXSIsolatedTreeMode.
        https://bugs.webkit.org/show_bug.cgi?id=208691
        <rdar://problem/60178602>

        Reviewed by Chris Fleizach.

        Honors the system AccessibilitySupport IsolatedTreeMode setting. The
        system has three modes for IsolatedTree functionality: off, on on main
        thread, and on on secondary thread.

        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::isolatedTreeFocusedObject):
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::isIsolatedTreeEnabled):
        (WebCore::AXObjectCache::isolatedTreeRootObject):
        (WebCore::AXObjectCache::canUseSecondaryAXThread):
        * accessibility/AXObjectCache.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase detach]):
        (-[WebAccessibilityObjectWrapperBase axBackingObject]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):

2020-03-08  Jer Noble  <jer.noble@apple.com>

        Unreviewed watchOS build fix: add platform guards.

        * platform/audio/ios/MediaSessionHelperIOS.mm:
        (MediaSessionHelperiOS::startMonitoringWirelessRoutes):
        (MediaSessionHelperiOS::stopMonitoringWirelessRoutes):

2020-03-08  Fujii Hironori  <Hironori.Fujii@sony.com>

        generate-bindings-all.pl: "my" variable $fh masks earlier declaration in same scope
        https://bugs.webkit.org/show_bug.cgi?id=208757

        Reviewed by Yusuke Suzuki.

        * bindings/scripts/generate-bindings-all.pl: Reuse $fh variable instead of defining new one.

2020-03-06  Jer Noble  <jer.noble@apple.com>

        [GPUP] Move AVSystemController code into the GPU process
        https://bugs.webkit.org/show_bug.cgi?id=208727

        Reviewed by Eric Carlson.

        Move AVSystemController code out of MediaSessionManageriOS and into a new
        class MediaSessionHelper, which is currently iOS only. The abstract base class
        will be overriden by WebKit in the WebContent process.

        Drive-by fix: Don't call a virtual method (resetRestrictions()) from the constructor of a
        virtual base class; the virtual function table hasn't been created yet, and the subclasses'
        overridden methods won't be called. Move the call to post-creation.

        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::sharedManager):
        (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
        * platform/audio/ios/MediaSessionHelperIOS.h: Added.
        * platform/audio/ios/MediaSessionHelperIOS.mm: Copied from Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm.
        (sharedHelperInstance):
        (MediaSessionHelper::sharedHelper):
        (MediaSessionHelper::resetSharedHelper):
        (MediaSessionHelper::setSharedHelper):
        (MediaSessionHelper::addClient):
        (MediaSessionHelper::removeClient):
        (MediaSessionHelperiOS::MediaSessionHelperiOS):
        (MediaSessionHelperiOS::~MediaSessionHelperiOS):
        (MediaSessionHelperiOS::providePresentingApplicationPID):
        (MediaSessionHelperiOS::startMonitoringWirelessRoutes):
        (MediaSessionHelperiOS::stopMonitoringWirelessRoutes):
        (MediaSessionHelperiOS::carPlayServerDied):
        (MediaSessionHelperiOS::updateCarPlayIsConnected):
        (MediaSessionHelperiOS::setIsPlayingToAutomotiveHeadUnit):
        (MediaSessionHelperiOS::activeAudioRouteDidChange):
        (MediaSessionHelperiOS::activeVideoRouteDidChange):
        (MediaSessionHelperiOS::receivedInterruption):
        (MediaSessionHelperiOS::applicationDidBecomeActive):
        (MediaSessionHelperiOS::applicationDidEnterBackground):
        (MediaSessionHelperiOS::applicationWillBecomeInactive):
        (MediaSessionHelperiOS::applicationWillEnterForeground):
        (MediaSessionHelperiOS::externalOutputDeviceAvailableDidChange):
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper dealloc]):
        (-[WebMediaSessionHelper clearCallback]):
        (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
        (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
        (-[WebMediaSessionHelper interruption:]):
        (-[WebMediaSessionHelper applicationWillEnterForeground:]):
        (-[WebMediaSessionHelper applicationDidBecomeActive:]):
        (-[WebMediaSessionHelper applicationWillResignActive:]):
        (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
        (-[WebMediaSessionHelper applicationDidEnterBackground:]):
        (-[WebMediaSessionHelper carPlayServerDied:]):
        (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):
        (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
        (WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
        (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
        (WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):
        (WebCore::MediaSessionManageriOS::providePresentingApplicationPID):
        (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
        (WebCore::MediaSessionManageriOS::isPlayingToAutomotiveHeadUnitDidChange):
        (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
        (WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
        (WebCore::MediaSessionManageriOS::receivedInterruption):
        (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
        (WebCore::MediaSessionManageriOS::applicationDidBecomeActive):
        (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
        (WebCore::MediaSessionManageriOS::applicationWillBecomeInactive):
        (WebCore::MediaSessionManageriOS::carPlayServerDied): Deleted.
        (WebCore::MediaSessionManageriOS::updateCarPlayIsConnected): Deleted.
        (-[WebMediaSessionHelper initWithCallback:]): Deleted.
        (-[WebMediaSessionHelper dealloc]): Deleted.
        (-[WebMediaSessionHelper clearCallback]): Deleted.
        (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Deleted.
        (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Deleted.
        (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Deleted.
        (-[WebMediaSessionHelper interruption:]): Deleted.
        (-[WebMediaSessionHelper applicationWillEnterForeground:]): Deleted.
        (-[WebMediaSessionHelper applicationDidBecomeActive:]): Deleted.
        (-[WebMediaSessionHelper applicationWillResignActive:]): Deleted.
        (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Deleted.
        (-[WebMediaSessionHelper applicationDidEnterBackground:]): Deleted.
        (-[WebMediaSessionHelper carPlayServerDied:]): Deleted.
        (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]): Deleted.
        (-[WebMediaSessionHelper activeAudioRouteDidChange:]): Deleted.

2020-03-08  Andres Gonzalez  <andresg_22@apple.com>

        Fix for LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html in IsolatedTree mode.
        https://bugs.webkit.org/show_bug.cgi?id=208462
        <rdar://problem/59980673>

        Reviewed by Chris Fleizach.

        Covered by LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html.

        - Updates the IsolatedTree on the TextStateChange notification.
        - Renamed isAccessibilityScrollView to isAccessibilityScrollViewInstance
        and used isScrollView instead everywhere it's appropriate. This makes
        code like AXObjectCache::rootWebArea work for both AXObjects and IsolatedObjects.
        - Moved several utility functions from WebAccessibilityObjectWrapperMac.mm
        to AXObjectCacheMac.mm where they belong, so that they can be used by
        AXObjectCache implementation in addition to by the wrapper.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::postTextStateChangeNotification):
        (WebCore::AXObjectCache::rootWebArea):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::isOnScreen const):
        (WebCore::AccessibilityObject::scrollToGlobalPoint const):
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):
        * accessibility/AccessibilityScrollView.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityContainer]):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::isAccessibilityScrollViewInstance const):
        (WebCore::AXIsolatedObject::isAccessibilityScrollView const): Renamed.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postTextStateChangePlatformNotification): Uses
        TextMarker utilities instead of calling into the wrapper. This fixes
        the crash caused by the wrapper updating the backingObject that in turn
        may change the wrapper.
        (WebCore::AXTextMarkerRange): Moved from WebAccessibilityObjectWrapperMac.mm.
        (WebCore::textMarkerRangeFromMarkers): Moved from WebAccessibilityObjectWrapperMac.mm.
        (WebCore::textMarkerForVisiblePosition): Moved from WebAccessibilityObjectWrapperMac.mm.
        (WebCore::textMarkerRangeFromVisiblePositions): Moved from WebAccessibilityObjectWrapperMac.mm.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (AXTextMarkerRange): Moved.
        (textMarkerForVisiblePosition): Moved.
        (textMarkerRangeFromMarkers): Moved.
        (textMarkerRangeFromVisiblePositions): Moved.

2020-03-08  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Canvas drawing commands have to be flushed to the GPUProcess in batches
        https://bugs.webkit.org/show_bug.cgi?id=208597

        Reviewed by Myles C. Maxfield.

        Make DisplayList::ImageBuffer an observer of DisplayList::Recorder.
        It can track adding an item to the recoded DisplayList.

        * platform/graphics/displaylists/DisplayListDrawingContext.cpp:
        (WebCore::DisplayList::DrawingContext::DrawingContext):
        * platform/graphics/displaylists/DisplayListDrawingContext.h:
        * platform/graphics/displaylists/DisplayListImageBuffer.h:
        (WebCore::DisplayList::ImageBuffer::ImageBuffer):
        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        (WebCore::DisplayList::Recorder::Recorder):
        (WebCore::DisplayList::Recorder::willAppendItem):
        * platform/graphics/displaylists/DisplayListRecorder.h:
        (WebCore::DisplayList::Recorder::Observer::~Observer):
        (WebCore::DisplayList::Recorder::Observer::willAppendItem):

2020-03-08  Konstantin Tokarev  <annulen@yandex.ru>

        [GTK] Fix compilation with disabled OpenGL
        https://bugs.webkit.org/show_bug.cgi?id=208773

        Reviewed by Yusuke Suzuki.

        * html/OffscreenCanvas.h:

2020-03-07  Brent Fulgham  <bfulgham@apple.com>

        Create a flag to disable in-app browser quirks
        https://bugs.webkit.org/show_bug.cgi?id=208777
        <rdar://problem/60062197>

        Reviewed by Simon Fraser.

        This patch makes the following changes:

        1. Adds a new flag 'NeedsInAppBrowserPrivacyQuirks' to allow quirks to be toggled
           during testing.
        2. Reclassify this new flag, and the existing 'InAppBrowserPrivacyEnabled' flag from 
           'settings' to Internal Debug settings

        The renamed flags are covered by existing tests.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setNeedsInAppBrowserPrivacyQuirks):
        (WebCore::RuntimeEnabledFeatures::needsInAppBrowserPrivacyQuirks const):
        * page/Settings.yaml:

2020-03-07  Jer Noble  <jer.noble@apple.com>

        [GPUP] Implement Legacy EME API in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=208402

        Reviewed by Eric Carlson.

        Prepare for running the LegacyCDM et. al. in the GPU process.

        Slightly modernize LegacyCDM to allow all methods representaing a LegacyCDMFactory to be WTF::Functions.

        Allow the list of registered factories to be cleared and reset at runtime.

        Modify WebKitMediaKeys to notify the MediaPlayer when the keys object is added to a HTMLMediaElement.

        Expose the pointer to the internal CDMPrivateInterface for use in WebKit.

        * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
        (WebCore::LegacyCDM::platformRegisterFactories):
        (WebCore::installedCDMFactories):
        (WebCore::LegacyCDM::registerCDMFactory):
        (WebCore::LegacyCDMFactoryForKeySystem):
        (WebCore::LegacyCDM::supportsKeySystem):
        (WebCore::LegacyCDM::keySystemSupportsMimeType):
        (WebCore::LegacyCDM::LegacyCDM):
        (WebCore::LegacyCDM::createSession):
        * Modules/encryptedmedia/legacy/LegacyCDM.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
        (WebCore::WebKitMediaKeys::setMediaElement):
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
        * platform/graphics/LegacyCDMSession.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setCDM):
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setCDM):

2020-03-07  Jer Noble  <jer.noble@apple.com>

        [GPUP] LayoutTest debug assertion crashes: InitDataRegistry::registerInitDataType() called mulitple times with same type
        https://bugs.webkit.org/show_bug.cgi?id=208765

        Reviewed by Simon Fraser.

        Wrap calls to registerInitDataType() in a std::call_once, to ensure it's not called muliple times when
        platformRegisterFactories() is called multiple times.

        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::CDMFactory::platformRegisterFactories):

2020-03-07  Simon Fraser  <simon.fraser@apple.com>

        Generalize setSynchronousScrollingReasons() to take a ScrollingNodeID
        https://bugs.webkit.org/show_bug.cgi?id=208774

        Reviewed by Zalan Bujtas.

        We'll be calling setSynchronousScrollingReasons() for overflow nodes at some point,
        so change the argument from FrameView to ScrollingNodeID.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):

2020-03-07  Andres Gonzalez  <andresg_22@apple.com>

        REGRESSION: (r257760?) [ Mac wk2 Debug ] ASSERTION FAILED: child->parentObject() == this in WebCore::AccessibilityObject::insertChild
        https://bugs.webkit.org/show_bug.cgi?id=208648

        Reviewed by Chris Fleizach.

        [WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions] must
        not update the backing store but instead just get the backing object.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):

2020-03-07  Ryosuke Niwa  <rniwa@webkit.org>

        TextManipulationController should work with ARIA labels
        https://bugs.webkit.org/show_bug.cgi?id=208759

        Reviewed by Wenson Hsieh.

        This patch makes TextManipulationController work with a few ARIA content attributes.

        It also makes observeParagraphs observe content across the entire document since canonicalizing
        the starting position can end up skipping some content with ARIA.

        Tests: TextManipulation.StartTextManipulationFindAttributeContent
               TextManipulation.CompleteTextManipulationShouldReplaceAttributeContent

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::startObservingParagraphs): Now takes two Positions instead
        of two VisiblePositions.
        (WebCore::isAttributeForTextManipulation): Added.
        (WebCore::TextManipulationController::observeParagraphs): Added the code to find elements with
        ARIA attributes and a few other elements that don't generate RenderObject's.
        (WebCore::TextManipulationController::scheduleObservartionUpdate):
        (WebCore::TextManipulationController::addItem): Now takes ManipulationItemData instead of indivisual
        fields in it.
        (WebCore::TextManipulationController::replace): Added the logic to handle ManipulationItemData
        that specify element and attributeName.
        * editing/TextManipulationController.h:
        (WebCore::TextManipulationController::ManipulationItemData): Added element and attributeName.

2020-03-07  Megan Gardner  <megan_gardner@apple.com>

        Adopt UIContextMenu for WKFileUploadPanel
        https://bugs.webkit.org/show_bug.cgi?id=208687

        Reviewed by Tim Horton.

        New string, no tests needed.

        * en.lproj/Localizable.strings:

2020-03-07  Daniel Bates  <dabates@apple.com>

        [iOS] Implement support for dictation alternatives
        https://bugs.webkit.org/show_bug.cgi?id=208720
        <rdar://problem/58540114>

        Reviewed by Brent Fulgham.

        Part 3

        Separate code that is actually USE(AUTOCORRECTION_PANEL)-specific from code that can also
        be used when building with USE(DICTATION_ALTERNATIVES) enabled.

        Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
        compiled for iOS. I will do that in a subsequent change once after all the code is in place
        to do so.

        * SourcesCocoa.txt: Mark TextAlternativeWithRange.mm as @no-unify to fix build breakage when
        a unified source file includes both TextAlternativeWithRange.mm and a file that ultimately
        includes LengthBox.h (e.g. WebArchiveResourceFromNSAttributedString.mm). TextAlternativeWithRange.mm
        ultimately includes SFNTLayoutTypes.h, which defines a Fixed type that conflicts with enumerator
        Fixed (part of the LengthType enumeration) defined in Length.h. Ideally the LengthType enumeration
        would be an enum class or scoped to Length to avoid this ambiguity. This would be a big change to do
        and so for now I am fixing the build breakage using @no-unify.
        * WebCore.xcodeproj/project.pbxproj: Add TextAlternativeWithRange.mm to the project now that
        it is excluded from the unified build.
        * editing/AlternativeTextController.cpp:
        (WebCore::markerTypesForAppliedDictationAlternative):
        (WebCore::AlternativeTextController::alternativeTextClient):
        (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
        (WebCore::AlternativeTextController::applyAlternativeTextToRange):
        * editing/AlternativeTextController.h:

2020-03-07  Daniel Bates  <dabates@apple.com>

        [iOS] Implement support for dictation alternatives
        https://bugs.webkit.org/show_bug.cgi?id=208720
        <rdar://problem/58540114>

        Reviewed by Wenson Hsieh.

        Part 2

        Include UIKitSPI.h in TextAlternativeWithRange.mm to get the definition of NSTextAlternatives
        when building for iOS. Also while I am here, fix up some code style issues and use uniform
        initializer syntax.

        Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
        compiled for iOS. I will do that in a subsequent change once after all the code is in place
        to do so.

        * editing/mac/TextAlternativeWithRange.mm:
        (WebCore::TextAlternativeWithRange::TextAlternativeWithRange):

2020-03-07  Daniel Bates  <dabates@apple.com>

        [iOS] Implement support for dictation alternatives
        https://bugs.webkit.org/show_bug.cgi?id=208720
        <rdar://problem/58540114>

        Reviewed by Wenson Hsieh.

        Part 1

        Rename editing/mac/AlternativeTextUIController.{h, mm} to editing/cocoa/AlternativeTextUIController.{h, mm}
        as it can be shared by both Mac and iOS. I also took this opportunity to do some very minor modernization
        and cleanup to these files: use =default constructors and put the * on the right side for Objective-C types.

        Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
        compiled for iOS. I will do that in a subsequent change once after all the code is in place
        to do so.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/cocoa/AlternativeTextContextController.h:
        * editing/cocoa/AlternativeTextContextController.mm: Added.
        (WebCore::AlternativeTextContextController::addAlternatives):
        (WebCore::AlternativeTextContextController::alternativesForContext):
        (WebCore::AlternativeTextContextController::removeAlternativesForContext):
        (WebCore::AlternativeTextContextController::clear):
        * editing/cocoa/AlternativeTextUIController.h: Renamed from Source/WebCore/editing/mac/AlternativeTextUIController.h.
        * editing/cocoa/AlternativeTextUIController.mm: Renamed from Source/WebCore/editing/mac/AlternativeTextUIController.mm.
        (WebCore::AlternativeTextUIController::addAlternatives):
        (WebCore::AlternativeTextUIController::alternativesForContext):
        (WebCore::AlternativeTextUIController::clear):
        (WebCore::AlternativeTextUIController::showAlternatives):
        (WebCore::AlternativeTextUIController::handleAcceptedAlternative):
        (WebCore::AlternativeTextUIController::dismissAlternatives):
        (WebCore::AlternativeTextUIController::removeAlternatives):

2020-03-07  Fujii Hironori  <Hironori.Fujii@sony.com>

        [CMake][Win] GenerateSettings.rb are invoked twice in WebCoreBindings.vcxproj and WebCoreTestSupportBindings.vcxproj
        https://bugs.webkit.org/show_bug.cgi?id=208771

        Reviewed by Konstantin Tokarev.

        CMake Visual Studio generator put a custom command of
        GenerateSettings.rb into both WebCoreBindings.vcxproj and
        WebCoreTestSupportBindings.vcxproj because both projects are
        using the generated files as source files. This causes
        unnecessary recompilation.

        The fundamental issue of this bug was fixed in CMake 3.12.
        <https://gitlab.kitware.com/cmake/cmake/issues/16767>
        All Windows ports are using newer CMake for Visual Studio 2019
        support.

        However, WebCoreTestSupportBindings needs to have a direct or
        indirect dependency to WebCoreBindings for CMake Visual Studio
        generator to eliminate duplicated custom commands. Otherwise,
        GenerateSettings.rb will be triggered in both projects.

        * CMakeLists.txt: Added a explicit dependency to WebCoreBindings
        for WebCoreTestSupportBindings.
        * WebCoreMacros.cmake: Removed stale comment.

2020-03-07  Eric Carlson  <eric.carlson@apple.com>

        Implement setWirelessPlaybackTarget, performTaskAtMediaTime, and wouldTaintOrigin in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=208651
        <rdar://problem/60088298>

        Reviewed by Youenn Fablet.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove unused lambda parameter.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::performTaskAtMediaTime): Make MediaTime parameter const ref
        so it isn't copied.
        * platform/graphics/MediaPlayer.h:

        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::performTaskAtMediaTime): Ditto.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::performTaskAtMediaTime): Ditto.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::performTaskAtMediaTime): Ditto.

        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
        (WebCore::VideoLayerManagerObjC::setVideoFullscreenLayer): Don't set inline image
        contents if image is NULL.

2020-03-07  Brady Eidson  <beidson@apple.com>

        Add runtime flag for incremental PDF loading.
        https://bugs.webkit.org/show_bug.cgi?id=208763

        Reviewed by Tim Horton.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setIncrementalPDFLoadingEnabled):
        (WebCore::RuntimeEnabledFeatures::incrementalPDFLoadingEnabled const):

2020-03-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][Verification] Use the table wrapper box's offset when matching out-of-flow tables
        https://bugs.webkit.org/show_bug.cgi?id=208769
        <rdar://problem/60191322>

        Reviewed by Antti Koivisto.

        In LFC, an out-of-flow table initiates a wrapper table box (out-of-flow) and a child table box (in-flow).
        Apply the wrapper table box's offset, when matching the display and the render tree.

        Test: fast/layoutformattingcontext/absolute-positioned-simple-table2.html

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

2020-03-07  Darin Adler  <darin@apple.com>

        Make Editor::applyEditingStyleToBodyElement do things in a straightforward manner
        https://bugs.webkit.org/show_bug.cgi?id=208177

        Reviewed by Wenson Hsieh.

        * editing/Editor.cpp:
        (WebCore::Editor::applyEditingStyleToBodyElement const): Use Document::body and
        StyledElement::setInlineStyleProperty to apply styles to the body. The older code
        was looping over all body elements in the document, for no good reason, and using
        the CSS object model wrapper object for the styles, also for no good reason.

2020-03-05  Sam Weinig  <weinig@apple.com>

        Move JavaScriptCore related feature defines from FeatureDefines.xcconfig to PlatformEnableCocoa.h
        https://bugs.webkit.org/show_bug.cgi?id=207436
        <rdar://problem/59296762>

        Reviewed by Darin Adler.

        * Configurations/FeatureDefines.xcconfig:
        Remove JSC related defines.

2020-03-07  Chris Fleizach  <cfleizach@apple.com>

        AX: Provide a way to run tests in isolated tree mode
        https://bugs.webkit.org/show_bug.cgi?id=208629
        <rdar://problem/60075583>

        Reviewed by Ryosuke Niwa.

        Now that we have a way to run this with tests, we don't need to allow usage for an unknown client.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::clientSupportsIsolatedTree):

2020-03-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Use start-aligned horizontal adjustment when justify is not eligible.
        https://bugs.webkit.org/show_bug.cgi?id=208762
        <rdar://problem/60188433>

        Reviewed by Antti Koivisto.

        Make sure we apply "text-align: start" when "text-align: justify" is not eligible.
        Currently "text-align: start" is a no-op, so no chnange in functionality (this might change in the future).

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignHorizontally):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::isTextAlignJustify const): Deleted.
        (WebCore::Layout::LineBuilder::isTextAlignRight const): Deleted.

2020-03-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Do not text-align: justify the runs on the current line if they are followed by a forced break
        https://bugs.webkit.org/show_bug.cgi?id=208761
        <rdar://problem/59825136>

        Reviewed by Antti Koivisto.

        https://www.w3.org/TR/css-text-3/#text-align-property
        "Text is justified according to the method specified by the text-justify property,
        in order to exactly fill the line box. Unless otherwise specified by text-align-last,
        the last line before a forced break or the end of the block is start-aligned."

        Test: fast/text/text-align-justify-and-forced-line-break.html

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignHorizontally):

2020-03-07  Konstantin Tokarev  <annulen@yandex.ru>

        REGRESSION(r257975): [GTK][WPE] Build failure after a clean build
        https://bugs.webkit.org/show_bug.cgi?id=208711

        Reviewed by Yusuke Suzuki.

        Make sure that InternalSettingsGenerated,idl is generated before bindings
        generation starts.

        Also, make IDL preprocessor die if specified IDL file is missing, instead
        of going on silently.

        * CMakeLists.txt:
        * WebCoreMacros.cmake:
        * bindings/scripts/preprocess-idls.pl:
        (getFileContents):

2020-03-07  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for documentLinks.
        https://bugs.webkit.org/show_bug.cgi?id=208734

        Reviewed by Chris Fleizach.

        - Expose documentLinks through the AXCoreObject interface, so that
        wrapper code works for both AXObject and AXIsolatedObjects.
        - Struct NodeChange now retains wrapper which was causing crash as the
        wrapper was destroyed before it was attached to the IsolatedObject.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::documentLinks):
        (WebCore::AccessibilityRenderObject::getDocumentLinks): Deleted.
        * accessibility/AccessibilityRenderObject.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::setFocusedNode):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2020-03-07  chris fleizach  <cfleizach@apple.com>

        Unreviewed, rolling out r258047.

        Referenced SPI not yet available for Safari builders.

        Reverted changeset:

        "Implementation of AccessibilitySupport AXSIsolatedTreeMode."
        https://bugs.webkit.org/show_bug.cgi?id=208691
        https://trac.webkit.org/changeset/258047

2020-03-06  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r258051): WinCairo/WPE/GTK build failures
        <https://bugs.webkit.org/show_bug.cgi?id=208621>
        <rdar://problem/60068047>

        * Headers.cmake:
        (WebCore_PRIVATE_FRAMEWORK_HEADERS): Add html/ImageData.h to
        attempt a build fix.

2020-03-06  Yusuke Suzuki  <ysuzuki@apple.com>

        Put remaining fixed-sized cells into IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=208754

        Reviewed by Keith Miller.

        * bindings/js/JSDOMIterator.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GeneratePrototypeDeclaration):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        * bindings/scripts/test/JS/JSMapLike.cpp:
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        * bindings/scripts/test/JS/JSSetLike.cpp:
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObjectConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracerConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        * bindings/scripts/test/JS/JSTestException.cpp:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::construct):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::prototypeForStructure):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjConstructor::construct):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::construct):

2020-03-06  Simon Fraser  <simon.fraser@apple.com>

        Fix scrolling tree hit-testing on scrolled and zoomed pages
        https://bugs.webkit.org/show_bug.cgi?id=208755

        Reviewed by Zalan Bujtas.

        Map the hit-test point from view to content coordinates before hit-testing the scrolling tree.

        Tests: fast/scrolling/mac/overflow-scrolled-document.html
               fast/scrolling/mac/overflow-zoomed-document.html

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

2020-03-06  Alex Christensen  <achristensen@webkit.org>

        Add SPI to disable cross origin access control checks
        https://bugs.webkit.org/show_bug.cgi?id=208748
        <rdar://problem/59861114>

        Reviewed by Tim Hatcher.

        Because loading is done process-globally in the WebProcess, use a CrossOriginAccessControlCheckDisabler::singleton for those checks.
        Pass a parameter to the NetworkResourceLoaders to disable these checks only for loads from a web process without access control checks.
        As long as we're changing the signature of passesAccessControlCheck, make it return an Expected instead of a bool with an out parameter.

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::CrossOriginAccessControlCheckDisabler::singleton):
        (WebCore::CrossOriginAccessControlCheckDisabler::setCrossOriginAccessControlCheckEnabled):
        (WebCore::CrossOriginAccessControlCheckDisabler::crossOriginAccessControlCheckEnabled const):
        (WebCore::passesAccessControlCheck):
        (WebCore::validatePreflightResponse):
        * loader/CrossOriginAccessControl.h:
        * loader/CrossOriginPreflightChecker.cpp:
        (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::loadRequest):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::willSendRequestInternal):
        (WebCore::SubresourceLoader::didReceiveResponse):
        (WebCore::SubresourceLoader::checkResponseCrossOriginAccessControl):
        (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
        * loader/SubresourceLoader.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::loadFrom):

2020-03-06  Myles C. Maxfield  <mmaxfield@apple.com>

        [GPU Process] Implement CanvasRenderingContext2D.putImageData()
        https://bugs.webkit.org/show_bug.cgi?id=208621
        <rdar://problem/60068047>

        Reviewed by Simon Fraser.

        putImageData() is implemented just as a DisplayListItem. Conceptually, it's the
        same as a draw command. Unfortunately, it can't be implemented on top of
        GraphicsContext, and instead has to be implemented on top of ImageBuffer, so
        this patch also adds a delegate to DisplayList::Replayer which can implement the
        commands that require an ImageBuffer. This moves in the direction of making the
        display list raw data, and moving the applier functions somewhere else at a
        higher level.

        Implementing this as a DisplayListItem rather than its own IPC message is superior
        because it gives us more control about when to flush the in-flight display list.

        There is still a few unnecessary copies - we're copying into / out of a SharedData
        during encoding. Being able to either have the ImageBuffer retain the SharedBuffer,
        or have putImageData() have an overload which accepts a SharedBuffer, would be a
        good opportunity for improvement.

        Test: fast/canvas/putImageData-multiple.html

        * html/ImageData.cpp:
        (WebCore::ImageData::deepClone const):
        * html/ImageData.h:
        * platform/graphics/AlphaPremultiplication.h:
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContext::impl):
        * platform/graphics/displaylists/DisplayList.h:
        * platform/graphics/displaylists/DisplayListDrawingContext.cpp:
        (WebCore::DisplayList::DrawingContext::recorder):
        * platform/graphics/displaylists/DisplayListDrawingContext.h:
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::Item::sizeInBytes):
        (WebCore::DisplayList::PutImageData::PutImageData):
        (WebCore::DisplayList::PutImageData::apply const):
        (WebCore::DisplayList::operator<<):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawingItem::globalBounds const):
        (WebCore::DisplayList::PutImageData::create):
        (WebCore::DisplayList::PutImageData::inputFormat const):
        (WebCore::DisplayList::PutImageData::imageData const):
        (WebCore::DisplayList::PutImageData::srcRect const):
        (WebCore::DisplayList::PutImageData::destPoint const):
        (WebCore::DisplayList::PutImageData::encode const):
        (WebCore::DisplayList::PutImageData::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):
        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        (WebCore::DisplayList::Recorder::putImageData):
        (WebCore::DisplayList::Recorder::updateItemExtent const):
        * platform/graphics/displaylists/DisplayListRecorder.h:
        * platform/graphics/displaylists/DisplayListReplayer.cpp:
        (WebCore::DisplayList::Replayer::Replayer):
        (WebCore::DisplayList::Replayer::replay):
        * platform/graphics/displaylists/DisplayListReplayer.h:
        (WebCore::DisplayList::Replayer::Delegate::~Delegate):
        (WebCore::DisplayList::Replayer::Delegate::apply):

2020-03-06  Daniel Bates  <dabates@apple.com>

        Add support for inserting and removing a text placeholder
        https://bugs.webkit.org/show_bug.cgi?id=208661
        <rdar://problem/59371073>

        Reviewed by Simon Fraser and Ryosuke Niwa.

        Implements the concept of a text placeholder, which is an element that acts like whitespace:
        it takes up space in the page layout, but has no visual appearance.

        Tests: editing/text-placeholder/insert-and-remove-into-text-field.html
               editing/text-placeholder/insert-into-content-editable.html
               editing/text-placeholder/insert-into-empty-text-field.html
               editing/text-placeholder/insert-into-text-field-in-iframe.html
               editing/text-placeholder/insert-into-text-field.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Element.h:
        (WebCore::Element::isTextPlaceholderElement const): Added. Defaults to false. I override this
        in TextPlaceholderElement.h.

        * editing/Editor.cpp:
        (WebCore::Editor::insertTextPlaceholder):
        (WebCore::Editor::removeTextPlaceholder):
        Insert a new placeholder or remove an existing one.

        * editing/Editor.h:
        * html/shadow/TextPlaceholderElement.cpp: Added.
        (WebCore::TextPlaceholderElement::create):
        (WebCore::TextPlaceholderElement::TextPlaceholderElement): Set inline styles to size the placeholder.
        (WebCore::TextPlaceholderElement::insertedIntoAncestor): If the placeholder is inserted inside an
        HTMLTextFormControlElement (e.g. <input> or <textarea>) then hide the HTML placeholder text.
        (WebCore::TextPlaceholderElement::removedFromAncestor): If the placeholder was removed from inside
        an HTMLTextFormControlElement then show the HTML placeholder text.
        * html/shadow/TextPlaceholderElement.h:
        (isType):
        * testing/Internals.cpp:
        (WebCore::Internals::insertTextPlaceholder): Added.
        (WebCore::Internals::removeTextPlaceholder): Added.
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-06  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of AccessibilitySupport AXSIsolatedTreeMode.
        https://bugs.webkit.org/show_bug.cgi?id=208691

        Reviewed by Chris Fleizach.

        Support for the AccessibilitySupport AXIsolatedTreMode accessibility setting.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::isolatedTreeFocusedObject):
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::isIsolatedTreeEnabled):
        (WebCore::AXObjectCache::rootObject):
        (WebCore::AXObjectCache::isolatedTreeRootObject):
        (WebCore::AXObjectCache::canUseSecondaryAXThread):
        * accessibility/AXObjectCache.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase detach]):
        (-[WebAccessibilityObjectWrapperBase axBackingObject]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):

2020-03-06  Simon Fraser  <simon.fraser@apple.com>

        Hit-test CALayers on the scrolling thread for async frame/overflow scrolling
        https://bugs.webkit.org/show_bug.cgi?id=208740
        <rdar://problem/48028836>

        Reviewed by Tim Horton.

        Implement hit-testing in the scrolling thread so we can determine which overflow/subframe
        to scroll without hitting the main thread.

        ScrollingTreeMac overrides scrollingNodeForPoint() and hit-tests through CALayers, starting at the
        root content layer. Locking ensures that the CALayer tree doesn't change while we're hit-testing it.
        We collect layers for the given point in back-to-front order much like the iOS code _web_findDescendantViewAtPoint
        (too different to share though), and consult event regions on PlatformCALayerCocoa's to determine if the
        point is inside the part of the layer that should receive events.

        To handle the complex stacking/containing block cases, isScrolledBy() consults the scrolling tree.

        For testing, fix it so that multiple calls to monitorWheelEvents() in a single test each start
        with clean state.

        Tests: fast/scrolling/mac/absolute-in-overflow-scroll.html
               fast/scrolling/mac/async-scroll-overflow.html
               fast/scrolling/mac/move-node-in-overflow-scroll.html
               fast/scrolling/mac/overlapped-overflow-scroll.html

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::scrollingNodeForPoint):
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeMac.h:
        * page/scrolling/mac/ScrollingTreeMac.mm:
        (collectDescendantLayersAtPoint):
        (scrollingNodeIDForLayer):
        (isScrolledBy):
        (ScrollingTreeMac::scrollingNodeForPoint):
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::monitorWheelEvents): Make sure that each call to eventSender.monitorWheelEvents() clears previous state.

2020-03-06  Jer Noble  <jer.noble@apple.com>

        [GPUP] Convert CDMFactory away from platformStrategies() and use WebProcess settings instead
        https://bugs.webkit.org/show_bug.cgi?id=208699

        Reviewed by Youenn Fablet.

        * platform/MediaStrategy.h:
        * platform/encryptedmedia/CDMFactory.cpp:

2020-03-06  Ryosuke Niwa  <rniwa@webkit.org>

        TextManipulationController should preserve images
        https://bugs.webkit.org/show_bug.cgi?id=208692

        Reviewed by Wenson Hsieh.

        This patch makes TextManipulationController preserve images (img and SVG) and their ordering,
        and lays down the foundation for preserving other non-text content.

        To do this, this patch introduces ParagraphContentIterator which wraps TextIterator and introduces
        a secondary node iteration which detects all ndoes that have been skipped. Ideally, we would update
        TextIterator to do this natively but this is tricky due to the multitude of the node traveral options
        supported by TextIterator at the moment. ParagraphContentIterator::advance stops at every node
        including ones that do not generate text in TextIterator. This also allows more code sharing between
        TextManipulationController's observeParagraphs and replace functions.

        For now, we special case nodes with RenderReplaced like img element and the root SVG element.

        Tests: TextManipulation.CompleteTextManipulationShouldPreserveImagesAsExcludedTokens
               TextManipulation.CompleteTextManipulationShouldPreserveSVGAsExcludedTokens
               TextManipulation.CompleteTextManipulationShouldPreserveOrderOfBlockImage

        * editing/TextManipulationController.cpp:
        (WebCore::ParagraphContentIterator): Added.
        (WebCore::ParagraphContentIterator::ParagraphContentIterator): Added.
        (WebCore::ParagraphContentIterator::advance): Added.
        (WebCore::ParagraphContentIterator::currentContent): Added.
        (WebCore::ParagraphContentIterator::startPosition): Added.
        (WebCore::ParagraphContentIterator::endPosition): Added.
        (WebCore::ParagraphContentIterator::atEnd const): Added.
        (WebCore::ParagraphContentIterator::moveCurrentNodeForward): Added.
        (WebCore::TextManipulationController::observeParagraphs): Adopted ParagraphContentIterator. For
        nodes with RenderReplaced, we generate an excluded token "[]". Removed the dead code which was
        creating a subrange from TextIterator, and renamed the previously misleadingly named endOfLastNewLine
        to startOfCurrentLine for clarity.
        (WebCore::TextManipulationController::replace): Adopted ParagraphContentIterator. Fixed a bug that
        excluded content were always assumed to be text, and a bug that the replaced content was inserted
        at a wrong location when insertionPoint is a position anchored at a node being removed. Also fixed
        an obvious bug that we were inserting root replaced contents at the position before a node which
        appears immediately before insertionPoint instead of after; this also resulted in the replaced content
        being inserted at a wrong location in some cases.

2020-03-06  Andres Gonzalez  <andresg_22@apple.com>

        Crash accessing AXIsolatedObject::m_childrenIDS from removeSubtree on the main thread.
        https://bugs.webkit.org/show_bug.cgi?id=208728

        Reviewed by Chris Fleizach.

        AXIsolatedTree::removeSubtree was accessing AXIsolatedObject::m_childrenIDs
        on the main thread to remove all descendants recursively. But the lock
        had to be unlocked and locked again on each iteration, creating problems
        if the secondary thread modifies the children in between iterations.
        The solution in this patch is to eliminate removeSubtree, and make
        removeNode and applyPendingChanges to remove all descendants.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::updateIsolatedTree):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::appendNodeChanges): Renamed local vars to make it clearer.
        (WebCore::AXIsolatedTree::applyPendingChanges):
        (WebCore::AXIsolatedTree::removeSubtree): Deleted.
        * accessibility/isolatedtree/AXIsolatedTree.h:

2020-03-06  Yusuke Suzuki  <ysuzuki@apple.com>

        JSDOMIterator classes should be in IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=208705

        Reviewed by Sam Weinig.

        JSDOMIterator should be allocated in IsoSubspace. So we can put all WebCore related cells into IsoSubspaces.
        To collect all iterator subspaces in DOMIsoSubspaces class, we scan `iterable<...>` pattern in preprocess-idls.pl.
        Then, we create a class for each DOM iterator instead of using `using XXXIterator = JSDOMIterator<...>` to put
        subspaceFor implementation easily. And we rename JSDOMIterator to JSDOMIteratorBase to explicitly state that
        this is Base class of actual iterators.

        * bindings/js/JSDOMIterator.h:
        (WebCore::JSDOMIteratorBase::JSDOMIteratorBase):
        (WebCore::IteratorTraits>::asJS):
        (WebCore::IteratorTraits>::destroy):
        (WebCore::IteratorTraits>::next):
        (WebCore::JSDOMIterator::createStructure): Deleted.
        (WebCore::JSDOMIterator::create): Deleted.
        (WebCore::JSDOMIterator::createPrototype): Deleted.
        (WebCore::JSDOMIterator::JSDOMIterator): Deleted.
        * bindings/js/JSDOMWrapper.h:
        (WebCore::JSDOMObject::subspaceFor):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateIterableDefinition):
        (GeneratePrototypeDeclaration):
        * bindings/scripts/preprocess-idls.pl:
        (interfaceIsIterable):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::JSInterfaceNamePrototype::create): Deleted.
        (WebCore::JSInterfaceNamePrototype::createStructure): Deleted.
        (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype): Deleted.
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLikePrototype::create): Deleted.
        (WebCore::JSMapLikePrototype::createStructure): Deleted.
        (WebCore::JSMapLikePrototype::JSMapLikePrototype): Deleted.
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLikePrototype::create): Deleted.
        (WebCore::JSReadOnlyMapLikePrototype::createStructure): Deleted.
        (WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype): Deleted.
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::JSReadOnlySetLikePrototype::create): Deleted.
        (WebCore::JSReadOnlySetLikePrototype::createStructure): Deleted.
        (WebCore::JSReadOnlySetLikePrototype::JSReadOnlySetLikePrototype): Deleted.
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::JSSetLikePrototype::create): Deleted.
        (WebCore::JSSetLikePrototype::createStructure): Deleted.
        (WebCore::JSSetLikePrototype::JSSetLikePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObjectConstructor::prototypeForStructure):
        (WebCore::JSTestActiveDOMObjectPrototype::create): Deleted.
        (WebCore::JSTestActiveDOMObjectPrototype::createStructure): Deleted.
        (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::JSTestCEReactionsPrototype::create): Deleted.
        (WebCore::JSTestCEReactionsPrototype::createStructure): Deleted.
        (WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::JSTestCEReactionsStringifierPrototype::create): Deleted.
        (WebCore::JSTestCEReactionsStringifierPrototype::createStructure): Deleted.
        (WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracerConstructor::prototypeForStructure):
        (WebCore::JSTestCallTracerPrototype::create): Deleted.
        (WebCore::JSTestCallTracerPrototype::createStructure): Deleted.
        (WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::create): Deleted.
        (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::createStructure): Deleted.
        (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::JSTestDOMJITPrototype::create): Deleted.
        (WebCore::JSTestDOMJITPrototype::createStructure): Deleted.
        (WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySettingPrototype::create): Deleted.
        (WebCore::JSTestEnabledBySettingPrototype::createStructure): Deleted.
        (WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::JSTestEnabledForContextPrototype::create): Deleted.
        (WebCore::JSTestEnabledForContextPrototype::createStructure): Deleted.
        (WebCore::JSTestEnabledForContextPrototype::JSTestEnabledForContextPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructorPrototype::create): Deleted.
        (WebCore::JSTestEventConstructorPrototype::createStructure): Deleted.
        (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTargetPrototype::create): Deleted.
        (WebCore::JSTestEventTargetPrototype::createStructure): Deleted.
        (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestExceptionPrototype::create): Deleted.
        (WebCore::JSTestExceptionPrototype::createStructure): Deleted.
        (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachablePrototype::create): Deleted.
        (WebCore::JSTestGenerateIsReachablePrototype::createStructure): Deleted.
        (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObjectPrototype::create): Deleted.
        (WebCore::JSTestGlobalObjectPrototype::createStructure): Deleted.
        (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifierPrototype::create): Deleted.
        (WebCore::JSTestIndexedSetterNoIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::create): Deleted.
        (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::createStructure): Deleted.
        (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifierPrototype::create): Deleted.
        (WebCore::JSTestIndexedSetterWithIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::construct):
        (WebCore::jsTestInterfacePrototypeFunctionEntriesCaller):
        (WebCore::JSTestInterfacePrototype::create): Deleted.
        (WebCore::JSTestInterfacePrototype::createStructure): Deleted.
        (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::JSTestInterfaceLeadingUnderscorePrototype::create): Deleted.
        (WebCore::JSTestInterfaceLeadingUnderscorePrototype::createStructure): Deleted.
        (WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::jsTestIterablePrototypeFunctionEntriesCaller):
        (WebCore::JSTestIterablePrototype::create): Deleted.
        (WebCore::JSTestIterablePrototype::createStructure): Deleted.
        (WebCore::JSTestIterablePrototype::JSTestIterablePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::JSTestJSBuiltinConstructorPrototype::create): Deleted.
        (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
        (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListenerPrototype::create): Deleted.
        (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): Deleted.
        (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::create): Deleted.
        (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorPrototype::create): Deleted.
        (WebCore::JSTestNamedConstructorPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedDeleterNoIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::create): Deleted.
        (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedDeleterWithIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::create): Deleted.
        (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWithPrototype::create): Deleted.
        (WebCore::JSTestNamedGetterCallWithPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedGetterNoIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedGetterWithIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterNoIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingExceptionPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterThrowingExceptionPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifierPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterWithIdentifierPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::prototypeForStructure):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::prototypeForStructure):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::create): Deleted.
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::createStructure): Deleted.
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::jsTestNodePrototypeFunctionEntriesCaller):
        (WebCore::JSTestNodePrototype::create): Deleted.
        (WebCore::JSTestNodePrototype::createStructure): Deleted.
        (WebCore::JSTestNodePrototype::JSTestNodePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjConstructor::construct):
        (WebCore::JSTestObjPrototype::create): Deleted.
        (WebCore::JSTestObjPrototype::createStructure): Deleted.
        (WebCore::JSTestObjPrototype::JSTestObjPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructorsPrototype::create): Deleted.
        (WebCore::JSTestOverloadedConstructorsPrototype::createStructure): Deleted.
        (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::create): Deleted.
        (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::createStructure): Deleted.
        (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltinsPrototype::create): Deleted.
        (WebCore::JSTestOverrideBuiltinsPrototype::createStructure): Deleted.
        (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterfacePrototype::create): Deleted.
        (WebCore::JSTestPluginInterfacePrototype::createStructure): Deleted.
        (WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEventPrototype::create): Deleted.
        (WebCore::JSTestPromiseRejectionEventPrototype::createStructure): Deleted.
        (WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::JSTestSerializationPrototype::create): Deleted.
        (WebCore::JSTestSerializationPrototype::createStructure): Deleted.
        (WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::JSTestSerializationIndirectInheritancePrototype::create): Deleted.
        (WebCore::JSTestSerializationIndirectInheritancePrototype::createStructure): Deleted.
        (WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::JSTestSerializationInheritPrototype::create): Deleted.
        (WebCore::JSTestSerializationInheritPrototype::createStructure): Deleted.
        (WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::JSTestSerializationInheritFinalPrototype::create): Deleted.
        (WebCore::JSTestSerializationInheritFinalPrototype::createStructure): Deleted.
        (WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): Deleted.
        (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): Deleted.
        (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::JSTestStringifierPrototype::create): Deleted.
        (WebCore::JSTestStringifierPrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::JSTestStringifierAnonymousOperationPrototype::create): Deleted.
        (WebCore::JSTestStringifierAnonymousOperationPrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::JSTestStringifierNamedOperationPrototype::create): Deleted.
        (WebCore::JSTestStringifierNamedOperationPrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::JSTestStringifierOperationImplementedAsPrototype::create): Deleted.
        (WebCore::JSTestStringifierOperationImplementedAsPrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::JSTestStringifierOperationNamedToStringPrototype::create): Deleted.
        (WebCore::JSTestStringifierOperationNamedToStringPrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::JSTestStringifierReadOnlyAttributePrototype::create): Deleted.
        (WebCore::JSTestStringifierReadOnlyAttributePrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::JSTestStringifierReadWriteAttributePrototype::create): Deleted.
        (WebCore::JSTestStringifierReadWriteAttributePrototype::createStructure): Deleted.
        (WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype): Deleted.
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::construct):
        (WebCore::JSTestTypedefsPrototype::create): Deleted.
        (WebCore::JSTestTypedefsPrototype::createStructure): Deleted.
        (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype): Deleted.

2020-03-06  James Darpinian  <jdarpinian@chromium.org>

        Set important EGL context attributes
        https://bugs.webkit.org/show_bug.cgi?id=208724

        Reviewed by Dean Jackson.

        These EGL context attributes are important to make ANGLE's validation correct for
        WebGL contexts. ROBUST_RESOURCE_INITIALIZATION is especially important; the lack
        of it may be a root cause of some of the test flakiness we have seen. With this
        change WebKit's EGL context attributes now match Chromium's for ANGLE/WebGL
        contexts.

        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

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

        Use ObjectIdentifier to identify media sessions
        https://bugs.webkit.org/show_bug.cgi?id=208710

        Reviewed by Eric Carlson.

        No change of behavior, except that the identifier is now stable over time and unique per process.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const):
        * html/HTMLMediaElement.h:
        * platform/audio/NowPlayingInfo.h:
        (WebCore::NowPlayingInfo::decode):
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingInfoUniqueIdentifier const):
        * platform/audio/cocoa/MediaSessionManagerCocoa.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::setNowPlayingInfo):
        (MediaSessionManagerCocoa::updateNowPlayingInfo):
        * testing/Internals.cpp:
        (WebCore::Internals::nowPlayingState const):

2020-03-06  Jason Lawrence  <lawrence.j@apple.com>

        Unreviewed, rolling out r257760.

        This commit caused flaky crashing on Mac wk2.

        Reverted changeset:

        "Fix for LayoutTests/accessibility/mac/value-change/value-
        change-user-info-contenteditable.html in IsolatedTree mode."
        https://bugs.webkit.org/show_bug.cgi?id=208462
        https://trac.webkit.org/changeset/257760

2020-03-06  David Quesada  <david_quesada@apple.com>

        Add _WKResourceLoadInfo.resourceType SPI
        https://bugs.webkit.org/show_bug.cgi?id=208723

        Reviewed by Alex Christensen.

        Covered by API tests.

        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::sendBeacon):
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendPing):
        * platform/network/ResourceRequestBase.h:

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

        Add support for NowPlaying commands in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=208707

        Reviewed by Eric Carlson.

        Add a NowPlayingManager that is responsible to clear/set/update NowPlaying information as well as receive commands
        and send them to the current NowPlaying client.
        Manually tested.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/PlatformMediaSessionManager.h:

2020-03-06  Simon Fraser  <simon.fraser@apple.com>

        Move synchronousScrollingReasons to ScrollingTreeScrollingNode
        https://bugs.webkit.org/show_bug.cgi?id=208721

        Reviewed by Antti Koivisto.

        synchronousScrollingReasons was on Scrolling*FrameScrollingNode, but with async overflow
        scrolling, some overflow scrolls will need to scroll synchronously if they paint any
        background-attachment:fixed, so move synchronousScrollingReasons down to Scrolling*ScrollingNode.

        Also wrap the scrolling tree parts in #if ENABLE(SCROLLING_THREAD) since synchronous scrolling
        is only a thing if you use threaded scrolling. Ideally more of the ScrollingCoordinator code
        would also have #if ENABLE(SCROLLING_THREAD) but that can be done later.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
        (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
        (WebCore::ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons): Deleted.
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
        (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
        (WebCore::ScrollingStateScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingStateScrollingNode.h:
        (WebCore::ScrollingStateScrollingNode::synchronousScrollingReasons const):
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingTreeScrollingNode.h:

2020-03-06  Simon Fraser  <simon.fraser@apple.com>

        Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread
        https://bugs.webkit.org/show_bug.cgi?id=208672

        Reviewed by Antti Koivisto.

        Async overflow/frame scrolling on macOS is going to hit-test through the CALayer tree on the
        scrolling thread, and access PlatformCALayers that hang off CALayers. We therefore have to ensure
        that those layers are not getting mutated while hit-testing.

        We only touch PlatformCALayers and CALayers through two codepaths: GraphicsLayer::flushCompositingState()
        when pushing GraphicsLayer changes to CA, and when destroying GraphicsLayers which tears down their associated
        PlatformCALayers (the CALayers remain parented in the tree).

        To prevent a PlatformCALayer from being destroyed while being accessed on the scrolling thread, we make
        it ThreadSafeRefCounted<>, and lock around fetching thePlatformCALayer from the layerToPlatformLayerMap() which
        retains it.

        To prevent the CALayer/PlatformCALayer trees being mutated during layer flushing, we lock around 
        rootLayer->flushCompositingState() in RenderLayerCompositor::flushPendingLayerChanges().

        The lock is owned by ScrollingTreeMac.

        * page/scrolling/AsyncScrollingCoordinator.h:
        (WebCore::LayerTreeHitTestLocker::LayerTreeHitTestLocker):
        (WebCore::LayerTreeHitTestLocker::~LayerTreeHitTestLocker):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::lockLayersForHitTesting):
        (WebCore::ScrollingTree::unlockLayersForHitTesting):
        * page/scrolling/mac/ScrollingTreeMac.h:
        * page/scrolling/mac/ScrollingTreeMac.mm:
        (ScrollingTreeMac::lockLayersForHitTesting):
        (ScrollingTreeMac::unlockLayersForHitTesting):
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::layerToPlatformLayerMapMutex):
        (WebCore::PlatformCALayer::platformCALayerForLayer):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):

2020-03-06  Simon Fraser  <simon.fraser@apple.com>

        Put an event region on scroll container layers
        https://bugs.webkit.org/show_bug.cgi?id=208684

        Reviewed by Antti Koivisto.
        
        Hit-testing through the CALayer tree on macOS, where we don't have scroll views for overflow,
        is simpler if scroll container layers have an event region that just represents the bounds of
        the layer. These regions are harmless to have on iOS too.

        This patch adds them for overflow scroll, and for m_clipLayer which is the scroll container
        layer for scrollable subframes.

        Tests: fast/scrolling/mac/event-region-scrolled-contents-layer.html
               fast/scrolling/mac/event-region-subframe.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateScrollLayerClipping):

2020-03-06  Antti Koivisto  <antti@apple.com>

        Reduce ThreadTimers maxDurationOfFiringTimers to 16ms
        https://bugs.webkit.org/show_bug.cgi?id=208717

        Reviewed by Simon Fraser.

        50ms -> 16ms.

        This gives us more chances to do rendering updates. A/B testing says it is neutral for performance.

        * platform/ThreadTimers.cpp:

2020-03-06  Kate Cheney  <katherine_cheney@apple.com>

        Remove redundant flags in script evaluation checks
        https://bugs.webkit.org/show_bug.cgi?id=208609
        <rdar://problem/60058656>
        
        Reviewed by Brent Fulgham.
        
        hasNavigatedAwayFromAppBoundDomain only gets set in WebPageProxy if
        its a main frame navigation and In-App Browser privacy is enabled,
        we don't need to check again at the sites.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeScriptInWorld):
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptImmediately):

2020-03-06  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Absolute positioned table should generate a static table box inside the out-of-flow table wrapper box
        https://bugs.webkit.org/show_bug.cgi?id=208713
        <rdar://problem/60151358>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/absolute-positioned-simple-table.html

        <table style="position: absolute"> should generate
        1. absolute positioned table wrapper box
        2. static (inflow) positioned table box inside the out-of-flow table wrapper box. 

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildTableStructure):

2020-03-05  Darin Adler  <darin@apple.com>

        Improve some media code
        https://bugs.webkit.org/show_bug.cgi?id=208322

        Reviewed by Anders Carlsson.

        - TextTrack objects now take Document instead of ScriptExecutionContext.
        - Made more TextTrack functions private and protected.
        - Made TextTrack parsing functions use return values rather than out arguments.
        - Use references rather than pointers and Ref rather than RefPtr for non-null things.
        - Made MediaControlsHost use a WeakPtr instead of a raw pointer.

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::alwaysOnKeyword): Made private to this file instead of exposed in header.
        (WebCore::manualKeyword): Ditto.
        (WebCore::MediaControlsHost::create): Take a reference instead of a pointer to
        the media element.
        (WebCore::MediaControlsHost::MediaControlsHost): Ditto, and make a weak pointer.
        (WebCore::MediaControlsHost::sortedTrackListForMenu): Added null check.
        (WebCore::MediaControlsHost::displayNameForTrack): Ditto.
        (WebCore::MediaControlsHost::captionMenuOffItem): Ditto.
        (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
        (WebCore::MediaControlsHost::captionDisplayMode const): Ditto.
        (WebCore::MediaControlsHost::setSelectedTextTrack): Ditto.
        (WebCore::MediaControlsHost::textTrackContainer): Ditto.
        (WebCore::MediaControlsHost::allowsInlineMediaPlayback const): Ditto.
        (WebCore::MediaControlsHost::supportsFullscreen const): Ditto.
        (WebCore::MediaControlsHost::isVideoLayerInline const): Ditto.
        (WebCore::MediaControlsHost::isInMediaDocument const): Ditto.
        (WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline): Ditto.
        (WebCore::MediaControlsHost::userGestureRequired const): Ditto.
        (WebCore::MediaControlsHost::shouldForceControlsDisplay const): Ditto.
        (WebCore::MediaControlsHost::externalDeviceDisplayName const): Ditto.
        (WebCore::MediaControlsHost::externalDeviceType const): Ditto.
        (WebCore::MediaControlsHost::controlsDependOnPageScaleFactor const): Ditto.
        (WebCore::MediaControlsHost::setControlsDependOnPageScaleFactor): Ditto.
        (WebCore::MediaControlsHost::generateUUID): Made a static member.
        (WebCore::MediaControlsHost::shadowRootCSSText): Ditto.
        (WebCore::MediaControlsHost::base64StringForIconNameAndType): Ditto.
        (WebCore::MediaControlsHost::formattedStringForDuration): Ditto.
        (WebCore::MediaControlsHost::compactMode const): Tweaked logic a bit.

        * Modules/mediacontrols/MediaControlsHost.h: Made various member functions
        into static member functions, used references instead of pointers for
        things that are never null, used WeakPtr for m_mediaElement.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        Document instead of ScriptExecutionContext.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Document instead of
        ScriptExecutionContext.
        (WebCore::HTMLMediaElement::updateCaptionContainer): Pass reference to
        MediaControlsHost::create.
        (WebCore::HTMLMediaElement::setSelectedTextTrack): Update since special items
        are now references rather than pointers.
        (WebCore::HTMLMediaElement::updateTextTrackDisplay): Pass reference.
        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Ditto.

        * html/HTMLTrackElement.cpp:
        (WebCore::HTMLTrackElement::parseAttribute): Removed setIsDefault function
        since the track can simply read the attribute out of the element instead.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
        Update since special items are now referencse rather than pointers.

        * html/track/DataCue.cpp:
        (WebCore::DataCue::DataCue): Document instead of ScriptExecutionContext.
        (WebCore::DataCue::create): Moved these functions out of the header.
        * html/track/DataCue.h: Updated for the above.
        * html/track/DataCue.idl: Ditto.

        * html/track/InbandDataTextTrack.cpp:
        (WebCore::InbandDataTextTrack::InbandDataTextTrack): Document instead
        of ScriptExecutionContext.
        (WebCore::InbandDataTextTrack::create): Ditto.
        (WebCore::InbandDataTextTrack::addDataCue): Ditto. Also use reference
        instead of pointer when calling hasCue.
        * html/track/InbandDataTextTrack.h: Updated for the above.

        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Document
        instead of ScriptExecutionContext.
        (WebCore::InbandGenericTextTrack::create): Ditto.
        (WebCore::InbandGenericTextTrack::addGenericCue): Ditto. Also use
        reference instead of pointer when calling hasCue.
        (WebCore::InbandGenericTextTrack::parser): Ditto.
        (WebCore::InbandGenericTextTrack::newCuesParsed): Ditto. Also use
        return value from takeCues instead of out arguenmt from getNewCues.
        Also use reference instead of pointer when calling hasCue.
        (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
        * html/track/InbandGenericTextTrack.h: Update for above.

        * html/track/InbandTextTrack.cpp:
        (WebCore::InbandTextTrack::create): Document instead of
        ScriptExecutionContext.
        (WebCore::InbandTextTrack::InbandTextTrack): Ditto.
        * html/track/InbandTextTrack.h: Update for above.

        * html/track/InbandWebVTTTextTrack.cpp:
        (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Document
        instead of ScriptExecutionContext.
        (WebCore::InbandWebVTTTextTrack::create): Ditto.
        (WebCore::InbandWebVTTTextTrack::parser): Ditto.
        (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. Also use
        return value from takeCues instead of out arguenmt from getNewCues.
        Also use reference instead of pointer when calling hasCue.
        (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Ditto.
        * html/track/InbandWebVTTTextTrack.h: Update for above.

        * html/track/LoadableTextTrack.cpp:
        (WebCore::LoadableTextTrack::create): Moved here from header.
        (WebCore::LoadableTextTrack::loadTimerFired): Document instead of
        ScriptExecutionContext.
        (WebCore::LoadableTextTrack::newRegionsAvailable): Use return value
        from getNewRegions instead of out argument.
        (WebCore::LoadableTextTrack::isDefault const): New implementation that
        does not rely on a data member; checks attribute on video element.
        * html/track/LoadableTextTrack.h: Updated for above changes.

        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::captionMenuOffItem): Return a reference rather
        than a pointer.
        (WebCore::TextTrack::captionMenuAutomaticItem): Ditto.
        (WebCore::TextTrack::create): Document rather than ScriptExecutionContext.
        (WebCore::TextTrack::document const): Added. For use by derived classes.
        (WebCore::TextTrack::addRegion): Ref rather than RefPtr.
        (WebCore::TextTrack::removeRegion): Reference rather than pointer.
        (WebCore::TextTrack::cueWillChange): Ditto.
        (WebCore::TextTrack::cueDidChange): Ditto.
        (WebCore::TextTrack::hasCue): Ditto.

        * html/track/TextTrack.h: Removed declarations of non-existent
        disabledKeyword, hiddenKeyword, and showingKeyword functions.
        Made setKind, client, and hasCue protected. Made overrides of
        eventTargetInterface, scriptExecutionContext, and logClassName
        private. Removed setIsDefault. Updated for changes above.

        * html/track/TextTrack.idl: Did what FIXME suggested, making the region
        parameters non-nullable. Passing null silently did nothing before. There
        is some small risk of website incompatibility if someone accidentally
        relied on this WebKit-specific behavior.

        * html/track/TextTrackCue.cpp:
        (WebCore::TextTrackCue::create): Document instead of ScriptExecutionContext.
        (WebCore::TextTrackCue::TextTrackCue): Ditto.
        (WebCore::TextTrackCue::willChange): Pass reference.
        (WebCore::TextTrackCue::didChange): Ditto.
        * html/track/TextTrackCue.h: Update for above changes.
        * html/track/TextTrackCue.idl: Ditto.

        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Update since the base
        class now takes an rvalue reference to the string.
        (WebCore::TextTrackCueGeneric::isOrderedBefore const): Use auto.
        (WebCore::TextTrackCueGeneric::isPositionedAbove const): Ditto.

        * html/track/VTTCue.cpp:
        (WebCore::VTTCue::create): Document instead of ScriptExecutionContext.
        Also take String with an rvalue reference.
        (WebCore::VTTCue::VTTCue): Ditto.
        * html/track/VTTCue.h: Update for above changes.
        * html/track/VTTCue.idl: Ditto.

        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::WebVTTParser): Document instead of
        ScriptExecutionContext. References instead of pointers. Initialize
        m_state in class definition.
        (WebCore::WebVTTParser::takeCues): Renamed from getNewCues and changed
        to use a return value instead of an out argument.
        (WebCore::WebVTTParser::takeRegions): Ditto.
        (WebCore::WebVTTParser::takeStyleSheets): Ditto.
        (WebCore::WebVTTParser::parseCueData): Remove null check of m_client.
        (WebCore::WebVTTParser::parse): Ditto.
        (WebCore::WebVTTParser::collectWebVTTBlock): Ditto.
        (WebCore::WebVTTParser::checkAndCreateRegion): Pass document.
        (WebCore::WebVTTParser::checkAndStoreRegion): Use
        Vector::removeFirstMatching instead of Vector::removeFirst.
        (WebCore::WebVTTParser::createNewCue): Remove null check of m_client.
        * html/track/WebVTTParser.h: Update for above changes.

        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::TextTrackLoader): Document instead of
        ScriptExecutionContext. References instead of pointers. Initialize
        data members in in class definition.
        (WebCore::TextTrackLoader::processNewCueData): Pass references.
        (WebCore::TextTrackLoader::corsPolicyPreventedLoad): Use m_document.
        (WebCore::TextTrackLoader::load): Ditto.
        (WebCore::TextTrackLoader::getNewCues): Use takeCues.
        (WebCore::TextTrackLoader::getNewRegions): Changed to return a vector
        instead of using an out argument. Use takeRegions.
        (WebCore::TextTrackLoader::getNewStyleSheets): Ditto.
        * loader/TextTrackLoader.h: Updated for the above.

        * page/CaptionUserPreferences.cpp:
        (WebCore::trackDisplayName): Updated since these are references.
        (WebCore::CaptionUserPreferences::mediaSelectionOptionForTrack const): Ditto.
        (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto.
        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::trackDisplayName): Ditto.
        (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Ditto.
        * platform/cocoa/PlaybackSessionModelMediaElement.mm:
        (WebCore::PlaybackSessionModelMediaElement::selectLegibleMediaOption): Ditto.
        (WebCore::PlaybackSessionModelMediaElement::legibleMediaSelectedIndex const):
        Updated to use references rather than pointers. Refactored the logic to
        use Optional and nested if statements to make the algorithm clearer.

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

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

        Reviewed by Antti Koivisto.

        Convert SynchronousScrollingReasons to an OptionSet<SynchronousScrollingReason>.

        * page/PerformanceLoggingClient.cpp:
        (WebCore::PerformanceLoggingClient::synchronousScrollingReasonsAsString):
        * page/PerformanceLoggingClient.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
        (WebCore::AsyncScrollingCoordinator::reportSynchronousScrollingReasonsChanged):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::synchronousScrollingReasons const):
        (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously const):
        (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):
        * page/scrolling/ScrollingCoordinatorTypes.h:
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons):
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::reportSynchronousScrollingReasonsChanged):
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::reportSynchronousScrollingReasonsChanged):
        * page/scrolling/ThreadedScrollingTree.h:

2020-03-06  Antoine Quint  <graouts@webkit.org>

        Remove the experimental flag for Pointer Events
        https://bugs.webkit.org/show_bug.cgi?id=208655
        <rdar://problem/60090545>

        Reviewed by Dean Jackson.

        * dom/Element.cpp:
        (WebCore::dispatchPointerEventIfNeeded):
        (WebCore::Element::removedFromAncestor):
        * dom/Element.idl:
        * dom/NavigatorMaxTouchPoints.idl:
        * dom/PointerEvent.idl:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setPointerEventsEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::pointerEventsEnabled const): Deleted.
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement):

2020-03-06  Enrique Ocaña González  <eocanha@igalia.com>

        [GStreamer] Streaming aac/mp3 audio doesn't always work
        https://bugs.webkit.org/show_bug.cgi?id=205801

        Reviewed by Philippe Normand.

        Don't rely on response size to replace Content-Length. This may break streaming videos,
        which should always have an Infinite duration.

        This patch is based on the fix found by Philippe Normand <pnormand@igalia.com>

        Test: http/tests/media/video-no-content-length-stall.html

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (CachedResourceStreamingClient::dataReceived):

2020-03-06  Frederic Wang  <fwang@igalia.com>

        [intersection-observer] Accept a Document as an explicit root
        https://bugs.webkit.org/show_bug.cgi?id=208047

        Reviewed by Simon Fraser.

        This patch introduces a recent enhancement to the Intersection Observer specification: the
        root initialization parameter can be explicitly be set to a Document. The typical use case
        is when document is an iframe. See https://github.com/w3c/IntersectionObserver/issues/372

        This patch also updates the way Element's intersection observer data is handled so that it is
        more consistent with the explicit Document root case introduced here.

        Test: imported/w3c/web-platform-tests/intersection-observer/document-scrolling-element-root.html

        * dom/Document.cpp:
        (WebCore::Document::~Document): Notify observers about our desctruction.
        (WebCore::Document::updateIntersectionObservations): Use new method name. This does not
        require null-check because ensureIntersectionObserverData() has been called in
        IntersectionObserver::observe().
        (WebCore::Document::ensureIntersectionObserverData): Return reference to intersection
        observer data for this document, creating one if it does not exist.
        * dom/Document.h: Add new intersection observer data, used for documents that are explicit
        intersection observer roots.
        (WebCore::Document::intersectionObserverDataIfExists): Return pointer to intersection
        observer data or null if it does not exist.
        * dom/Element.cpp:
        (WebCore::Element::didMoveToNewDocument): Use new method name.
        (WebCore::Element::disconnectFromIntersectionObservers): Ditto and null-check weak refs.
        (WebCore::Element::intersectionObserverDataIfExists): Rename method to match Document's one
        and be more explicit that it will be null if it does not exist.
        (WebCore::Element::intersectionObserverData): Renamed.
        * dom/Element.h: Renamed.
        * html/LazyLoadImageObserver.cpp:
        (WebCore::LazyLoadImageObserver::intersectionObserver): Initialize with a WTF::Optional
        after API change.
        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::create): Pass a Node* root, which can be null (implicit
        root), Document* or Element* (explicit roots). This is determined from init.root.
        (WebCore::IntersectionObserver::IntersectionObserver): Handle the case of explicit Document
        root.
        (WebCore::IntersectionObserver::~IntersectionObserver): Ditto and update method name for
        the explicit Element case. Note that in both explicit root cases the corresponding
        ensureIntersectionObserverData() method had been called in the constructor so they can
        be safely deferenced.
        (WebCore::IntersectionObserver::removeTargetRegistration): Use new method name.
        * page/IntersectionObserver.h: Update comment and code now that explicit root is a Node* and
        IntersectionObserver::Init::root is either an Element or a Document or null.
        (WebCore::IntersectionObserver::root const): Ditto.
        (): Deleted.
        * page/IntersectionObserver.idl: Update IDL to match the spec IntersectionObserver::root
        is a nullable Node and IntersectionObserverInit::root a nullable Element or Document.

2020-03-06  Yusuke Suzuki  <ysuzuki@apple.com>

        Put all generated JSCells in WebCore into IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205107

        Reviewed by Saam Barati.

        This patch automatically generates IsoSubspace per WebCore DOM object type.
        In preprocess-idls.pl, we collect all the DOM object types and generate DOMIsoSubspaces class,
        which contains all the necessary IsoSubspaces. And it is held by WebCoreJSClientData.

        CodeGeneratorJS.pm starts putting `subspaceFor` and `subspaceForImpl` for each JS DOM wrapper classes.
        And we dynamically create IsoSubspace and set it to WebCoreJSClientData's DOMIsoSubspaces. At the same
        time, we register IsoSubspace to m_outputConstraintSpaces if the class has output constraits callback.

        From the previous patch, we fixed outputConstraintSpaces bug, which is returning a copy of Vector<>
        instead of a reference to the member Vector.

        * CMakeLists.txt:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * WebCoreMacros.cmake:
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::outputConstraintSubspaceFor): Deleted.
        * bindings/js/JSDOMWrapper.h:
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WebCoreJSClientData.h:
        (WebCore::JSVMClientData::forEachOutputConstraintSpace):
        (WebCore::JSVMClientData::subspaces):
        (WebCore::JSVMClientData::outputConstraintSpace): Deleted.
        (WebCore::JSVMClientData::subspaceForJSDOMWindow): Deleted.
        (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow): Deleted.
        (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        * bindings/scripts/generate-bindings-all.pl:
        * bindings/scripts/preprocess-idls.pl:
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::JSInterfaceName::subspaceForImpl):
        * bindings/scripts/test/JS/JSInterfaceName.h:
        (WebCore::JSInterfaceName::subspaceFor):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSMapLike.h:
        (WebCore::JSMapLike::subspaceFor):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
        (WebCore::JSReadOnlyMapLike::subspaceFor):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::JSReadOnlySetLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSReadOnlySetLike.h:
        (WebCore::JSReadOnlySetLike::subspaceFor):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::JSSetLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSSetLike.h:
        (WebCore::JSSetLike::subspaceFor):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        (WebCore::JSTestActiveDOMObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::JSTestCEReactions::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCEReactions.h:
        (WebCore::JSTestCEReactions::subspaceFor):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::JSTestCEReactionsStringifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
        (WebCore::JSTestCEReactionsStringifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracer::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCallTracer.h:
        (WebCore::JSTestCallTracer::subspaceFor):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
        (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::JSTestDOMJIT::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestDOMJIT.h:
        (WebCore::JSTestDOMJIT::subspaceFor):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySetting::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
        (WebCore::JSTestEnabledBySetting::subspaceFor):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::JSTestEnabledForContext::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEnabledForContext.h:
        (WebCore::JSTestEnabledForContext::subspaceFor):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        (WebCore::JSTestEventConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTarget::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        (WebCore::JSTestEventTarget::subspaceFor):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestException.h:
        (WebCore::JSTestException::subspaceFor):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachable::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        (WebCore::JSTestGenerateIsReachable::subspaceFor):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::JSTestGlobalObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
        (WebCore::JSTestIndexedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
        (WebCore::JSTestIndexedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
        (WebCore::JSTestIndexedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::JSTestInterfaceLeadingUnderscore::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
        (WebCore::JSTestInterfaceLeadingUnderscore::subspaceFor):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::JSTestIterable::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIterable.h:
        (WebCore::JSTestIterable::subspaceFor):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::JSTestJSBuiltinConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
        (WebCore::JSTestJSBuiltinConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListener::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        (WebCore::JSTestMediaQueryListListener::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        (WebCore::JSTestNamedConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        (WebCore::JSTestNamedDeleterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        (WebCore::JSTestNamedDeleterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        (WebCore::JSTestNamedDeleterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWith::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
        (WebCore::JSTestNamedGetterCallWith::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
        (WebCore::JSTestNamedGetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
        (WebCore::JSTestNamedGetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        (WebCore::JSTestNamedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        (WebCore::JSTestNamedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        (WebCore::JSTestNamedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNode::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObj::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestObj.h:
        (WebCore::JSTestObj::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructors::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        (WebCore::JSTestOverloadedConstructors::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
        (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
        (WebCore::JSTestOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestPluginInterface.h:
        (WebCore::JSTestPluginInterface::subspaceFor):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEvent::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
        (WebCore::JSTestPromiseRejectionEvent::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::JSTestSerialization::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerialization.h:
        (WebCore::JSTestSerialization::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::JSTestSerializationIndirectInheritance::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h:
        (WebCore::JSTestSerializationIndirectInheritance::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::JSTestSerializationInherit::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationInherit.h:
        (WebCore::JSTestSerializationInherit::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::JSTestSerializationInheritFinal::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
        (WebCore::JSTestSerializationInheritFinal::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        (WebCore::JSTestSerializedScriptValueInterface::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::JSTestStringifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifier.h:
        (WebCore::JSTestStringifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::JSTestStringifierAnonymousOperation::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
        (WebCore::JSTestStringifierAnonymousOperation::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::JSTestStringifierNamedOperation::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
        (WebCore::JSTestStringifierNamedOperation::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::JSTestStringifierOperationImplementedAs::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
        (WebCore::JSTestStringifierOperationImplementedAs::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::JSTestStringifierOperationNamedToString::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
        (WebCore::JSTestStringifierOperationNamedToString::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::JSTestStringifierReadOnlyAttribute::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
        (WebCore::JSTestStringifierReadOnlyAttribute::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::JSTestStringifierReadWriteAttribute::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
        (WebCore::JSTestStringifierReadWriteAttribute::subspaceFor):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefs::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        (WebCore::JSTestTypedefs::subspaceFor):

2020-03-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r257950.
        https://bugs.webkit.org/show_bug.cgi?id=208704

        causing debug failure (Requested by yusukesuzuki on #webkit).

        Reverted changeset:

        "Put all generated JSCells in WebCore into IsoSubspace"
        https://bugs.webkit.org/show_bug.cgi?id=205107
        https://trac.webkit.org/changeset/257950

2020-03-06  Michael Catanzaro  <mcatanzaro@gnome.org>

        [WPE][GTK] Use Firefox user agent quirk more aggressively on Google Docs
        https://bugs.webkit.org/show_bug.cgi?id=208647

        Reviewed by Carlos Garcia Campos.

        I had previously determined that we need to send a Firefox user agent quirk to
        accounts.youtube.com to avoid unsupported browser warnings on Google Docs. Either the user
        agent check has since become more aggressive, or it somehow depends on factors I don't
        understand, but as of today it's no longer enough. We now need the quirk for docs.google.com
        as well.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresFirefoxBrowser):

2020-03-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] An absolute positioned <table> should establish a table formatting context
        https://bugs.webkit.org/show_bug.cgi?id=208695
        <rdar://problem/60122473>

        Reviewed by Antti Koivisto.

        Not all type of content gets blockified when out-of-flow positioned or floated.

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesBlockFormattingContext const):

2020-02-29  Darin Adler  <darin@apple.com>

        Simplify gradient parsing
        https://bugs.webkit.org/show_bug.cgi?id=208417

        Reviewed by Anders Carlsson.

        - Use Optional<> and invalid Color to represent unspecified positions and colors.
          This is simpler and easier to get right than separate booleans.
        - Simplified sorting of stops in legacy gradients to remove extra CSS value
          evaluation and unnecessary "sort in place" technique.
        - Rewrote equals functions for CSS gradient value classes. The new pattern is
          to compare all the data members that hold parsed CSS data, handling null
          correctly, since the parser won't set inappropriate ones. The old code had
          complex logic to only compare certain data members, which was unnecessary
          and hard to read to tell if it was correct.
        - Added some more use of WTFMove to cut down on reference count churn.

        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::image): Removed unneeded call to get().
        (WebCore::compareStops): Deleted.
        (WebCore::CSSGradientValue::sortStopsIfNeeded): Deleted.
        (WebCore::resolveStopColors): Take advantage of the fact that we know because
        of parsing rules that the only stops without colors are midpoints to drastically
        simplify this function to a trivial loop.
        (WebCore::CSSGradientValue::hasColorDerivedFromElement const): Added.
        Checks to see if any of the stop colors is derived from the element. The old
        code confusingly would store the answer to this in the stop, but only in the
        first stop with this property. Computing it without modifying the stop, and
        memoizing it in the gradient preserves the same performance characteristics
        as before without requiring a boolean in each stop in the stops vector.
        (WebCore::CSSGradientValue::gradientWithStylesResolved): Call the new
        hasColorDerivedFromElement function instead of having the logic here.
        (WebCore::LinearGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
        Update since GradientStop now has optional offsets. By the time this
        function is called they are all guaranteed to be filled in, so we can
        just use the * operator.
        (WebCore::RadialGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
        Ditto.
        (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
        Ditto.
        (WebCore::CSSGradientValue::computeStops): Moved the sorting of stops for
        the deprecated gradients here. Also updated since Gradient::ColorStop
        no longer uses "m_" prefixes on its public struct data members. Some
        simplification because we no longer need to explicitly set "specified"
        to true since it's no longer a separate boolean.
        (WebCore::positionFromValue): Handle a null pointer for value by returning
        0, which is what the caller was doing explicitly before. Use float
        instead of int for some internal computations that were mixing the two
        for no good reason.
        (WebCore::computeEndPoint): Removed null checks now that positionFromValue
        does them for us, turning this into a one-liner.
        (WebCore::CSSGradientValue::isCacheable const): Use hasColorDerivedFromElement.
        (WebCore::CSSGradientValue::knownToBeOpaque const): Removed unnnecessary
        checking the color both before and after when a color filter is involved.
        (WebCore::CSSGradientValue::equals const): Added. Shared by all the equals
        functions for derived classes.
        (WebCore::appendGradientStops): Updated for changes to CSSGradientColorStop.
        (WebCore::appendSpaceSeparatedOptionalCSSPtrText): Added template helper
        for writing two optional CSS values with a space between.
        (WebCore::writeColorStop): Ditto. Also converted to non-member function,
        removed unneeded isMidpoint check, use appendSpaceSeparatedOptionalCSSPtrText.
        (WebCore::CSSLinearGradientValue::customCSSText const): Call function
        members so we don't have to expose CSSGradientValue data members as
        protected things that can be accessed by derived classes. Some other
        small refactoring, such as getting rid of extra boolean wroteFirstStop.
        (WebCore::CSSLinearGradientValue::createGradient): Updated to use
        function members instead of protected data members.
        (WebCore::CSSLinearGradientValue::equals const): Compare all data
        members and use CSSGradientValue::equals, makes this a 1-liner.
        (WebCore::CSSRadialGradientValue::customCSSText const): Call function
        members as described above and use appendSpaceSeparatedOptionalCSSPtrText.
        (WebCore::CSSRadialGradientValue::createGradient): Ditto.
        (WebCore::CSSRadialGradientValue::equals const): Compare all data
        members and use CSSGradientValue::equals.
        (WebCore::CSSConicGradientValue::customCSSText const): Call function
        members as described above and use appendSpaceSeparatedOptionalCSSPtrText.
        (WebCore::CSSConicGradientValue::createGradient): Ditto.
        (WebCore::CSSConicGradientValue::equals const): Compare all data
        members and use CSSGradientValue::equals, makes this a 1-liner.

        * css/CSSGradientValue.h: Removed unneeded includes and forward declarations.
        Renamed CSSGradientColorStop data members to not use m_ prefix since this is
        a struct with public data members, and WebKit style says not to do that here.
        Removed m_colorIsDerivedFromElement and isMidpoint from CSSGradientColorStop,
        m_colorIsDerivedFromElement is now stored in the gradient, not the color stop,
        and midpoints are any color stop with null color. Replaced the
        CSSGradientValue::stopCount function, which mixed size_t and unsigned types,
        with a hasTwoStops function, which is all the caller needs. Converted the
        isFixedSize, fixedSize, isPending, and loadSubimages into static member
        functions: they don't do any work and so don't need an instance. Removed
        the unneeded gradient type argument to the cloning constructors. Removed
        m_stopsSorted and added m_hasColorDerivedFromElement and
        hasColorDerivedFromElement. Added getter functions that are protected so
        the data members themselves can be private. Removed sortStopsIfNeeded
        and writeColorStop.

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
        Updated for CSSGradientColorStop member renaming.
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient): Use
        more WTFMove to save a little bit of reference count churn; in some cases
        that means moving the setter calls to the end of the function after all
        the error checking.
        (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops): Ditto.
        Removed code to set isMidpoint and the FIXME-NEWPARSER comment that said
        it could be removed. Used lambda to cut down on repeated code. Changed
        parsing of stops with a second position to repeat the color instead of
        relying on later computation to repeat it; this is required so we can
        always treat an omitted color as a midpoint.
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient): Ditto.
        (WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto.
        (WebCore::CSSPropertyParserHelpers::consumeLinearGradient): Ditto.
        (WebCore::CSSPropertyParserHelpers::consumeConicGradient): Ditto.

        * html/HTMLInputElement.cpp:
        (WebCore::autoFillStrongPasswordMaskImage): Updated for the renamed
        CSSGradientColorStop members, added a missing call to doneAddingStops,
        and use some WTFMove to cut down on reference count churn.

2020-03-05  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove the optimization for discarding no operation DisplayList items between Save and Restore items
        https://bugs.webkit.org/show_bug.cgi?id=208659

        Reviewed by Simon Fraser.

        This optimization is wrong in the case of drawing a canvas in general.
        The original implementation of the DisplayList assumes balanced Save/
        Restore GraphicsContext. In canvas a GraphicsConext 'save' can be issued
        in a frame and the corresponding restore is issued many frames later.

        * platform/graphics/displaylists/DisplayList.cpp:
        (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
        * platform/graphics/displaylists/DisplayList.h:
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::operator<<):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::Save::encode const):
        (WebCore::DisplayList::Save::decode):
        (WebCore::DisplayList::Save::restoreIndex const): Deleted.
        (WebCore::DisplayList::Save::setRestoreIndex): Deleted.
        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        (WebCore::DisplayList::Recorder::save):
        (WebCore::DisplayList::Recorder::restore):
        * platform/graphics/displaylists/DisplayListRecorder.h:
        (WebCore::DisplayList::Recorder::ContextState::cloneForSave const):

2020-03-05  Ben Nham  <nham@apple.com>

        Add signposts for top-level execution of script elements
        https://bugs.webkit.org/show_bug.cgi?id=208548

        Reviewed by Alex Christensen.

        This adds signposts for initial global scope code evaluation of script elements. This makes
        it easier to understand what code is executing and blocking initial HTML parsing from
        completing.

        In the long run, it would be nice to extend this to all top-level entry points back into JS
        (e.g. we should emit an interval if we re-enter a script via setTimeout). However, such
        probes have been removed in the past for being too noisy or slow (like in
        https://bugs.webkit.org/show_bug.cgi?id=187196), so let's just start with this for now.

        Note that we do emit the script URL in the signpost, but the signpost is gated behind both
        an environment variable and an Apple-internal check to prevent accidentally leaking
        sensitive info.

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::executeClassicScript):
        (WebCore::ScriptElement::executeModuleScript):

2020-03-05  Zalan Bujtas  <zalan@apple.com>

        [First paint] Fixed sized SVG content should taken into account when computing VNE status
        https://bugs.webkit.org/show_bug.cgi?id=208663
        <rdar://problem/60096896>

        Reviewed by Simon Fraser.

        Let's add fixed sized SVG to the list of content we track as VNE pixel count.
        It helps to reach VNE status sooner on youtube.com.

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::reportVisuallyNonEmptyContent):

2020-03-05  Yusuke Suzuki  <ysuzuki@apple.com>

        Put all generated JSCells in WebCore into IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205107

        Reviewed by Saam Barati.

        This patch automatically generates IsoSubspace per WebCore DOM object type.
        In preprocess-idls.pl, we collect all the DOM object types and generate DOMIsoSubspaces class,
        which contains all the necessary IsoSubspaces. And it is held by WebCoreJSClientData.

        CodeGeneratorJS.pm starts putting `subspaceFor` and `subspaceForImpl` for each JS DOM wrapper classes.
        And we dynamically create IsoSubspace and set it to WebCoreJSClientData's DOMIsoSubspaces. At the same
        time, we register IsoSubspace to m_outputConstraintSpaces if the class has output constraits callback.

        We also remove stale assertion in JSEventListener. It is saying the following.

            1. If the world is normal.
            2. If m_wrapper is gone.
            3. If m_jsFunction is not gone.

        Then, the assertion hits. But this is wrong. We have no guarantee that m_jsFunction is gone when m_wrapper is gone.
        We have conservative GC. We have generational GC. Someone can hold m_jsFunction's instance. Everything makes it possible
        that m_jsFunction is live while m_wrapper is gone. This patch removes this assertion.

        * CMakeLists.txt:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * WebCoreMacros.cmake:
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::outputConstraintSubspaceFor): Deleted.
        * bindings/js/JSDOMWrapper.h:
        * bindings/js/JSEventListener.h:
        (WebCore::JSEventListener::jsFunction const):
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WebCoreJSClientData.h:
        (WebCore::JSVMClientData::forEachOutputConstraintSpace):
        (WebCore::JSVMClientData::subspaces):
        (WebCore::JSVMClientData::outputConstraintSpace): Deleted.
        (WebCore::JSVMClientData::subspaceForJSDOMWindow): Deleted.
        (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow): Deleted.
        (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        * bindings/scripts/generate-bindings-all.pl:
        * bindings/scripts/preprocess-idls.pl:
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::JSInterfaceName::subspaceForImpl):
        * bindings/scripts/test/JS/JSInterfaceName.h:
        (WebCore::JSInterfaceName::subspaceFor):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSMapLike.h:
        (WebCore::JSMapLike::subspaceFor):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
        (WebCore::JSReadOnlyMapLike::subspaceFor):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::JSReadOnlySetLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSReadOnlySetLike.h:
        (WebCore::JSReadOnlySetLike::subspaceFor):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::JSSetLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSSetLike.h:
        (WebCore::JSSetLike::subspaceFor):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        (WebCore::JSTestActiveDOMObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::JSTestCEReactions::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCEReactions.h:
        (WebCore::JSTestCEReactions::subspaceFor):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::JSTestCEReactionsStringifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
        (WebCore::JSTestCEReactionsStringifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracer::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCallTracer.h:
        (WebCore::JSTestCallTracer::subspaceFor):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
        (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::JSTestDOMJIT::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestDOMJIT.h:
        (WebCore::JSTestDOMJIT::subspaceFor):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySetting::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
        (WebCore::JSTestEnabledBySetting::subspaceFor):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::JSTestEnabledForContext::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEnabledForContext.h:
        (WebCore::JSTestEnabledForContext::subspaceFor):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        (WebCore::JSTestEventConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTarget::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        (WebCore::JSTestEventTarget::subspaceFor):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestException.h:
        (WebCore::JSTestException::subspaceFor):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachable::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        (WebCore::JSTestGenerateIsReachable::subspaceFor):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::JSTestGlobalObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
        (WebCore::JSTestIndexedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
        (WebCore::JSTestIndexedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
        (WebCore::JSTestIndexedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::JSTestInterfaceLeadingUnderscore::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
        (WebCore::JSTestInterfaceLeadingUnderscore::subspaceFor):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::JSTestIterable::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIterable.h:
        (WebCore::JSTestIterable::subspaceFor):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::JSTestJSBuiltinConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
        (WebCore::JSTestJSBuiltinConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListener::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        (WebCore::JSTestMediaQueryListListener::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        (WebCore::JSTestNamedConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        (WebCore::JSTestNamedDeleterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        (WebCore::JSTestNamedDeleterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        (WebCore::JSTestNamedDeleterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWith::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
        (WebCore::JSTestNamedGetterCallWith::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
        (WebCore::JSTestNamedGetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
        (WebCore::JSTestNamedGetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        (WebCore::JSTestNamedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        (WebCore::JSTestNamedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        (WebCore::JSTestNamedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNode::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObj::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestObj.h:
        (WebCore::JSTestObj::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructors::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        (WebCore::JSTestOverloadedConstructors::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
        (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
        (WebCore::JSTestOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestPluginInterface.h:
        (WebCore::JSTestPluginInterface::subspaceFor):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEvent::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
        (WebCore::JSTestPromiseRejectionEvent::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::JSTestSerialization::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerialization.h:
        (WebCore::JSTestSerialization::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::JSTestSerializationIndirectInheritance::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h:
        (WebCore::JSTestSerializationIndirectInheritance::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::JSTestSerializationInherit::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationInherit.h:
        (WebCore::JSTestSerializationInherit::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::JSTestSerializationInheritFinal::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
        (WebCore::JSTestSerializationInheritFinal::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        (WebCore::JSTestSerializedScriptValueInterface::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::JSTestStringifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifier.h:
        (WebCore::JSTestStringifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::JSTestStringifierAnonymousOperation::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
        (WebCore::JSTestStringifierAnonymousOperation::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::JSTestStringifierNamedOperation::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
        (WebCore::JSTestStringifierNamedOperation::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::JSTestStringifierOperationImplementedAs::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
        (WebCore::JSTestStringifierOperationImplementedAs::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::JSTestStringifierOperationNamedToString::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
        (WebCore::JSTestStringifierOperationNamedToString::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::JSTestStringifierReadOnlyAttribute::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
        (WebCore::JSTestStringifierReadOnlyAttribute::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::JSTestStringifierReadWriteAttribute::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
        (WebCore::JSTestStringifierReadWriteAttribute::subspaceFor):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefs::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        (WebCore::JSTestTypedefs::subspaceFor):

2020-03-05  Andres Gonzalez  <andresg_22@apple.com>

        Fix for several failures of LayoutTests in isolated tree mode.
        https://bugs.webkit.org/show_bug.cgi?id=208658

        Reviewed by Chris Fleizach.

        - Exposes the scrollView method through the AXCoreObject interface so
        that wrapper code can use it for both AXObjects and IsolatedObjects.
        - Fix for a crash/assert where InvalidAXID cannot be passed as key to
        the HashMap methods.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityScrollView.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::scrollView const):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper scrollViewParent]):
        (-[WebAccessibilityObjectWrapper _accessibilityShowContextMenu]):

2020-03-05  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, rolling out r257945.

        This causes tests to fail

        Reverted changeset:

        "Remove the optimization for discarding no operation
        DisplayList items between Save and Restore items"
        https://bugs.webkit.org/show_bug.cgi?id=208659
        https://trac.webkit.org/changeset/257945

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

        When using the scrolling thread, push ScrollingNodeIDs onto PlatformCALayers
        https://bugs.webkit.org/show_bug.cgi?id=208654

        Reviewed by Antti Koivisto.

        The scrolling thread on macOS will need to be able to associate layers with scrolling nodes,
        so push a ScrollingNodeID down through GraphicsLayer to PlatformCALayerCocoa.
        
        We only need one ScrollingNodeID per platform layer, since a given platform layer only
        ever has one scrolling role.

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::scrollingTreeAsText):
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties const):
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::scrollingNodeID const):
        (WebCore::GraphicsLayer::setScrollingNodeID):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setScrollingNodeID):
        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
        (WebCore::GraphicsLayerCA::updateScrollingNode):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/ca/PlatformCALayer.h: setEventRegion() doesn't need to be pure virtual.
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::setEventRegion):
        (WebCore::PlatformCALayerCocoa::eventRegionContainsPoint const):
        * platform/graphics/ca/win/PlatformCALayerWin.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
        (WebCore::RenderLayerBacking::setScrollingNodeIDForRole):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::ensureRootLayer):
        (WebCore::RenderLayerCompositor::attachScrollingNode): For subframe scrolling, the clipLayer
        is the layer that gets associated with a scrolling node.
        (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):

2020-03-05  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove the optimization for discarding no operation DisplayList items between Save and Restore items
        https://bugs.webkit.org/show_bug.cgi?id=208659

        Reviewed by Simon Fraser.

        This optimization is wrong in the case of drawing a canvas in general.
        The original implementation of the DisplayList assumes balanced Save/
        Restore GraphicsContext. In canvas a GraphicsConext 'save' can be issued
        in a frame and the corresponding restore is issued many frames later.

        * platform/graphics/displaylists/DisplayList.cpp:
        (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
        * platform/graphics/displaylists/DisplayList.h:
        * platform/graphics/displaylists/DisplayListItems.cpp:
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::Save::encode const):
        (WebCore::DisplayList::Save::decode):
        (WebCore::DisplayList::Save::restoreIndex const): Deleted.
        (WebCore::DisplayList::Save::setRestoreIndex): Deleted.
        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        (WebCore::DisplayList::Recorder::save):
        (WebCore::DisplayList::Recorder::restore):
        * platform/graphics/displaylists/DisplayListRecorder.h:
        (WebCore::DisplayList::Recorder::ContextState::cloneForSave const):

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

        Windows build fix after r257938.
        
        Surround the event region painting code with #if ENABLE(ASYNC_SCROLLING); Windows
        doesn't need to build this code.

        * rendering/RenderLayerBacking.cpp:
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

2020-03-05  Antoine Quint  <graouts@apple.com>

        Page-specific UserStyleSheets should wait until the initial empty document has been removed to be injected
        https://bugs.webkit.org/show_bug.cgi?id=208644
        <rdar://problem/60042429>

        Reviewed by Brady Eidson.

        When a WKWebView is created and asked to load a URL, it will first load an empty initial document (about:blank) prior
        to creating a Document for the requested URL. We need to ensure that page-specific UserStyleSheets are only injected
        once the Document for the requested URL starts loading.

        When Page::injectUserStyleSheet() is called, if we determine that the empty initial document is visible, we enqueue
        the provided UserStyleSheet and wait until the new mainFrameDidChangeToNonInitialEmptyDocument() method is called
        to empty that queue and inject the UserStyleSheets then.

        This new method is called from Frame::setDocument() for a main frame once we've determined the frame's document has
        changed to a non-null value and that the frame loader's state machine indicates that we're no longer displaying the
        initial empty document.

        * dom/ExtensionStyleSheets.h:
        * page/Frame.cpp:
        (WebCore::Frame::setDocument):
        * page/Page.cpp:
        (WebCore::Page::injectUserStyleSheet):
        (WebCore::Page::removeInjectedUserStyleSheet):
        (WebCore::Page::mainFrameDidChangeToNonInitialEmptyDocument):
        * page/Page.h:

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

        Generate layer event regions for async overflow scrolling on macOS
        https://bugs.webkit.org/show_bug.cgi?id=208649

        Reviewed by Antti Koivisto.

        Turn on the existing code for event region generation on macOS, and generate event
        regions when async overflow scroll is enabled.
        
        Tweak the region debug color to be more visible.

        Tests: fast/scrolling/mac/border-radius-event-region.html
               fast/scrolling/mac/event-region-visibility-hidden.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        (WebCore::RenderLayerBacking::paintDebugOverlays):

2020-03-05  Jer Noble  <jer.noble@apple.com>

        [GPUP] Implement RemoteAudioSession
        https://bugs.webkit.org/show_bug.cgi?id=208583

        Reviewed by Alex Christensen.

        Add EnumTraits for all the enumerations inside AudioSession.

        Make many AudioSession methods virtual, so they can be overridden in the case where the
        GPU process is enabled.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/AudioSession.cpp:
        (WebCore::AudioSession::create):
        (WebCore::AudioSession::sharedSession):
        * platform/audio/AudioSession.h:

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

        Make m_viewportConstrainedObjects into a WeakHashSet
        https://bugs.webkit.org/show_bug.cgi?id=208625

        Reviewed by Ryosuke Niwa.

        Use WeakHashSet<> for m_viewportConstrainedObjects.

        * page/FrameView.cpp:
        (WebCore::FrameView::didDestroyRenderTree):
        (WebCore::FrameView::addViewportConstrainedObject):
        (WebCore::FrameView::removeViewportConstrainedObject):
        (WebCore::FrameView::scrollContentsFastPath):
        (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
        * page/FrameView.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects const):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::willBeDestroyed):
        (WebCore::RenderLayerModelObject::styleDidChange):

2020-03-05  Kenneth Russell  <kbr@chromium.org>

        REGRESSION: [ Mac ] fast/canvas/webgl/texImage2D-video-flipY-false.html is Timing out
        https://bugs.webkit.org/show_bug.cgi?id=205734

        Fix two bugs in MediaPlayerPrivateAVFoundationObjC causing the
        preferred AVPlayerItemVideoOutput code path to not be taken, in
        the situation where GPU-to-GPU copies are not possible because the
        video's format doesn't allow them.

        Implement currentTime, fixing longstanding bug in the
        AVAssetImageGenerator fallback where only the first frame of the
        video would be displayed.

        Covered by existing layout test.

        Reviewed by Dean Jackson.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

2020-03-05  youenn fablet  <youenn@apple.com>

        In case an activating service worker is terminated, it should go to activated state
        https://bugs.webkit.org/show_bug.cgi?id=208440
        <rdar://problem/59742332>

        Reviewed by Chris Dumez.

        Covered by updated test.

        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::setState):
        As per spec, if an activated service worker is terminated or its activate event is timing out,
        we should move it to activate state.

2020-03-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Reset position style on line breaks.
        https://bugs.webkit.org/show_bug.cgi?id=208646
        <rdar://problem/60086589>

        Reviewed by Antti Koivisto.

        Test: fast/inline/out-of-flow-positioned-line-break.html

        We need to treat line breaks as statically positioned inline content.
        In the long run we should do something along these lines:
        https://github.com/w3c/csswg-drafts/issues/610

        * layout/integration/LayoutIntegrationBoxTree.cpp:
        (WebCore::LayoutIntegration::BoxTree::buildTree):

2020-03-05  Eric Carlson  <eric.carlson@apple.com>

        Some media tests crash when run in the GPU process
        https://bugs.webkit.org/show_bug.cgi?id=208611
        <rdar://problem/60060320>

        Reviewed by Jer Noble.

        The AVPlayerItemOutputPullDelegate is not called on the main queue, so it can't
        use a WeakPtr that is created on the main queue. Rather than having the ObjC 
        delegate object call back to MediaPlayerPrivateAVFoundationObjC to signal a
        semaphore it owns, have the delegate object own the semaphore and expose it
        so MediaPlayerPrivateAVFoundationObjC can use it, removing the need for the
        WeakPtr completely.

        No new tests, this fixes a crash in existing tests.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        Don't allocate m_videoOutputDelegate, it isn't needed immediately.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Drive-by
        optimization: don't update the current image when the fullscreen layer is set to NULL.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Allocate m_videoOutputDelegate.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
        Wait on the deletage's semphore.
        (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange): Deleted.
        (-[WebCoreAVFPullDelegate initWithPlayer:]): Deleted.

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

        Change ScrollingTreeMac.cpp to a .mm file
        https://bugs.webkit.org/show_bug.cgi?id=208652

        Reviewed by Antti Koivisto.

        Simple file rename.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/scrolling/mac/ScrollingTreeMac.mm: Renamed from Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp.

2020-03-05  Jason Lawrence  <lawrence.j@apple.com>

        Unreviewed, rolling out r257905.

        This commit caused crashes on Mac wk2 Debug.

        Reverted changeset:

        "Put all generated JSCells in WebCore into IsoSubspace"
        https://bugs.webkit.org/show_bug.cgi?id=205107
        https://trac.webkit.org/changeset/257905

2020-03-05  Simon Fraser  <simon.fraser@apple.com>

        Track "scrolling scope" on RenderLayers
        https://bugs.webkit.org/show_bug.cgi?id=208620

        Reviewed by Zalan Bujtas.

        Keep track of a "scrolling scope" on RenderLayers. Layers that share a scrolling scope
        get scrolled by some common async-scrollable containing-block ancestor. The scope is just
        a unique identifier.
        
        Each layer has two scopes; a "box" scope that applies to the background/borders, and
        a "content" scope that applies to (potentially) scrollable content. For most layers,
        these will be the same, and shared with the layer's containing block ancestor layer.

        For async-scrollable overflow, "box" scope is shared with the cb ancestor, but "content" scope
        will have a new value that applies to all the layers moved by that scroller.

        Having this value makes it easy to ask the question "is this layer scrolled by some ancestor",
        which is a tricky computation for things like a position:absolute layer inside a non-containing block
        stacking context overflow:scroll. Also, position:fixed whose containing block is the root will share
        the scrolling scope of the root.

        No behavior change.

        * rendering/RenderLayer.cpp:
        (WebCore::nextScrollingScope):
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::updateLayerPosition):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::isScrolledByOverflowScrollLayer):

2020-03-05  youenn fablet  <youenn@apple.com>

        Add logging support for capture sources in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=208637

        Reviewed by Eric Carlson.

        Make sure RealtimeVideoSource propagates its logger to its underlying source and to its clones.
        No change of behavior.

        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::RealtimeVideoSource::clone):
        (WebCore::RealtimeVideoSource::setLogger):
        * platform/mediastream/RealtimeVideoSource.h:

2020-03-05  Wenson Hsieh  <wenson_hsieh@apple.com>

        Optimize Path::encode on platforms that support CGPathGetNumberOfElements
        https://bugs.webkit.org/show_bug.cgi?id=208266

        Reviewed by Darin Adler and Simon Fraser.

        When encoding Path objects, we currently first encode the number of elements in the path by iterating over each
        path element and incrementing a counter; then, we iterate over each element again, and encode information
        (points, angles, etc.) for each path element.

        However, on platforms that have the fix for <rdar://problem/59828724>, the first call to CGPathApply can be
        skipped, since CoreGraphics can (in constant time, for the most part) simply tell us how many elements are in
        the CGPath. See comments below for more details.

        There should be no change in behavior.

        * platform/graphics/Path.cpp:
        * platform/graphics/Path.h:

        Add an `elementCount` method on Path, which returns the count of elements in the path. On platforms where
        CGPathGetNumberOfElements exists (and the fix for <rdar://problem/59828724> is also present), we return the
        result of calling this SPI. Otherwise, fall back to mapping over each path element and incrementing a count.

        (WebCore::Path::encode const):

        Use the new `elementCount` method when encoding a WebCore::Path.

        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::elementCount const):

2020-03-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Incoming image data should invalidate layout tree content
        https://bugs.webkit.org/show_bug.cgi?id=208640
        <rdar://problem/60083229>

        Reviewed by Antti Koivisto.

        This is a forced invalidation (in the least intrusive way) to make sure LFC has up-to-date replaced information.

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):

2020-03-05  Youenn Fablet  <youenn@apple.com>

        Remove CoreAudioCaptureSourceFactory::setCoreAudioActiveSource/unsetCoreAudioActiveSource
        https://bugs.webkit.org/show_bug.cgi?id=208632

        Reviewed by Eric Carlson.

        We can remove this code since suspend/resume is now directly handled
        by the AudioSharedUnit singleton instead of going through the source.
        No change of behavior.

        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
        (WebCore::CoreAudioCaptureSource::startProducingData):
        * platform/mediastream/mac/CoreAudioCaptureSource.h:

2020-03-05  Youenn Fablet  <youenn@apple.com>

        Export NowPlaying commands to GPUProcess when media playing in GPUProcess is enabled
        https://bugs.webkit.org/show_bug.cgi?id=208568

        Reviewed by Eric Carlson.

        Removed PlatformMediaSessionClient NowPlaying getters since only HTMLMediaElement is eligible.
        Let MediaElementSession generates its own NowPlayingInfo when requested by the session manager.
        Use platform strategies to abstract out how to execute NowPlaying orders.

        Manually tested for NowPlaying functionality.
        Also covered by existing tests for the refactoring bits.

        * Headers.cmake:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::sourceApplicationIdentifier const): Deleted.
        * Modules/webaudio/AudioContext.h:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.h:
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::allowsPlaybackControlsForAutoplayingAudio const):
        (WebCore::MediaElementSession::nowPlayingInfo const):
        (WebCore::MediaElementSession::allowsNowPlayingControlsVisibility const): Deleted.
        * html/MediaElementSession.h:
        * platform/MediaStrategy.h:
        * platform/audio/AudioSession.h:
        * platform/audio/NowPlayingInfo.h: Added.
        (WebCore::NowPlayingInfo::encode const):
        (WebCore::NowPlayingInfo::decode):
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::nowPlayingInfo const):
        (WebCore::PlatformMediaSession::uniqueIdentifier const): Deleted.
        (WebCore::PlatformMediaSession::title const): Deleted.
        (WebCore::PlatformMediaSession::duration const): Deleted.
        (WebCore::PlatformMediaSession::currentTime const): Deleted.
        (WebCore::PlatformMediaSession::sourceApplicationIdentifier const): Deleted.
        (WebCore::PlatformMediaSessionClient::mediaSessionUniqueIdentifier const): Deleted.
        (WebCore::PlatformMediaSessionClient::mediaSessionTitle const): Deleted.
        (WebCore::PlatformMediaSessionClient::mediaSessionDuration const): Deleted.
        (WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime const): Deleted.
        * platform/audio/PlatformMediaSession.h:
        (WebCore::PlatformMediaSession::allowsNowPlayingControlsVisibility const): Deleted.
        * platform/audio/cocoa/MediaSessionManagerCocoa.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::clearNowPlayingInfo):
        (MediaSessionManagerCocoa::setNowPlayingInfo):
        (MediaSessionManagerCocoa::nowPlayingEligibleSession):
        (MediaSessionManagerCocoa::updateNowPlayingInfo):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):
        (WebCore::MediaSessionManageriOS::providePresentingApplicationPID):

2020-03-04  Yusuke Suzuki  <ysuzuki@apple.com>

        Put all generated JSCells in WebCore into IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205107

        Reviewed by Saam Barati.

        This patch automatically generates IsoSubspace per WebCore DOM object type.
        In preprocess-idls.pl, we collect all the DOM object types and generate DOMIsoSubspaces class,
        which contains all the necessary IsoSubspaces. And it is held by WebCoreJSClientData.

        CodeGeneratorJS.pm starts putting `subspaceFor` and `subspaceForImpl` for each JS DOM wrapper classes.
        And we dynamically create IsoSubspace and set it to WebCoreJSClientData's DOMIsoSubspaces. At the same
        time, we register IsoSubspace to m_outputConstraintSpaces if the class has output constraits callback.

        * CMakeLists.txt:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * WebCoreMacros.cmake:
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::outputConstraintSubspaceFor): Deleted.
        * bindings/js/JSDOMWrapper.h:
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WebCoreJSClientData.h:
        (WebCore::JSVMClientData::forEachOutputConstraintSpace):
        (WebCore::JSVMClientData::subspaces):
        (WebCore::JSVMClientData::outputConstraintSpace): Deleted.
        (WebCore::JSVMClientData::subspaceForJSDOMWindow): Deleted.
        (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow): Deleted.
        (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope): Deleted.
        (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        * bindings/scripts/generate-bindings-all.pl:
        * bindings/scripts/preprocess-idls.pl:
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::JSInterfaceName::subspaceForImpl):
        * bindings/scripts/test/JS/JSInterfaceName.h:
        (WebCore::JSInterfaceName::subspaceFor):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSMapLike.h:
        (WebCore::JSMapLike::subspaceFor):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
        (WebCore::JSReadOnlyMapLike::subspaceFor):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::JSReadOnlySetLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSReadOnlySetLike.h:
        (WebCore::JSReadOnlySetLike::subspaceFor):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::JSSetLike::subspaceForImpl):
        * bindings/scripts/test/JS/JSSetLike.h:
        (WebCore::JSSetLike::subspaceFor):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        (WebCore::JSTestActiveDOMObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::JSTestCEReactions::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCEReactions.h:
        (WebCore::JSTestCEReactions::subspaceFor):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::JSTestCEReactionsStringifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
        (WebCore::JSTestCEReactionsStringifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracer::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestCallTracer.h:
        (WebCore::JSTestCallTracer::subspaceFor):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
        (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::JSTestDOMJIT::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestDOMJIT.h:
        (WebCore::JSTestDOMJIT::subspaceFor):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySetting::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
        (WebCore::JSTestEnabledBySetting::subspaceFor):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::JSTestEnabledForContext::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEnabledForContext.h:
        (WebCore::JSTestEnabledForContext::subspaceFor):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        (WebCore::JSTestEventConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTarget::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        (WebCore::JSTestEventTarget::subspaceFor):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestException.h:
        (WebCore::JSTestException::subspaceFor):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachable::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        (WebCore::JSTestGenerateIsReachable::subspaceFor):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::JSTestGlobalObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
        (WebCore::JSTestIndexedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
        (WebCore::JSTestIndexedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
        (WebCore::JSTestIndexedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestInterface.h:
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::JSTestInterfaceLeadingUnderscore::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
        (WebCore::JSTestInterfaceLeadingUnderscore::subspaceFor):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::JSTestIterable::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestIterable.h:
        (WebCore::JSTestIterable::subspaceFor):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::JSTestJSBuiltinConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
        (WebCore::JSTestJSBuiltinConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListener::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        (WebCore::JSTestMediaQueryListListener::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructor::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        (WebCore::JSTestNamedConstructor::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        (WebCore::JSTestNamedDeleterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        (WebCore::JSTestNamedDeleterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        (WebCore::JSTestNamedDeleterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWith::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
        (WebCore::JSTestNamedGetterCallWith::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
        (WebCore::JSTestNamedGetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
        (WebCore::JSTestNamedGetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        (WebCore::JSTestNamedSetterNoIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingException::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        (WebCore::JSTestNamedSetterThrowingException::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        (WebCore::JSTestNamedSetterWithIdentifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceFor):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNode::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObj::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestObj.h:
        (WebCore::JSTestObj::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructors::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        (WebCore::JSTestOverloadedConstructors::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
        (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceFor):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltins::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
        (WebCore::JSTestOverrideBuiltins::subspaceFor):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestPluginInterface.h:
        (WebCore::JSTestPluginInterface::subspaceFor):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEvent::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
        (WebCore::JSTestPromiseRejectionEvent::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::JSTestSerialization::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerialization.h:
        (WebCore::JSTestSerialization::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::JSTestSerializationIndirectInheritance::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h:
        (WebCore::JSTestSerializationIndirectInheritance::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::JSTestSerializationInherit::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationInherit.h:
        (WebCore::JSTestSerializationInherit::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::JSTestSerializationInheritFinal::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
        (WebCore::JSTestSerializationInheritFinal::subspaceFor):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterface::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        (WebCore::JSTestSerializedScriptValueInterface::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::JSTestStringifier::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifier.h:
        (WebCore::JSTestStringifier::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::JSTestStringifierAnonymousOperation::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
        (WebCore::JSTestStringifierAnonymousOperation::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::JSTestStringifierNamedOperation::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
        (WebCore::JSTestStringifierNamedOperation::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::JSTestStringifierOperationImplementedAs::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
        (WebCore::JSTestStringifierOperationImplementedAs::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::JSTestStringifierOperationNamedToString::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
        (WebCore::JSTestStringifierOperationNamedToString::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::JSTestStringifierReadOnlyAttribute::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
        (WebCore::JSTestStringifierReadOnlyAttribute::subspaceFor):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::JSTestStringifierReadWriteAttribute::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
        (WebCore::JSTestStringifierReadWriteAttribute::subspaceFor):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefs::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        (WebCore::JSTestTypedefs::subspaceFor):

2020-03-04  Andres Gonzalez  <andresg_22@apple.com>

        Fix for test accessibility/mac/aria-liveregions-addedelement.html in IsolatedTree mode.
        https://bugs.webkit.org/show_bug.cgi?id=208624

        Reviewed by Chris Fleizach.

        Test: accessibility/mac/aria-liveregions-addedelement.html

        LayoutTests can request the focused element before they call any method
        in the WebAccessibilityObjectWrapper through AccessibilityController::focusedElement,
        and thus the focused element may be amongst the pending appends of the
        IsolatedTree. This change sets the focused element in the isolated
        treee during generation, so it can be returned to the AccessibilityController
        even if no WebAccessibilityObjectWrapper calls have been made.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::generateIsolatedTree):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::focusedUIElement):
        (WebCore::AXIsolatedTree::setFocusedNode):
        * accessibility/isolatedtree/AXIsolatedTree.h:

2020-03-04  Simon Fraser  <simon.fraser@apple.com>

        Make m_slowRepaintObjects a WeakHashSet
        https://bugs.webkit.org/show_bug.cgi?id=208623

        Reviewed by Ryosuke Niwa.

        Use WeakHashSet<> for m_slowRepaintObjects, rather than a HashSet of raw pointers.

        * page/FrameView.cpp:
        (WebCore::FrameView::didDestroyRenderTree):
        (WebCore::FrameView::addSlowRepaintObject):
        (WebCore::FrameView::removeSlowRepaintObject):
        (WebCore::FrameView::repaintSlowRepaintObjects):
        * page/FrameView.h:

2020-03-04  Sihui Liu  <sihui_liu@apple.com>

        Remove unused variable m_allUniqueIDBDatabases in IDBServer
        https://bugs.webkit.org/show_bug.cgi?id=208613

        Reviewed by Chris Dumez.

        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::addDatabase): Deleted.
        (WebCore::IDBServer::IDBServer::removeDatabase): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):

2020-03-04  Zalan Bujtas  <zalan@apple.com>

        [VNE layout] Move visually non-empty content reporting to RenderTreeBuilder
        https://bugs.webkit.org/show_bug.cgi?id=208606
        <rdar://problem/60056951>

        Reviewed by Simon Fraser.

        Move the VNE reporting logic from the c'tors to the RenderTreeBuilder.

        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::RenderText):
        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::attach):
        (WebCore::RenderTreeBuilder::attachInternal):
        (WebCore::RenderTreeBuilder::attachIgnoringContinuation):
        (WebCore::RenderTreeBuilder::reportVisuallyNonEmptyContent):
        * rendering/updating/RenderTreeBuilder.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::createRenderer):
        (WebCore::RenderTreeUpdater::createTextRenderer):

2020-03-04  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add system trace points around display list replay
        https://bugs.webkit.org/show_bug.cgi?id=208616

        Reviewed by Simon Fraser.

        Surround DisplayList::Replayer::replay with trace points.

        * platform/graphics/displaylists/DisplayListReplayer.cpp:
        (WebCore::DisplayList::Replayer::replay):

2020-03-04  Doug Kelly  <dougk@apple.com>

        Crash in SVGElement::removeEventListener with symbol element
        https://bugs.webkit.org/show_bug.cgi?id=207920

        Reviewed by Ryosuke Niwa.

        Resolves a crash in SVGElement::removeEventListener by only attaching the events to the window if the SVG element is both the outermost
        SVG element, in addition to ensuring the SVG element is attached to the tree.  The symbol element's behavior when referenced by a use
        tag actually creates an svg tag instead, so the SVGSVGElement's special behavior for copying attributes is vital.

        Note that Chrome and Firefox have a similar behavior for detached SVG elements as to what this change creates: in both other browsers,
        onerror is not fired for a detached svg element, and in Firefox, onresize is not fired for a detached svg element (it is however fired
        in Chrome).

        Tests: fast/events/detached-svg-parent-window-events.html
               fast/events/onerror-svg-symbol.html

        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::parseAttribute):

2020-03-04  Andres Gonzalez  <andresg_22@apple.com>

        Fix for crash in AXIsolatedObject::fillChildrenVectorForProperty.
        https://bugs.webkit.org/show_bug.cgi?id=208618

        Reviewed by Chris Fleizach.

        Reserve capacity of WTF::Vector before using it since constructor
        doesn't do it.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::fillChildrenVectorForProperty const):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::objectsForIDs const):

2020-03-04  Chris Dumez  <cdumez@apple.com>

        Adopt new and improved CFNetwork SPI for cookie change notifications
        https://bugs.webkit.org/show_bug.cgi?id=208594
        <rdar://problem/60053313>

        Reviewed by Alex Christensen.

        Adopt new and improved CFNetwork SPI for cookie change notifications. Notifications are now per domain
        and the domain matches one of the domains we listen for cookie changes on.

        This also fixes a bug where httpOnly cookies would be sent to the WebContent processes in cookie change
        notifications, even though the WebProcesses are not interested in those.

        * platform/network/NetworkStorageSession.h:
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::registerCookieChangeListenersIfNecessary):

2020-03-04  Alex Christensen  <achristensen@webkit.org>

        Add SPI to evaluate JavaScript in an iframe
        https://bugs.webkit.org/show_bug.cgi?id=208605

        Reviewed by Brady Eidson.

        Covered by new API tests.

        * bindings/js/DOMWrapperWorld.cpp:
        (WebCore::DOMWrapperWorld::DOMWrapperWorld):
        Remove a now-invalid assertion that was firing during my test.
        API::ContentWorld::defaultClientWorld creates a world with no name and type Type::User.
        I'm surprised this wasn't hit before.

2020-03-03  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Implement -[_WKWebAuthenticationPanelDelegate panel:decidePolicyForLocalAuthenticatorWithCompletionHandler:] SPI
        https://bugs.webkit.org/show_bug.cgi?id=208533
        <rdar://problem/60010184>

        Reviewed by Alex Christensen.

        Covered by new tests within existing test files.

        * en.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::touchIDPromptTitle):
        (WebCore::biometricFallbackPromptTitle):
        * platform/LocalizedStrings.h:
        Adds localized strings to support the customized LocalAuthentication dialog.

2020-03-04  Antoine Quint  <graouts@apple.com>

        Add an SPI to allow UserStyleSheet injection to target a specific WKWebView
        https://bugs.webkit.org/show_bug.cgi?id=208575
        <rdar://problem/59773690>

        Reviewed by Brady Eidson.

        Add a new Optional<PageIdentifier> member to UserStyleSheet which indicates whether the UserStyleSheet is supposed
        to be injected for all WKWebViews, or only a specific top-level WKWebView associated with a Page with the give ID.

        In ExtensionStyleSheets::updateInjectedStyleSheetCache(), UserStyleSheets with a specified pageID are ignored. Instead,
        we now also consider CSSStyleSheets listed in the new m_pageSpecificStyleSheets which contains page-specific stylesheets
        to be injected for the associated Document.

        The new Page::injectUserStyleSheet() method allows the addition of a UserStyleSheet on its documents' ExtensionStyleSheets,
        and will call this method either for the main frame's Document, or all Documents, depending on the UserStyleSheet's configuration.

        Finally, these new targeted UserStyleSheets can be removed via Page::removeInjectedUserStyleSheet() and
        ExtensionStyleSheets::removePageSpecificUserStyleSheet().

        * dom/ExtensionStyleSheets.cpp:
        (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):
        (WebCore::ExtensionStyleSheets::injectPageSpecificUserStyleSheet):
        (WebCore::ExtensionStyleSheets::removePageSpecificUserStyleSheet):
        (WebCore::ExtensionStyleSheets::detachFromDocument):
        * dom/ExtensionStyleSheets.h:
        * page/Page.cpp:
        (WebCore::Page::injectUserStyleSheet):
        (WebCore::Page::removeInjectedUserStyleSheet):
        * page/Page.h:
        * page/UserStyleSheet.h:
        (WebCore::UserStyleSheet::UserStyleSheet):
        (WebCore::UserStyleSheet::pageID const):

2020-03-04  Jer Noble  <jer.noble@apple.com>

        [GPUP] Implement Modern EME API in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=208090

        Reviewed by Eric Carlson.

        Add export macros to CDMFactory::registeredFactories().

        * platform/encryptedmedia/CDMFactory.h:

2020-03-04  Ben Nham  <nham@apple.com>

        Remove initial layout throttler
        https://bugs.webkit.org/show_bug.cgi?id=208285

        Reviewed by Antti Koivisto.

        This removes a throttle that can prevent us from laying out during the first 250 ms of page
        load. This throttle is generally not effective (many pages have JS that force a sync layout
        before the first 250 ms of loading) and is also extremely outdated (the comment says the
        interval is too high for dual G5s). We already have too many throttles in too many places,
        so let's remove this one.

        * dom/Document.cpp:
        (WebCore::Document::implicitClose):
        (WebCore::Document::shouldScheduleLayout const):
        (WebCore::Document::isLayoutTimerActive const):
        (WebCore::Document::shouldScheduleLayout): Deleted.
        (WebCore::Document::isLayoutTimerActive): Deleted.
        (WebCore::Document::minimumLayoutDelay): Deleted.
        (WebCore::Document::timeSinceDocumentCreation const): Deleted.
        * dom/Document.h:
        (WebCore::Document::parsing const):
        (WebCore::Document::timeSinceDocumentCreation const):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layout):
        (WebCore::FrameViewLayoutContext::reset):
        (WebCore::FrameViewLayoutContext::scheduleLayout):
        (WebCore::FrameViewLayoutContext::unscheduleLayout):
        (WebCore::FrameViewLayoutContext::scheduleSubtreeLayout):
        * page/FrameViewLayoutContext.h:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::SettingsBase):
        (WebCore::SettingsBase::setLayoutInterval): Deleted.
        * page/SettingsBase.h:
        (WebCore::SettingsBase::layoutInterval const): Deleted.

2020-03-04  Antti Koivisto  <antti@apple.com>

        Avoid full style resolution on Element::focus()
        https://bugs.webkit.org/show_bug.cgi?id=208504
        <rdar://problem/60035288>

        Unreviewed followup.

        * dom/Element.cpp:
        (WebCore::Element::resolveComputedStyle):
        (WebCore::Element::isVisibleWithoutResolvingFullStyle const):

        Emilio spotted that this neeeds to be a composed ancestor walk to match resolveComputedStyle.

2020-03-04  Simon Fraser  <simon.fraser@apple.com>

        (r256513) [ Mac ] fast/scrolling/programmatic-scroll-to-zero-zero.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=207948

        Reviewed by Zalan Bujtas.

        It was possible for WheelEventTestMonitor to fire the callback before receiving any wheel events, if
        no deferral reasons happened before the timer fires. Let's require at least one deferral.

        There was no deferral for main-thread iframe wheel event handling, so add that so that tests that
        slow-scroll iframes work.

        Should de-flake fast/scrolling/programmatic-scroll-to-zero-zero.html and maybe other tests.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent):
        * page/WheelEventTestMonitor.cpp:
        (WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
        (WebCore::WheelEventTestMonitor::deferForReason):
        (WebCore::WheelEventTestMonitor::triggerTestTimerFired):
        (WebCore::operator<<):
        * page/WheelEventTestMonitor.h:
        (WebCore::WheelEventTestMonitorCompletionDeferrer::WheelEventTestMonitorCompletionDeferrer):
        (WebCore::WheelEventTestMonitorCompletionDeferrer::~WheelEventTestMonitorCompletionDeferrer):

2020-03-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Display::Run::TextContent::expand(unsigned) is called with the value of -1.
        https://bugs.webkit.org/show_bug.cgi?id=208558
        <rdar://problem/60026658>

        Reviewed by Antti Koivisto.

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContent::shrink):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::Run::removeTrailingWhitespace):

2020-03-04  Zalan Bujtas  <zalan@apple.com>

        [First paint] Going from visually empty to non-empty should immediately trigger layer unfreezing
        https://bugs.webkit.org/show_bug.cgi?id=208385
        <rdar://problem/59895900>

        Reviewed by Antti Koivisto.

        Now that VNE check and layout are decoupled, we should also decouple the VNE layout milestone and
        layer unfreezing.
        In many cases a style change does not initiate synchronous layout (see Document::updateStyleIfNeeded) which
        potentially delays the first paint. This patch ensure that we unfreeze the layer tree and issue paint soon after
        the style change produced a VNE content. 

        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::didReachVisuallyNonEmptyState):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::styleAndRenderTreeDidChange):
        (WebCore::FrameView::checkAndDispatchDidReachVisuallyNonEmptyState):
        (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
        (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const): Deleted.
        * page/FrameView.h:

2020-03-04  Antti Koivisto  <antti@apple.com>

        Avoid full style resolution on Element::focus()
        https://bugs.webkit.org/show_bug.cgi?id=208504

        Reviewed by Zalan Bujtas.

        Element::focus() currently triggers full style resolution both before (to compute element visibility)
        and after (for no particular reason).

        Resolving style can be costly if there are further DOM mutations that end up invalidating it again.
        This patch adds a cheaper single-element way to computing visibility and uses it for focus().

        This appears to be 3-4% Speedometer progression.

        Test: fast/forms/focus-after-visibility-change.html

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::focusedUIElementForPage):

        AX code assumes renderers have exist for focused element so ensure style is up to date.

        * dom/Document.cpp:
        (WebCore::Document::setFocusedElement):

        Remove style resolution.

        * dom/Element.cpp:
        (WebCore::Element::isFocusable const):

        Use isVisibleWithoutResolvingFullStyle helper.

        (WebCore::Element::focus):

        Avoid style resolution if the element is in a subtree that doesn't have renderers yet.

        (WebCore::Element::resolveComputedStyle):

        Add a mode where we bail out when we figure out we are in display:none subtree.

        (WebCore::Element::hasValidStyle const):

        See if we already have valid style.

        (WebCore::Element::isVisibleWithoutResolvingFullStyle const):

        Use computed style mechanism for subtrees that have no renderers yet.

        (WebCore::Element::computedStyle):
        * dom/Element.h:
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::isFocusable const):

        Use isVisibleWithoutResolvingFullStyle here too.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler):

        Update style after explicit focus() calls to keep the existing behavior.

        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::setRangeText):

        Ensure the renderer is created.

        * html/shadow/SpinButtonElement.cpp:
        (WebCore::SpinButtonElement::forwardEvent):

        Remove unneeded renderer test.

2020-03-04  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Use restore view icon for exit fullscreen button in media controls
        https://bugs.webkit.org/show_bug.cgi?id=208511

        Reviewed by Xabier Rodriguez-Calvar.

        We currently use view fullscreen for both entering and leaving.

        * Modules/mediacontrols/mediaControlsAdwaita.css:
        (video::-webkit-media-controls-fullscreen-button.exit):
        (audio::-webkit-media-controls-fullscreen-button,): Deleted.
        (audio::-webkit-media-controls-fullscreen-button.hidden,): Deleted.
        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (Controller.prototype.handleFullscreenChange):

2020-03-04  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Stop adding volume-box class to volume box element
        https://bugs.webkit.org/show_bug.cgi?id=208510

        Reviewed by Xabier Rodriguez-Calvar.

        The class was removed in r257705 because it's not used by our css.

        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (Controller.prototype.createControls):

2020-03-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: re-add `InspectorFrontendHost` support for moving the inspected window
        https://bugs.webkit.org/show_bug.cgi?id=208555

        Reviewed by Timothy Hatcher.

        Partially revert r257759, as the design changed enough such that this code is still useful.

        Allow the Web Inspector frontend to ask the containing app (via `InspectorFrontendClient`)
        whether it supports the given docking configuration.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::dockSideFromString): Added.
        (WebCore::InspectorFrontendHost::supportsDockSide): Added.
        (WebCore::InspectorFrontendHost::requestSetDockSide):
        (WebCore::InspectorFrontendHost::startWindowDrag): Added.
        (WebCore::InspectorFrontendHost::moveWindowBy const): Added.

        * inspector/InspectorFrontendClient.h:

        * inspector/InspectorFrontendClientLocal.cpp:
        * inspector/InspectorFrontendClientLocal.h:
        (WebCore::InspectorFrontendClientLocal::moveWindowBy): Added.

        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::supportsDockSide): Added.

2020-03-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: set both the page's and the window's appearance when modifying the frontend forced appearance in the case that the frontend is docked
        https://bugs.webkit.org/show_bug.cgi?id=208557

        Reviewed by Timothy Hatcher.

        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::setForcedAppearance):
        `InspectorFrontendClient::setForcedAppearance` only has an effect when Web Inspector is
        detached/undocked, meaning that changing the Appearance in the Settings Tab when docked has
        no effect. In addition to notifying the `InspectorFrontendClient`, we should also call
        `Page::setUseDarkAppearanceOverride` so that if Web Inspector is docked, the apperance
        changes. The Web Inspector frontend page's apperance would normally change to match the
        appearance of the window, but when Web Inspector is docked there is no window.

2020-03-03  Ryosuke Niwa  <rniwa@webkit.org>

        Batch observations and completions of text manipulations
        https://bugs.webkit.org/show_bug.cgi?id=208406

        Reviewed by Wenson Hsieh.

        This patch updates TextManipulationController to notify and replace multiple paragraphs at once.

        To allow some form of parallelism for the client application to process items while WebContent's main thread
        is finding paragraphs, we notify the client every 128 items.

        Tests: TestWebKitAPI.TextManipulation.StartTextManipulationSupportsLegacyDelegateCallback: Added.
               TestWebKitAPI.TextManipulation.LegacyCompleteTextManipulationReplaceSimpleSingleParagraph: Added.
               TestWebKitAPI.TextManipulation.CompleteTextManipulationReplaceMultipleSimpleParagraphsAtOnce: Added.
               TestWebKitAPI.TextManipulation.CompleteTextManipulationShouldBatchItemCallback: Added.
               TestWebKitAPI.TextManipulation.CompleteTextManipulationFailWhenItemIdentifierIsDuplicated: Added.
               TestWebKitAPI.TextManipulation.CompleteTextManipulationCanHandleSubsetOfItemsToFail: Added.

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::startObservingParagraphs):
        (WebCore::TextManipulationController::scheduleObservartionUpdate):
        (WebCore::TextManipulationController::addItem): Added.
        (WebCore::TextManipulationController::flushPendingItemsForCallback): Added.
        (WebCore::TextManipulationController::completeManipulation): Apply each ManipulationItem changes and return
        an array for ManipulationFailure for those that failed.
        (WebCore::TextManipulationController::replace):
        * editing/TextManipulationController.h:
        (WebCore::TextManipulationController::ManipulationItem): Added.
        (WebCore::TextManipulationController::ManipulationFailureType): Renamed from ManipulationResult.
        (WebCore::TextManipulationController::ManipulationFailure): Added.
        (WebCore::TextManipulationController::ManipulationItemData): Renamed from ManipulationItem. 
        (WebCore::TextManipulationController::ManipulationItem::encode const): Added.
        (WebCore::TextManipulationController::ManipulationItem::decode): Added.
        (WebCore::TextManipulationController::ManipulationFailure::encode const): Added.
        (WebCore::TextManipulationController::ManipulationFailure::decode): Added.

2020-03-03  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Mapping from MIME type to UTI type should be done in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=208415

        Reviewed by Brent Fulgham.

        This is currently done in the WebContent process, but since this is using a system service which will be closed,
        this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
        and send it to the WebContent process.

        API test: WebKit.UTIFromMIMEType

        * platform/network/mac/UTIUtilities.h:
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::mapUTIFromMIMEType):
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
        (WebCore::cacheUTIFromMimeType):
        (WebCore::UTIFromMIMEType):
        (WebCore::mimeTypes):
        (WebCore::createUTIFromMIMETypeMap):
        (WebCore::setUTIFromMIMETypeMap):
        * testing/Internals.cpp:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.mm:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Path::m_path should be a RetainPtr<CGMutablePathRef> on platforms that use CoreGraphics
        https://bugs.webkit.org/show_bug.cgi?id=208492

        Reviewed by Simon Fraser and Said Abou-Hallawa.

        Make m_path a RetainPtr<CGMutablePathRef> on platforms that use CoreGraphics. This allows us to remove all the
        manual retaining and releasing on m_path that currently resides in PathCG.cpp. See below for more details.
        There should be no change in behavior.

        * platform/graphics/Path.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

        Add `adoptCF` when constructing the WebCore::Path from the newly created CGMutablePathRef.

        (WebCore::PlatformCALayerCocoa::shapePath const):
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::Path):

        Instead of taking a RetainPtr<CGMutablePathRef> and leaking the pointer, change this to take an rvalue reference
        and `WTFMove` it directly into m_path.

        (WebCore::Path::ensurePlatformPath):
        (WebCore::Path::contains const):
        (WebCore::Path::transform):
        (WebCore::Path::boundingRect const):
        (WebCore::Path::fastBoundingRect const):
        (WebCore::Path::addPath):
        (WebCore::Path::clear):
        (WebCore::Path::isEmpty const):
        (WebCore::Path::currentPoint const):
        (WebCore::Path::apply const):

        Change `m_path` to `m_path.get()` and add `adoptCF`s, as needed. Remove explicit calls to CFRelease and
        CFRetain.

        (WebCore::Path::~Path): Deleted.

        Just use the default destructor, now that there's no longer a need to explicitly call CFRelease on m_path.

        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::platformPathForGlyph const):

        Since the Path constructor now takes `RetainPtr<CGMutablePathRef>&&`, use move semantics when creating the new
        WebCore::Path from the RetainPtr.

2020-03-03  Alex Christensen  <achristensen@webkit.org>

        Requests sent to _WKResourceLoadDelegate should include HTTPBody
        https://bugs.webkit.org/show_bug.cgi?id=208550

        Reviewed by Tim Hatcher.

        Covered by API tests.

        * platform/network/FormData.h:
        Expose lengthInBytes to be used in a check capping the size of included body data.
        This will prevent exteremely large HTTP bodies from being serialized.

2020-03-03  Zalan Bujtas  <zalan@apple.com>

        [Internals] Introduce Internals::updateLayoutAndStyleRecursively
        https://bugs.webkit.org/show_bug.cgi?id=208536
        <rdar://problem/60012372>

        Reviewed by Simon Fraser.

        It's been a common practice to call document.body.offsetHeight/Width to force style update and layout.
        However in certain cases (see Hyatt's optimization on lazy offsetHeight/Width computation in Document::updateLayoutIfDimensionsOutOfDate)
        this call can leave the tree partially dirty.

        This behavior leads to flakiness, especially when the test checks against Internals::layoutCount.

        * testing/Internals.cpp:
        (WebCore::Internals::updateLayoutAndStyleRecursively):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-03  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [CG] Change the UTI of the "WebP" image to be "com.google.webp"
        https://bugs.webkit.org/show_bug.cgi?id=208038

        Reviewed by Simon Fraser.

        This is to conform with CGImageSourceGetType().

        * platform/graphics/cg/UTIRegistry.cpp:
        (WebCore::defaultSupportedImageTypes):
        Make sure CG supports the suggested UTI before considering it is actually
        supported.

2020-03-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: setting the frontend appearance doesn't update the window when undocked
        https://bugs.webkit.org/show_bug.cgi?id=208503

        Reviewed by Timothy Hatcher.

        Notify the UIProcess when setting the forced appearance so platforms that support dark mode
        are able to run native code to adjust the appearance of the undocked window.

        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::setForcedAppearance):
        Call through to the `InspectorFrontendClient` to change the forced appearance.

        * inspector/InspectorFrontendClient.h:
        (WebCore::InspectorFrontendHost::Appearance): Added.
        Add an `enum class Appearance` so that multiple copies of the same string comparison logic
        isn't needed.

        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::setForcedAppearance): Added.

2020-03-03  Justin Fan  <justin_fan@apple.com>

        [WebGL2] Implement texImage2D(TexImageSource) for RGBA/RGBA/UNSIGNED_BYTE ImageElements
        https://bugs.webkit.org/show_bug.cgi?id=208486

        Reviewed by Dean Jackson.

        Partial implementation of WebGL 2 texImage2D(TexImageSource).

        Covered by webgl/2.0.0/conformance2/textures/svg_image directory of tests, especially for RGBA/RGBA/UNSIGNED_BYTE.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::texImage2D): Enable.
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::isRGBFormat):
        (WebCore::WebGLRenderingContextBase::texImageSource2D): Handle both WebGL and WebGL 2 versions of TexImage2D(TexImageSource).
        (WebCore::WebGLRenderingContextBase::texImage2DImpl):
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::texSubImage2DBase): Disable WebGL1-only validation check.
        (WebCore::WebGLRenderingContextBase::texImage2D):
        * html/canvas/WebGLRenderingContextBase.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Prevent crashing for HALF_FLOAT textures.

2020-03-03  Wenson Hsieh  <wenson_hsieh@apple.com>

        Address post-commit feedback after r257732
        https://bugs.webkit.org/show_bug.cgi?id=208265

        Reviewed by Darin Adler.

        Remove the private initializeOrCopyPlatformPathIfNeeded() helper,
        and move its logic into ensurePlatformPath().

        * platform/graphics/Path.h:
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::ensurePlatformPath):
        (WebCore::Path::initializeOrCopyPlatformPathIfNeeded): Deleted.

2020-03-03  Chris Dumez  <cdumez@apple.com>

        Regression (CookieCache) Unable to log into Hulu.com
        https://bugs.webkit.org/show_bug.cgi?id=208517
        <rdar://problem/59973630>

        Reviewed by Geoffrey Garen.

        Even though we are listening for notifications for 'www.hulu.com', CFNetwork sends us a notification for host
        'secure.hulu.com' when a load to secure.hulu.com sets a cookie for domain '.hulu.com'. Because the host did
        not match one if our map of observers, we would ignore the cookie notification and our cookie cache would get
        out of sync. To temporarily address the issue (until a better fix is made, likely on CFNetwork side), WebKit
        now matches registrable domains instead of hosts.

        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::registerCookieChangeListenersIfNecessary):

2020-03-03  Kate Cheney  <katherine_cheney@apple.com>

        Check for navigation to app-bound domain during script evaluation
        https://bugs.webkit.org/show_bug.cgi?id=208319
        <rdar://problem/57569321>

        Reviewed by Brent Fulgham.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeScriptInWorld):
        * loader/FrameLoaderClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptImmediately):

2020-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Fix current time and duration formatting in media controls
        https://bugs.webkit.org/show_bug.cgi?id=208442

        Reviewed by Xabier Rodriguez-Calvar.

        We are always using mm:ss or hh:mm:ss for current time and duration. We should use different amount of digits
        depending on the duration (m:ss, mm:ss, h:mm:ss or hh:mm:ss).

        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (Controller.prototype.updateDuration): Set the amount of digits for current duration.
        (Controller.prototype.prependZeroIfNeeded): Helper to prepend 0 for values less than 10.
        (Controller.prototype.formatTime): Format the time depending on the number of digits required.

2020-03-03  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r257754.
        https://bugs.webkit.org/show_bug.cgi?id=208513

        Introduced API test failure (Requested by perarne on #webkit).

        Reverted changeset:

        "[Cocoa] Mapping from MIME type to UTI type should be done in
        the UI process"
        https://bugs.webkit.org/show_bug.cgi?id=208415
        https://trac.webkit.org/changeset/257754

2020-03-03  Chris Dumez  <cdumez@apple.com>

        Regression(r257354) Crash when trying on watch video on apple.com
        https://bugs.webkit.org/show_bug.cgi?id=208487
        <rdar://problem/59967385>

        Reviewed by Eric Carlson.

        Use WebCore::Cookie's code to convert to a NSHTTPCookie instead of using toNSHTTPCookie()
        which was not quite right, especially after r257354.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
        (WebCore::toNSHTTPCookie): Deleted.

2020-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Use -webkit-system-font instead of -webkit-small-control in media controls
        https://bugs.webkit.org/show_bug.cgi?id=208509

        Reviewed by Xabier Rodriguez-Calvar.

        For consistency with the system font.

        * Modules/mediacontrols/mediaControlsAdwaita.css:
        (audio::-webkit-media-controls-current-time-display,):
        (video::-webkit-media-controls-closed-captions-container):

2020-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Fix JavaScript exception when removing media controls
        https://bugs.webkit.org/show_bug.cgi?id=208444

        Reviewed by Xabier Rodriguez-Calvar.

        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (Controller.prototype.hideCaptionMenu): Return early if there's no caption menu to hide.

2020-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): [GTK] media controls current time label is disabled for live streams
        https://bugs.webkit.org/show_bug.cgi?id=208443

        Reviewed by Xabier Rodriguez-Calvar.

        Remove the no-duration class from currentTime element when we know it's a live stream.

        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (Controller.prototype.updateTime):

2020-03-02  Rob Buis  <rbuis@igalia.com>

        https://bugs.webkit.org/show_bug.cgi?id=208447
        Make FrameLoadRequest ctor take move parameter

        Reviewed by Simon Fraser.

        Make FrameLoadRequest ctor use move semantics for the
        ResourceRequest parameter to avoid copies.

        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::openInNewTab):
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::navigate):
        * loader/FrameLoadRequest.cpp:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        * loader/FrameLoadRequest.h:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        * loader/NavigationScheduler.cpp:
        (WebCore::NavigationScheduler::scheduleLocationChange):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::createWindow):

2020-03-02  Chris Dumez  <cdumez@apple.com>

        Reduce size of PerformanceResourceTiming
        https://bugs.webkit.org/show_bug.cgi?id=208466

        Reviewed by Ryosuke Niwa.

        Reduce size of PerformanceResourceTiming when not storing non-timing data.
        To achieve this, I moved the timing data to a
        NetworkLoadMetricsWithoutNonTimingData base class, out of NetworkLoadMetrics.
        PerformanceResourceTiming's m_networkLoadMetrics data member is now of type
        NetworkLoadMetricsWithoutNonTimingData.

        * page/PerformanceResourceTiming.cpp:
        (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
        * page/PerformanceResourceTiming.h:
        * platform/network/NetworkLoadMetrics.h:
        (WebCore::NetworkLoadMetricsWithoutNonTimingData::isComplete const):
        (WebCore::NetworkLoadMetricsWithoutNonTimingData::markComplete):
        (WebCore::NetworkLoadMetrics::NetworkLoadMetrics):
        (WebCore::NetworkLoadMetrics::reset): Deleted.
        (WebCore::NetworkLoadMetrics::clearNonTimingData): Deleted.
        (WebCore::NetworkLoadMetrics::isComplete const): Deleted.
        (WebCore::NetworkLoadMetrics::markComplete): Deleted.

2020-03-02  Ben Nham  <nham@apple.com>

        Add performance probes for HTML parsing
        https://bugs.webkit.org/show_bug.cgi?id=208271

        Reviewed by Daniel Bates.

        This adds probes that show which lines of HTML are have been parsed.

        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        * html/parser/HTMLDocumentParser.h:

2020-03-02  Andres Gonzalez  <andresg_22@apple.com>

        REGRESSION (257739) [ Mac wk2 Release ] multiple tests crashing in WebCore::postUserInfoForChanges
        https://bugs.webkit.org/show_bug.cgi?id=208488
        <rdar://problem/59975669>

        Reviewed by Chris Fleizach.

        Ensure that we have a root web area before de-referencing it.

        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
        (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl):

2020-03-02  Andres Gonzalez  <andresg_22@apple.com>

        Fix for LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html in IsolatedTree mode.
        https://bugs.webkit.org/show_bug.cgi?id=208462

        Reviewed by Chris Fleizach.

        Covered by LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html.

        - Updates the IsolatedTree on the TextStateChange notification.
        - Renamed isAccessibilityScrollView to isAccessibilityScrollViewInstance
        and used isScrollView instead everywhere it's appropriate. This makes
        code like AXObjectCache::rootWebArea work for both AXObjects and IsolatedObjects.
        - Moved several utility functions from WebAccessibilityObjectWrapperMac.mm
        to AXObjectCacheMac.mm where they belong, so that they can be used by
        AXObjectCache implementation in addition to by the wrapper.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::postTextStateChangeNotification):
        (WebCore::AXObjectCache::rootWebArea):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::isOnScreen const):
        (WebCore::AccessibilityObject::scrollToGlobalPoint const):
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):
        * accessibility/AccessibilityScrollView.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityContainer]):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::isAccessibilityScrollViewInstance const):
        (WebCore::AXIsolatedObject::isAccessibilityScrollView const): Renamed.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postTextStateChangePlatformNotification): Uses
        TextMarker utilities instead of calling into the wrapper. This fixes
        the crash caused by the wrapper updating the backingObject that in turn
        may change the wrapper.
        (WebCore::AXTextMarkerRange): Moved from WebAccessibilityObjectWrapperMac.mm.
        (WebCore::textMarkerRangeFromMarkers): Moved from WebAccessibilityObjectWrapperMac.mm.
        (WebCore::textMarkerForVisiblePosition): Moved from WebAccessibilityObjectWrapperMac.mm.
        (WebCore::textMarkerRangeFromVisiblePositions): Moved from WebAccessibilityObjectWrapperMac.mm.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (AXTextMarkerRange): Moved.
        (textMarkerForVisiblePosition): Moved.
        (textMarkerRangeFromMarkers): Moved.
        (textMarkerRangeFromVisiblePositions): Moved.

2020-03-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: Items in the toolbar take up to much vertical space
        https://bugs.webkit.org/show_bug.cgi?id=204627
        <rdar://problem/59091905>

        Reviewed by Timothy Hatcher.

        Now that there is no toolbar area, there is nothing obstructing the ability for the window
        to be moved around when dragging via the title bar area. As such, we can remove the unused
        `InspectorFrontendHost` APIs.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::startWindowDrag): Deleted.
        (WebCore::InspectorFrontendHost::moveWindowBy const): Deleted.

        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::moveWindowBy): Deleted.

2020-03-02  Devin Rousso  <drousso@apple.com>

        Remove the required `LockHolder` when calling `WebAnimation::instances()`
        https://bugs.webkit.org/show_bug.cgi?id=208493

        Reviewed by Simon Fraser.

        Since `WebAnimation`s are not accessible from `Worker`s (e.g. main thread only), there's no
        reason to require that a lock be held in order to access `WebAnimation::instances()`.

        * animation/WebAnimation.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::WebAnimation):
        (WebCore::WebAnimation::~WebAnimation):
        (WebCore::WebAnimation::instancesMutex): Deleted.

        * inspector/agents/InspectorAnimationAgent.cpp:
        (WebCore::InspectorAnimationAgent::enable):

2020-03-02  Alan Coon  <alancoon@apple.com>

        Add new Mac target numbers
        https://bugs.webkit.org/show_bug.cgi?id=208398

        Reviewed by Alexey Proskuryakov.

        No new tests: adding target numbers doesn't necessitate any new testing. 

        * Configurations/Base.xcconfig:
        * Configurations/DebugRelease.xcconfig:
        * Configurations/Version.xcconfig:
        * Configurations/WebKitTargetConditionals.xcconfig:

2020-03-02  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Mapping from MIME type to UTI type should be done in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=208415

        Reviewed by Brent Fulgham.

        This is currently done in the WebContent process, but since this is using a system service which will be closed,
        this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
        and send it to the WebContent process.

        API test: WebKit.UTIFromMIMEType

        * platform/network/mac/UTIUtilities.h:
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::mapUTIFromMIMEType):
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
        (WebCore::cacheUTIFromMimeType):
        (WebCore::UTIFromMIMEType):
        (WebCore::mimeTypes):
        (WebCore::createUTIFromMIMETypeMap):
        (WebCore::setUTIFromMIMETypeMap):
        * testing/Internals.cpp:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.mm:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-02  Zalan Bujtas  <zalan@apple.com>

        Frame::layerTreeAsText should make sure that all the frames are clean and up-to-date
        https://bugs.webkit.org/show_bug.cgi?id=208484
        <rdar://problem/59972433>

        Reviewed by Simon Fraser.

        window.internals.layerTreeAsText() is designed to dump the layer structure of the current page content.
        It calls updateLayout() on the mainframe's document to make sure we collect the layer information on a clear tree.
        However Document::updateLayout is scoped to the current document's frame (the mainframe in this case) and
        leaves all the other frames dirty.

        * page/Frame.cpp:
        (WebCore::Frame::layerTreeAsText const):

2020-03-02  Daniel Bates  <dabates@apple.com>

        Annotate editable elements with hit test order
        https://bugs.webkit.org/show_bug.cgi?id=208463
        <rdar://problem/59962843>

        Reviewed by Wenson Hsieh.

        Until <rdar://problem/59737118> is fixed, annotate editable elements with their hit test order
        towards fixing <rdar://problem/59602885>.

        * dom/ElementContext.h:
        (WebCore::ElementContext::encode const):
        (WebCore::ElementContext::decode):
        Encode and decode the optional hit test order.

2020-03-02  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed restabilization of non-unified build.

        * css/parser/CSSSelectorParser.cpp:
        * css/parser/CSSSelectorParser.h:
        * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:

2020-03-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
        Implement canvas remote rendering
        https://bugs.webkit.org/show_bug.cgi?id=204955

        Reviewed by Jon Lee.

        Prepare ConcreteImageBuffer to be created without immediate backend.
        RemoteImageBuffer, which is a superclass of ConcreteImageBuffer, will be
        created initially without a backend. It will be created when its twin
        RemoteImageBufferProxy in the GPUProcess shares its backend.

        * platform/graphics/ConcreteImageBuffer.h:
        (WebCore::ConcreteImageBuffer::ensureBackendCreated const):
        (WebCore::ConcreteImageBuffer::ensureBackend const): Deleted.

2020-03-02  Mark Lam  <mark.lam@apple.com>

        ScriptController::executeIfJavaScriptURL() uses wrong JSGlobalObject.
        https://bugs.webkit.org/show_bug.cgi?id=208290
        <rdar://problem/59839476>

        Reviewed by Chris Dumez.

        The call to executeScriptIgnoringException() may have changed the current global
        object of the window.  We should be using the original global object that produced
        the result string.

        Also added a missing exception check needed after a potential rope resolution.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeIfJavaScriptURL):

2020-03-02  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, rolling out r257725.

        This commit caused 10 API tests to fail

        Reverted changeset:

        "[Cocoa] Mapping from MIME type to UTI type should be done in
        the UI process"
        https://bugs.webkit.org/show_bug.cgi?id=208415
        https://trac.webkit.org/changeset/257725

2020-03-02  Andres Gonzalez  <andresg_22@apple.com>

        Fix for LayoutTests/accessibility/mac/search-text/search-text.html in IsolatedTree mode.
        https://bugs.webkit.org/show_bug.cgi?id=208434

        Reviewed by Chris Fleizach.

        Covered by LayoutTests/accessibility/mac/search-text/search-text.html

        - Updates IsolatedTree for AXSelectedTextChanged notifications.
        - Exposes webAreaObject through the AXCoreObject interface.
        - AXIsolatedObject implementation for hasApplePDFAnnotationAttribute,
        webAreaObject and stringForRange.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::postTextStateChangeNotification):
        (WebCore::AXObjectCache::updateIsolatedTree):
        (WebCore::AXObjectCache::rootWebArea):
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isLoaded const):
        (WebCore::AccessibilityRenderObject::accessKey const):
        * accessibility/AccessibilityScrollView.h:
        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
        (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
        (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::stringForRange const):
        (WebCore::AXIsolatedObject::hasApplePDFAnnotationAttribute const): Deleted.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::removeNode):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
        (WebCore::addTextMarkerFor):
        (WebCore::textReplacementChangeDictionary):
        (WebCore::postUserInfoForChanges):
        (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
        (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2020-03-02  Wenson Hsieh  <wenson_hsieh@apple.com>

        Make Path::Path(const Path&) and Path::operator=(const Path&) cheap
        https://bugs.webkit.org/show_bug.cgi?id=208265
        <rdar://problem/59922452>

        Reviewed by Darin Adler.

        Make WebCore::Path's copy constructor and copy assignment operator cheaper. See below for more details; there
        should be no observable change in behavior. This gives us approximately 6% back on the canvas lines subtest on
        MotionMark, when the GPU process is used to render canvases (tested against macOS 10.15.3, on a 10-core iMac).

        * platform/graphics/Path.h:
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::~Path):
        (WebCore::Path::ensurePlatformPath):
        (WebCore::Path::Path):

        Update move constructors to set m_copyPathBeforeMutation to false on the given (moved) path.

        (WebCore::Path::swap):
        (WebCore::Path::initializeOrCopyPlatformPathIfNeeded):

        Whenever we need to ensure the platform CGPath (i.e. prior to appending to it), check the new flag to see
        whether it's necessary to apply the subsequent mutation on a copy of m_path, rather than m_path itself. The
        exception to this is when m_path only has a retain count of 1, which implies that all other copies of this path
        have been mutated (and have copied their platform CGPath as a result); this means it's safe to apply changes to
        m_path, since this path is now the sole owner of the CGPath.

        (WebCore::Path::operator=):

        The copy constructor and copy assignment operators currently call CGPathCreateMutableCopy on the given path's
        platform CGPath; this is to ensure that if either path is mutated in the future, the mutation won't also affect
        the other copy of the WebCore::Path.

        However, this call to CGPathCreateMutableCopy isn't needed in the case where a path is copied, but neither of
        the paths are mutated. To avoid this extra copy, we can instead introduce a dirty bit (m_copyPathBeforeMutation)
        that is set when a path is copied (either via the constructor, or through assignment) and proceed to simply copy
        the path pointer to the new path. Only if either path is mutated do we then call CGPathCreateMutableCopy.

        (WebCore::Path::transform):
        (WebCore::Path::closeSubpath):
        (WebCore::Path::addArc):
        (WebCore::Path::addPath):
        (WebCore::Path::clear):

2020-03-02  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Implement the remote ImageBuffer
        https://bugs.webkit.org/show_bug.cgi?id=207221

        Reviewed by Jon Lee.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/ConcreteImageBuffer.h:
        (WebCore::ConcreteImageBuffer::create):
        ConcreteImageBuffer::create returns the derived class which it creates.

        * platform/graphics/displaylists/DisplayList.h:
        This using statement gives compilation error when referencing DisplayList
        from WebKit.

        * platform/graphics/displaylists/DisplayListDrawingContext.h:
        RemoteImageBuffer inherits DisplayList::ImageBuffer so these methods 
        need to be exported.

        * platform/graphics/displaylists/DisplayListImageBuffer.h:
        (WebCore::DisplayList::ImageBuffer::ImageBuffer):
        Make it possible for RemoteImageBuffer to be created with no backend. It
        will be created later when RemoteImageBufferProxy shares its backend with
        RemoteImageBuffer.

2020-03-02  Rob Buis  <rbuis@igalia.com>

        Fix behavior of pings regarding Origin header
        https://bugs.webkit.org/show_bug.cgi?id=207102

        Reviewed by Youenn Fablet.

        Fix behavior of pings regarding Origin header by using the
        "append a request Origin header" algorithm [1]. This patch
        also sets the origin before calling addExtraFieldsToSubresourceRequest
        since the latter forces the origin to "null".

        Tests: imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-no-referrer-when-downgrade.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-no-referrer.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-origin-when-cross-origin.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-origin.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-same-origin.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-strict-origin-when-cross-origin.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-strict-origin.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin-unsafe-url.html
               imported/w3c/web-platform-tests/html/semantics/links/downloading-resources/header-origin.html

        [1] https://fetch.spec.whatwg.org/#append-a-request-origin-header

        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendPing):
        * page/SecurityPolicy.cpp:
        (WebCore::SecurityPolicy::generateOriginHeader):
        * page/SecurityPolicy.h:

2020-03-02  Chris Dumez  <cdumez@apple.com>

        Reduce size of PerformanceEntry
        https://bugs.webkit.org/show_bug.cgi?id=208452

        Reviewed by Devin Rousso.

        Reduce size of PerformanceEntry by leveraging the fact that it is polymorphic.

        * page/PerformanceEntry.cpp:
        (WebCore::PerformanceEntry::PerformanceEntry):
        * page/PerformanceEntry.h:
        (WebCore::PerformanceEntry::name const):
        (WebCore::PerformanceEntry::isResource const):
        (WebCore::PerformanceEntry::isMark const):
        (WebCore::PerformanceEntry::isMeasure const):
        (WebCore::PerformanceEntry::entryType const): Deleted.
        (WebCore::PerformanceEntry::type const): Deleted.
        * page/PerformanceMark.h:
        * page/PerformanceMeasure.h:
        * page/PerformanceResourceTiming.cpp:
        (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
        (WebCore::PerformanceResourceTiming::nextHopProtocol const):
        * page/PerformanceResourceTiming.h:

2020-03-02  John Wilander  <wilander@apple.com>

        ResourceLoadStatistics: Enable cookie blocking and the Storage Access API in ephemeral sessions
        https://bugs.webkit.org/show_bug.cgi?id=208399
        <rdar://problem/24731650>

        Reviewed by Brent Fulgham.

        Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-ephemeral-database.html
               http/tests/resourceLoadStatistics/third-party-cookie-blocking-ephemeral.html
               http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-ephemeral.html
               http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-ephemeral.html
               http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-without-cookie-ephemeral.html
               http/tests/storageAccess/request-and-grant-access-cross-origin-non-sandboxed-iframe-ephemeral.html
               http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-user-gesture-ephemeral.html

        * loader/ResourceLoadStatistics.h:
            Adds a boolean enum IsEphemeral which is used to capture ephemeral state
            across various classes.

2020-03-02  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Mapping from MIME type to UTI type should be done in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=208415

        Reviewed by Brent Fulgham.

        This is currently done in the WebContent process, but since this is using a system service which will be closed,
        this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
        and send it to the WebContent process.

        API test: WebKit.UTIFromMIMEType

        * platform/network/mac/UTIUtilities.h:
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::mapUTIFromMIMEType):
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
        (WebCore::cacheUTIFromMimeType):
        (WebCore::UTIFromMIMEType):
        (WebCore::mimeTypes):
        (WebCore::createUTIFromMIMETypeMap):
        (WebCore::setUTIFromMIMETypeMap):
        * testing/Internals.cpp:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.mm:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-03-02  Daniel Bates  <dabates@apple.com>

        Page::editableElementsInRect() should find nested editable elements and return found elements in paint order
        https://bugs.webkit.org/show_bug.cgi?id=208352
        <rdar://problem/59867815>

        Reviewed by Wenson Hsieh.

        Use the existing rect-based hit testing machinery to collect all the editable elements on
        the page that a person can hit. This makes it possible to find nested editable elements
        (e.g. an <input> inside a <div contenteditable="true">), ignore elements with CSS "pointer-events: none",
        and return elements in paint order (closest to farthest to a person's face). The latter
        makes it possible for a caller to know what element is frontmost, especially when two
        editable elements overlap.

        * page/Page.cpp:
        (WebCore::Page::editableElementsInRect const): Implement in terms of hit testing machinery.
        * rendering/HitTestLocation.cpp:
        (WebCore::HitTestLocation::HitTestLocation):
        * rendering/HitTestLocation.h:
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::HitTestResult):
        * rendering/HitTestResult.h:
        Added convenience constructors that take a LayoutRect.

2020-03-02  Doug Kelly  <dougk@apple.com>

        ASSERT(m_column != unsetColumnIndex) in RenderTable::cellBefore
        https://bugs.webkit.org/show_bug.cgi?id=208397

        Reviewed by Zalan Bujtas.

        When inserting a cell into a table row which is not visible, this can lead to attempting to compute the repaint
        rects during tree building.  Instead, mark the layer as dirty using dirtyVisibleContentStatus(), and the visibility
        will be recomputed at a later time.

        Test: fast/table/insert-cell-invisible-parent.html

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::insertedIntoTree):

2020-03-02  Zalan Bujtas  <zalan@apple.com>

        [BFC][MarginCollapsing] Sometimes precomputed margin values are just plain wrong.
        https://bugs.webkit.org/show_bug.cgi?id=208448
        <rdar://problem/59950390>

        Reviewed by Antti Koivisto.

        Consider the following content:
        <div style="float: left"></div>
        <div style="height: 100px">
          <div style="float: left"></div>
          <div>
            <span style="white-space: pre">  </span>
          </div>
          <div style="margin-bottom: 320px;"></div>
         </div>
        </div>

        In order to compute the position of the second float we need be able to intersect it with all
        the other floats in the same floating context. The float positioning starts with the box's static vertical position
        which is the position the box would be taking if it wasn't floating positioned.
        This vertical position needs to be in the same coordinate system as all the other floats to be able to intersect properly.
        The coordinate system is the formatting root's content box.
        When the second float box is being positioned, we don't yet have final margins for its ancestors, so the box's vertical
        position at this point is only computed relative to its containing block.
        In most cases we could just walk the ancestor chain all the way to the formatting root and pre-compute the margin before values.
        However in some not-so-rare cases, the ancestor margin before value depends on some content after the float box and to be able
        to figure out the exact margin values, we actually need to lay out the rest of the content.
        In the example above, the second float's final position depends on whether the <span> has white-space: pre or not (whether the parent
        div produces empty content or not).

        This patch computes margin before values only for the ancestors ignoring margin collapsing (and margin after values).

        * layout/MarginTypes.h:
        (WebCore::Layout::PrecomputedMarginBefore::usedValue const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::setPrecomputedMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::hasPrecomputedMarginBefore const): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedMarginBefore):

2020-03-02  Dean Jackson  <dino@apple.com>

        maps.google.com is not loading properly, screen flickers when zooming
        https://bugs.webkit.org/show_bug.cgi?id=208331
        <rdar://problem/59790757>

        Reviewed by Antoine Quint.

        When using ANGLE, we don't need the GL_ANGLE_depth_texture extension.
        We were mistakenly checking for it and deciding to not allow
        combined depth+stencil framebuffer attachments.

        Test: webgl/1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html
        (now passes on iOS)

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::setupFlags):

2020-03-02  Chris Dumez  <cdumez@apple.com>

        Add quirk to disable to back/forward cache on docs.google.com
        https://bugs.webkit.org/show_bug.cgi?id=208381
        <rdar://problem/59893415>

        Reviewed by Ryosuke Niwa.

        Google Docs used to bypass the back/forward cache by serving "Cache-Control: no-store"
        over HTTPS. We started caching such content in r250437 but the Google Docs content
        unfortunately is not currently compatible because it puts an overlay over the page and
        starts an animation when navigating away and fails to remove those when coming back from
        the back/forward cache (e.g. in 'pageshow' event handler).

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

2020-03-02  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, rolling out r257687.

        This commit caused debug tests to crash for macOS & iOS

        Reverted changeset:

        "[Cocoa] Mapping from MIME type to UTI type should be done in
        the UI process"
        https://bugs.webkit.org/show_bug.cgi?id=208415
        https://trac.webkit.org/changeset/257687

2020-03-02  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Get rid of custom GCD implementation
        https://bugs.webkit.org/show_bug.cgi?id=208446

        Reviewed by Xabier Rodriguez-Calvar.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
        (WebCore::greatestCommonDivisor): Deleted.

2020-03-02  Eric Carlson  <eric.carlson@apple.com>

        [GPUP] Plumb through more MediaPlayer methods
        https://bugs.webkit.org/show_bug.cgi?id=208423
        <rdar://problem/59924386>

        Reviewed by Youenn Fablet.

        No new tests, unskipped ~1200 existing media tests.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerPause): Deleted.
        (WebCore::HTMLMediaElement::mediaPlayerPlay): Deleted.
        * html/HTMLMediaElement.h:

        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerContentsScale const):
        (WebCore::MediaPlayerClient::mediaPlayerPause): Deleted.
        (WebCore::MediaPlayerClient::mediaPlayerPlay): Deleted.

2020-03-02  Youenn Fablet  <youenn@apple.com>

        LocalSampleBufferDisplayLayer is not computing the correct bounds/position in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=208370

        Reviewed by Eric Carlson.

        When in GPUProcess, we need to update the bounds of the remote LocalSampleBufferDisplayLayer.
        In case of samples with rotation, the computation was wrong.
        Move the rotation logic from MediaPLayerPrivateMediaStreamAVFObjC to LocalSampleBufferDisplayLayer.
        This allows in WebKit2 to send the rotation information with the bounds information.
        Remove the bounds getter since it is no longer used.
        Covered by manual tests.

        * platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
        (WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
        (WebCore::LocalSampleBufferDisplayLayer::updateRootLayerBoundsAndPosition):
        (WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):

2020-03-02  Rob Buis  <rbuis@igalia.com>

        Add referrerpolicy attribute support for anchors
        https://bugs.webkit.org/show_bug.cgi?id=208424

        Reviewed by Darin Adler.

        This patch adds 'referrerpolicy' attribute support for anchor elements.
        If set, the value is restricted to the ReferrerPolicy enum, and
        if valid it is used for the script fetch.
        If not set or invalid, the current behavior is kept.

        Tests: http/tests/referrer-policy-anchor/no-referrer-when-downgrade/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/no-referrer-when-downgrade/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/no-referrer-when-downgrade/same-origin.html
               http/tests/referrer-policy-anchor/no-referrer/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/no-referrer/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/no-referrer/same-origin.html
               http/tests/referrer-policy-anchor/origin-when-cross-origin/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/origin-when-cross-origin/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/origin-when-cross-origin/same-origin.html
               http/tests/referrer-policy-anchor/origin/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/origin/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/origin/same-origin.html
               http/tests/referrer-policy-anchor/same-origin/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/same-origin/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/same-origin/same-origin.html
               http/tests/referrer-policy-anchor/strict-origin-when-cross-origin/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/strict-origin-when-cross-origin/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/strict-origin-when-cross-origin/same-origin.html
               http/tests/referrer-policy-anchor/strict-origin/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/strict-origin/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/strict-origin/same-origin.html
               http/tests/referrer-policy-anchor/unsafe-url/cross-origin-http-http.html
               http/tests/referrer-policy-anchor/unsafe-url/cross-origin-http.https.html
               http/tests/referrer-policy-anchor/unsafe-url/same-origin.html

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::handleClick):
        (WebCore::HTMLAnchorElement::setReferrerPolicyForBindings):
        (WebCore::HTMLAnchorElement::referrerPolicyForBindings const):
        (WebCore::HTMLAnchorElement::referrerPolicy const):
        * html/HTMLAnchorElement.h:
        * html/HTMLAnchorElement.idl:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::handleClick):
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::openInNewTab):
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::navigate):
        * loader/FrameLoadRequest.cpp:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        * loader/FrameLoadRequest.h:
        (WebCore::FrameLoadRequest::FrameLoadRequest):
        (WebCore::FrameLoadRequest::referrerPolicy const):
        (WebCore::FrameLoadRequest::shouldSendReferrer const): Deleted.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::loadURLIntoChildFrame):
        (WebCore::FrameLoader::loadFrameRequest):
        * loader/FrameLoader.h:
        * loader/FrameLoaderTypes.h:
        * loader/NavigationScheduler.cpp:
        (WebCore::NavigationScheduler::scheduleLocationChange):
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::defaultEventHandler):
        * page/ContextMenuController.cpp:
        (WebCore::openNewWindow):
        (WebCore::ContextMenuController::contextMenuItemSelected):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::createWindow):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):

2020-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Stop using mediaControlsBase.js
        https://bugs.webkit.org/show_bug.cgi?id=208374

        Reviewed by Xabier Rodriguez-Calvar.

        Move the required base functionality to mediaControlsAdwaita.js and use that single file.

        * Modules/mediacontrols/mediaControlsAdwaita.js:
        (createControls):
        (Controller):
        (Controller.prototype.listenFor):
        (Controller.prototype.stopListeningFor):
        (Controller.prototype.addVideoListeners):
        (Controller.prototype.removeVideoListeners):
        (Controller.prototype.handleEvent):
        (Controller.prototype.createBase):
        (Controller.prototype.isAudio):
        (Controller.prototype.isFullScreen):
        (Controller.prototype.shouldHaveControls):
        (Controller.prototype.updateBase):
        (Controller.prototype.createControls):
        (Controller.prototype.configureControls):
        (Controller.prototype.disconnectControls):
        (Controller.prototype.reconnectControls):
        (Controller.prototype.showControls):
        (Controller.prototype.hideControls):
        (Controller.prototype.resetHideControlsTimer):
        (Controller.prototype.clearHideControlsTimer):
        (Controller.prototype.controlsAreAlwaysVisible):
        (Controller.prototype.controlsAreHidden):
        (Controller.prototype.addControls):
        (Controller.prototype.removeControls):
        (Controller.prototype.updateControls):
        (Controller.prototype.setIsLive):
        (Controller.prototype.updateDuration):
        (Controller.prototype.formatTime):
        (Controller.prototype.setPlaying):
        (Controller.prototype.updatePlaying):
        (Controller.prototype.updateCaptionButton):
        (Controller.prototype.updateCaptionContainer):
        (Controller.prototype.updateFullscreenButton):
        (Controller.prototype.updateVolume):
        (Controller.prototype.updateHasVideo):
        (Controller.prototype.handleReadyStateChange):
        (Controller.prototype.handleTimeUpdate):
        (Controller.prototype.handleDurationChange):
        (Controller.prototype.handlePlay):
        (Controller.prototype.handlePause):
        (Controller.prototype.handleVolumeChange):
        (Controller.prototype.handleFullscreenChange):
        (Controller.prototype.handleTextTrackChange):
        (Controller.prototype.handleTextTrackAdd):
        (Controller.prototype.handleTextTrackRemove):
        (Controller.prototype.handleControlsChange):
        (Controller.prototype.handleWrapperMouseMove):
        (Controller.prototype.handleWrapperMouseOut):
        (Controller.prototype.handleWrapperMouseUp):
        (Controller.prototype.handlePanelMouseDown):
        (Controller.prototype.handlePanelTransitionEnd):
        (Controller.prototype.handlePanelClick):
        (Controller.prototype.canPlay):
        (Controller.prototype.handlePlayButtonClicked):
        (Controller.prototype.handleTimelineChange):
        (Controller.prototype.handleTimelineMouseUp):
        (Controller.prototype.handleMuteButtonClicked):
        (Controller.prototype.handleMuteButtonMouseOver):
        (Controller.prototype.handleVolumeBoxMouseOut):
        (Controller.prototype.handleVolumeSliderInput):
        (Controller.prototype.handleFullscreenButtonClicked):
        (Controller.prototype.buildCaptionMenu):
        (Controller.prototype.captionItemSelected):
        (Controller.prototype.focusSiblingCaptionItem):
        (Controller.prototype.handleCaptionItemKeyUp):
        (Controller.prototype.showCaptionMenu):
        (Controller.prototype.captionMenuTransitionEnd):
        (Controller.prototype.captionMenuContainsNode):
        (Controller.prototype.handleCaptionButtonClicked):
        (Controller.prototype.handleCaptionButtonMouseOver):
        (Controller.prototype.handleCaptionButtonMouseOut):
        (Controller.prototype.handleCaptionMenuMouseOut):
        (ControllerAdwaita): Deleted.
        (contains): Deleted.
        (ControllerAdwaita.prototype.createControls): Deleted.
        (ControllerAdwaita.prototype.configureInlineControls): Deleted.
        (ControllerAdwaita.prototype.shouldHaveControls): Deleted.
        (ControllerAdwaita.prototype.reconnectControls): Deleted.
        (ControllerAdwaita.prototype.setStatusHidden): Deleted.
        (ControllerAdwaita.prototype.updateTime): Deleted.
        (ControllerAdwaita.prototype.handleTimeUpdate): Deleted.
        (ControllerAdwaita.prototype.updateHasAudio): Deleted.
        (ControllerAdwaita.prototype.handleMuteButtonMouseOver): Deleted.
        (ControllerAdwaita.prototype.handleVolumeBoxMouseOut): Deleted.
        (ControllerAdwaita.prototype.removeControls): Deleted.
        (ControllerAdwaita.prototype.addControls): Deleted.
        (ControllerAdwaita.prototype.updateFullscreenButton): Deleted.
        (ControllerAdwaita.prototype.updateReadyState): Deleted.
        (ControllerAdwaita.prototype.updateDuration): Deleted.
        (ControllerAdwaita.prototype.setIsLive): Deleted.
        (ControllerAdwaita.prototype.updatePlaying): Deleted.
        (ControllerAdwaita.prototype.updateProgress): Deleted.
        (ControllerAdwaita.prototype.handleCaptionButtonClicked): Deleted.
        (ControllerAdwaita.prototype.buildCaptionMenu): Deleted.
        (ControllerAdwaita.prototype.destroyCaptionMenu): Deleted.
        (ControllerAdwaita.prototype.showCaptionMenu): Deleted.
        (ControllerAdwaita.prototype.hideCaptionMenu): Deleted.
        (ControllerAdwaita.prototype.captionMenuTransitionEnd): Deleted.
        (ControllerAdwaita.prototype.handleCaptionButtonMouseOver): Deleted.
        (ControllerAdwaita.prototype.handleCaptionButtonShowMenu): Deleted.
        (ControllerAdwaita.prototype.handleCaptionButtonMouseOut): Deleted.
        (ControllerAdwaita.prototype.handleCaptionMouseOut): Deleted.
        * Modules/mediacontrols/mediaControlsBase.js:
        (Controller.prototype.createControls):
        * PlatformGTK.cmake:
        * PlatformWPE.cmake:
        * rendering/RenderThemeAdwaita.cpp:
        (WebCore::RenderThemeAdwaita::mediaControlsScript):

2020-03-01  Zalan Bujtas  <zalan@apple.com>

        Unreviewed build fix for non-unified builds after r257507.

        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginValue const):
        (WebCore::Layout::marginValue): Deleted.

2020-02-29  Darin Adler  <darin@apple.com>

        Slim down some CSS parsing code
        https://bugs.webkit.org/show_bug.cgi?id=208418

        Reviewed by Anders Carlsson.

        * css/CSSPrimitiveValue.h: Remove unused createAllowingMarginQuirk function
        and the FIXME-NEWPARSER that said we wouldn't need it any more and the
        no-longer-needed isQuirkValue function.

        * css/CSSValue.h: Remove m_isQuirkValue.

        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseSelector): Call parseCSSSelector instead of
        CSSSelectorParser::parseSelector, because that's the public function now.
        * css/parser/CSSParserImpl.cpp:
        (WebCore::CSSParserImpl::consumeStyleRule): Ditto.

        * css/parser/CSSPropertyParserHelpers.h: Removed a FIXME-NEWPARSER that is
        now obsolete.

        * css/parser/CSSSelectorParser.cpp: Moved the entire CSSSelectorParser class here from
        the header, because the only thing used outside this file is the entry point, the
        now renamed parseCSSSelector function.
        (WebCore::CSSSelectorParser::DisallowPseudoElementsScope::DisallowPseudoElementsScope):
        Changed this class to use a reference instead of a pointer.
        (WebCore::parseCSSSelector): Renamed CSSSelectorParser::parseSelector to this.
        (WebCore::CSSSelectorParser::consumeComplexSelectorList): Use auto to make some
        unique_ptr code less verbose.
        (WebCore::CSSSelectorParser::consumeCompoundSelectorList): Ditto. Removed the check of
        m_failed. Only the parser entry point function needs that check, and that is the
        consumeComplexSelectorList function above.
        (WebCore::extractCompoundFlags): Use static instead of anonymous namespace. Use enum
        class instead of enum, and use OptionSet instead of unsigned.
        (WebCore::CSSSelectorParser::consumeComplexSelector): Updated for the above. This
        refactoring exposed a strangeness in the simple selector loop; for now maintained
        behavior rather than changing it to do something more logical.
        (WebCore::isScrollbarPseudoClass): Use static instead of anonymous namespace.
        (WebCore::isUserActionPseudoClass): Ditto.
        (WebCore::isPseudoClassValidAfterPseudoElement): Ditto.
        (WebCore::isSimpleSelectorValidAfterPseudoElement): Ditto.
        (WebCore::CSSSelectorParser::consumeCompoundSelector): Use auto to make unique_ptr
        code less verbose. Also inlined the one line applySimpleSelectorToCompound function,
        because that name didn't document much thus having a function obscured rather than
        clarifying what was going on. Also use makeUnique instead of new.
        (WebCore::CSSSelectorParser::consumeId): Use makeUnique instead of new.
        (WebCore::CSSSelectorParser::consumeClass): Ditto.
        (WebCore::CSSSelectorParser::consumeAttribute): Ditto.
        (WebCore::isOnlyPseudoElementFunction): Tweaked a comment.
        (WebCore::CSSSelectorParser::consumePseudo): Update use of DisallowPseudoElementsScope
        to use a reference, use auto to make unique_ptr code less verbose, use makeUnique
        instead of new.
        (WebCore::consumeANPlusB): Converted to a file-level static function rather than
        a static member function.
        (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded): Changed type from
        pointer to reference
        (WebCore::CSSSelectorParser::addSimpleSelectorToCompound): Deleted.

        * css/parser/CSSSelectorParser.h: Removed most of the contents of this file, leaving
        only the function that is the parser entry point.

        * style/StyleBuilderConverter.h:
        (WebCore::Style::BuilderConverter::convertLength): This si the one place that sets
        the quirk on a Length value. It now checks for CSS_QUIRKY_EMS directly rather than
        using a helper function.

2020-02-29  Darin Adler  <darin@apple.com>

        Tighten up CSSPendingSubstitutionValue
        https://bugs.webkit.org/show_bug.cgi?id=208421

        Reviewed by Anders Carlsson.

        * Sources.txt: Removed CSSPendingSubstitutionValue.cpp.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * css/CSSPendingSubstitutionValue.cpp: Removed.

        * css/CSSPendingSubstitutionValue.h:
        (WebCore::CSSPendingSubstitutionValue::shorthandValue const): Return a reference
        instead of a pointer.
        (WebCore::CSSPendingSubstitutionValue::equals const): Updated since m_shorthandValue
        is now a Ref instead of RefPtr.
        (WebCore::CSSPendingSubstitutionValue::customCSSText): Made this a static member
        function that always returns an empty string.

        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getPropertyValue const): Use auto, scoped variables
        so they don't live until the end of the function. Simplified the code and the
        comments while retaining as much clarity as possible. Also call getPropertyCSSValue
        directly instead of calling getPropertyCSSValueInternal.
        (WebCore::StyleProperties::asText const): Use is<> to make the code simpler.
        Also updated to use reference instead of pointer from CSSPendingSubstitutionValue.

        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::borderSpacingValue const): Call getPropertyCSSValue
        instead of getPropertyCSSValueInternal.
        (WebCore::StyleProperties::getLayeredShorthandValue const): Ditto.
        (WebCore::StyleProperties::getShorthandValue const): Ditto.
        (WebCore::StyleProperties::getCommonValue const): Ditto.
        (WebCore::StyleProperties::pageBreakPropertyValue const): Ditto. Also added a
        missing null check.
        (WebCore::StyleProperties::getPropertyCSSValue const): Merged with the function
        below since all this did was call getPropertyCSSValueInternal.
        (WebCore::StyleProperties::getPropertyCSSValueInternal const): Renamed to take
        away the word internal and merged with the function above.
        (WebCore::ImmutableStyleProperties::findCustomPropertyIndex const): Removed
        incorrectly copied and pasted comment.
        (WebCore::MutableStyleProperties::findCustomPropertyIndex const): Ditto.
        (WebCore::StyleProperties::copyPropertiesInSet const): Call getPropertyCSSValue
        instead of getPropertyCSSValueInternal.
        * css/StyleProperties.h: Removed getPropertyCSSValueInternal.

        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseValueWithVariableReferences): Use is<> and fewer locals.

        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseValueStart): Removed a local and made this use
        more Ref and less RefPtr.

2020-02-29  Darin Adler  <darin@apple.com>

        Move some vectors around instead of heap-allocating them and moving the pointers
        https://bugs.webkit.org/show_bug.cgi?id=208422

        Reviewed by Sam Weinig.

        * css/CSSKeyframeRule.cpp:
        (WebCore::StyleRuleKeyframe::StyleRuleKeyframe): Take Vector&& instead of
        unique_ptr<Vector>.
        (WebCore::StyleRuleKeyframe::create): Moved these here from the header.
        Take Vector&& instead of unique_ptr<Vector>.
        (WebCore::StyleRuleKeyframe::setKeyText): Update since the result is a
        Vector rather than a unique_ptr<Vector>.
        * css/CSSKeyframeRule.h: Updated for the above.

        * css/CSSKeyframesRule.cpp:
        (WebCore::StyleRuleKeyframes::findKeyframeIndex const): Return Optional<size_t>
        so we don't depend on notFound. This is our better modern pattern, since
        notFound can work wrong if we mix size_t and unsigned, for example. Also
        updatd since result of parseKeyFrameKeyList is now a Vector rather than
        a unique_ptr<Vector>.
        (WebCore::CSSKeyframesRule::deleteRule): Updated for the above.
        (WebCore::CSSKeyframesRule::findRule): Ditto.
        * css/CSSKeyframesRule.h: Updated for the above.

        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseKeyframeKeyList): Return Vector instead of
        unique_ptr<Vector>.
        * css/parser/CSSParser.h: Updated for the above.

        * css/parser/CSSParserImpl.cpp:
        (WebCore::CSSParserImpl::parseKeyframeKeyList): Return Vector instead of
        unique_ptr<Vector>.
        (WebCore::CSSParserImpl::consumeKeyframeStyleRule): Updated for the
        above change.
        (WebCore::CSSParserImpl::consumeKeyframeKeyList): Return Vector instead
        of unique_ptr<Vector>.
        * css/parser/CSSParserImpl.h: Updated for the above.

        * platform/graphics/FloatPolygon.cpp:
        (WebCore::FloatPolygon::FloatPolygon): Take Vector&& instead of
        unique_ptr<Vector>.
        * platform/graphics/FloatPolygon.h: Take Vector&& instead of unique_ptr<Vector>.
        Also changed m_vertices to a Vector instead of a unique_ptr<Vector>.

        * rendering/shapes/PolygonShape.h: Take Vector&& instead of unique_ptr<Vector>.

        * rendering/shapes/Shape.cpp:
        (WebCore::createPolygonShape): Take Vector&& instead of unique_ptr<Vector>.
        (WebCore::Shape::createShape): Use a Vector instead of a unique_ptr<Vector>.

2020-03-01  Zalan Bujtas  <zalan@apple.com>

        [LFC][MarginCollapsing] Do not re-compute PositiveAndNegativeVerticalMargin values
        https://bugs.webkit.org/show_bug.cgi?id=208419
        <rdar://problem/59923666>

        Reviewed by Antti Koivisto.

        MarginCollapse::collapsedVerticalValues() already computes the positive/negative before/after pairs.

        * layout/MarginTypes.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::resolvedPositiveNegativeMarginValues): Deleted.

2020-03-01  Simon Fraser  <simon.fraser@apple.com>

        Convert m_scrollingNodeToLayerMap to use WeakPtr<RenderLayer>
        https://bugs.webkit.org/show_bug.cgi?id=208403

        Reviewed by Zalan Bujtas.

        Use WeakPtr<> in m_scrollingNodeToLayerMap.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::attachScrollingNode):
        (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
        (WebCore::RenderLayerCompositor::scrollableAreaForScrollLayerID const):
        * rendering/RenderLayerCompositor.h:

2020-02-29  Yusuke Suzuki  <ysuzuki@apple.com>

        Remove std::lock_guard
        https://bugs.webkit.org/show_bug.cgi?id=206451

        Reviewed by Anders Carlsson.

        * Modules/webaudio/AudioBufferSourceNode.cpp:
        (WebCore::AudioBufferSourceNode::setBuffer):
        * Modules/webaudio/AudioParamTimeline.cpp:
        (WebCore::AudioParamTimeline::insertEvent):
        (WebCore::AudioParamTimeline::cancelScheduledValues):
        * Modules/webaudio/ConvolverNode.cpp:
        (WebCore::ConvolverNode::reset):
        (WebCore::ConvolverNode::setBuffer):
        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        (WebCore::MediaElementAudioSourceNode::setFormat):
        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        (WebCore::MediaStreamAudioSourceNode::setFormat):
        * Modules/webaudio/OscillatorNode.cpp:
        (WebCore::OscillatorNode::setPeriodicWave):
        * Modules/webaudio/PannerNode.cpp:
        (WebCore::PannerNode::setPanningModel):
        * Modules/webaudio/WaveShaperProcessor.cpp:
        (WebCore::WaveShaperProcessor::setCurve):
        (WebCore::WaveShaperProcessor::setOversample):
        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::Database):
        (WebCore::Database::performOpenAndVerify):
        (WebCore::Database::closeDatabase):
        (WebCore::Database::getCachedVersion const):
        (WebCore::Database::setCachedVersion):
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::addProposedDatabase):
        (WebCore::DatabaseManager::removeProposedDatabase):
        (WebCore::DatabaseManager::fullPathForDatabase):
        (WebCore::DatabaseManager::detailsForNameAndOrigin):
        * crypto/CryptoAlgorithmRegistry.cpp:
        (WebCore::CryptoAlgorithmRegistry::identifier):
        (WebCore::CryptoAlgorithmRegistry::name):
        (WebCore::CryptoAlgorithmRegistry::create):
        (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
        * inspector/agents/WebHeapAgent.cpp:
        (WebCore::SendGarbageCollectionEventsTask::addGarbageCollection):
        (WebCore::SendGarbageCollectionEventsTask::reset):
        (WebCore::SendGarbageCollectionEventsTask::timerFired):
        * page/scrolling/ScrollingThread.cpp:
        (WebCore::ScrollingThread::dispatch):
        (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
        * page/scrolling/generic/ScrollingThreadGeneric.cpp:
        (WebCore::ScrollingThread::initializeRunLoop):
        * page/scrolling/mac/ScrollingThreadMac.mm:
        (WebCore::ScrollingThread::initializeRunLoop):
        * platform/audio/ReverbConvolver.cpp:
        (WebCore::ReverbConvolver::~ReverbConvolver):
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC):
        (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
        (WebCore::AudioSourceProviderAVFObjC::prepareCallback):
        (WebCore::AudioSourceProviderAVFObjC::unprepareCallback):
        (WebCore::AudioSourceProviderAVFObjC::processCallback):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontDatabase::collectionForFamily):
        (WebCore::FontDatabase::clear):
        * platform/ios/wak/WebCoreThreadRun.cpp:
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
        (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
        (WebCore::WebAudioSourceProviderAVFObjC::prepare):
        (WebCore::WebAudioSourceProviderAVFObjC::unprepare):
        * platform/network/cf/LoaderRunLoopCF.cpp:
        (WebCore::loaderRunLoop):
        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
        (WebCore::SQLiteDatabase::open):
        * platform/sql/SQLiteDatabaseTracker.cpp:
        (WebCore::SQLiteDatabaseTracker::setClient):
        (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
        (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
        (WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):
        * platform/text/TextEncodingRegistry.cpp:
        (WebCore::buildBaseTextCodecMaps):
        (WebCore::newTextCodec):
        (WebCore::atomCanonicalTextEncodingName):

2020-02-29  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Mapping from MIME type to UTI type should be done in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=208415

        Reviewed by Brent Fulgham.

        This is currently done in the WebContent process, but since this is using a system service which will be closed,
        this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
        and send it to the WebContent process.

        API test: WebKit.UTIFromMIMEType

        * platform/network/mac/UTIUtilities.h:
        * platform/network/mac/UTIUtilities.mm:
        (WebCore::mapUTIFromMIMEType):
        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
        (WebCore::cacheUTIFromMimeType):
        (WebCore::UTIFromMIMEType):
        (WebCore::mimeTypes):
        (WebCore::createUTIFromMIMETypeMap):
        (WebCore::setUTIFromMIMETypeMap):
        * testing/Internals.cpp:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.mm:
        (WebCore::Internals::getUTIFromMIMEType):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-02-29  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Consolidate precomputeVerticalPositionForAncestors and precomputeVerticalPosition
        https://bugs.webkit.org/show_bug.cgi?id=208414
        <rdar://problem/59919467>

        Reviewed by Antti Koivisto.

        BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors takes care of both the box and its ancestors now.
        This is also in preparation for making precompute logic a bit simpler. 

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPosition): Deleted.
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRoot): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:

2020-02-29  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] FloatingState::top should return topmost logical vertical position
        https://bugs.webkit.org/show_bug.cgi?id=208412
        <rdar://problem/59918798>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html

        When computing the used height for an auto: height formatting root block level container, we have to take both the non-floating and floating
        in-flow boxes into account. This patch ensures that in case of multiple floats, we use the topmost float's logical top position. 

        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::top const):

2020-02-29  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] The used available width for float avoider with clear always matches the containing block's constraint
        https://bugs.webkit.org/show_bug.cgi?id=208411
        <rdar://problem/59918356>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/block-only/float-clear-with-auto-width.html

        Float clear pushes the block level box either below the floats, or just one side below but the other side could overlap.
        What it means is that the used available width always matches the containing block's constraint.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
        (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear):

2020-02-28  Peng Liu  <peng.liu6@apple.com>

        [Media in GPU process] Implement the video fullscreen and Picture-in-Picture support
        https://bugs.webkit.org/show_bug.cgi?id=208252

        Reviewed by Simon Fraser.

        Covered by existing tests.

        This patch moves the creation of the CALayer for video fullscreen and picture-in-picture from
        VideoFullscreenManager to MediaPlayerPrivate classes. With this change, we can support
        video fullscreen and picture-in-picture no matter the "Media in GPU process"
        feature is enabled or not. The function createVideoFullscreenLayer() is added to
        MediaPlayer and MediaPlayerPrivate for that purpose.

        There are duplicated code snippets to create a CALayer in MediaPlayerPrivateAVFoundationObjC,
        MediaPlayerPrivateMediaSourceAVFObjC, and MediaPlayerPrivateMediaStreamAVFObjC.
        That will be fixed in a future refactoring (webkit.org/b/208342).

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::createVideoFullscreenLayer):
        * html/HTMLMediaElement.h:
        * platform/cocoa/VideoFullscreenModelVideoElement.h:
        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
        (WebCore::VideoFullscreenModelVideoElement::createVideoFullscreenLayer):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::createVideoFullscreenLayer):
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::createVideoFullscreenLayer):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoFullscreenLayer):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createVideoFullscreenLayer):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createVideoFullscreenLayer):

2020-02-28  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add an internal setting to enable or disable canvas rendering in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=208375

        Reviewed by Tim Horton.

        Adds an internal setting to enable or disable the GPU process when rendering canvases. To do this, we add a
        codepath for creating a new ImageBuffer, given enum types that indicate whether to try and enable acceleration,
        and also whether to use display lists.

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createImageBuffer const):

        Use the new ImageBuffer::create method.

        * page/Chrome.cpp:
        (WebCore::Chrome::createImageBuffer const):
        * page/Chrome.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::createImageBuffer const):
        * platform/HostWindow.h:
        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::create):

        Add a new version of ImageBuffer::create that does not directly take a RenderingMode, but instead takes the
        a few pieces of information that the client layer will need to decide what kind of ImageBuffer it should create.

        * platform/graphics/ImageBuffer.h:
        * platform/graphics/RenderingMode.h:

        Add some new enum types to represent hints provided by WebCore when it asks the client layer for a new
        ImageBuffer.

2020-02-28  Chris Dumez  <cdumez@apple.com>

        Garbage collection prevents FontFace.loaded promise from getting resolved
        https://bugs.webkit.org/show_bug.cgi?id=208382

        Reviewed by Ryosuke Niwa.

        Make sure the FontFace JS wrapper stays alive long enough to resolve the
        loaded promise when it is observable by the page's script.

        Test: fast/text/font-promises-gc.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::document const):
        * css/CSSFontFace.h:
        * css/FontFace.cpp:
        (WebCore::FontFace::FontFace):
        (WebCore::FontFace::fontStateChanged):
        (WebCore::FontFace::loadForBindings):
        (WebCore::FontFace::loadedForBindings):
        (WebCore::FontFace::activeDOMObjectName const):
        (WebCore::FontFace::hasPendingActivity const):
        (WebCore::FontFace::load): Deleted.
        * css/FontFace.h:
        * css/FontFace.idl:

2020-02-28  Jer Noble  <jer.noble@apple.com>

        [GPUP] Implement Modern EME API in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=208090

        Reviewed by Eric Carlson.

        To enable caching of certain CDM properties, allow them to be fetched rather than queries. As such,
        CDMPrivate::supportsInitDataType -> supportedInitDataTypes, supportsRobustness -> supportedRobustnesses.

        To enable CDM types to be passed across XPC, add explicit sizes to the enumerations, and add encode and
        decode templates to the data types.

        To enable async messaging form the GPU process's MediaPlayer, send the MediaPlayer the information it
        needs when both legacy- and modern-EME APIs are both enabled, rather than allow the MediaPlayerPrivate
        to query the MediaPlayer.

        Move most of the algorithimic implementation from CDM into CDMPrivate, allowing it to be run from within
        the GPU process. Similmarly, make most of the synchronous methods in CDMInstance instead take a callback
        parameter, allowing them to be implemented in a remote process.

        * Headers.cmake:
        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::CDM::getSupportedConfiguration):
        (WebCore::CDM::supportsInitDataType const):
        * Modules/encryptedmedia/CDM.h:
        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::update):
        * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
        (WebCore::MediaKeySystemAccess::createMediaKeys):
        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::setServerCertificate):
        * Modules/encryptedmedia/MediaKeys.h:
        * Modules/encryptedmedia/MediaKeys.idl:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateShouldContinueAfterNeedKey):
        (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
        (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
        (WebCore::HTMLMediaElement::addEventListener):
        (WebCore::HTMLMediaElement::removeEventListener):
        * html/HTMLMediaElement.h:
        * platform/encryptedmedia/CDMEncryptionScheme.h:
        * platform/encryptedmedia/CDMFactory.cpp:
        (WebCore::CDMFactory::resetFactories):
        * platform/encryptedmedia/CDMFactory.h:
        * platform/encryptedmedia/CDMInstance.h:
        * platform/encryptedmedia/CDMInstanceSession.h:
        * platform/encryptedmedia/CDMKeyStatus.h:
        * platform/encryptedmedia/CDMKeySystemConfiguration.h:
        (WebCore::CDMKeySystemConfiguration::encode const):
        (WebCore::CDMKeySystemConfiguration::decode):
        * platform/encryptedmedia/CDMMediaCapability.h:
        (WebCore::CDMMediaCapability::encode const):
        (WebCore::CDMMediaCapability::decode):
        * platform/encryptedmedia/CDMMessageType.h:
        * platform/encryptedmedia/CDMPrivate.cpp:
        (WebCore::CDMPrivate::getSupportedConfiguration):
        (WebCore::CDMPrivate::doSupportedConfigurationStep):
        (WebCore::CDMPrivate::isPersistentType):
        (WebCore::CDMPrivate::getSupportedCapabilitiesForAudioVideoType):
        (WebCore::CDMPrivate::getConsentStatus):
        * platform/encryptedmedia/CDMPrivate.h:
        * platform/encryptedmedia/CDMRequirement.h:
        * platform/encryptedmedia/CDMRestrictions.h:
        (WebCore::CDMRestrictions::encode const):
        (WebCore::CDMRestrictions::decode):
        * platform/encryptedmedia/CDMSessionType.h:
        * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
        (WebCore::CDMPrivateClearKey::supportedInitDataTypes const):
        (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const):
        (WebCore::CDMPrivateClearKey::supportedRobustnesses const):
        (WebCore::CDMInstanceClearKey::initializeWithConfiguration):
        (WebCore::CDMInstanceClearKey::setServerCertificate):
        (WebCore::CDMInstanceClearKey::setStorageDirectory):
        (WebCore::CDMInstanceSessionClearKey::updateLicense):
        * platform/encryptedmedia/clearkey/CDMClearKey.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setShouldContinueAfterKeyNeeded):
        (WebCore::MediaPlayer::keyNeeded):
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setShouldContinueAfterKeyNeeded):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::CDMPrivateFairPlayStreaming::supportedInitDataTypes const):
        (WebCore::CDMPrivateFairPlayStreaming::supportsSessionTypeWithConfiguration const):
        (WebCore::CDMPrivateFairPlayStreaming::supportedRobustnesses const):
        (WebCore::CDMPrivateFairPlayStreaming::supportsInitData const):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setServerCertificate):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::sessionIdentifierChanged):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
        * testing/MockCDMFactory.cpp:
        (WebCore::MockCDMFactory::setSupportedRobustness):
        (WebCore::MockCDM::supportedInitDataTypes const):
        (WebCore::MockCDM::supportedRobustnesses const):
        (WebCore::MockCDM::supportsSessionTypeWithConfiguration const):
        (WebCore::MockCDM::supportsInitData const):
        (WebCore::MockCDMInstance::initializeWithConfiguration):
        (WebCore::MockCDMInstance::setServerCertificate):
        (WebCore::MockCDMInstance::setStorageDirectory):
        (WebCore::MockCDMInstanceSession::updateLicense):
        * testing/MockCDMFactory.h:
        (WebCore::MockCDMFactory::supportedRobustness const):

2020-02-28  Chris Dumez  <cdumez@apple.com> and Yusuke Suzuki  <ysuzuki@apple.com>

        Clear FontDatabase when low-memory-warning happens
        https://bugs.webkit.org/show_bug.cgi?id=208389

        Reviewed by Chris Dumez.

        FontDatabase can monotonically increase. We should clear it when low-memory-warning happens.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontCache::platformPurgeInactiveFontData):

2020-02-28  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Add TLS debugging feature to log encryption keys
        https://bugs.webkit.org/show_bug.cgi?id=208192

        Reviewed by Fujii Hironori.

        This patch enables recording encryption keys on curl port.
        When you set key log file path to environment variable SSLKEYLOGFILE on curl port, network process writes encryption keys into the path.
        The key log file follows the NSS key log format and this feature is as same as Chrome and Firefox have.

        See also: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format

        Test: No tests for this debugging feature. We have to check manually if the log file is generate.

        * platform/network/curl/CurlContext.cpp:
        (WebCore::CurlContext::CurlContext):
        * platform/network/curl/CurlContext.h:
        (WebCore::CurlContext::shouldLogTLSKey const):
        (WebCore::CurlContext::tlsKeyLogFilePath const):
        * platform/network/curl/CurlSSLVerifier.cpp:
        (WebCore::CurlSSLVerifier::CurlSSLVerifier):
        (WebCore::CurlSSLVerifier::infoCallback):
        (WebCore::CurlSSLVerifier::logTLSKey):
        * platform/network/curl/CurlSSLVerifier.h:

2020-02-28  Chris Dumez  <cdumez@apple.com>

        MediaResourceLoader leaks resource responses
        https://bugs.webkit.org/show_bug.cgi?id=208267

        Reviewed by Eric Carlson.

        MediaResourceLoader leaks resource responses when browsing in Safari, even though these responses are
        only used for testing. AVAssetCustomURLBridgeForNSURLSession holds on to the WebCoreNSURLSession, which
        keeps the MediaResourceLoader alive, even if there is no media on the current page. In turn, the
        MediaResourceLoader always keeps in memory the last 5 HTTP responses.

        To address the issue, we now only record these responses when running the tests.

        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResourceLoader::recordResponsesForTesting):
        (WebCore::MediaResourceLoader::addResponseForTesting):
        * loader/MediaResourceLoader.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):

2020-02-28  Keith Rollin  <krollin@apple.com>

        Convert frame address in logging statements to pageID+frameID
        https://bugs.webkit.org/show_bug.cgi?id=208325
        <rdar://problem/59850768>

        Reviewed by Alex Christensen.

        Some old logging prints the address of the associated frame object.
        Annotating logging statements this way makes it difficult to match up
        that logging with other logging that uses pageID+frameID. Update the
        logging to consistently use the latter format.

        No new tests -- no new or changed functionality.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setRequest):
        (WebCore::DocumentLoader::setMainDocumentError):
        (WebCore::DocumentLoader::mainReceivedError):
        (WebCore::DocumentLoader::stopLoading):
        (WebCore::DocumentLoader::notifyFinished):
        (WebCore::DocumentLoader::willSendRequest):
        (WebCore::DocumentLoader::tryLoadingSubstituteData):
        (WebCore::DocumentLoader::disallowDataRequest const):
        (WebCore::DocumentLoader::continueAfterContentPolicy):
        (WebCore::DocumentLoader::startLoadingMainResource):
        (WebCore::DocumentLoader::loadMainResource):
        (WebCore::DocumentLoader::cancelMainResourceLoad):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::pageID const):
        (WebCore::FrameLoader::frameID const):
        (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
        * loader/FrameLoader.h:
        * loader/ResourceLoader.cpp:
        * loader/SubresourceLoader.cpp:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * page/Frame.cpp:
        (WebCore::Frame::pageID const):
        (WebCore::Frame::frameID const):
        * page/Frame.h:
        * page/FrameView.cpp:

2020-02-28  Eric Carlson  <eric.carlson@apple.com>

        No port uses USE_NATIVE_FULLSCREEN_VIDEO, remove it
        https://bugs.webkit.org/show_bug.cgi?id=208378
        <rdar://problem/59892497>

        Reviewed by Jer Noble.

        No new tests, unused code removed.

        * dom/FullscreenManager.cpp:
        (WebCore::FullscreenManager::willEnterFullscreen):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::enterFullscreen): Deleted.
        (WebCore::MediaPlayer::exitFullscreen): Deleted.
        (WebCore::MediaPlayer::canEnterFullscreen const): Deleted.
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::enterFullscreen): Deleted.
        (WebCore::MediaPlayerPrivateInterface::exitFullscreen): Deleted.
        (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen const): Deleted.

2020-02-28  Eric Carlson  <eric.carlson@apple.com>

        Regression r257612: Windows build broken
        https://bugs.webkit.org/show_bug.cgi?id=208372
        <rdar://problem/59885001>

        Unreviewed Windows build fix.

        * platform/graphics/InbandGenericCue.cpp:
        (WebCore::InbandGenericCue::toJSONString const):

2020-02-28  Dean Jackson  <dino@apple.com>

        updateCSSTransitionsForElementAndProperty should clone RenderStyles
        https://bugs.webkit.org/show_bug.cgi?id=208356
        rdar://59869560

        Reviewed by Antti Koivisto.

        Make ownership of the local variable clear by cloning the RenderStyles
        used in updateCSSTransitionsForElementAndProperty rather than referencing
        different versions.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):

2020-02-28  Chris Dumez  <cdumez@apple.com>

        Retain cycle between CSSFontSelector -> CSSFontFaceSet -> CSSFontFace -> CSSFontSelector
        https://bugs.webkit.org/show_bug.cgi?id=196437
        <rdar://problem/46598332>

        Reviewed by Alex Christensen.

        Break the reference cycle using a WeakPtr. The leak was reproducible by browsing CNN.com
        and then navigating to about:blank (those objects would stay around, even after memory
        pressure signal).

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::CSSFontFace):
        (WebCore::CSSFontFace::fontLoadEventOccurred):
        * css/CSSFontFace.h:

2020-02-28  Alberto Garcia  <berto@igalia.com>

        [SOUP] Unreviewed. Fix unused parameter warning

        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::getRawCookies const):

2020-02-28  Yusuke Suzuki  <ysuzuki@apple.com>

        Shrink-to-fit Display::LineBox/Display::Run vectors.
        https://bugs.webkit.org/show_bug.cgi?id=208343

        Reviewed by Antti Koivisto.

        From the collected data in PLT5, 95% of Runs / LineBoxes are <= 4, while we are having 10 and 5 inlineCapacity.
        We adjust this inlineCapacity to 4 based on this number. It also covers almost all of Speedometer2.0 content (in it, 99.9% is 1).
        We also call `shrinkToFit` to make it the exact size after baking Display::InlineContent. It should be no-op in 95% cases.

        * layout/displaytree/DisplayInlineContent.h:
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::shrinkDisplayInlineContent):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::layout):

2020-02-28  Alberto Garcia  <berto@igalia.com>

        [GStreamer] Unreviewed. Fix build warning.

        queueSize is of type size_t so it should use the proper format
        specifier.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (restartLoaderIfNeeded):
        (stopLoaderIfNeeded):

2020-02-28  Youenn Fablet  <youenn@apple.com>

        Conversion between MediaSample and RemoteVideoSample should preserve the rotation information
        https://bugs.webkit.org/show_bug.cgi?id=208240

        Reviewed by Eric Carlson.

        Update RemoteVideoSample to have surface getter be const.
        Add a new routine to convert a RemoteVideoSample in a MediaSample, with proper rotation and mirrored information.
        Covered by manual testing.

        * platform/graphics/RemoteVideoSample.cpp:
        (WebCore::RemoteVideoSample::surface const):
        * platform/graphics/RemoteVideoSample.h:
        (WebCore::RemoteVideoSample::mirrored const):
        * platform/graphics/cv/ImageTransferSessionVT.h:
        * platform/graphics/cv/ImageTransferSessionVT.mm:
        (WebCore::ImageTransferSessionVT::createMediaSample):

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): [GTK] Test imported/w3c/web-platform-tests/css/css-sizing/button-min-width.html is failing since r257299
        https://bugs.webkit.org/show_bug.cgi?id=208296

        Reviewed by Adrian Perez de Castro.

        We are no longer honoring the style min width/height of buttons.

        * platform/Theme.cpp:
        (WebCore::Theme::minimumControlSize const): Add zoomedSize parameter.
        * platform/Theme.h:
        * platform/adwaita/ThemeAdwaita.cpp:
        (WebCore::ThemeAdwaita::minimumControlSize const): Use the style min size unless it's intrinsic or auto.
        * platform/adwaita/ThemeAdwaita.h:
        * platform/mac/ThemeMac.h:
        * platform/mac/ThemeMac.mm:
        (WebCore::ThemeMac::minimumControlSize const): Add zoomedSize parameter.
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle): Pass style min size to Theme::minimumControlSize().

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): [GTK] Check and radio buttons don't keep the aspect ratio
        https://bugs.webkit.org/show_bug.cgi?id=208302

        Reviewed by Adrian Perez de Castro.

        When different width and height is used, we should use the lower value and render the button centered.

        * platform/adwaita/ThemeAdwaita.cpp:
        (WebCore::ThemeAdwaita::paintCheckbox):
        (WebCore::ThemeAdwaita::paintRadio):

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): [GTK] Test fast/replaced/table-percent-height.html is failing since r257299
        https://bugs.webkit.org/show_bug.cgi?id=208295

        Reviewed by Adrian Perez de Castro.

        We are now hardcoding the size of check and radio buttons, except when width and height are both specified.

        * platform/adwaita/ThemeAdwaita.cpp:
        (WebCore::ThemeAdwaita::controlSize const): Only set width and height of check and radio buttons when they are
        intrinsic or auto.

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): [GTK] Test fast/forms/menulist-restrict-line-height.html is failing since r257299
        https://bugs.webkit.org/show_bug.cgi?id=208241

        Reviewed by Adrian Perez de Castro.

        We should not honor line-height for styled combo buttons.

        * rendering/RenderThemeAdwaita.cpp:
        (WebCore::RenderThemeAdwaita::adjustMenuListStyle const):
        (WebCore::RenderThemeAdwaita::adjustMenuListButtonStyle const):
        * rendering/RenderThemeAdwaita.h:

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): [GTK] box shadow is no longer ignored for search field decorations
        https://bugs.webkit.org/show_bug.cgi?id=208239

        Reviewed by Adrian Perez de Castro.

        Since we no longer use RenderTheme to paint the search field decorations we need to ensure a box shadow isn't
        used for them in the CSS.

        * css/themeAdwaita.css:
        (input[type="search"]::-webkit-search-results-button,): Add -webkit-box-shadow: none !important;
        (input[type="search"]::-webkit-search-cancel-button): Ditto.
        (body[dir="rtl"] input[type="search"]::-webkit-search-cancel-button): Ditto.

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        REGRESSION(r257299): Test fast/css/button-height.html is failing since r257299
        https://bugs.webkit.org/show_bug.cgi?id=208237

        Reviewed by Adrian Perez de Castro.

        The new theming code doesn't use the same border size for button and input[type="button"].

        * platform/adwaita/ThemeAdwaita.cpp:
        (WebCore::ThemeAdwaita::controlBorder const): Use the same border for all buttons.
        * platform/adwaita/ThemeAdwaita.h:

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix hover effects broken for GTK port after r257592

        Add missing braces to if that now has two lines in the body. This was causing all mouse events to be considered
        read only when building with TOUCH_EVENTS enabled.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseMoveEvent):

2020-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Test imported/blink/fast/forms/datalist/slider-appearance-with-ticks-crash.html fails
        https://bugs.webkit.org/show_bug.cgi?id=190613

        Reviewed by Wenson Hsieh.

        Check the input is a range control before trying to paint slider ticks.

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paintSliderTicks):

2020-02-27  Devin Rousso  <drousso@apple.com>

        Web Inspector: allow use of dark mode theme independently from system-wide theme
        https://bugs.webkit.org/show_bug.cgi?id=186308
        <rdar://problem/40785895>

        Reviewed by Timothy Hatcher.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::setForcedAppearance): Added.
        Expose a way to call `Page::setUseDarkAppearanceOverride` from the Web Inspector frontend.

2020-02-27  Don Olmstead  <don.olmstead@sony.com>

        Fix WebCore export macros for declspec
        https://bugs.webkit.org/show_bug.cgi?id=208363

        Reviewed by Konstantin Tokarev.

        Modified the PlatformExportMacros to match the other export macros. Originally
        Windows ports were treated differently and they had to set their own export macros.
        This isn't ideal because how WebCore is built is really dependent on the CMake
        definition of the library type.

        * CMakeLists.txt:
        * WebCorePrefix.h:
        * platform/PlatformExportMacros.h:
        * testing/js/WebCoreTestSupportPrefix.h:

2020-02-27  Dean Jackson  <dino@apple.com>

        MemoryRelease logging uses a unique_ptr with unclear lifetime
        https://bugs.webkit.org/show_bug.cgi?id=208361

        Reviewed by Alex Christensen.

        The logging here was getting a unique_ptr inside the loop, which
        causes newer versions of clang to complain with an error:
        object backing the pointer will be destroyed at the end of the full-expression [-Werror,-Wdangling-gsl]

        Using a temporary local variable fixes the problem.

        * page/MemoryRelease.cpp:
        (WebCore::logMemoryStatisticsAtTimeOfDeath):

2020-02-27  Doug Kelly  <dougk@apple.com>

        Hit test with clipPath referencing parent element causes infinite recursion
        https://bugs.webkit.org/show_bug.cgi?id=208279

        Reviewed by Ryosuke Niwa.

        Add an early return for SVG hit tests which have a child element referencing a  parent clipPath.
        This change breaks the cycle, although it unfortunately runs on every hit test, for each node which
        is a child of the clipPath element. 

        Test: svg/hittest/svg-clip-path-child-element.html

        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::hitTestClipContent):

2020-02-27  Ryosuke Niwa  <rniwa@webkit.org>

        TextManipulationController should not generate a new item for content in manipulated paragraphs
        https://bugs.webkit.org/show_bug.cgi?id=208286

        Reviewed by Wenson Hsieh.

        This patch makes TextManipulationController to ignore any content change in previously manipulated paragraphs.

        Added an early exist to observeParagraphs when the observed content has an element that has already been manipulated
        as an ancestor. Note that the only case in which this logic matters is when it's called by scheduleObservartionUpdate,
        which calls this function on each paragraph separately, unlike startObservingParagraphs which calls it on
        the entire document, we can simply exit early instead of ignoring just the current paragraph.

        Renamed TextManipulationController's m_recentlyInsertedElements to m_manipulatedElements and made it persist
        forever so that we can track any element that has already been manipulated. Als renamed m_mutatedElements
        to m_elementsWithNewRenderer for clarity.

        Test: TestWebKitAPI.TextManipulation.InsertingContentIntoAlreadyManipulatedContentDoesNotCreateTextManipulationItem

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::isInManipulatedElement): Added. Has a fast path for when
        m_manipulatedElements's capacity is 0, which happens when observeParagraphs is called by startObservingParagraphs.
        (WebCore::TextManipulationController::observeParagraphs): Added an early exit when there is a content that has
        already been manipulated.
        (WebCore::TextManipulationController::didCreateRendererForElement): Added the same check to fail early.
        (WebCore::TextManipulationController::scheduleObservartionUpdate):
        (WebCore::TextManipulationController::replace): Removed the code to clear m_recentlyInsertedElements.
        * editing/TextManipulationController.h:

2020-02-27  Eric Carlson  <eric.carlson@apple.com>

        Support in-band generic cues when loading media in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=208080
        <rdar://problem/59687943>

        Reviewed by Youenn Fablet.

        No new tests, existing tests enabled for GPU process.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::GenericTextTrackCueMap::add):
        (WebCore::GenericTextTrackCueMap::findIndexOfPair):
        (WebCore::GenericTextTrackCueMap::find):
        (WebCore::GenericTextTrackCueMap::remove):
        (WebCore::InbandGenericTextTrack::updateCueFromCueData):
        (WebCore::InbandGenericTextTrack::addGenericCue):
        (WebCore::InbandGenericTextTrack::updateGenericCue):
        (WebCore::InbandGenericTextTrack::removeGenericCue):
        * html/track/InbandGenericTextTrack.h:
        * html/track/InbandTextTrack.h:
        * html/track/TextTrackCueGeneric.h:
        * platform/graphics/InbandGenericCue.h: Added.
        (WebCore::GenericCueData::decode):
        (WebCore::GenericCueData::encode const):
        (WebCore::InbandGenericCue::create):
        (WebCore::InbandGenericCue::startTime const):
        (WebCore::InbandGenericCue::setStartTime):
        (WebCore::InbandGenericCue::endTime const):
        (WebCore::InbandGenericCue::setEndTime):
        (WebCore::InbandGenericCue::id const):
        (WebCore::InbandGenericCue::setId):
        (WebCore::InbandGenericCue::content const):
        (WebCore::InbandGenericCue::setContent):
        (WebCore::InbandGenericCue::line const):
        (WebCore::InbandGenericCue::setLine):
        (WebCore::InbandGenericCue::position const):
        (WebCore::InbandGenericCue::setPosition):
        (WebCore::InbandGenericCue::size const):
        (WebCore::InbandGenericCue::setSize):
        (WebCore::InbandGenericCue::align const):
        (WebCore::InbandGenericCue::setAlign):
        (WebCore::InbandGenericCue::fontName const):
        (WebCore::InbandGenericCue::setFontName):
        (WebCore::InbandGenericCue::baseFontSize const):
        (WebCore::InbandGenericCue::setBaseFontSize):
        (WebCore::InbandGenericCue::relativeFontSize const):
        (WebCore::InbandGenericCue::setRelativeFontSize):
        (WebCore::InbandGenericCue::foregroundColor const):
        (WebCore::InbandGenericCue::setForegroundColor):
        (WebCore::InbandGenericCue::backgroundColor const):
        (WebCore::InbandGenericCue::setBackgroundColor):
        (WebCore::InbandGenericCue::highlightColor const):
        (WebCore::InbandGenericCue::setHighlightColor):
        (WebCore::InbandGenericCue::status):
        (WebCore::InbandGenericCue::setStatus):
        (WebCore::InbandGenericCue::cueData const):
        (WebCore::InbandGenericCue::InbandGenericCue):
        (WebCore::InbandGenericCue::toJSONString const):
        (WebCore::InbandGenericCue::doesExtendCueData const):
        (WTF::LogArgument<WebCore::InbandGenericCue>::toString):
        * platform/graphics/InbandTextTrackPrivateClient.h:
        (WebCore::GenericCueData::create): Deleted.
        (WebCore::GenericCueData::startTime const): Deleted.
        (WebCore::GenericCueData::setStartTime): Deleted.
        (WebCore::GenericCueData::endTime const): Deleted.
        (WebCore::GenericCueData::setEndTime): Deleted.
        (WebCore::GenericCueData::id const): Deleted.
        (WebCore::GenericCueData::setId): Deleted.
        (WebCore::GenericCueData::content const): Deleted.
        (WebCore::GenericCueData::setContent): Deleted.
        (WebCore::GenericCueData::line const): Deleted.
        (WebCore::GenericCueData::setLine): Deleted.
        (WebCore::GenericCueData::position const): Deleted.
        (WebCore::GenericCueData::setPosition): Deleted.
        (WebCore::GenericCueData::size const): Deleted.
        (WebCore::GenericCueData::setSize): Deleted.
        (): Deleted.
        (WebCore::GenericCueData::align const): Deleted.
        (WebCore::GenericCueData::setAlign): Deleted.
        (WebCore::GenericCueData::fontName const): Deleted.
        (WebCore::GenericCueData::setFontName): Deleted.
        (WebCore::GenericCueData::baseFontSize const): Deleted.
        (WebCore::GenericCueData::setBaseFontSize): Deleted.
        (WebCore::GenericCueData::relativeFontSize const): Deleted.
        (WebCore::GenericCueData::setRelativeFontSize): Deleted.
        (WebCore::GenericCueData::foregroundColor const): Deleted.
        (WebCore::GenericCueData::setForegroundColor): Deleted.
        (WebCore::GenericCueData::backgroundColor const): Deleted.
        (WebCore::GenericCueData::setBackgroundColor): Deleted.
        (WebCore::GenericCueData::highlightColor const): Deleted.
        (WebCore::GenericCueData::setHighlightColor): Deleted.
        (WebCore::GenericCueData::status): Deleted.
        (WebCore::GenericCueData::setStatus): Deleted.
        (WebCore::GenericCueData::toJSONString const): Deleted.
        (WebCore::GenericCueData::doesExtendCueData const): Deleted.
        (WTF::LogArgument<WebCore::GenericCueData>::toString): Deleted.
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
        (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings):
        (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues):
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

2020-02-27  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Implement ImageBuffer shareable backends
        https://bugs.webkit.org/show_bug.cgi?id=207233

        Reviewed by Simon Fraser.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/PlatformImageBufferBackend.h: Added.
        Define the base ImageBufferBackend for each platform.
        ImageBufferShareableBitmapBackend in WebKit needs to have access to basic
        ImageBufferBackend functionalities specific to the platform.

        * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
        (WebCore::ImageBufferIOSurfaceBackend::create):
        * platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
        Use WTF::makeUnique and make the constructor public.

2020-02-27  Daniel Bates  <dabates@apple.com>

        Change HitTestRequestType to an OptionSet
        https://bugs.webkit.org/show_bug.cgi?id=208334

        Reviewed by Wenson Hsieh.

        The majority of this change is replacing usage of HitTestRequestType with an OptionSet<HitTestRequest::RequestType>.
        Though I was tempted and did in some circumstances modernize code around HitTestRequestType call sites.
        I've annotated important changes below.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::press):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::visiblePositionForPoint const): Updated code as needed.
        Added FIXME comment: the code should be written without a loop and instead use HitTestRequest::AllowVisibleChildFrameContentOnly
        to achieve the goal.
        (WebCore::AccessibilityRenderObject::accessibilityHitTest const):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::elementsFromPoint):
        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::isReplacementObscured): Update code as needed. Use IntRect::center()
        convenience function instead of computing the center point manually.
        * html/MediaElementSession.cpp:
        (WebCore::isElementMainContentForPurposesOfAutoplay): Update code as needed. Move check for whether
        the main frame has a document earlier in the function to avoid unncessary work. In practice, this
        check will never fail because the main frame always has a document. Though to be precise the main
        frame may not have a document during frame initialization. However, it does not make sense for this
        code to ever be called then.
        * page/AutoscrollController.cpp:
        (WebCore::AutoscrollController::updateAutoscrollRenderer):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::maybeCreateContextMenu):
        * page/DragController.cpp:
        (WebCore::DragController::canProcessDrag):
        (WebCore::DragController::startDrag):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::eventMayStartDrag const):
        (WebCore::EventHandler::updateSelectionForMouseDrag):
        (WebCore::EventHandler::hitTestResultAtPoint const):
        (WebCore::EventHandler::updateCursor):
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseDoubleClickEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::EventHandler::handleMouseForceEvent):
        (WebCore::EventHandler::updateDragAndDrop):
        (WebCore::EventHandler::isInsideScrollbar const):
        (WebCore::EventHandler::sendContextMenuEvent):
        (WebCore::EventHandler::sendContextMenuEventForKey):
        (WebCore::EventHandler::hoverTimerFired):
        (WebCore::EventHandler::dragSourceEndedAt):
        (WebCore::EventHandler::handleDrag):
        (WebCore::hitTestResultInFrame):
        (WebCore::EventHandler::handleTouchEvent):
        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
        * page/EventHandler.h:
        * page/FocusController.cpp:
        (WebCore::updateFocusCandidateIfNeeded):
        * page/Frame.cpp:
        (WebCore::Frame::visiblePositionForPoint const):
        (WebCore::Frame::documentAtPoint):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::cancelPointer): Added FIXME about correctness issue.
        The local variable named target will always be nullptr even after calling hitTestResultAtPoint().
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::tryToBeginDragAtPoint):
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::renderRectForPoint const):
        (WebCore::Frame::betterApproximateNode):
        (WebCore::Frame::hitTestResultAtViewportLocation):
        (WebCore::Frame::qualifyingNodeAtViewportLocation):
        * rendering/HitTestRequest.h:
        (WebCore::HitTestRequest::HitTestRequest):
        (WebCore::HitTestRequest::readOnly const):
        (WebCore::HitTestRequest::active const):
        (WebCore::HitTestRequest::move const):
        (WebCore::HitTestRequest::release const):
        (WebCore::HitTestRequest::ignoreClipping const):
        (WebCore::HitTestRequest::svgClipContent const):
        (WebCore::HitTestRequest::touchEvent const):
        (WebCore::HitTestRequest::disallowsUserAgentShadowContent const):
        (WebCore::HitTestRequest::allowsFrameScrollbars const):
        (WebCore::HitTestRequest::allowsChildFrameContent const):
        (WebCore::HitTestRequest::allowsVisibleChildFrameContent const):
        (WebCore::HitTestRequest::isChildFrameHitTest const):
        (WebCore::HitTestRequest::resultIsElementList const):
        (WebCore::HitTestRequest::includesAllElementsUnderPoint const):
        (WebCore::HitTestRequest::type const):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::hitTestClipContent):
        * testing/Internals.cpp:
        (WebCore::Internals::nodesFromRect const):
        * testing/Internals.mm:
        (WebCore::Internals::rangeForDictionaryLookupAtLocation):

2020-02-27  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for table rows and ARIA tree/grid rows.
        https://bugs.webkit.org/show_bug.cgi?id=208335

        Reviewed by Chris Fleizach.

        Covered by existing tests.

        - Exposes the AccessibilityTableRow and AccessibilityARIAGridRow
        interfaces through AXCoreObject.
        - Eliminates the need of downcasting in the platform wrapper code, so
        that it now works for both AXObjects and AXIsolatedObjects.
        - Implements the above mentioned interfaces in AXIsolatedObject.

        * accessibility/AccessibilityARIAGridRow.cpp:
        (WebCore::AccessibilityARIAGridRow::disclosedRows):
        * accessibility/AccessibilityARIAGridRow.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::disclosedRows):
        (WebCore::AccessibilityObject::ariaTreeItemDisclosedRows): Became disclosedRows.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityTableRow.h:
        (WebCore::AccessibilityTableRow::setRowIndex):
        (WebCore::AccessibilityTableRow::rowIndex const): Deleted.
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2020-02-27  Don Olmstead  <don.olmstead@sony.com>

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

        Reviewed by Michael Catanzaro.

        Use WebKit::PAL target.

        * CMakeLists.txt:

2020-02-27  Peng Liu  <peng.liu6@apple.com>

        MediaResourceLoader objects are leaking on reddit.com
        https://bugs.webkit.org/show_bug.cgi?id=208273

        Reviewed by Jer Noble.

        We retain the WebCoreNSURLSession delegate. There will be a retain cycle
        if that delegate retains the session. This patch fixes the retain cycle problem
        by referencing the delegate with a weak pointer.

        Manually tested.

        * platform/network/cocoa/WebCoreNSURLSession.h:
        * platform/network/cocoa/WebCoreNSURLSession.mm:
        (-[WebCoreNSURLSession delegate]):

2020-02-28  Simon Fraser  <simon.fraser@apple.com>

        Stop using -[CALayer setValue:forKey:] to store back pointers to PlatformCALayer*
        https://bugs.webkit.org/show_bug.cgi?id=208358

        Reviewed by Tim Horton.

        We used -[CAlayer setValue:forKey:@"WKPlatformCALayer"] to store associate PlatformCALayer*
        with CALayers. However, this has some performance cost, and won't work for a near-future world
        where the scrolling thread needs to get at PlatformCALayers.

        Replace with a static HashMap<> of CALayer* to PlatformCALayer*. Also rename platformCALayer()
        to platformCALayerForLayer() so it's easier to find.

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::layerToPlatformLayerMap):
        (WebCore::PlatformCALayer::platformCALayerForLayer):
        (WebCore::PlatformCALayerCocoa::create):
        (WebCore::PlatformCALayerCocoa::commonInit):
        (WebCore::PlatformCALayerCocoa::~PlatformCALayerCocoa):
        (WebCore::PlatformCALayerCocoa::superlayer const):
        (WebCore::PlatformCALayer::platformCALayer): Deleted.
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (PlatformCALayer::platformCALayerForLayer):
        (layoutSublayersProc):
        (PlatformCALayerWin::superlayer const):
        (PlatformCALayer::platformCALayer): Deleted.
        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
        (PlatformCALayerWinInternal::getSublayers const):
        (PlatformCALayerWinInternal::sublayerAtIndex const):
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer display]):
        * platform/graphics/mac/WebLayer.mm:
        (-[WebLayer drawInContext:]):
        (-[WebSimpleLayer setNeedsDisplay]):
        (-[WebSimpleLayer setNeedsDisplayInRect:]):
        (-[WebSimpleLayer display]):
        (-[WebSimpleLayer drawInContext:]):

2020-02-27  Rob Buis  <rbuis@igalia.com>

        Add referrerpolicy attribute support for images
        https://bugs.webkit.org/show_bug.cgi?id=207901

        Reviewed by Darin Adler.

        This patch adds 'referrerpolicy' attribute support for img elements.
        If set, the value is restricted to the ReferrerPolicy enum, and
        if valid it is used for the script fetch.
        If not set or invalid, the current behavior is kept.

        Tests: http/tests/referrer-policy-img/no-referrer-when-downgrade/cross-origin-http-http.html
               http/tests/referrer-policy-img/no-referrer-when-downgrade/cross-origin-http.https.html
               http/tests/referrer-policy-img/no-referrer-when-downgrade/same-origin.html
               http/tests/referrer-policy-img/no-referrer/cross-origin-http-http.html
               http/tests/referrer-policy-img/no-referrer/cross-origin-http.https.html
               http/tests/referrer-policy-img/no-referrer/same-origin.html
               http/tests/referrer-policy-img/origin-when-cross-origin/cross-origin-http-http.html
               http/tests/referrer-policy-img/origin-when-cross-origin/cross-origin-http.https.html
               http/tests/referrer-policy-img/origin-when-cross-origin/same-origin.html
               http/tests/referrer-policy-img/origin/cross-origin-http-http.html
               http/tests/referrer-policy-img/origin/cross-origin-http.https.html
               http/tests/referrer-policy-img/origin/same-origin.html
               http/tests/referrer-policy-img/same-origin/cross-origin-http-http.html
               http/tests/referrer-policy-img/same-origin/cross-origin-http.https.html
               http/tests/referrer-policy-img/same-origin/same-origin.html
               http/tests/referrer-policy-img/strict-origin-when-cross-origin/cross-origin-http-http.html
               http/tests/referrer-policy-img/strict-origin-when-cross-origin/cross-origin-http.https.html
               http/tests/referrer-policy-img/strict-origin-when-cross-origin/same-origin.html
               http/tests/referrer-policy-img/strict-origin/cross-origin-http-http.html
               http/tests/referrer-policy-img/strict-origin/cross-origin-http.https.html
               http/tests/referrer-policy-img/strict-origin/same-origin.html
               http/tests/referrer-policy-img/unsafe-url/cross-origin-http-http.html
               http/tests/referrer-policy-img/unsafe-url/cross-origin-http.https.html
               http/tests/referrer-policy-img/unsafe-url/same-origin.html

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::setReferrerPolicyForBindings):
        (WebCore::HTMLImageElement::referrerPolicyForBindings const):
        (WebCore::HTMLImageElement::referrerPolicy const):
        * html/HTMLImageElement.h:
        * html/HTMLImageElement.idl:
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement):

2020-02-27  Daniel Bates  <dabates@apple.com>

        Cleanup HitTestResult.{h, cpp}
        https://bugs.webkit.org/show_bug.cgi?id=208269
        <rdar://problem/59824186>

        Reviewed by Alex Christensen.

        Use modern C++ features to remove duplicate code.

        * rendering/HitTestLocation.cpp:
        (WebCore::HitTestLocation::HitTestLocation):
        * rendering/HitTestLocation.h:
        * rendering/HitTestResult.cpp: Remove unnecessary #includes.
        * rendering/HitTestResult.h: Remove unnecessary #includes. 
        (WebCore::HitTestResult::setIsOverWidget):

2020-02-27  Zalan Bujtas  <zalan@apple.com>

        Unreviewed build fix for non-unified builds after r257507.

        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedPositiveAndNegativeMargin const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
        (WebCore::Layout::computedPositiveAndNegativeMargin): Deleted.

2020-02-27  Antti Koivisto  <antti@apple.com>

        Load async scripts with low priority
        https://bugs.webkit.org/show_bug.cgi?id=208298

        Reviewed by Anders Carlsson.

        They are assumed to be non-critical and don't delay DOMContentLoaded.

        This matches other browsers. See https://addyosmani.com/blog/script-priorities/ for Chrome behavior.

        * bindings/js/CachedScriptFetcher.cpp:
        (WebCore::CachedScriptFetcher::requestModuleScript const):
        (WebCore::CachedScriptFetcher::requestScriptWithCache const)

        Pass around the priority.

        * bindings/js/CachedScriptFetcher.h:
        * dom/LoadableClassicScript.cpp:
        (WebCore::LoadableClassicScript::create):
        (WebCore::LoadableClassicScript::load):

        Deprioritize async script load.

        * dom/LoadableClassicScript.h:
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::requestClassicScript):

        Pass around the information that this is an async script.

        * dom/ScriptElementCachedScriptFetcher.cpp:
        (WebCore::ScriptElementCachedScriptFetcher::requestModuleScript const):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

        Parse async attribute in preload scanner.

        * html/parser/HTMLResourcePreloader.cpp:
        (WebCore::PreloadRequest::resourceRequest):

        Deprioritize async script preload.

        * html/parser/HTMLResourcePreloader.h:
        (WebCore::PreloadRequest::setScriptIsAsync):

2020-02-26  Ryosuke Niwa  <rniwa@webkit.org>

        Create AudioDestination in the GPU process
        https://bugs.webkit.org/show_bug.cgi?id=208179

        Reviewed by Jer Noble.

        Add an abstraction around the creation of AudioDestination using newly introduced mediaStrategy.

        * Headers.cmake:
        * Modules/webaudio/DefaultAudioDestinationNode.cpp:
        (WebCore::DefaultAudioDestinationNode::createDestination): Use MediaStrategy::createAudioDestination
        * WebCore.xcodeproj/project.pbxproj:
        * platform/MediaStrategy.h: Added.
        (WebCore::MediaStrategy): Added.
        * platform/PlatformStrategies.h:
        (WebCore::PlatformStrategies::mediaStrategy): Added.
        * platform/audio/AudioBus.h:
        * platform/audio/AudioDestination.h:

2020-02-26  Myles C. Maxfield  <mmaxfield@apple.com>

        [iPadOS] REGRESSION(r247667): Autosizing style changes don't invalidate RenderText's preferred logical widths
        https://bugs.webkit.org/show_bug.cgi?id=208084
        <rdar://problem/59463898>

        Reviewed by Darin Adler.

        Just use RenderElement::setStyle(), which handles all the invalidations, instead of RenderElement::setNeedsLayout().

        Do a little refactoring so we don't clone RenderStyles unless we need to.

        Test: fast/text-autosizing/ios/idempotentmode/viewport-change-relayout.html

        * page/Page.cpp:
        (WebCore::Page::recomputeTextAutoSizingInAllFrames):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):
        * rendering/style/RenderStyle.h:
        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::computeStatus):
        (WebCore::AutosizeStatus::updateStatus):
        * rendering/style/TextSizeAdjustment.h:
        (WebCore::AutosizeStatus::operator== const):
        (WebCore::AutosizeStatus::operator!= const):
        * style/StyleAdjuster.cpp:
        (WebCore::Style::Adjuster::adjustmentForTextAutosizing):
        (WebCore::Style::Adjuster::adjustForTextAutosizing):
        * style/StyleAdjuster.h:
        (WebCore::Style::Adjuster::AdjustmentForTextAutosizing::operator bool const):

2020-02-26  Zalan Bujtas  <zalan@apple.com>

        REGRESSION (r257507): [ macOS ] ASSERTION FAILED: blockFormattingState.hasPositiveAndNegativeVerticalMargin(layoutBox)
        https://bugs.webkit.org/show_bug.cgi?id=208278
        <rdar://problem/59828533>

        Fix mismatching call after r257507.

        * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):

2020-02-26  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for table cells.
        https://bugs.webkit.org/show_bug.cgi?id=208263

        Reviewed by Chris Fleizach.

        Covered by existing tests.

        - Exposed the AccessibilityTableCell interface through AXCoreObject.
        - This way there is no need to downcast in client code and the same
        platform wrapper code works for AccessibilityObjects and
        AXIsolatedObjects.
        - Completed caching of table cell properties in AXIsolatedObject.

        * accessibility/AccessibilityARIAGridCell.cpp:
        (WebCore::AccessibilityARIAGridCell::rowIndexRange const):
        (WebCore::AccessibilityARIAGridCell::axRowSpanWithRowIndex const):
        (WebCore::AccessibilityARIAGridCell::columnIndexRange const):
        * accessibility/AccessibilityARIAGridCell.h:
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::cellForColumnAndRow):
        * accessibility/AccessibilityTableCell.cpp:
        (WebCore::AccessibilityTableCell::isColumnHeaderCell const):
        (WebCore::AccessibilityTableCell::isRowHeaderCell const):
        (WebCore::AccessibilityTableCell::isTableCellInSameColGroup):
        (WebCore::AccessibilityTableCell::columnHeaders):
        (WebCore::AccessibilityTableCell::rowHeaders):
        (WebCore::AccessibilityTableCell::rowIndexRange const):
        (WebCore::AccessibilityTableCell::columnIndexRange const):
        * accessibility/AccessibilityTableCell.h:
        * accessibility/AccessibilityTableRow.h:
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
        (webkitAccessibleTableCellGetColumnSpan):
        (webkitAccessibleTableCellGetRowSpan):
        (webkitAccessibleTableCellGetPosition):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
        (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
        (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::pairAttributeValue const):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2020-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Implement the remote RenderingBackend
        https://bugs.webkit.org/show_bug.cgi?id=207198

        Reviewed by Simon Fraser.

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createImageBuffer const):
        Make HTMLCanvasElement be able to create a remote ImageBuffer.

2020-02-27  Simon Fraser  <simon.fraser@apple.com>

        Add ENABLE(SCROLLING_THREAD) and use it to turn off some code we don't need for iOS
        https://bugs.webkit.org/show_bug.cgi?id=208282

        Reviewed by Tim Horton.

        Protect ThreadedScrollingTree and ScrollingCoordinatorMac with ENABLE(SCROLLING_THREAD).

        * page/scrolling/ThreadedScrollingTree.cpp:
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.h:
        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
        * page/scrolling/mac/ScrollingTreeMac.cpp:
        * page/scrolling/mac/ScrollingTreeMac.h:

2020-02-26  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed unified source builds fix.

        > layout\FormattingContextGeometry.cpp(564): error C2027: use of undefined type 'WebCore::Layout::ReplacedBox
        > Modules\websockets\WebSocket.cpp(335): error C2027: use of undefined type 'WebCore::WorkerThread'
        > layout\integration\LayoutIntegrationBoxTree.cpp(63): error C2039: 'InlineTextBox': is not a member of 'WebCore::Layout'
        > workers\service\context\ServiceWorkerFetch.cpp(143): error C2027: use of undefined type 'WebCore::ServiceWorkerThread'

        * Modules/websockets/WebSocket.cpp:
        * layout/FormattingContextGeometry.cpp:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        * layout/integration/LayoutIntegrationBoxTree.cpp:
        * workers/service/context/ServiceWorkerFetch.cpp:

2020-02-26  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::canHaveChildrenForEditing via CompositeEditCommand::insertNode
        https://bugs.webkit.org/show_bug.cgi?id=208115
        <rdar://problem/56685655>

        Reviewed by Ryosuke Niwa.

        When inserting a list at an element with a non-list-item child, if the element is uneditable, skip creating list item for the child. 

        Test: fast/lists/insert-list-uneditable-element-with-non-li-child.html

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::listifyParagraph):

2020-02-26  Don Olmstead  <don.olmstead@sony.com>

        Allow setting of stack sizes for threads
        https://bugs.webkit.org/show_bug.cgi?id=208223

        Reviewed by Yusuke Suzuki.

        Specify ThreadType at the Thread::create callsite.

        * Modules/webaudio/AsyncAudioDecoder.cpp:
        (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
        * Modules/webaudio/OfflineAudioDestinationNode.cpp:
        (WebCore::OfflineAudioDestinationNode::startRendering):
        * bindings/js/GCController.cpp:
        (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
        * platform/audio/ReverbConvolver.cpp:
        (WebCore::ReverbConvolver::ReverbConvolver):
        * platform/network/cf/LoaderRunLoopCF.cpp:
        (WebCore::loaderRunLoop):
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::platformLoadResourceSynchronously):
        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
        (WebCore::getRunLoop):
        * platform/network/curl/CurlRequestScheduler.cpp:
        (WebCore::CurlRequestScheduler::startThreadIfNeeded):
        * platform/network/curl/CurlStreamScheduler.cpp:
        (WebCore::CurlStreamScheduler::startThreadIfNeeded):
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::start):

2020-02-26  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC][MarginCollapsing] Decouple regular and pre-computed margin collapsing logic
        https://bugs.webkit.org/show_bug.cgi?id=208247
        <rdar://problem/59808951>

        Reviewed by Antti Koivisto.

        The pre-computed path is so peculiar it deserves a dedicated file.

        This is in preparation for fixing a flaw in the pre-computed logic where we end up
        accessing a not-yet-computed horizontal constraint. No change in functionality at this point.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedMarginBefore): Deleted.
        * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp: Added.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedMarginBefore):
        * layout/integration/LayoutIntegrationBoxTree.cpp:

2020-02-26  Keith Rollin  <krollin@apple.com>

        Add logging to help diagnose redirect issue
        https://bugs.webkit.org/show_bug.cgi?id=207916
        <rdar://problem/59567875>

        Reviewed by Chris Dumez.

        We're seeing an issue where communication between the WebContent
        process and the Network process seems to come to a stop between
        NetworkResourceLoader::continueWillSendRedirectedRequest and
        NetworkResourceLoader::continueWillSendRequest. We do see a
        WebResourceLoader::willSendRequest log line between those two
        NetworkResourceLoader logging lines, but nothing else. Add a bunch of
        logging in this area to help determine what's happening.

        No new tests -- no new or changed functionality.

        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::checkNavigationPolicy):
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::loadDataURL):
        (WebCore::ResourceLoader::willSendRequestInternal):
        (WebCore::ResourceLoader::didFinishLoading):
        (WebCore::ResourceLoader::didFail):
        (WebCore::ResourceLoader::willSendRequestAsync):
        (WebCore::ResourceLoader::wasBlocked):
        (WebCore::ResourceLoader::cannotShowURL):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::init):
        (WebCore::SubresourceLoader::willSendRequestInternal):
        (WebCore::SubresourceLoader::didReceiveResponse):
        (WebCore::SubresourceLoader::didFinishLoading):
        (WebCore::SubresourceLoader::didFail):
        (WebCore::SubresourceLoader::willCancel):
        * loader/cache/CachedRawResource.cpp:
        (WebCore::CachedRawResource::redirectReceived):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::redirectReceived):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::canRequestAfterRedirection const):

2020-02-26  Daniel Bates  <dabates@apple.com>

        Clean up HitTestLocation.h
        https://bugs.webkit.org/show_bug.cgi?id=208254
        <rdar://problem/59815136>

        Reviewed by Jer Noble.

        Use modern C++ features to remove duplicate code.

        * rendering/HitTestLocation.cpp:
        (WebCore::HitTestLocation::HitTestLocation):
        * rendering/HitTestLocation.h:
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::HitTestResult):
        * rendering/HitTestResult.h: Remove unnecessary #includes. This file only needs
        to include RoundedRect.h: RoundedRect.h includes FloatQuad.h and LayoutRect.h
        and FloatQuad.h will include FloatRect.h. We do not make use of have declarations
        in <wtf/Forward.h> so remove that as well.

2020-02-26  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, rolling out r257373.

        This commit introduced one test that is a flaky failure on ios
        bots and broke another test

        Reverted changeset:

        "[iPadOS] REGRESSION(r247667): Autosizing style changes don't
        invalidate RenderText's preferred logical widths"
        https://bugs.webkit.org/show_bug.cgi?id=208084
        https://trac.webkit.org/changeset/257373

2020-02-26  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, rolling out r257470.

        This broke the build for tvOS and watchOS

        Reverted changeset:

        "Conversion between MediaSample and RemoteVideoSample should
        preserve the rotation information"
        https://bugs.webkit.org/show_bug.cgi?id=208240
        https://trac.webkit.org/changeset/257470

2020-02-26  Adrian Perez de Castro  <aperez@igalia.com>

        Unreviewed build fix for non-unified builds with assertions enabled.

        * css/CSSImageSetValue.cpp: Add missing include.

2020-02-26  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for table column objects.
        https://bugs.webkit.org/show_bug.cgi?id=208215

        Reviewed by Chris Fleizach.

        Covered by existing tests.

        - AccessibilityTableColumn interface is now exposed through
        AXCoreObject.
        - Separated isTableColumn from isAccessibilityTableColumnInstance.
        - This eliminates to need to downcast in the wrapper code, and hence
        makes it possible that the same code works for both AccessibilityObjects
        and AXIsolatedObjects.
        - Completed the caching of table column properties in AXIsolatedObject.
        - Some minor code cleanup.

        * accessibility/AccessibilityARIAGrid.cpp:
        (WebCore::AccessibilityARIAGrid::addChildren): Removed unnecessary cast.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::addChildren): Removed unnecessary cast.
        (WebCore::AccessibilityTable::columnHeaders):
        * accessibility/AccessibilityTableColumn.cpp:
        (WebCore::AccessibilityTableColumn::columnHeader):
        (WebCore::AccessibilityTableColumn::headerObject): Renamed columnHeader.
        * accessibility/AccessibilityTableColumn.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::isAccessibilityTableColumnInstance const):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2020-02-26  Youenn Fablet  <youenn@apple.com>

        Conversion between MediaSample and RemoteVideoSample should preserve the rotation information
        https://bugs.webkit.org/show_bug.cgi?id=208240

        Reviewed by Eric Carlson.

        Update RemoteVideoSample to have surface getter be const.
        Add a new routine to convert a RemoteVideoSample in a MediaSample, with proper rotation and mirrored information.
        Covered by manual testing.

        * platform/graphics/RemoteVideoSample.cpp:
        (WebCore::RemoteVideoSample::surface const):
        * platform/graphics/RemoteVideoSample.h:
        (WebCore::RemoteVideoSample::mirrored const):
        * platform/graphics/cv/ImageTransferSessionVT.h:
        * platform/graphics/cv/ImageTransferSessionVT.mm:
        (WebCore::ImageTransferSessionVT::createMediaSample):

2020-02-26  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC][Floats] ASSERT(committedInlineItemCount || line.hasIntrusiveFloat()) in LineLayoutContext::close
        https://bugs.webkit.org/show_bug.cgi?id=208230
        <rdar://problem/59791249>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/float-and-br-inline-content-only.html

        Expand the ASSERT to include all the valid cases
        1. Inline content is added to the line
        2. Only float(s) got processed (no inline content)
        3. Neither floats not inline content got processed due to intrusive floats.
        (This patch slightly rearranges the body of LineLayoutContext::commitFloats and also fixes an off-by-1 error in LineLayoutContext::close.)

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::commitFloats):

2020-02-26  Alicia Boya García  <aboya@igalia.com>

        [GStreamer] Correctly remove webvttenc on WebKitTextCombiner pad release
        https://bugs.webkit.org/show_bug.cgi?id=208234

        Reviewed by Xabier Rodriguez-Calvar.

        The implementation of webkitTextCombinerReleasePad() was wrong in that
        it was checking the peer pad of webkittextcombinerpad to check if it
        belonged a webvttenc element and remove it... But since this is a
        ghostpad, the peer is upstream, not downstream. When the release pad
        function is called, upstream is already disconnected, so the branch
        was never hit.

        To actually remove the webvttenc element we must check the target pad
        instead of the peer pad, which corresponds to the element downstream.
        Also, we need to set the element state to NULL before removing it,
        which the previous code didn't.

        * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
        (webkitTextCombinerReleasePad):

2020-02-26  Antti Koivisto  <antti@apple.com>

        Remove throttling code from RenderLayerCompositor
        https://bugs.webkit.org/show_bug.cgi?id=208135
        <rdar://problem/59765410>

        Unreviewed partial revert.

        Keep using the "flush" naming in GraphicsLayerClient.

        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::notifyFlushRequired):
        (WebCore::PageOverlayController::notifyRenderingUpdateRequired): Deleted.
        * page/PageOverlayController.h:
        * page/linux/ResourceUsageOverlayLinux.cpp:
        * page/mac/ServicesOverlayController.h:
        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
        (WebCore::ServicesOverlayController::Highlight::notifyRenderingUpdateRequired): Deleted.
        * platform/graphics/GraphicsLayerClient.h:
        (WebCore::GraphicsLayerClient::notifyFlushRequired):
        (WebCore::GraphicsLayerClient::notifyRenderingUpdateRequired): Deleted.
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::notifyFlushRequired):
        (WebCore::RenderLayerBacking::notifyRenderingUpdateRequired): Deleted.
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::notifyFlushRequired):
        (WebCore::RenderLayerCompositor::notifyRenderingUpdateRequired): Deleted.
        * rendering/RenderLayerCompositor.h:

2020-02-26  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        [GL][GStreamer] Instantiate GstGLContext when the shared GLContext is created
        https://bugs.webkit.org/show_bug.cgi?id=200626

        Reviewed by Carlos Garcia Campos.

        This patch adds GstGLContext and GstGLDisplay as part of
        PlatformDisplay.

        Right now one GstGLContext is created per video tag, which is a
        wrapper of the GL shared context. Every time this wrapper is
        created the GL context has to be current in order to initialize
        the wrapper's internal state.

        A better approach would be to have a single GstGLContext per GL
        context, to instantiate it when the GL context is created and
        current. This GstGLContext would be used for all media players.

        GstGLContext and GstGLDisplay are instantiated as singletons by
        PlatformDisplay. When the media player request for the
        GstGLContext a GL context is instantiated, if it wasn't before,
        and wraps it. PlatformDisplay adds two getters, one for
        GstGLContext object, and other for GstGLDisplay. Both are used to
        configure the internal GStreamer GL context in the multimedia
        pipeline.

        No new tests are needed.

        * platform/GStreamer.cmake:
        * platform/graphics/PlatformDisplay.cpp:
        (WebCore::PlatformDisplay::terminateEGLDisplay):
        * platform/graphics/PlatformDisplay.h:
        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        (requestGLContext):
        (webKitGLVideoSinkChangeState):
        (webKitGLVideoSinkProbePlatform):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp: Added.
        (createGstGLDisplay):
        (PlatformDisplay::tryEnsureGstGLContext):
        (PlatformDisplay::gstGLDisplay const):
        (PlatformDisplay::gstGLContext const):

2020-02-26  Chris Dumez  <cdumez@apple.com>

        DocumentTimeline / CSSTransition objects are leaking on CNN.com
        https://bugs.webkit.org/show_bug.cgi?id=208069
        <rdar://problem/59680143>

        Reviewed by Antoine Quint.

        Break reference cycle between DocumentTimeline and WebAnimation by using WeakPtr.

        * animation/AnimationTimeline.h:
        * animation/DocumentTimeline.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::timeline const):
        (WebCore::WebAnimation::setTimeline):
        (WebCore::WebAnimation::setTimelineInternal):
        (WebCore::WebAnimation::enqueueAnimationEvent):
        (WebCore::WebAnimation::acceleratedStateDidChange):
        * animation/WebAnimation.h:
        (WebCore::WebAnimation::timeline const): Deleted.

2020-02-26  Adrian Perez de Castro  <aperez@igalia.com>

        Unreviewed build fix for non-unified builds.

        * bindings/js/JSAnimationTimelineCustom.cpp: Add missing header include.

2020-02-26  Mark Lam  <mark.lam@apple.com>

        Custom element caching should be aware of different worlds.
        https://bugs.webkit.org/show_bug.cgi?id=208228
        <rdar://problem/57881013>

        Reviewed by Ryosuke Niwa.

        Even though a custom element is cached in one world, we should return an unknown
        HTMl element in a different world.

        Test to be added in https://bugs.webkit.org/show_bug.cgi?id=208229.

        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJSNewlyCreated):

2020-02-25  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo] Unreviewed build fix for unified source builds

        > Modules\websockets\WebSocket.cpp(334): error C2065: 'WorkerGlobalScope': undeclared identifier
        > Modules\websockets\WebSocket.cpp(334): error C2672: 'downcast': no matching overloaded function found
        > Modules\websockets\WebSocket.cpp(334): error C2974: 'WTF::downcast': invalid template argument for 'Target', type expected

        * Modules/websockets/WebSocket.cpp: Added #include "WorkerGlobalScope.h".

2020-02-25  Devin Rousso  <drousso@apple.com>

        Web Inspector: safari app extension isolated worlds and injected files use the extension's identifier instead of its name
        https://bugs.webkit.org/show_bug.cgi?id=206911
        <rdar://problem/58026635>

        Reviewed by Brian Burg.

        * Modules/webauthn/AuthenticationExtensionsClientOutputs.h:
        Drive-by: add missing include.

2020-02-25  Jer Noble  <jer.noble@apple.com>

        Unreviewed tvOS build fix; fix the compiler guards broken by r257189.

        * platform/ios/PlaybackSessionInterfaceAVKit.h:
        * platform/ios/PlaybackSessionInterfaceAVKit.mm:
        * platform/ios/WebAVPlayerController.h:
        * platform/ios/WebAVPlayerController.mm:

2020-02-25  Jack Lee  <shihchieh_lee@apple.com>

        ASSERTION FAILURE in AppendNodeCommand::AppendNodeCommand when inserting list with read-only user-modify
        https://bugs.webkit.org/show_bug.cgi?id=208045
        <rdar://problem/39023383>

        Reviewed by Ryosuke Niwa.

        When inserting a list (InsertListCommand) around enclosed list items, if new list is not editable, skip moving list items in function doApplyForSingleParagraph.

        Test: fast/lists/insert-list-user-modify-read-only-enclosed-li.html

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::doApplyForSingleParagraph):

2020-02-25  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in CompositeEditCommand::splitTreeToNode
        https://bugs.webkit.org/show_bug.cgi?id=208039
        <rdar://problem/52011355>

        Reviewed by Ryosuke Niwa.

        When inserting a list (InsertListCommand) around orphaned list items, if unordered list is not editable, skip moving list items in function fixOrphanedListChild. 

        Test: fast/lists/insert-list-user-modify-read-only-orphaned-li.html

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::fixOrphanedListChild):
        (WebCore::InsertListCommand::doApplyForSingleParagraph):
        * editing/InsertListCommand.h:

2020-02-25  Justin Michaud  <justin_michaud@apple.com>

        Inline Cache delete by id/val
        https://bugs.webkit.org/show_bug.cgi?id=207522

        Reviewed by Keith Miller and Filip Pizlo.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::deleteProperty):
        * bindings/js/JSLocationCustom.cpp:
        (WebCore::JSLocation::deleteProperty):
        * bindings/js/JSRemoteDOMWindowCustom.cpp:
        (WebCore::JSRemoteDOMWindow::deleteProperty):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateDeleteProperty):
        (GenerateHeader):
        (GenerateImplementation):
        (GenerateConstructorHelperMethods):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifier::deleteProperty):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingException::deleteProperty):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifier::deleteProperty):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::deleteProperty):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNodePrototype::finishCreation):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjConstructor::initializeProperties):
        (WebCore::JSTestObjPrototype::finishCreation):
        * bridge/NP_jsobject.cpp:
        * bridge/objc/WebScriptObject.mm:
        (-[WebScriptObject removeWebScriptKey:]):
        * bridge/objc/objc_runtime.h:
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):
        * bridge/runtime_array.cpp:
        (JSC::RuntimeArray::deleteProperty):
        * bridge/runtime_array.h:
        * bridge/runtime_object.cpp:
        (JSC::Bindings::RuntimeObject::deleteProperty):
        * bridge/runtime_object.h:

2020-02-25  Ben Nham  <nham@apple.com>

        Remove render update throttling
        https://bugs.webkit.org/show_bug.cgi?id=208168

        Reviewed by Zalan Bujtas.

        Currently, we disable render updates after the first paint for 500 ms while the page is
        actively loading. However, oftentimes our first paint heuristic selects a first paint that
        isn't particularly interesting (mostly background colors) and this paint throttler just
        makes the user look at a nearly empty page for 500 ms. Antti and Simon both think we should
        remove the throttler to fix this so this patch does that.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::scheduleStyleRecalc):
        (WebCore::Document::shouldScheduleLayout):
        * editing/AlternativeTextController.cpp:
        (WebCore::AlternativeTextController::insertDictatedText):
        * page/ChromeClient.h:
        (WebCore::ChromeClient::layerTreeStateIsFrozen const):
        (WebCore::ChromeClient::renderingUpdateThrottlingIsActive const): Deleted.
        (WebCore::ChromeClient::adjustRenderingUpdateThrottling): Deleted.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::dispatchDragEvent):
        (WebCore::EventHandler::dispatchMouseEvent):
        (WebCore::EventHandler::internalKeyEvent):
        (WebCore::EventHandler::handleTextInputEvent):
        * page/FrameView.cpp:
        (WebCore::FrameView::loadProgressingStatusChanged):
        (WebCore::FrameView::setWasScrolledByUser):
        (WebCore::determineLayerFlushThrottleState): Deleted.
        (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction): Deleted.
        (WebCore::FrameView::updateLayerFlushThrottling): Deleted.
        * page/FrameView.h:

2020-02-25  Myles C. Maxfield  <mmaxfield@apple.com>

        [iPadOS] REGRESSION(r247667): Autosizing style changes don't invalidate RenderText's preferred logical widths
        https://bugs.webkit.org/show_bug.cgi?id=208084
        <rdar://problem/59463898>

        Reviewed by Darin Adler.

        Just use RenderElement::setStyle(), which handles all the invalidations, instead of RenderElement::setNeedsLayout().

        Do a little refactoring so we don't clone RenderStyles unless we need to.

        Test: fast/text-autosizing/ios/idempotentmode/viewport-change-relayout.html

        * page/Page.cpp:
        (WebCore::Page::recomputeTextAutoSizingInAllFrames):
        * style/StyleAdjuster.cpp:
        (WebCore::Style::Adjuster::adjustmentForTextAutosizing):
        (WebCore::Style::Adjuster::adjustForTextAutosizing):
        * style/StyleAdjuster.h:
        (WebCore::Style::Adjuster::AdjustmentForTextAutosizing::operator bool const):

2020-02-25  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Do not create a formatting context for empty subtree in TableFormattingContext::computePreferredWidthForColumns
        https://bugs.webkit.org/show_bug.cgi?id=208205
        <rdar://problem/59766702>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/simple-table-with-empty-td.html

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

2020-02-25  Don Olmstead  <don.olmstead@sony.com>

        [WinCairo] Fix build after revisions 257357 and 257354
        https://bugs.webkit.org/show_bug.cgi?id=208210

        Unreviewed build fix.

        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::notifyChange):
        * platform/network/curl/CookieJarDB.cpp:
        (WebCore::CookieJarDB::setCookie):

2020-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Make HostWindow be the creator of the remote ImageBuffer
        https://bugs.webkit.org/show_bug.cgi?id=207134

        Reviewed by Darin Adler.

        ImageBuffer is responsible of creating all the in-process ImageBuffers.
        HostWindow will be responsible of creating the remote ImageBuffers.

        HostWindow adds the virtual function createImageBuffer(). Chrome forward
        this to the virtual function createImageBuffer() on the ChromeClient.

        * page/Chrome.cpp:
        (WebCore::Chrome::createImageBuffer const):
        * page/Chrome.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::createImageBuffer const):
        * platform/HostWindow.h:
        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::create):
        * platform/graphics/RenderingMode.h:

2020-02-25  Sihui Liu  <sihui_liu@apple.com>

        Assertion failed: currentSchema == createV1ObjectStoreInfoSchema(objectStoreInfoTableName) || currentSchema == createV1ObjectStoreInfoSchema(objectStoreInfoTableNameAlternate)
        https://bugs.webkit.org/show_bug.cgi?id=208144

        Reviewed by Ryosuke Niwa.

        Change a release assertion to release error log to gather information about bug. This is also the pattern of 
        handling error during schema update in SQLiteIDBBackingStore.  

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidObjectStoreInfoTable):

2020-02-25  Zalan Bujtas  <zalan@apple.com>

        [LFC][OutOfFlow] Out-of-flow positioned line breaks can generate display boxes
        https://bugs.webkit.org/show_bug.cgi?id=208198
        <rdar://problem/59764787>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/out-of-flow-positioned-line-breaks.html

        This assert should take the positioning into account when checking againts line breaks.
        (In practice those display boxes are empty and they don't really contribute to rendering but
        they are still valid content.) 

        * layout/FormattingState.cpp:
        (WebCore::Layout::FormattingState::displayBox):

2020-02-25  Antti Koivisto  <antti@apple.com>

        Remove throttling code from RenderLayerCompositor
        https://bugs.webkit.org/show_bug.cgi?id=208135

        Reviewed by Zalan Bujtas.

        It is only used on WK1, adds lots of complexity and is not very effective or correct.

        Also do some "layer flush" -> "rendering update" renaming.

        * page/FrameView.cpp:
        (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
        (WebCore::FrameView::updateLayerFlushThrottling):
        (WebCore::FrameView::setViewExposedRect):
        (WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Deleted.
        * page/FrameView.h:
        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::notifyRenderingUpdateRequired):
        (WebCore::PageOverlayController::notifyFlushRequired): Deleted.
        * page/PageOverlayController.h:
        * page/mac/ServicesOverlayController.h:
        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::notifyRenderingUpdateRequired):
        (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired): Deleted.
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::canThrottleLayerFlush const): Deleted.
        * platform/graphics/GraphicsLayerClient.h:
        (WebCore::GraphicsLayerClient::notifyRenderingUpdateRequired):
        (WebCore::GraphicsLayerClient::notifyFlushRequired): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/ios/LegacyTileCache.h:
        * platform/ios/LegacyTileCache.mm:
        (WebCore::LegacyTileCache::scheduleRenderingUpdateForPendingRepaint):
        (WebCore::LegacyTileCache::setNeedsDisplayInRect):
        (WebCore::LegacyTileCache::updateTilingMode):
        (WebCore::LegacyTileCache::scheduleLayerFlushForPendingRepaint): Deleted.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::notifyRenderingUpdateRequired):
        (WebCore::RenderLayerBacking::notifyFlushRequired): Deleted.
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::RenderLayerCompositor):
        (WebCore::RenderLayerCompositor::notifyRenderingUpdateRequired):
        (WebCore::RenderLayerCompositor::scheduleRenderingUpdate):
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
        (WebCore::RenderLayerCompositor::didChangeVisibleRect):
        (WebCore::RenderLayerCompositor::flushLayersSoon):
        (WebCore::RenderLayerCompositor::frameViewDidScroll):
        (WebCore::RenderLayerCompositor::ensureRootLayer):
        (WebCore::RenderLayerCompositor::attachRootLayer):
        (WebCore::RenderLayerCompositor::notifyFlushRequired): Deleted.
        (WebCore::RenderLayerCompositor::scheduleLayerFlush): Deleted.
        (WebCore::RenderLayerCompositor::setLayerFlushThrottlingEnabled): Deleted.
        (WebCore::RenderLayerCompositor::disableLayerFlushThrottlingTemporarilyForInteraction): Deleted.
        (WebCore::RenderLayerCompositor::isThrottlingLayerFlushes const): Deleted.
        (WebCore::RenderLayerCompositor::startLayerFlushTimerIfNeeded): Deleted.
        (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded): Deleted.
        (WebCore::RenderLayerCompositor::layerFlushTimerFired): Deleted.
        * rendering/RenderLayerCompositor.h:

2020-02-25  Andres Gonzalez  <andresg_22@apple.com>

        IsolatedObject support for ProgressIndicator and Meter.
        https://bugs.webkit.org/show_bug.cgi?id=208175

        Reviewed by Chris Fleizach.

        - Eliminated the need to downcast to an AccessibilityProgressIndicator
        by including gaugeRegionValueDescription in the valueDescription
        method.
        - Separated isAccessibilityProgressIndicatorInstance from
        isProgressIndicator, so that the latter now works for both
        AccessibilityObjects and AXIsolatedObjects.
        - Completed implementation of isMeter in AXIsolatedObject.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityProgressIndicator.cpp:
        (WebCore::AccessibilityProgressIndicator::valueDescription const):
        * accessibility/AccessibilityProgressIndicator.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData): Sets the isMeter property.
        (WebCore::AXIsolatedObject::isAccessibilityProgressIndicatorInstance const):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]): Deleted, no needed any longer.

2020-02-25  Zalan Bujtas  <zalan@apple.com>

        [LFC] Invalidate layout states on style mutation
        https://bugs.webkit.org/show_bug.cgi?id=208195
        <rdar://problem/59764089>

        Reviewed by Antti Koivisto.

        Let's just do a blanket invalidation for now (since we don't have the invalidation figured out yet).

        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::invalidateLayoutState):
        * page/FrameViewLayoutContext.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2020-02-25  Chris Dumez  <cdumez@apple.com>

        Regression(CookieCache) Hang and very high CPU usage on nytimes.com
        https://bugs.webkit.org/show_bug.cgi?id=208166
        <rdar://problem/59739735>

        Reviewed by Alex Christensen.

        The Cookie class which the cookie cache implementation relies on for IPC of cookie had a bug
        in its implementation to convert the Cookie into a NSHTTPCookie. In particular, if the expiry
        was in the past, it would drop it and the cookie would end up with no expiration date. We would
        end up with a cookie that lives for duration of the session, instead of a cookie with an
        expiration in the past (which is how sites delete cookies).

        Test: http/tests/cookies/document-cookie-set-expired-cookie.html

        * platform/network/cocoa/CookieCocoa.mm:
        (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):

2020-02-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Add support for rendering slider ticks
        https://bugs.webkit.org/show_bug.cgi?id=208132

        Reviewed by Adrian Perez de Castro.

        * rendering/RenderThemeAdwaita.cpp:
        (WebCore::RenderThemeAdwaita::paintSliderTrack):
        (WebCore::RenderThemeAdwaita::sliderTickSize const):
        (WebCore::RenderThemeAdwaita::sliderTickOffsetFromTrackCenter const):

2020-02-25  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Stop using gtk foreign drawing API to style form controls
        https://bugs.webkit.org/show_bug.cgi?id=208129

        Reviewed by Adrian Perez de Castro.

        It causes layout issues in some websites, it doesn't really work with all GTK themes and it won't be possible
        with GTK4 because foreign drawing APIs have been removed. Instead, we can use the new custom style used by WPE
        port, which is based on adwaita, but simplified to avoid the huge minimum control sizes, the usage of gradients
        and transparencies, etc. We can still use the GTK API to get the selection colors, to keep some consistency with
        the actual GTK theme, but that won't be possible with GTK4 either. This also means we won't be rendering
        directly to the cairo context anymore (which was required by GTK foreign drawing), so we can use things like
        threaded rendering in the GTK port now. This patch renames ScrollbarThemeWPE, RenderThemeWPE and ThemeWPE as
        ScrollbarThemeAdwaita, RenderThemeAdwaita and ThemeAdwaita and adds ThemeGtk. GTK media controls CSS and
        JavaScript files have been removed in favor of using the adwaita ones.

        * Modules/mediacontrols/mediaControlsGtk.js: Removed.
        * PlatformGTK.cmake:
        * PlatformWPE.cmake:
        * SourcesGTK.txt:
        * SourcesWPE.txt:
        * css/mediaControlsGtk.css: Removed.
        * platform/adwaita/ScrollbarThemeAdwaita.cpp: Renamed from Source/WebCore/platform/wpe/ScrollbarThemeWPE.cpp.
        (WebCore::ScrollbarThemeAdwaita::usesOverlayScrollbars const):
        (WebCore::ScrollbarThemeAdwaita::scrollbarThickness):
        (WebCore::ScrollbarThemeAdwaita::minimumThumbLength):
        (WebCore::ScrollbarThemeAdwaita::hasButtons):
        (WebCore::ScrollbarThemeAdwaita::hasThumb):
        (WebCore::ScrollbarThemeAdwaita::backButtonRect):
        (WebCore::ScrollbarThemeAdwaita::forwardButtonRect):
        (WebCore::ScrollbarThemeAdwaita::trackRect):
        (WebCore::ScrollbarThemeAdwaita::paint):
        (WebCore::ScrollbarThemeAdwaita::handleMousePressEvent):
        (WebCore::ScrollbarTheme::nativeTheme):
        * platform/adwaita/ScrollbarThemeAdwaita.h: Copied from Source/WebCore/platform/wpe/ScrollbarThemeWPE.h.
        * platform/adwaita/ThemeAdwaita.cpp: Renamed from Source/WebCore/platform/wpe/ThemeWPE.cpp.
        (WebCore::Theme::singleton):
        (WebCore::ThemeAdwaita::activeSelectionForegroundColor const):
        (WebCore::ThemeAdwaita::activeSelectionBackgroundColor const):
        (WebCore::ThemeAdwaita::inactiveSelectionForegroundColor const):
        (WebCore::ThemeAdwaita::inactiveSelectionBackgroundColor const):
        (WebCore::ThemeAdwaita::focusColor):
        (WebCore::ThemeAdwaita::paintFocus):
        (WebCore::ThemeAdwaita::paintArrow):
        (WebCore::ThemeAdwaita::controlSize const):
        (WebCore::ThemeAdwaita::paint):
        (WebCore::ThemeAdwaita::paintCheckbox):
        (WebCore::ThemeAdwaita::paintRadio):
        (WebCore::ThemeAdwaita::paintButton):
        (WebCore::ThemeAdwaita::paintSpinButton):
        * platform/adwaita/ThemeAdwaita.h: Renamed from Source/WebCore/platform/wpe/ThemeWPE.h.
        (WebCore::ThemeAdwaita::platformColorsDidChange):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawFocusRing):
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::drawFocusRing):
        * platform/gtk/RenderThemeGadget.cpp: Removed.
        * platform/gtk/RenderThemeGadget.h: Removed.
        * platform/gtk/RenderThemeWidget.cpp: Removed.
        * platform/gtk/RenderThemeWidget.h: Removed.
        * platform/gtk/ScrollbarThemeGtk.cpp: Removed.
        * platform/gtk/ScrollbarThemeGtk.h: Removed.
        * platform/gtk/ThemeGtk.cpp: Added.
        (WebCore::Theme::singleton):
        (WebCore::ThemeGtk::ensurePlatformColors const):
        (WebCore::ThemeGtk::platformColorsDidChange):
        (WebCore::ThemeGtk::activeSelectionForegroundColor const):
        (WebCore::ThemeGtk::activeSelectionBackgroundColor const):
        (WebCore::ThemeGtk::inactiveSelectionForegroundColor const):
        (WebCore::ThemeGtk::inactiveSelectionBackgroundColor const):
        * platform/gtk/ThemeGtk.h: Renamed from Source/WebCore/platform/wpe/ScrollbarThemeWPE.h.
        * rendering/RenderThemeAdwaita.cpp: Renamed from Source/WebCore/platform/wpe/RenderThemeWPE.cpp.
        (WebCore::RenderTheme::singleton):
        (WebCore::RenderThemeAdwaita::supportsFocusRing const):
        (WebCore::RenderThemeAdwaita::shouldHaveCapsLockIndicator const):
        (WebCore::RenderThemeAdwaita::platformActiveSelectionBackgroundColor const):
        (WebCore::RenderThemeAdwaita::platformInactiveSelectionBackgroundColor const):
        (WebCore::RenderThemeAdwaita::platformActiveSelectionForegroundColor const):
        (WebCore::RenderThemeAdwaita::platformInactiveSelectionForegroundColor const):
        (WebCore::RenderThemeAdwaita::platformActiveListBoxSelectionBackgroundColor const):
        (WebCore::RenderThemeAdwaita::platformInactiveListBoxSelectionBackgroundColor const):
        (WebCore::RenderThemeAdwaita::platformActiveListBoxSelectionForegroundColor const):
        (WebCore::RenderThemeAdwaita::platformInactiveListBoxSelectionForegroundColor const):
        (WebCore::RenderThemeAdwaita::platformFocusRingColor const):
        (WebCore::RenderThemeAdwaita::platformColorsDidChange):
        (WebCore::RenderThemeAdwaita::extraDefaultStyleSheet):
        (WebCore::RenderThemeAdwaita::extraMediaControlsStyleSheet):
        (WebCore::RenderThemeAdwaita::mediaControlsScript):
        (WebCore::RenderThemeAdwaita::paintTextField):
        (WebCore::RenderThemeAdwaita::paintTextArea):
        (WebCore::RenderThemeAdwaita::paintSearchField):
        (WebCore::RenderThemeAdwaita::popupInternalPaddingBox const):
        (WebCore::RenderThemeAdwaita::paintMenuList):
        (WebCore::RenderThemeAdwaita::paintMenuListButtonDecorations):
        (WebCore::RenderThemeAdwaita::animationRepeatIntervalForProgressBar const):
        (WebCore::RenderThemeAdwaita::animationDurationForProgressBar const):
        (WebCore::RenderThemeAdwaita::progressBarRectForBounds const):
        (WebCore::RenderThemeAdwaita::paintProgressBar):
        (WebCore::RenderThemeAdwaita::paintSliderTrack):
        (WebCore::RenderThemeAdwaita::adjustSliderThumbSize const):
        (WebCore::RenderThemeAdwaita::paintSliderThumb):
        (WebCore::RenderThemeAdwaita::paintMediaSliderTrack):
        (WebCore::RenderThemeAdwaita::paintMediaVolumeSliderTrack):
        (WebCore::RenderThemeAdwaita::sliderTickSize const):
        (WebCore::RenderThemeAdwaita::sliderTickOffsetFromTrackCenter const):
        (WebCore::RenderThemeAdwaita::adjustListButtonStyle const):
        * rendering/RenderThemeAdwaita.h: Renamed from Source/WebCore/platform/wpe/RenderThemeWPE.h.
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::updateCachedSystemFontDescription const):
        (WebCore::RenderThemeGtk::caretBlinkInterval const):
        * rendering/RenderThemeGtk.h:

2020-02-24  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for WinCairo port
        https://bugs.webkit.org/show_bug.cgi?id=208112
        <rdar://problem/59709701>

        > WebCore\layout/inlineformatting/LineLayoutContext.cpp(337): error C2397: conversion from 'size_t' to 'WTF::Optional<unsigned int>' requires a narrowing conversion
        > WebCore\layout/inlineformatting/LineLayoutContext.cpp(361): error C2397: conversion from 'size_t' to 'WTF::Optional<unsigned int>' requires a narrowing conversion

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::close): Changed the type of 'trailingInlineItemIndex' from 'auto' to 'unsigned'.

2020-02-23  Darin Adler  <darin@apple.com>

        Refactor TextTrackCue to use more traditional design patterns
        https://bugs.webkit.org/show_bug.cgi?id=208114

        Reviewed by Alex Christensen.

        - Fixed is<VTTCue> to accurately match the class hierarchy. Before, TextTrackCueGeneric
          derived from VTTCue, but is<VTTCue> would return false. Normalizing this lets us use
          is<VTTCue> and downcast<VTTCue> in the conventional way.
        - Made the TextTrackCue::isEqual function a non-virtual function that calls a virtual
          function TextTrackCue::cueContentsMatch. Before there was a mix of overridding both
          functions in derived classes, achieving the same thing in multiple ways with
          unneccessary additional virtual function call overhead.
        - Made the TextTrackCue::toJSONString function a non-virtual function that calls a
          virtual funtion TextTrackCue::toJSON. Before there were two virtual functions and
          inconsistent patterns for which one was overridden.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::textTrackRemoveCue): Use downcast instead of toVTTCue.

        * html/HTMLMediaElement.h: Removed some unneeded includes.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use downcast
        instead of toVTTCue.
        (WebCore::MediaControlTextTrackContainerElement::processActiveVTTCue): Removed
        an assertion that no longer makes sense; guaranteed at runtime.

        * html/shadow/MediaControls.h: Removed an unneeded include.

        * html/track/DataCue.cpp:
        (WebCore::toDataCue): Deleted. No need for this function since we can use
        downcast<DataCue> instead.
        (WebCore::DataCue::cueContentsMatch const): Removed unnecessary check of cueType.
        The isEqual function checks cueType and only calls this function if it matches.
        Use downcast instead of toDataCue.
        (WebCore::DataCue::isEqual const): Deleted. Base class now handles this.
        (WebCore::DataCue::doesExtendCue const): Deleted. Was never being called.
        (WebCore::DataCue::toJSONString const): Deleted. Override toJSON instead.
        (WebCore::DataCue::toJSON const): Moved the code here that used to be in toJSONString.

        * html/track/DataCue.h: Reduced includes. Made overridden functions private
        and final. Removed functions as mmentioned above. Changed WTF::LogArgument implementation
        to just forward to TextTrackCue instead of reimplementing here.

        * html/track/InbandDataTextTrack.cpp:
        (WebCore::InbandDataTextTrack::removeCue): Use downcast instead of toDataCue.

        * html/track/InbandGenericTextTrack.cpp: Removed an unneeded include.

        * html/track/LoadableTextTrack.cpp:
        (WebCore::LoadableTextTrack::LoadableTextTrack): Removed unneeded initialization of
        m_isDefault, which is initialized in the class definition.
        (WebCore::LoadableTextTrack::newCuesAvailable): Removed unneeded call to toVTTCue,
        taking advantage of the better interface of getNewCues, which now returns
        Vector<Ref<VTTCue>>, making the type explicit.

        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::addCue): Use is<DataCue> instead of checking cueType.

        * html/track/TextTrackCue.cpp:
        (WebCore::TextTrackCue::create): Fixed confusing naming that called the fragment the
        cue is contained in "cueDocument"; call it cueFragment instead. This constructor
        already required that the ScriptExecutionContext be a Document. Did the type cast
        for that up front. In the future would be good to change the argument type to Document.
        Also fixed how the newly-created fragment is passed to the constructor. The old code
        tried to use DocumentFragment&& to pass ownership, but since this is a reference-counted
        object it needs to be Ref<DocumentFragment>&&.
        (WebCore::TextTrackCue::TextTrackCue):
        (WebCore::TextTrackCue::scriptExecutionContext const): Moved this here from the header
        file so we can compile without TextTrackCue.h including Document.h.
        (WebCore::TextTrackCue::cueContentsMatch const): Removed the code that checks cueType.
        It's now isEqual that is responsible for checking that the cueType matches, and
        cueContentsMatch is only called when the types are the same.
        (WebCore::TextTrackCue::isEqual const): Reordered the boolean checks a bit so it's
        easier to see the logic; no need for a cascade of if statements.
        (WebCore::TextTrackCue::doesExtendCue const): Deleted. Was never being called.
        (WebCore::operator<<): Use downcast instead of toVTTCue.

        * html/track/TextTrackCue.h: Made isEqual no longer virtual. The per-class behavior
        is now all in the virtual cueContentsMatch function, only called by isEqual.
        Removed uncalled doesExtendCue function. Added some argument names in cases where
        the type alone did not make their purpose clear. Made some things more private.
        Replaced m_scriptExecutionContext with m_document.

        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGeneric::create): Moved this function here from the header.
        (WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Initialized data members in the
        class definition so they don't also need to be initialized here.
        (WebCore::TextTrackCueGeneric::cueContentsMatch const): Rewrote using && rather than
        castcading if statements, making the function shorter andd easier to read.
        (WebCore::TextTrackCueGeneric::isEqual const): Deleted. Base class now handes this.
        The old version had confusing logic to deal with checking cue type; can now do this
        in a more straightforward way.
        (WebCore::TextTrackCueGeneric::doesExtendCue const): Deleted. Was never called.
        (WebCore::TextTrackCueGeneric::isOrderedBefore const): Use is<TextTrackCueGeneric>
        and downcast<TextTrackCueGeneric>.
        (WebCore::TextTrackCueGeneric::isPositionedAbove const): Ditto. Also merged two
        if statements so there is less repeated logic.
        (WebCore::TextTrackCueGeneric::toJSONString const): Deleted.
        (WebCore::TextTrackCueGeneric::toJSON const): Moved code here that was in toJSONString.

        * html/track/TextTrackCueGeneric.h: Made things more private. Changed WTF::LogArgument
        implementation to just forward to TextTrackCue instead of reimplementing here.

        * html/track/TextTrackCueList.cpp:
        (WebCore::TextTrackCueList::create): Moved here from header.
        * html/track/TextTrackCueList.h: Ditto.

        * html/track/VTTCue.cpp: Moved undefinedPosition to be a private static constexpr
        data member so it can be used in initialization.
        (WebCore::VTTCueBox::applyCSSProperties): Use is<VTTCue> and downcast<VTTCue>.
        (WebCore::VTTCue::create): Moved more overloads of this function here from the
        header file.
        (WebCore::VTTCue::VTTCue): Take Document instead of ScriptExecutionContext.
        Also took the ScriptExecutionContext argument away from the initialize function.
        (WebCore::VTTCue::initialize): Do less initialization here. This function is
        only called in constructors, so it doesn't need to initialize anything that
        is initialized in all constructors or initialized in the class definition.
        What remains are things that require a little code to initialize and the
        bitfields, which can't be initialized in the class definition.
        (WebCore::VTTCue::setPosition): Rearranged the code a tiny bit.
        (WebCore::copyWebVTTNodeToDOMTree): Made this a non-member function. Also changed
        the argument types to use references.
        (WebCore::VTTCue::getCueAsHTML): Updated for changes to copyWebVTTNodeToDOMTree.
        (WebCore::VTTCue::removeDisplayTree): Check m_displayTree directly instead
        of calling a hasDisplayTree function, since that's more a more straightforward
        way to guard a subsequent line of code that then uses m_displayTree.
        (WebCore::VTTCue::setCueSettings): Merged two if statements into one.
        (WebCore::VTTCue::cueContentsMatch const): Rewrote using && rather than
        castcading if statements, making the function shorter andd easier to read.
        (WebCore::VTTCue::isEqual const): Deleted. Base class now handles this.
        (WebCore::VTTCue::doesExtendCue const): Deleted. Was never called.
        (WebCore::toVTTCue): Deleted.
        (WebCore::VTTCue::toJSONString const): Deleted. Base class now handles this.
        (WebCore::VTTCue::toJSON const): Added a comment.

        * html/track/VTTCue.h: Moved create functions out of header, made some things
        more private and final, initialized more data members in the class definition.
        Removed toVTTCue. Changed WTF::LogArgument implementation to just forward to
        TextTrackCue instead of reimplementing here. Corrected the isType function so
        it knows about both cue types that result in a VTTCue object. This allows us
        to use is<VTTCue> and downcast<VTTCue> in the normal way. Removed the FIXME
        saying we should do that.

        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::getNewCues): Changed to return a Vector<Ref<VTTCue>>.
        In modern C++ return value is better than an out argument for a function like
        this, and the more-specific type helps us at the call sites.

        * loader/TextTrackLoader.h: Updated for the above.

        * page/CaptionUserPreferencesMediaAF.cpp: Removed unneeded include.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        Use #pragma once and removed some unneded includes and forward declarations.

        * rendering/RenderVTTCue.cpp:
        (WebCore::RenderVTTCue::RenderVTTCue): Use downcast<VTTCue>.
        (WebCore::RenderVTTCue::layout): Removed unneeded call to toVTTCue.
        (WebCore::RenderVTTCue::repositionGenericCue): Use downcast instead of
        static_cast for TextTrackCueGeneric.

        * style/RuleSet.cpp: Removed unneeded include.

2020-02-24  Chris Fleizach  <cfleizach@apple.com>

        AX: Support relative frames for isolated trees correctly
        https://bugs.webkit.org/show_bug.cgi?id=208169
        <rdar://problem/59746529>

        Reviewed by Zalan Bujtas.

        To support relative frames correctly for accessibility, we should:
          1) Only expose for isolated tree clients.
          2) Support FloatRects in the attribute variants.
          
        This patch also fixes an issue where we weren't reserving capacity before using.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::setObjectVectorProperty):
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
        (-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):

2020-02-24  ChangSeok Oh  <changseok@webkit.org>

        PS-2019-006: [GTK] WebKit - AXObjectCache - m_deferredFocusedNodeChange - UaF
        https://bugs.webkit.org/show_bug.cgi?id=204342

        Reviewed by Carlos Garcia Campos.

        m_deferredFocusedNodeChange keeps pairs of a old node and a new one
        to update a focused node later. When a node is removed in the document,
        it is also removed from the pair vector. The problem is only comparing
        the new node in each pair with a removed node decides the removal.
        In the case where the removed node lives in m_deferredFocusedNodeChange
        as an old node, a crash happens while we get a renderer of the removed node
        to handle focused elements. To fix this, we find all entries of which old node
        is matched to the removed node, and set their first value null.

        No new tests since no functionality changed.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::remove):

2020-02-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC][Floats] Fix float boxes embedded to unbreakable inline runs.
        https://bugs.webkit.org/show_bug.cgi?id=208112
        <rdar://problem/59709701>

        Reviewed by Antti Koivisto.

        This patch fixes the cases when the float is embedded to otherwise unbreakable inline content.
        e.g. "text_<div style="float: left"></div>_content"

        The logic goes like this:
        1. collect the floats inside the unbreakable candidate content
        2. mark them intrusive if they potentially influence the current line
        3. at handleFloatsAndInlineContent(), adjust available width with the intrusive floats first
        4. feed the inline content to the LineBreaker
        6. commit the float content based on the line breaking result (commit none, partially, all).
        (Note that this algorithm produces a different layout compared to WebKit trunk. It mostly matches FireFox though.)

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::moveLogicalLeft):
        (WebCore::Layout::LineBuilder::moveLogicalRight):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::nextWrapOpportunity):
        (WebCore::Layout::LineCandidate::FloatContent::append):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::LineLayoutContext::addIntrusiveFloats):
        (WebCore::Layout::LineLayoutContext::revertIntrusiveFloats):
        (WebCore::Layout::LineLayoutContext::handleFloatsAndInlineContent):
        (WebCore::Layout::isLineConsideredEmpty): Deleted.
        (WebCore::Layout::LineLayoutContext::tryAddingFloatContent): Deleted.
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2020-02-24  Nikos Mouchtaris  <nmouchtaris@apple.com>

        Add canShare function for Web Share API v2
        https://bugs.webkit.org/show_bug.cgi?id=207491

        Reviewed by Tim Horton.

        Added files member to share data and canShare function to
        navigator.cpp. Can share function should always be used 
        before call to share, and can be used to check if file 
        sharing is implemented by passing a share data object with
        only files.

        Imported new Web Platform Tests to test new function.

        * page/Navigator.cpp:
        (WebCore::Navigator::canShare): Will currently return false for 
        only file share data objects, since file sharing is currently 
        not implemented.
        (WebCore::Navigator::share): Changed to use canShare to 
        determine if data is shareable.
        * page/Navigator.h:
        * page/NavigatorShare.idl:
        * page/ShareData.h:
        * page/ShareData.idl:

2020-02-24  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF] Attach WARN_UNUSED_RETURN to makeScopeExit and fix existing wrong usage
        https://bugs.webkit.org/show_bug.cgi?id=208162

        Reviewed by Robin Morisset.

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):

2020-02-24  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Implement SPI for the platform authenticator
        https://bugs.webkit.org/show_bug.cgi?id=208087
        <rdar://problem/59369305>

        Reviewed by Brent Fulgham.

        Enhances AuthenticatorAssertionResponse to accommondate responses
        returned from the platform authenticator.

        Covered by API tests.

        * Modules/webauthn/AuthenticatorAssertionResponse.cpp:
        (WebCore::AuthenticatorAssertionResponse::create):
        (WebCore::AuthenticatorAssertionResponse::setAuthenticatorData):
        (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
        * Modules/webauthn/AuthenticatorAssertionResponse.h:
        (WebCore::AuthenticatorAssertionResponse::authenticatorData const):
        (WebCore::AuthenticatorAssertionResponse::signature const):
        (WebCore::AuthenticatorAssertionResponse::name const):
        (WebCore::AuthenticatorAssertionResponse::displayName const):
        (WebCore::AuthenticatorAssertionResponse::numberOfCredentials const):
        (WebCore::AuthenticatorAssertionResponse::accessControl const):
        (WebCore::AuthenticatorAssertionResponse::setSignature):
        (WebCore::AuthenticatorAssertionResponse::setName):
        (WebCore::AuthenticatorAssertionResponse::setDisplayName):
        (WebCore::AuthenticatorAssertionResponse::setNumberOfCredentials):

2020-02-24  Simon Fraser  <simon.fraser@apple.com>

        Rename the clashing WebOverlayLayer classes
        https://bugs.webkit.org/show_bug.cgi?id=208156
        rdar://problem/59739250

        Reviewed by Tim Horton.

        The name WebOverlayLayer was used in two places. Rename them both to more specific names.

        * page/cocoa/ResourceUsageOverlayCocoa.mm:
        (-[WebResourceUsageOverlayLayer initWithResourceUsageOverlay:]):
        (WebCore::ResourceUsageOverlay::platformInitialize):
        (-[WebOverlayLayer initWithResourceUsageOverlay:]): Deleted.
        (-[WebOverlayLayer drawInContext:]): Deleted.

2020-02-24  Andres Gonzalez  <andresg_22@apple.com>

        [WebAccessibilityObjectWrapper updateObjectBackingStore] should return the backing object.
        https://bugs.webkit.org/show_bug.cgi?id=208153

        Reviewed by Chris Fleizach.

        Covered by existing tests.

        Currently in many WebAccessibilityObjectWrapper's methods we call
        updateObjectBackingStore followed by one or more calls to
        axBackingObject. This patch eliminates this unnecessary call by making
        updateObjectBackingStore return the backing object. It also cleans up
        other unnecessary calls to axBackingObject and does some minor code
        cleanup.

        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
        (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
        (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
        (-[WebAccessibilityObjectWrapper _accessibilityPerformIncrementAction]):
        (-[WebAccessibilityObjectWrapper _accessibilityPerformDecrementAction]):
        (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
        (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        (-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):

2020-02-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC][Floats] Fix float box handling inside unbreakable content
        https://bugs.webkit.org/show_bug.cgi?id=208109
        <rdar://problem/59708646>

        Reviewed by Antti Koivisto.

        We've been handling float boxes and other inline items as mutually exclusive content (in the context of unbreakable candidate runs).
        While this works in most cases, when the unbreakable content includes float boxes, the layout
        ends up being incorrect.
        This patch is in preparation for making sure we process the inline content and the associated float boxes as one entity.
        (e.g "text_<div style="float: left"></div>_content" produces an unbreakable inline content of [text_][_content] and an associated float box)

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::LineCandidate::FloatContent::append):
        (WebCore::Layout::LineCandidate::FloatContent::list const):
        (WebCore::Layout::LineCandidate::FloatContent::reset):
        (WebCore::Layout::LineCandidate::reset):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::LineLayoutContext::tryAddingFloatContent):
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItem): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2020-02-24  Chris Dumez  <cdumez@apple.com>

        Document / DOMWindow objects get leaked on CNN.com due to CSSTransitions
        https://bugs.webkit.org/show_bug.cgi?id=208145

        Reviewed by Antoine Quint.

        Break reference cycles using WeakPtr so that CSSTransitions can no longer cause whole document / DOM trees to
        get leaked.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::DocumentTimeline):
        * animation/DocumentTimeline.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::KeyframeEffect):
        (WebCore::KeyframeEffect::setTarget):
        * animation/KeyframeEffect.h:

2020-02-24  Youenn Fablet  <youenn@apple.com>

        Add a runtime flag dedicated to WebRTC codecs in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=208136

        Reviewed by Alex Christensen.

        Add a runtime flag for WebRTC codecs in GPUProcess.
        Enable the flag by default for MacOS.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::webRTCPlatformCodecsInGPUProcessEnabled const):
        (WebCore::RuntimeEnabledFeatures::setWebRTCPlatformCodecsInGPUProcessEnabled):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setUseGPUProcessForWebRTC):

2020-02-24  Simon Fraser  <simon.fraser@apple.com>

        Remove geometry information from the scrolling tree
        https://bugs.webkit.org/show_bug.cgi?id=208085

        Reviewed by Sam Weinig.

        The scrolling tree doesn't have enough information to do hit-testing because it has
        no representation of layers that overlap scrollers. We'll have to do hit-testing another
        way, so remove hit-testing-geometry data from the scrolling tree.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setRectRelativeToParentNode): Deleted.
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::setRectRelativeToParentNode): Deleted.
        * page/scrolling/ScrollingStateFrameHostingNode.cpp:
        (WebCore::ScrollingStateFrameHostingNode::ScrollingStateFrameHostingNode):
        (WebCore::ScrollingStateFrameHostingNode::dumpProperties const):
        (WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach): Deleted.
        (WebCore::ScrollingStateFrameHostingNode::setParentRelativeScrollableRect): Deleted.
        * page/scrolling/ScrollingStateFrameHostingNode.h:
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
        (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateScrollingNode::dumpProperties const):
        (WebCore::ScrollingStateScrollingNode::setParentRelativeScrollableRect): Deleted.
        * page/scrolling/ScrollingStateScrollingNode.h:
        (WebCore::ScrollingStateScrollingNode::parentRelativeScrollableRect const): Deleted.
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::handleWheelEvent):
        (WebCore::ScrollingTree::scrollingNodeForPoint):
        * page/scrolling/ScrollingTree.h:
        * page/scrolling/ScrollingTreeFrameHostingNode.cpp:
        (WebCore::ScrollingTreeFrameHostingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFrameHostingNode::dumpProperties const):
        (WebCore::ScrollingTreeFrameHostingNode::parentToLocalPoint const): Deleted.
        * page/scrolling/ScrollingTreeFrameHostingNode.h:
        (WebCore::ScrollingTreeFrameHostingNode::parentRelativeScrollableRect const): Deleted.
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::parentToLocalPoint const): Deleted.
        (WebCore::ScrollingTreeFrameScrollingNode::localToContentsPoint const): Deleted.
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::ScrollingTreeNode):
        (WebCore::ScrollingTreeNode::scrollingNodeForPoint const): Deleted.
        * page/scrolling/ScrollingTreeNode.h:
        (WebCore::ScrollingTreeNode::parentToLocalPoint const): Deleted.
        (WebCore::ScrollingTreeNode::localToContentsPoint const): Deleted.
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeScrollingNode::dumpProperties const):
        (WebCore::ScrollingTreeScrollingNode::parentToLocalPoint const): Deleted.
        (WebCore::ScrollingTreeScrollingNode::localToContentsPoint const): Deleted.
        (WebCore::ScrollingTreeScrollingNode::scrollingNodeForPoint const): Deleted.
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
        (WebCore::RenderLayerCompositor::updateScrollingNodeForFrameHostingRole):
        (WebCore::RenderLayerCompositor::rootParentRelativeScrollableRect const): Deleted.
        * rendering/RenderLayerCompositor.h:

2020-02-24  Alex Christensen  <achristensen@webkit.org>

        WKWebViewConfiguration._corsDisablingPatterns should also disable CORS for non-DocumentThreadableLoader loading
        https://bugs.webkit.org/show_bug.cgi?id=208035
        <rdar://problem/58011337>

        Reviewed by Tim Hatcher.

        Covered by an API test.

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::createPotentialAccessControlRequest):

2020-02-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Remove redundant trailing line break handling.
        https://bugs.webkit.org/show_bug.cgi?id=208108
        <rdar://problem/59708620>

        Reviewed by Antti Koivisto.

        LineLayoutContext::layoutLine should be able to handle both cases of trailing line breaks.
        (This patch also makes tryAddingInlineItems return explicit IsEndOfLine values.)

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):

2020-02-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC][Floats] Move float handling out of LineBreaker
        https://bugs.webkit.org/show_bug.cgi?id=208107
        <rdar://problem/59708575>

        Reviewed by Antti Koivisto.

        LineBreaker should only deal with inline content.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::shouldWrapFloatBox): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItem):

2020-02-24  Antoine Quint  <graouts@webkit.org>

        RenderLayerBacking::notifyAnimationStarted calls directly into the old animation controller
        https://bugs.webkit.org/show_bug.cgi?id=207979

        Reviewed by Simon Fraser.

        Only call into CSSAnimationController if the "Web Animations for CSS Animations" flag is disabled.

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

2020-02-24  Rob Buis  <rbuis@igalia.com>

        Handle page closure for stale-while-revalidate revalidations
        https://bugs.webkit.org/show_bug.cgi?id=204147

        Reviewed by Youenn Fablet.

        Add a new hook to LoaderStrategy to signal browsing context removal
        and call it when the main frame stops all loaders.

        Test: imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopAllLoaders):
        * loader/LoaderStrategy.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::canUseCacheValidator const):

2020-02-24  Andres Gonzalez  <andresg_22@apple.com>

        Fix for build: follow up to bug 208074.
        https://bugs.webkit.org/show_bug.cgi?id=208133

        Unreviewed build fix.

        No new tests needed.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::cellForColumnAndRow):

2020-02-24  Philippe Normand  <pnormand@igalia.com>

        [GStreamer][WPE] Add GstGLMemoryEGL support for the video-plane-display
        https://bugs.webkit.org/show_bug.cgi?id=208046

        Reviewed by Žan Doberšek.

        The glupload element might fill EGL memories in some cases, so for
        the video sink we can then directly access the corresponding
        EGLImage and export it to DMABuf, instead of using the more
        general GLMemory code path.

        With this patch we also ensure that both DMABuf FD and stride are valid.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::handoffVideoDmaBuf):

2020-02-23  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for tables.
        https://bugs.webkit.org/show_bug.cgi?id=208074

        Reviewed by Chris Fleizach.

        Covered by existing tests.

        AccessibilityObjectWrapper code and some utility functions in
        AccessibilityObject.cpp assume that AX objects can be downcast to a
        specialized subclass like AccessibilityTable. That is not true for
        AXIsolatedObjects, and the reason why tables don’t work in IsolatedTree
        mode.

        To solve this problem, this patch exposes the AccessibilityTable
        interface as part of the AXCoreObject. Thus it eliminates the need to
        downcast an AX object to an AccessibilityTable. It also implements the
        AccessibilityTable interface in the AXIsolatedObject class. The same
        approach will be used in subsequent patches for other specialized
        interfaces used by client code.

        * accessibility/AccessibilityARIAGrid.cpp:
        (WebCore::AccessibilityARIAGrid::addChildren):
        * accessibility/AccessibilityARIAGrid.h:
        * accessibility/AccessibilityARIAGridCell.cpp:
        (WebCore::AccessibilityARIAGridCell::parentTable const):
        (WebCore::AccessibilityARIAGridCell::rowIndexRange const):
        (WebCore::AccessibilityARIAGridCell::columnIndexRange const):
        * accessibility/AccessibilityARIAGridRow.cpp:
        (WebCore::AccessibilityARIAGridRow::disclosedRows):
        (WebCore::AccessibilityARIAGridRow::disclosedByRow const):
        (WebCore::AccessibilityARIAGridRow::parentTable const):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::shouldUseAccessibilityObjectInnerText):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::appendChildrenToArray): Use AXCoreObject interface instead of downcasting.
        (WebCore::Accessibility::isAccessibilityObjectSearchMatchAtIndex): Use AXCoreObject interface instead of downcasting.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h: AXCoreObject now exposes the table interface.
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::ariaSelectedRows):
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::AccessibilityTable):
        (WebCore::AccessibilityTable::init):
        (WebCore::AccessibilityTable::isExposable const):
        (WebCore::AccessibilityTable::addChildren):
        (WebCore::AccessibilityTable::headerContainer): Returns an AXCoreObject.

        The following methods now return a vector of objects instead of taking
        and out parameter. RVO guaranties that this does not cause extra copy.
        (WebCore::AccessibilityTable::columns):
        (WebCore::AccessibilityTable::rows):
        (WebCore::AccessibilityTable::columnHeaders):
        (WebCore::AccessibilityTable::rowHeaders):
        (WebCore::AccessibilityTable::visibleRows):
        (WebCore::AccessibilityTable::cells):

        (WebCore::AccessibilityTable::tableLevel const):
        (WebCore::AccessibilityTable::roleValue const):
        (WebCore::AccessibilityTable::computeAccessibilityIsIgnored const):
        (WebCore::AccessibilityTable::title const):
        (WebCore::AccessibilityTable::isExposableThroughAccessibility const): Renamed to just isExposable.
        * accessibility/AccessibilityTable.h:
        (WebCore::AccessibilityTable::supportsSelectedRows): Deleted.
        * accessibility/AccessibilityTableCell.cpp:
        (WebCore::AccessibilityTableCell::parentTable const):
        (WebCore::AccessibilityTableCell::isTableCell const):
        (WebCore::AccessibilityTableCell::columnHeaders):
        (WebCore::AccessibilityTableCell::rowHeaders):
        * accessibility/AccessibilityTableCell.h:
        * accessibility/AccessibilityTableColumn.cpp:
        (WebCore::AccessibilityTableColumn::headerObject):
        (WebCore::AccessibilityTableColumn::addChildren):
        * accessibility/AccessibilityTableHeaderContainer.cpp:
        (WebCore::AccessibilityTableHeaderContainer::addChildren):
        * accessibility/AccessibilityTableRow.cpp:
        (WebCore::AccessibilityTableRow::isTableRow const):
        (WebCore::AccessibilityTableRow::parentTable const):
        * accessibility/atk/WebKitAccessible.cpp:
        (webkitAccessibleGetAttributes):
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        (webkitAccessibleTableGetColumnHeader):
        (webkitAccessibleTableGetRowHeader):
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
        (webkitAccessibleTableCellGetColumnHeaderCells):
        (webkitAccessibleTableCellGetRowHeaderCells):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper tableParent]):
        (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::setObjectVectorProperty):
        (WebCore::AXIsolatedObject::cellForColumnAndRow):
        (WebCore::AXIsolatedObject::fillChildrenVectorForProperty const):
        (WebCore::AXIsolatedObject::isAccessibilityTableInstance const):
        (WebCore::AXIsolatedObject::isDataTable const): Deleted.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::nodeForID const):
        (WebCore::AXIsolatedTree::objectsForIDs const):
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postPlatformNotification):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        In addition to replacing the downcast to AccessibilityTable, cleaned up
        the unnecessary calls to self.axBackingObject. This used to be a macro,
        but it is now a method that check for the execution thread and returns
        the appropriate AX object.
        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
        (-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2020-02-23  Adrian Perez de Castro  <aperez@igalia.com>

        Non-unified build fixes late February 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=208111

        Unreviewed build fix.

        No new tests needed.

        * dom/WindowEventLoop.cpp: Add missing include.
        * html/HTMLEmbedElement.cpp: Ditto.
        * html/HTMLFrameSetElement.cpp: Ditto.
        * html/HTMLOptionElement.cpp: Ditto.
        * html/HTMLTablePartElement.cpp: Ditto.
        * html/HTMLTextFormControlElement.cpp: Ditto.
        * html/RangeInputType.cpp: Ditto.
        * inspector/agents/InspectorCSSAgent.cpp: Ditto.
        * loader/ImageLoader.h: Add missing forward declration for WebCore::Document.
        * platform/graphics/ImageBuffer.cpp: Add missing include.
        * platform/graphics/filters/FilterEffect.cpp: Ditto.
        * platform/wpe/ThemeWPE.h: Add missing include and forward declaration for WebCore::Path.
        * svg/graphics/filters/SVGFilterBuilder.cpp: Add missing include.

2020-02-23  Darin Adler  <darin@apple.com>

        Follow up element iterator work by reducing includes and using is<> in a few more places
        https://bugs.webkit.org/show_bug.cgi?id=207816

        Reviewed by Antti Koivisto.

        * accessibility/AccessibilityTableColumn.cpp: Removed unneeded includes.
        * bindings/js/JSDOMWindowCustom.cpp: Ditto.
        * dom/CustomElementRegistry.cpp: Ditto.
        * dom/Node.cpp: Ditto.
        * editing/markup.cpp: Ditto.
        * html/GenericCachedHTMLCollection.cpp: Ditto.
        * html/HTMLCollection.cpp: Ditto.
        * html/HTMLFrameSetElement.cpp: Ditto.
        * html/track/TextTrackCue.cpp: Ditto.
        * page/scrolling/AxisScrollSnapOffsets.cpp: Ditto.

        * platform/DataListSuggestionsClient.h: Reduced includes, use forward declarations.

        * style/StyleResolver.cpp:
        (WebCore::Style::isAtShadowBoundary): Use the is<ShadowRoot> function.

        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::pathOnlyClipping): Use is<RenderSVGText> and
        is<SVGGraphicsElement>, tweak coding style a tiny bit, and fix wording of comments.

        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::createElementRenderer): Use is<SVGElement>.

        * svg/SVGElement.cpp: Removed unneeded includes.
        (WebCore::SVGElement::isOutermostSVGSVGElement): Use is<SVGElement> and
        is<SVGForeignObjectElement>.
        (WebCore::SVGElement::reportAttributeParsingError): Use is<SVGElement>.
        (WebCore::SVGElement::updateRelativeLengthsInformation): Use
        is<SVGGraphicsElement> and is<SVGElement>, and use an if statement instead of
        a while loop since this doesn't loop.

2020-02-22  Darin Adler  <darin@apple.com>

        Fix HTMLDataListElement.options to include even options that are not suggestions
        https://bugs.webkit.org/show_bug.cgi?id=208102

        Reviewed by Antti Koivisto.

        * html/ColorInputType.cpp:
        (WebCore::ColorInputType::suggestedColors const): Use
        HTMLDataListElement::suggestions instead of HTMLCollection, both for efficiency
        and for correctness.

        * html/GenericCachedHTMLCollection.cpp:
        (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches const):
        Removed code to filter out options that are not valid suggestions. This is not
        called for in the HTML specification.

        * html/HTMLDataListElement.cpp:
        (WebCore::HTMLDataListElement::isSuggestion): Added.

        * html/HTMLDataListElement.h: Added isSuggestion and suggestions functions so
        logic about which datalist options are suggestions can be easily shared. The
        suggestions uses the new filteredDescendants function template.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Use
        HTMLDataListElement::suggestions instead of HTMLCollection.

        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::suggestions):  Use
        HTMLDataListElement::suggestions instead of HTMLCollection. Also added a FIXME
        since this implementation uses case-insensitive ASCII but it's for user interface
        and the current implementation might be insufficient for some lanagues.

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paintSliderTicks): Use
        HTMLDataListElement::suggestions instead of HTMLCollection.

2020-02-22  Darin Adler  <darin@apple.com>

        Refine the DOM element iterator implementation
        https://bugs.webkit.org/show_bug.cgi?id=208100

        Reviewed by Antti Koivisto.

        - Removed the duplicate descendant iterator, keeping the one that matches
          the style of the ancestor and child iterators.
        - Removed the non-template elementAncestors, elementChildren, elementDescendants,
          and elementLineage functions and changed callers to use xxxOfType<Element> instead.
        - Renamed "IteratorAdapter" templates to "Range", choosing that term to match the
          upcoming C++20 Ranges library and range-based for loops.
        - Changed the iterators to use an actual "nullptr" for end, following the "sentinel"
          design pattern from the Ranges library. Still kept a tiny bit of using an iterator
          for end around, only so we can use iterator library functions like std::distance
          while waiting for std::ranges::distance, which is compatible with sentinels.
        - Implemented const correctness by using const types instead of separate "Const"
          class templates. This cut down on source code size a lot. These element iterators
          don't need whole separate templates to implement the const correctness the way
          collection classes like HashMap do.
        - Improved some other details, like using more const and constexpr on members.
          All the functions on a range are const, because the range itself doesn't ever
          get modified, and all functions on an iterator are also const, because only
          operations like ++ and -- actually modify the iterator.
        - For now at least, removed extra code we don't need in practice. We never need to
          compare iterators to each other except when iterating a range, for example, so
          kept the != used for range iteration but not ==.
        - Simplified the HTMLCollection implementations by taking advantage of the null-
          based and sentinel designs. There are various places where we can write
          simpler code and pass around fewer arguments.
        - Added a new descendantsOfType template that takes a predicate and filters to only
          the elements that match that predicate. Similar concept to how we implement HTML
          collections, and possibly could be used even more eventually.
        - Use std::iterator in ElementIterator so we don't need to do that in derived
          classes. Also made more of ElementIterator protected to make it more explicit
          that it's an abstract class template and not something to be used directly.

        The most unusual clients of the elmeent ranges and iterators are HTMLCollection and
        the related caches, and this patch includes changes to those to adopt the new model.

        * Headers.cmake: Removed ElementDescendantIterator.h.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * dom/ChildNodeList.cpp:
        (WebCore::ChildNodeList::ChildNodeList): Removed initialization of m_indexCache
        since the constructor no longer requires arguments.
        (WebCore::ChildNodeList::invalidateCache): Removed argument to
        CollectionIndexCache::invalidate.
        * dom/ChildNodeList.h: Removed collectionEnd, since it's no longer needed.

        * dom/CollectionIndexCache.h: Removed the collection argument to the
        constructor, hasValidCache, and invalidate functions. Updated algorithms to use
        null style termination instead of actually relying on comparing with an end
        iterator, since that works for our element iterators.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::childElementCount const):: Use an empty initializer
        list instead of the result of the end function since std::distance requires
        both begin and end iterators have the same type.

        * dom/ElementAncestorIterator.h: Made the changes mentioned above, plus moved the
        declarations of functions to the top of the file, since the classes are
        implementation details, used downcast instead of static_cast.

        * dom/ElementAndTextDescendantIterator.h: Renamed IteratorAdapter to Range,
        mostly didn't make other changes since this is not one of the element iterators.

        * dom/ElementChildIterator.h: Made the changes mentioned above, plus moved the
        declarations of functions to the top of the file, since the classes are
        implementation details.

        * dom/ElementDescendantIterator.h: Removed.

        * dom/ElementIterator.h: Made the changes mentioned above.

        * dom/LiveNodeList.cpp: Removed some unneeded includes, including HTMLCollection.h.
        (WebCore::LiveNodeList::LiveNodeList): Simplified a little bit.
        (WebCore::LiveNodeList::rootNode): Moved to the header.

        * dom/LiveNodeList.h: Updated since CollectionTraversal now uses the
        more modern ElementDescendantIterator, not the older one that used a vector of
        ancestors to do the iteration. Also use WTF_MAKE_ISO_NONALLOCATABLE since
        LiveNodeList is an abstract class, and made some members protected. Removed
        CachedLiveNodeList::rootNode since it was identical to LiveNodeList::rootNode,
        and made LiveNodeList::rootNode protected so it can be called in
        CachedLiveNodeList, and moved it to the header so it will still be inlined.
        Simplified CachedListNodeList to use more final, to name long types less by
        using "auto" and "using", and to not pass arguments to functions that don't
        need them any more.

        * dom/NameNodeList.cpp:
        (WebCore::NameNodeList::create): Moved here from the header.
        * dom/NameNodeList.h: Removed unneeded includes and comment, moved create
        function out of the header.

        * dom/TypedElementDescendantIterator.h: Made all the change mentioned above.
        Also added a new filteredDescendants function, range, and iterator that uses
        a filter function. Not used yet in this patch; use comes in a future one.

        * html/CachedHTMLCollection.h: Updated includes, shortened type names,
        and used auto to simplify the code a bit. Removed unneeded collection arguments
        from various CollectionIndexCache functions.

        * html/CollectionTraversal.h: Updated to use the new/typed version of
        ElementDescendantIterator. Removed end functions. Use shorter type names.
        Tweaked algorithms to use null termination for loops instead of end iterators.

        * html/HTMLFormControlsCollection.h:
        (WebCore::HTMLFormControlsCollection::item const): Removed unneeded class
        template arguments.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formElementIndex): Changed to use the null check
        instead of comparing iterator with end.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::selectNextSourceChild): Ditto.

        * html/HTMLTableSectionElement.cpp:
        (WebCore::HTMLTableSectionElement::numRows const): Pass a default-constructed
        iterator for end to std::distance. When we get C++20 we can clean this up by
        using std::ranges::distances instead.

        * html/LabelsNodeList.cpp:
        (WebCore::LabelsNodeList::create): Moved here from the header.
        * html/LabelsNodeList.h: Removed unneeded include, tweaked coding style a bit,
        moved create function into the .cpp file.

        * html/RadioNodeList.cpp: Removed unneeded include.
        (WebCore::RadioNodeList::create): Moved this here from the header.
        (WebCore::nonEmptyRadioButton): Renamed from toRadioButtonInputElement to make
        a little clearer what the function does.
        (WebCore::RadioNodeList::value const): Updated to use nonEmptyRadioButton and
        straighten out the loop a tiny bit.
        (WebCore::RadioNodeList::setValue): Ditto.
        (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter const): Deleted.
        (WebCore::RadioNodeList::elementMatches const): Merged in the logic from
        checkElementMatchesRadioNodeListFilter, since the separate function wasn't helpful.

        * html/RadioNodeList.h: Removed unneeded includes. Moved the create function out
        of the header. Removed unneeded override of the item function to tighten the
        return type; not used in WebCore and not helpful for bindings. Made more private.

        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::invalidateStyleForDescendants): Use null checking
        style for the loop rather than comparing with end.
        (WebCore::Style::Invalidator::invalidateStyleWithMatchElement): Remove an unneeded
        local variable and braces.

        * svg/SVGUseElement.cpp:
        (WebCore::removeDisallowedElementsFromSubtree): Use null checking style rather than
        comparing with end.
        (WebCore::SVGUseElement::expandUseElementsInShadowTree const): Ditto. Also use
        dropAssertions rather than assigning to end with a comment saying it drops assertions.
        (WebCore::SVGUseElement::expandSymbolElementsInShadowTree const): Ditto.

2020-02-22  Darin Adler  <darin@apple.com>

        Put more of the datalist element implementation inside ENABLE(DATALIST_ELEMENT)
        https://bugs.webkit.org/show_bug.cgi?id=208098

        Reviewed by Antti Koivisto.

        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::computeWillValidate const): Use
        ancestorsOfType instead of a loop. Since this involves using the class
        HTMLDataListElement, it's only implemented when ENABLE(DATALIST_ELEMENT)
        is true. The old code would always do this validation for elements with
        the datalist tag even if the element is not implemented, so this changes
        behavior and affects some test results.

2020-02-22  Jer Noble  <jer.noble@apple.com>

        Stop using QTKit for rendering WK1 video fullscreen controls
        https://bugs.webkit.org/show_bug.cgi?id=207795
        <rdar://problem/48894915>

        Reviewed by Jon Lee.

        Drive-by fixes:

        - Don't set the video layer to not-visible when in video fullscreen mode.
        - Export previously un-exported methods.
        - Make some ios-only classes available on mac.
        - Add a couple previously unimplemented properties to WebAVPlayerController needed by AVKit.
        - WebCoreFullscreenWindow doesn't depend on FULLSCREEN_API.

        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::visibilityStateChanged):
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
        * platform/ios/PlaybackSessionInterfaceAVKit.h:
        * platform/ios/PlaybackSessionInterfaceAVKit.mm:
        (WebCore::PlaybackSessionInterfaceAVKit::externalPlaybackChanged):
        * platform/ios/WebAVPlayerController.h:
        * platform/ios/WebAVPlayerController.mm:
        (-[WebAVPlayerController canSeekFrameBackward]):
        (-[WebAVPlayerController canSeekFrameForward]):
        * platform/mac/WebCoreFullScreenWindow.h:
        * platform/mac/WebCoreFullScreenWindow.mm:

2020-02-22  Darin Adler  <darin@apple.com>

        Use DOM element iterators more, and more consistently
        https://bugs.webkit.org/show_bug.cgi?id=208097

        Reviewed by Antti Koivisto.

        - Added uses of element iterators in many places that had hand-written loops.
        - Eliminated most uses of elementAncestors, elementChildren, elementDescendants,
          and elementLineage functions and use ancestorsOfType<Element>,
          childrenOfType<Element>, descendantsOfType<Element> and lineageOfType<Element>
          instead. In particular, descendantsOfType<Element> uses a better traversal
          algorithm than elementDescendants does.

        - Unrelated: Omit template arguments in various cases where the C++ language lets
          us just give the name of the class template without repeating the arguments.
        - Unrelated: Remove some uses of the inefficient Node::nodeType function.

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::mouseButtonListener const): Use
        lineageOfType instead of elementLineage.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest const):
        Use ancestorsOfType instead of a handwritten loop.

        * dom/AllDescendantsCollection.h:
        (WebCore::AllDescendantsCollection::AllDescendantsCollection): Removed
        class template arguments.
        * dom/ClassCollection.h:
        (WebCore::ClassCollection::ClassCollection): Ditto.

        * dom/DocumentFragment.cpp:
        (WebCore::DocumentFragment::getElementById const): Use
        descendantsOfType insteadof elementDescendants.

        * dom/Element.cpp:
        (WebCore::Element::computeInheritedLanguage const): Use lineageOfType
        instead of a handrwitten loop.

        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::closest const): Use lineageOfType instead of an
        explicit loop.
        (WebCore::elementsForLocalName): Use descendantsOfType instead of elementDescendants.
        (WebCore::anyElement): Ditto.
        (WebCore::SelectorDataList::executeSingleTagNameSelectorData const): Ditto.
        (WebCore::SelectorDataList::executeSingleClassNameSelectorData const): Ditto.
        (WebCore::SelectorDataList::executeSingleSelectorData const): Ditto.
        (WebCore::SelectorDataList::executeSingleMultiSelectorData const): Ditto.
        (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker const): Ditto.
        (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext const): Ditto.
        (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData const): Ditto.

        * dom/TagCollection.cpp:
        (WebCore::TagCollectionNS::TagCollectionNS): Removed class template arguments.
        (WebCore::TagCollection::TagCollection): Ditto.
        (WebCore::HTMLTagCollection::HTMLTagCollection): Ditto.

        * editing/Editor.cpp:
        (WebCore::Editor::applyEditingStyleToBodyElement const): Use the function
        descendantsOfType<HTMLBodyElement> instead of getElementByTagName(bodyTag).
        Also merged applyEditingStyleToElement in here.
        (WebCore::Editor::applyEditingStyleToElement const): Deleted.

        * editing/Editor.h: Deleted applyEditingStyleToElement.

        * editing/FrameSelection.cpp:
        (WebCore::scanForForm): Cleaned up descendantsOfType loop so there's no
        explicit use of end. Also changed if nesting a little bit.

        * editing/TextManipulationController.cpp:
        (WebCore::ExclusionRuleMatcher::isExcluded): Use lineageOfType instead of
        elementLineage.

        * html/HTMLAllCollection.h: Removed class template arguments.

        * html/HTMLElement.cpp:
        (WebCore::elementAffectsDirectionality): Refactored so we get a more efficient
        implementation when the type of the element is known.
        (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
        Use lineageOfType instead of elementLineage.

        * html/HTMLElement.h: Removed some uneeeded forward declarations.

        * html/HTMLEmbedElement.cpp:
        (WebCore::findWidgetRenderer): Use ancestorsOfType instead of a loop.

        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::enclosingFormControlElement): Deleted.

        * html/HTMLFormControlElement.h: Deleted unused enclosingFormControlElement.

        * html/HTMLFormControlsCollection.cpp:
        (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection): Removed
        class template arguments.
        (WebCore::HTMLFormControlsCollection::ownerNode const): Ditto.
        (WebCore::HTMLFormControlsCollection::invalidateCacheForDocument): Ditto.

        * html/HTMLOptGroupElement.cpp:
        (WebCore::HTMLOptGroupElement::ownerSelectElement const): Use ancestorsOfType
        instead of a hand-written loop.

        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::parseAttribute): Use ancestorsOfType instead of
        calling ownerDataListElement.
        (WebCore::HTMLOptionElement::childrenChanged): Ditto.
        (WebCore::HTMLOptionElement::ownerDataListElement const): Deleted. Since the
        same option element can be used by multiple nested data list elements, the
        concept of a single "owner" data list element isn't correct.
        (WebCore::HTMLOptionElement::ownerSelectElement const): Use ancestorsOfType
        instead of a hand-written loop.

        * html/HTMLOptionElement.h: Deleted ownerDataListElement.

        * html/HTMLOptionsCollection.cpp:
        (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Removed class
        template arguments.

        * html/HTMLTableCellElement.cpp:
        (WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle const):
        Use auto since findParentTable now returns a const table pointer.
        * html/HTMLTableColElement.cpp:
        (WebCore::HTMLTableColElement::additionalPresentationAttributeStyle const):
        Ditto.

        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::createSharedCellStyle): Made const.
        (WebCore::HTMLTableElement::additionalCellStyle): Ditto.
        (WebCore::HTMLTableElement::additionalGroupStyle): Ditto.

        * html/HTMLTableElement.h: Made the functions const, and m_sharedCellStyle
        mutable.

        * html/HTMLTablePartElement.cpp:
        (WebCore::HTMLTablePartElement::findParentTable const): Use ancestorsOfType
        instead of a hand-written loop. Also revised return type to be const-consistent.

        * html/HTMLTablePartElement.h: Updated return type.

        * html/HTMLTableRowsCollection.cpp:
        (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Removed class
        template arguments.

        * html/HTMLTextFormControlElement.cpp:
        (WebCore::parentHTMLElement): Deleted.
        (WebCore::HTMLTextFormControlElement::directionForFormData const): Use
        lineageOfType rather than a hand-written loop. Also got rid of the multiple
        strings in return paths since the function always returns one of two strings.

        * inspector/InspectorAuditAccessibilityObject.cpp:
        (WebCore::InspectorAuditAccessibilityObject::getElementsByComputedRole):
        Use descendantsOfType instead of elementDescendants.

        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Use ancestorsOfType
        instead of a hand-written loop.

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::inspect): Use isElementNode and isDocumentNode
        instead of the much slower nodeType.
        (WebCore::InspectorDOMAgent::highlightMousedOverNode): Use isTextNode instead of
        the much slower nodeType.

        * page/DragController.cpp:
        (WebCore::containingLinkElement): Added. Uses lineageOfType instead of elementLineage.
        (WebCore::DragController::doSystemDrag): Updated for the above.

        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
        Use ancestorsOfType instead of a hand-written loop.

        * svg/SVGElement.h: Make computedStyle public so we can use it even after downcasting
        to SVGElement or a class derived from it. This arises in the revised version of
        SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending, which will now be able
        to compile a non-virtual call to the function as a bonus.

        * xml/parser/XMLDocumentParser.cpp:
        (WebCore::findXMLParsingNamespaces): Factored this function out from
        parseDocumentFragment. Use lineageOfType instead of elementLineage. Also add a null
        check that seems to have been needed before.
        (WebCore::XMLDocumentParser::parseDocumentFragment): Use findXMLParsingNamespaces.

2020-02-22  Darin Adler  <darin@apple.com>

        Some small improvements to DOM bindings for HTML collections
        https://bugs.webkit.org/show_bug.cgi?id=208092

        Reviewed by Antti Koivisto.

        * WebCore.xcodeproj/project.pbxproj: Added RadioNodeList.idl.

        * html/HTMLAllCollection.idl: Specify [RequiresExistingAtomString] on the
        argument to namedItem, and [AtomString] for the argument to item.
        * html/HTMLCollection.idl: Ditto.
        * html/HTMLFormControlsCollection.idl: Ditto.
        * html/HTMLOptionsCollection.idl: Ditto.
        * html/HTMLSelectElement.idl: Ditto.

        * html/RadioNodeList.idl: Removed unneeded getter; the inherited one from NodeList
        works correctly, and this isn't more efficient because of a more specific type.

2020-02-21  Wenson Hsieh  <wenson_hsieh@apple.com>

        Remove an unused local variable after r256808
        https://bugs.webkit.org/show_bug.cgi?id=208072

        Reviewed by Chris Dumez.

        Remove scriptsToExecuteSoon.

        * dom/ScriptRunner.cpp:
        (WebCore::ScriptRunner::timerFired):

2020-02-21  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Create a new ImageBuffer type for drawing on a DisplayList
        https://bugs.webkit.org/show_bug.cgi?id=207109

        Reviewed by Simon Fraser.

        DisplayList::ImageBuffer inherits ConcreteImageBuffer and DrawingContext.
        The drawing context will be the context of DrawingContext. The operations
        of ConcreteImageBuffer will have to ensure the recorded display-list is
        replayed back before getting the pixels of the ImageBufferBackend.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createContext2d):
        (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing):
        (WebCore::HTMLCanvasElement::setTracksDisplayListReplay):
        (WebCore::HTMLCanvasElement::displayListAsText const):
        (WebCore::HTMLCanvasElement::replayDisplayListAsText const):
        All the DisplayList operations will be routed to the DrawingContext of
        the ImageBuffer.

        (WebCore::HTMLCanvasElement::createImageBuffer const):
        createImageBuffer() can decide the ImageBuffer type based on the settings
        and the size of the canvas.

        * html/HTMLCanvasElement.h:
        * platform/graphics/ConcreteImageBuffer.h:
        (WebCore::ConcreteImageBuffer::create):
        The type of the ImageBuffer will be passed to this function such that
        it can create instances of derived classes.

        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::create):
        Create ImageBuffers which record the drawing commands to DisplayLists before
        committing them to the back-ends.

        * platform/graphics/ImageBuffer.h:
        (WebCore::ImageBuffer::drawingContext):
        (WebCore::ImageBuffer::flushDrawingContext):
        Add virtual methods to support DisplayList in ImageBuffer.

        * platform/graphics/PlatformImageBuffer.h:
        * platform/graphics/RenderingMode.h:
        Add DisplayList types to RenderingMode and define platform types for
        DisplayList ImageBuffers.

        * platform/graphics/displaylists/DisplayListDrawingContext.cpp: Added.
        (WebCore::DisplayList::DrawingContext::DrawingContext):
        (WebCore::DisplayList::DrawingContext::setTracksDisplayListReplay):
        (WebCore::DisplayList::DrawingContext::replayDisplayList):
        * platform/graphics/displaylists/DisplayListDrawingContext.h: Added.
        (WebCore::DisplayList::DrawingContext::context const):
        (WebCore::DisplayList::DrawingContext::displayList):
        (WebCore::DisplayList::DrawingContext::displayList const):
        (WebCore::DisplayList::DrawingContext::replayedDisplayList const):
        DisplayList::DrawingContext holds a recording and an optional replaying 
        back DisplayLists. It also provides a recording GraphicsContext.

        * platform/graphics/displaylists/DisplayListImageBuffer.h: Added.
        (WebCore::DisplayList::ImageBuffer::create):
        (WebCore::DisplayList::ImageBuffer::ImageBuffer):
        (WebCore::DisplayList::ImageBuffer::~ImageBuffer):
        Drawing commands will be recorded first because context() is overridden
        to return the GraphicsContext of DrawingContext. These drawing commands
        will be flushed before getting the pixels of the back-end because 
        flushDrawingContext() is overridden to replay back the recorded DisplayList
        to the GraphicsContext of the back-end.

2020-02-21  Wenson Hsieh  <wenson_hsieh@apple.com>

        [macOS] Large form controls are rendered at the wrong NSControlSize
        https://bugs.webkit.org/show_bug.cgi?id=208043
        <rdar://problem/59659134>

        Reviewed by Tim Horton.

        When painting form controls that are larger than a certain threshold (for the most part, 21px), use
        NSControlSizeLarge instead of NSControlSizeRegular. This makes us choose a more appropriate appearance when
        painting native large form controls, as long as the system supports it. Note that not all the metrics for
        NSControlSizeLarge form controls are finalized, as noted in the per-method comments below.

        With this patch alone, there is no change in behavior yet; in the near future, these changes will be covered by
        new platform-specific baselines.

        * platform/PopupMenuStyle.h: Add a new PopupMenuSizeLarge that corresponds to a popup that has NSControlSizeLarge.
        * platform/mac/ThemeMac.h: Add a helper to check (at runtime) whether the new large form control size is enabled.
        * platform/mac/ThemeMac.mm:
        (WebCore::controlSizeForFont): Add a new font size breakpoint, for which we use NSControlSizeLarge instead of
        NSControlSizeRegular.

        (WebCore::sizeFromNSControlSize):
        (WebCore::sizeFromFont):
        (WebCore::controlSizeFromPixelSize):
        (WebCore::setControlSize):
        (WebCore::checkboxSizes): Reflect the fact that checkboxes with NSControlSizeLarge are 16 by 16.
        (WebCore::checkboxMargins): Just match NSControlSizeRegular margins for now. These seem incorrect already, even
        for NSControlSizeRegular in macOS 10.15.

        (WebCore::radioSizes): Reflect the fact that radio buttons with NSControlSizeLarge are 16 by 16, and
        NSControlSizeRegular radio buttons are 14 by 14.

        (WebCore::radioMargins): Just match NSControlSizeRegular margins for now. These seem incorrect already, even for
        NSControlSizeRegular in macOS 10.15.

        (WebCore::buttonSizes): Reflect the fact that buttons with NSControlSizeLarge are 28px tall.
        (WebCore::buttonMargins): Just match NSControlSizeRegular margins for now, and add a FIXME about updating them.
        (WebCore::setUpButtonCell):
        (WebCore::stepperSizes): NSControlSizeLarge matches NSControlSizeRegular at the moment.
        (WebCore::stepperControlSizeForFont): Add a new font size breakpoint for using NSControlSizeLarge.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::controlSizeForFont const):
        (WebCore::RenderThemeMac::controlSizeForCell const):
        (WebCore::RenderThemeMac::controlSizeForSystemFont const):
        (WebCore::RenderThemeMac::popupButtonMargins const):
        (WebCore::RenderThemeMac::popupButtonSizes const):
        (WebCore::RenderThemeMac::popupButtonPadding const):

        NSControlSizeLarge metrics for popup buttons cannot be determined yet.

        (WebCore::RenderThemeMac::progressBarSizes const):
        (WebCore::RenderThemeMac::progressBarMargins const):
        (WebCore::RenderThemeMac::paintProgressBar):

        NSControlSizeLarge matches NSControlSizeRegular at the moment.

        (WebCore::menuListButtonSizes):
        (WebCore::RenderThemeMac::popupMenuSize const):
        (WebCore::RenderThemeMac::menuListSizes const):
        (WebCore::RenderThemeMac::searchFieldSizes const):
        (WebCore::RenderThemeMac::cancelButtonSizes const):
        (WebCore::RenderThemeMac::resultsButtonSizes const):

        Search field results and cancel buttons have the same size in NSControlSizeLarge as in NSControlSizeRegular.

2020-02-21  Michael Catanzaro  <mcatanzaro@gnome.org>

        [WPE][GTK] googleapis.com is a public suffix, defeating isGoogle() check in UserAgentQuirks.cpp
        https://bugs.webkit.org/show_bug.cgi?id=207984

        Reviewed by Daniel Bates.

        Fix the check for googleapis.com. Since it's now a public suffix, we can no longer check the
        URL's base domain here. Instead, we can check endsWith().

        I considered switching to endsWith() for all the checks in this file, to make our user agent
        quirks robust to future changes in the public suffix list, but checking the base domain is
        nicer and it seems unnecessary. We can continue to adjust our quirks in the future as
        necessary.

        The public suffix list:
        https://github.com/publicsuffix/list/blob/7922d7c20e246552be418e8f72e577899fd30d99/public_suffix_list.dat#L11922

        * platform/UserAgentQuirks.cpp:
        (WebCore::isGoogle):

2020-02-21  Simon Fraser  <simon.fraser@apple.com>

        [Web Animations] Repeated animations on pseudo elements will fail to run after a while
        https://bugs.webkit.org/show_bug.cgi?id=207993
        <rdar://problem/59428472>

        Reviewed by Zalan Bujtas.

        We failed to clear PseudoElement* from AnimationTimeline's various HashMaps on destruction,
        causing animations to fail to run when those pointer addresses were reused.

        Make DeclarativeAnimation::owningElement() be a WeakPtr<>.

        Test: animations/many-pseudo-animations.html

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::willDestoryRendererForElement):
        (WebCore::AnimationTimeline::elementWasRemoved):
        * animation/AnimationTimeline.h:
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::DeclarativeAnimation):
        (WebCore::DeclarativeAnimation::enqueueDOMEvent):
        * animation/DeclarativeAnimation.h:
        (WebCore::DeclarativeAnimation::owningElement const):
        * dom/Element.cpp:
        (WebCore::Element::removedFromAncestor):
        * dom/PseudoElement.cpp:
        (WebCore::PseudoElement::clearHostElement):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::tearDownRenderers):

2020-02-21  Lauro Moura  <lmoura@igalia.com>

        [GStreamer] TextCombinerGStreamer is failing to compile with Gst1.14
        https://bugs.webkit.org/show_bug.cgi?id=208041

        Reviewed by Xabier Rodriguez-Calvar.

        Replace usage of gst_clear_object and gst_clear_tag_list with previous
        *_unref functions. The clear versions were added in 1.16 while Ubuntu
        18.04 (current LTS) and Debian stable uses 1.14.

        * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
        (webkitTextCombinerPadDispose):

2020-02-21  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        Value sanitization for input[type=text] should not truncate a value at a control character
        https://bugs.webkit.org/show_bug.cgi?id=207900

        Reviewed by Darin Adler.

        Stop truncating value at a control character. The new behavior is compatible with Chrome and Firefox.
        Inspired on Chromium patch https://codereview.chromium.org/189843008

        Covered by existing tests: affected layout tests are modified to reflect the new behaviour.
        This improves WPT pass-rate in around 49K new subtest passes for Japanesse encoding tests.

        * html/TextFieldInputType.cpp:
        (WebCore::limitLength):

2020-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Use custom theme style for media controls
        https://bugs.webkit.org/show_bug.cgi?id=208002

        Reviewed by Adrian Perez de Castro.

        Add mediaControlsAdwaita.css and mediaControlsAdwaita.js. The style is based on GTK port with a few differences:

          - Adwaita icons are included in the css.
          - All buttons have effects for hover, pressed and disabled states.
          - Mute and fullscreen (only for videos) buttons are always visible, but disabled when not available to avoid
            the dancing when they are shown.
          - Media duration is always shown too (for non-live streams), being 00:00 and disabled when unknown, for the
            same reason.
          - Timeline and volume sliders are smaller and their thumbs are circled instead of rounded rectangles.
          - Slider thumbs also have effects for hover, pressed and disabled states.

        * Modules/mediacontrols/mediaControlsAdwaita.css: Added.
        (audio::-webkit-media-controls-panel.hidden,):
        (body:-webkit-full-page-media):
        (audio):
        (audio:-webkit-full-page-media,):
        (audio:-webkit-full-page-media::-webkit-media-controls-panel,):
        (::-webkit-media-controls):
        (audio::-webkit-media-controls-enclosure,):
        (video::-webkit-media-controls-enclosure):
        (audio::-webkit-media-controls-panel,):
        (video::-webkit-media-controls-panel):
        (video::-webkit-media-controls-panel div.mute-box,):
        (audio::-webkit-media-controls-panel div.mute-box.hidden,):
        (audio::-webkit-media-controls-mute-button,):
        (audio::-webkit-media-controls-mute-button.muted,):
        (audio::-webkit-media-controls-play-button,):
        (audio::-webkit-media-controls-play-button.paused,):
        (audio::-webkit-media-controls-current-time-display,):
        (audio::-webkit-media-controls-current-time-display.no-duration,):
        (audio::-webkit-media-controls-current-time-display.hidden,):
        (audio::-webkit-media-controls-timeline,):
        (input[type="range"][disabled]::-webkit-media-slider-thumb,):
        (audio::-webkit-media-controls-timeline.hidden,):
        (audio::-webkit-media-controls-volume-slider-container,):
        (audio::-webkit-media-controls-volume-slider-container.hiding,):
        (audio::-webkit-media-controls-volume-slider-container.down,):
        (audio::-webkit-media-controls-panel .hiding.down,):
        (audio::-webkit-media-controls-volume-slider,):
        (audio::-webkit-media-controls-volume-slider-container input[type="range"]::-webkit-media-slider-container > div,):
        (input[type="range"]::-webkit-media-slider-container):
        (input[type="range"]::-webkit-media-slider-container > div):
        (input[type="range"]::-webkit-media-slider-thumb):
        (audio::-webkit-media-controls-toggle-closed-captions-button,):
        (audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
        (video::-webkit-media-controls-closed-captions-container):
        (video::-webkit-media-controls-closed-captions-container.out):
        (video::-webkit-media-controls-closed-captions-container.hidden):
        (video::-webkit-media-controls-closed-captions-container h3):
        (video::-webkit-media-controls-closed-captions-container ul):
        (video::-webkit-media-controls-closed-captions-container li):
        (video::-webkit-media-controls-closed-captions-container li.selected):
        (audio::-webkit-media-controls-fullscreen-button,):
        (audio::-webkit-media-controls-fullscreen-button.hidden,):
        (audio::-webkit-media-controls-panel button:hover,):
        (audio::-webkit-media-controls-panel button:active,):
        (audio::-webkit-media-controls-panel button[disabled],):
        * Modules/mediacontrols/mediaControlsAdwaita.js: Added.
        (createControls):
        (ControllerAdwaita):
        (contains):
        (ControllerAdwaita.prototype.createControls):
        (ControllerAdwaita.prototype.configureInlineControls):
        (ControllerAdwaita.prototype.shouldHaveControls):
        (ControllerAdwaita.prototype.reconnectControls):
        (ControllerAdwaita.prototype.setStatusHidden):
        (ControllerAdwaita.prototype.updateTime):
        (ControllerAdwaita.prototype.handleTimeUpdate):
        (ControllerAdwaita.prototype.updateHasAudio):
        (ControllerAdwaita.prototype.handleMuteButtonMouseOver):
        (ControllerAdwaita.prototype.handleVolumeBoxMouseOut):
        (ControllerAdwaita.prototype.removeControls):
        (ControllerAdwaita.prototype.addControls):
        (ControllerAdwaita.prototype.updateFullscreenButton):
        (ControllerAdwaita.prototype.updateReadyState):
        (ControllerAdwaita.prototype.updateDuration):
        (ControllerAdwaita.prototype.setIsLive):
        (ControllerAdwaita.prototype.updatePlaying):
        (ControllerAdwaita.prototype.updateProgress):
        (ControllerAdwaita.prototype.handleCaptionButtonClicked):
        (ControllerAdwaita.prototype.buildCaptionMenu):
        (ControllerAdwaita.prototype.destroyCaptionMenu):
        (ControllerAdwaita.prototype.showCaptionMenu):
        (ControllerAdwaita.prototype.hideCaptionMenu):
        (ControllerAdwaita.prototype.captionMenuTransitionEnd):
        (ControllerAdwaita.prototype.handleCaptionButtonMouseOver):
        (ControllerAdwaita.prototype.handleCaptionButtonShowMenu):
        (ControllerAdwaita.prototype.handleCaptionButtonMouseOut):
        (ControllerAdwaita.prototype.handleCaptionMouseOut):
        * Modules/mediacontrols/mediaControlsBase.js:
        * PlatformWPE.cmake:
        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::extraMediaControlsStyleSheet):
        (WebCore::RenderThemeWPE::mediaControlsScript):
        (WebCore::RenderThemeWPE::paintMediaSliderTrack):
        (WebCore::RenderThemeWPE::paintMediaVolumeSliderTrack):
        * platform/wpe/RenderThemeWPE.h:

2020-02-21  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for Windows ports

        > WebKitBuild\Release\WTF\Headers\wtf/RefPtr.h(44): error C2027: use of undefined type 'WebCore::ImageData'

        RefPtr<ImageData> is used without defining ImageData.

        * platform/graphics/ConcreteImageBuffer.h: Added #include "ImageData.h".

2020-02-21  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in RenderStyle::isFlippedBlocksWritingMode when fragment flow gains a new in-flow descendant
        https://bugs.webkit.org/show_bug.cgi?id=207296
        <rdar://problem/49687828>

        Reviewed by Antti Koivisto.

        When a multi-column fragment flow gains a new in-flow descendant, we need to call
        multiColumnDescendantInserted so RenderMultiColumnSet would be created for the new
        descendant.

        Test: fast/multicol/fragflow-gains-new-in-flow-descendant-crash.html

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):

2020-02-20  Michael Catanzaro  <mcatanzaro@gnome.org>

        [GTK] Improve user agent quirk for Google Docs and Google Drive
        https://bugs.webkit.org/show_bug.cgi?id=206506

        Reviewed by Carlos Garcia Campos.

        Stop using our macOS platform quirk for Google Docs and Google Drive. It is not successfully
        suppressing the unsupported browser warnings that it was added to avoid. It is also
        responsible for complaints from users who do not like seeing macOS-style shortcuts with
        the Command key rather than Ctrl.

        Replace it with a new Firefox browser quirk. We can avoid the unsupported browser warning in
        Google Docs by using this quirk on accounts.youtube.com. There's no need for any other quirk
        specific to Google Docs (although removing the macOS platform quirk means we'll instead
        begin using the x86_64 Linux quirk that we send to other Google domains). Google Drive will
        also use this new quirk.

        Also, remove a stale comment instructing developers to test downloading the Hangouts browser
        plugin. We no longer support NPAPI, so Google Hangouts is a lost cause until we get WebRTC
        working.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresFirefoxBrowser):
        (WebCore::urlRequiresMacintoshPlatform):
        (WebCore::urlRequiresLinuxDesktopPlatform):
        (WebCore::UserAgentQuirks::quirksForURL):
        (WebCore::UserAgentQuirks::stringForQuirk):
        * platform/UserAgentQuirks.h:
        * platform/glib/UserAgentGLib.cpp:
        (WebCore::buildUserAgentString):

2020-02-20  Peng Liu  <peng.liu6@apple.com>

        [Media in GPU process] Synchronize the properties of video layers in the GPU process with the hosting layer in the web process
        https://bugs.webkit.org/show_bug.cgi?id=206132

        Reviewed by Jer Noble.

        Update the name (for debugging) of the CALayer created by _web_renderLayerWithContextID (The CALayer will not be only used as video layers).
        This patch also fixes the ordering issue related to VideoLayerManagerObjC.h and VideoLayerManagerObjC.mm in the Xcode project file.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/cocoa/WebCoreCALayerExtras.mm:
        (+[CALayer _web_renderLayerWithContextID:]):

2020-02-20  Zalan Bujtas  <zalan@apple.com>

        [First paint] Let optional style recalcs go through while in visually-non-empty state.
        https://bugs.webkit.org/show_bug.cgi?id=208020
        <rdar://problem/59636549>

        Reviewed by Simon Fraser.

        This is the final step to ensure we don't end up delaying the qualifiesAsVisuallyNonEmpty check when
        the page happens to not trigger synchronous style recalcs.

        Here is the optimized flow:
        Optional style realc -> FrameView::styleAndRenderTreeDidChange -> qualifiesAsVisuallyNonEmpty -> Document::shouldScheduleLayout true.

        This could be a slight regression in certain cases because now we let the optional style recalcs through and
        only delay the redundant layouts (as opposed to delay both).

        * dom/Document.cpp:
        (WebCore::Document::scheduleStyleRecalc):
        (WebCore::Document::shouldScheduleLayout):

2020-02-20  Eric Carlson  <eric.carlson@apple.com>

        Support in-band metadata cues when loading media in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=207904
        <rdar://problem/59561647>

        Reviewed by Dean Jackson.

        No new tests, unskipped existing tests.

        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::selectMediaResource):
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
        (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
        * html/track/InbandDataTextTrack.cpp:
        (WebCore::InbandDataTextTrack::addDataCue):
        (WebCore::InbandDataTextTrack::findIncompleteCue):
        (WebCore::InbandDataTextTrack::updateDataCue):
        (WebCore::InbandDataTextTrack::removeDataCue):
        (WebCore::InbandDataTextTrack::removeCue):
        * html/track/InbandDataTextTrack.h:
        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::addCue):
        * html/track/TextTrack.h:
        (WebCore::TextTrack::cuesInternal const):
        * html/track/TextTrackCue.cpp:
        (WebCore::TextTrackCue::cueIndex const):
        * platform/SerializedPlatformDataCue.h:
        (WebCore::SerializedPlatformDataCue::deserialize const):
        (WebCore::SerializedPlatformDataCue::data const):
        (WebCore::SerializedPlatformDataCue::isEqual const):
        (WebCore::SerializedPlatformDataCue::platformType const):
        (WebCore::SerializedPlatformDataCue::encodingRequiresPlatformData const):
        (WebCore::SerializedPlatformDataCue::encodableValue const):
        * platform/graphics/MediaPlayer.cpp:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        * platform/mac/SerializedPlatformDataCueMac.h:
        * platform/mac/SerializedPlatformDataCueMac.mm:
        (WebCore::SerializedPlatformDataCue::create):
        (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac):
        (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac):
        (WebCore::SerializedPlatformDataCueMac::isEqual const):
        (WebCore::toSerializedPlatformDataCueMac):
        (WebCore::SerializedPlatformDataCueMac::allowedClassesForNativeValues):
        (WebCore::SerializedPlatformDataCueMac::encodableValue const):
        (WebCore::jsValueWithAVMetadataItemInContext):
        (WebCore::NSDictionaryWithAVMetadataItem):
        (WebCore::SerializedPlatformDataCueMac::create): Deleted.

2020-02-20  Sunny He  <sunny_he@apple.com>

        Fix crash in Page::updateRendering when document has no domWindow
        https://bugs.webkit.org/show_bug.cgi?id=207975
        <rdar://56999099>

        Reviewed by Ryosuke Niwa.

        When a subframe is navigated, a new document is created and
        the window is transfered asynchronously. It is possible to have
        a call to updateRendering in the middle of this process, resulting
        in an attempt to update a document with no window. Add a check for
        this case and skip such documents.

        No test, since this crash relies on sensitive timing that cannot be
        consistently replicated in a test case.

        * page/Page.cpp:
        (WebCore::Page::updateRendering):

2020-02-20  Zalan Bujtas  <zalan@apple.com>

        [First paint] FrameView::loadProgressingStatusChanged should check m_firstVisuallyNonEmptyLayoutMilestoneIsPending
        https://bugs.webkit.org/show_bug.cgi?id=208008
        <rdar://problem/59630957>

        Reviewed by Antti Koivisto.

        If we haven't had a chance to issue a visually-non-empty milestone, we definitely need to check the content again when the load
        is finally completed.

        * page/FrameView.cpp:
        (WebCore::FrameView::loadProgressingStatusChanged):

2020-02-20  Alicia Boya García  <aboya@igalia.com>

        [GStreamer] Fix race in TextCombinerGStreamer
        https://bugs.webkit.org/show_bug.cgi?id=208001

        Reviewed by Xabier Rodriguez-Calvar.

        TextCombinerGStreamer uses the CAPS event to determine whether adding
        a webvttenc between the text track pad and the funnel element used to
        be able to display several subtitles at the same time.

        The way this was done previously had a race though: all text track
        pads were preemptively linked directly to the funnel, only adding the
        webvttenc element later in the middle when receiving the CAPS event.

        When two or more text tracks were present, it wasn't infrequent that
        one track had its CAPS event processed (causing the webvttenc element
        to be added) and propagated (fixating the funnel caps) before another
        track attempted caps negotiation. Because the pads were connected to
        the funnel preemptively, and because without the webvttenc element the
        caps of the text pad don't match the funnel's, this causes a caps
        mismatch error, stopping playback completely. The CAPS event is
        therefore never sent.

        To avoid this race, we must avoid linking elements until we get the
        CAPS events, when we actually know where we should link them to,
        therefore avoiding early caps negotiation errors.

        * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
        (webkitTextCombinerPadDispose):
        (webkitTextCombinerPadEvent):
        (webkitTextCombinerRequestNewPad):
        (webkitTextCombinerReleasePad):
        (webkit_text_combiner_class_init):
        (webkitTextCombinerPadFinalize): Deleted.

2020-02-20  Zalan Bujtas  <zalan@apple.com>

        [First paint] Let's check visually-non-empty state in FrameView::styleAndRenderTreeDidChange
        https://bugs.webkit.org/show_bug.cgi?id=208013
        <rdar://problem/59633427>

        Reviewed by Antti Koivisto.

        This patch completely decouples m_contentQualifiesAsVisuallyNonEmpty and m_firstVisuallyNonEmptyLayoutMilestoneIsPending.
        Now FrameView can be in the state where m_contentQualifiesAsVisuallyNonEmpty is true while
        m_firstVisuallyNonEmptyLayoutMilestoneIsPending is false (which is a perfectly valid state to be in).
        This will enable us to delay optional layouts after style recalcs when the content is still visually empty.
        (If a FrameView::isVisuallyNonEmpty() caller regresses after this change, it means that the caller is interested in
        whether the non-empty milestone has been issued or not and it needs to switch over to a different API.)

        * page/FrameView.cpp:
        (WebCore::FrameView::styleAndRenderTreeDidChange):
        (WebCore::FrameView::loadProgressingStatusChanged):
        (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

2020-02-20  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Simplify Cookie class.
        https://bugs.webkit.org/show_bug.cgi?id=207930

        Reviewed by Don Olmstead.

        Removed redundant CookieJarCurl.cpp and made NetworkDataTaskCurl access CookieJarDB directly.
        CookieJarCurl was used for supporting file based cookie database but now it is no longer used.

        No new tests. Covered by existing tests.

        * platform/Curl.cmake:
        * platform/network/NetworkStorageSession.h:
        * platform/network/curl/CookieJarCurl.cpp: Removed.
        * platform/network/curl/CookieJarCurl.h: Removed.
        * platform/network/curl/CurlResourceHandleDelegate.cpp:
        (WebCore::handleCookieHeaders):
        * platform/network/curl/NetworkStorageSessionCurl.cpp:
        (WebCore::cookiesForSession):
        (WebCore::NetworkStorageSession::NetworkStorageSession):
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::setCookiesFromHTTPResponse const):
        (WebCore::NetworkStorageSession::setCookieAcceptPolicy const):
        (WebCore::NetworkStorageSession::cookieAcceptPolicy const):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::setCookies):
        (WebCore::NetworkStorageSession::setCookie):
        (WebCore::NetworkStorageSession::deleteCookie):
        (WebCore::NetworkStorageSession::deleteCookie const):
        (WebCore::NetworkStorageSession::deleteAllCookies):
        (WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince):
        (WebCore::NetworkStorageSession::deleteCookiesForHostnames):
        (WebCore::NetworkStorageSession::getAllCookies):
        (WebCore::NetworkStorageSession::getHostnamesWithCookies):
        (WebCore::NetworkStorageSession::getRawCookies const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::createCurlRequest):

2020-02-20  Youenn Fablet  <youenn@apple.com>

        Move system listeners from PlatformMediaSessionManager to MediaSessionManagerCocoa
        https://bugs.webkit.org/show_bug.cgi?id=208011

        Reviewed by Eric Carlson.

        We will want the listeners to be running in GPUProcess.
        The plan is to have a generic PlatformMediaSessionManager that is hooked to GPUProcess
        through a counterpart session manager in GPUProcess.
        Given listeners are only supported in Cocoa ports, it is fine moving them to MediaSessionManagerCocoa.
        This way we can decide to instantiate either a MediaSessionManagerCocoa in WebProcess or in GPUProcess.

        For this to work, we have to make addSession virtual to be able to create the listeners lazily when adding a session.

        No change of behavior.

        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
        (WebCore::PlatformMediaSessionManager::addSession):
        (WebCore::PlatformMediaSessionManager::hasNoSession const):
        (WebCore::PlatformMediaSessionManager::removeSession):
        (WebCore::PlatformMediaSessionManager::setCurrentSession):
        (WebCore::PlatformMediaSessionManager::processDidReceiveRemoteControlCommand):
        (WebCore::PlatformMediaSessionManager::computeSupportsSeeking const):
        (WebCore::PlatformMediaSessionManager::processSystemWillSleep):
        (WebCore::PlatformMediaSessionManager::processSystemDidWake):
        * platform/audio/PlatformMediaSessionManager.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::MediaSessionManagerCocoa):
        (MediaSessionManagerCocoa::updateSessionState):
        (MediaSessionManagerCocoa::addSession):
        (MediaSessionManagerCocoa::removeSession):
        (MediaSessionManagerCocoa::setCurrentSession):
        * testing/Internals.cpp:
        (WebCore::Internals::postRemoteControlCommand):
        (WebCore::Internals::simulateSystemSleep const):
        (WebCore::Internals::simulateSystemWake const):

2020-02-19  Justin Fan  <justin_fan@apple.com>

        GraphicsContextGLOpenGL::transformFeedbackVaryings passes deallocated memory to gl::TransformFeedbackVaryings
        https://bugs.webkit.org/show_bug.cgi?id=207526

        Reviewed by Brent Fulgham.

        Covered by WebGL2 Transform Feedback tests.

        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):

2020-02-20  Antti Koivisto  <antti@apple.com>

        [macOS] Disable RunLoop function dispatch when there is a pending rendering update
        https://bugs.webkit.org/show_bug.cgi?id=207931

        Reviewed by Geoffrey Garen.

        Functions dispatched via RunLoop::dispatch() are executed before the rendering update runloop observer.
        This can significantly delay rendering updates as asyncronous IPC is handled via this mechanism.
        Most importantly network resources are dispatched to the main thread this way, sometimes triggering expensive
        synchronous parsing and script execution.

        This patch adds a mechanims for disabling function dispatch temporarily while there is a pending rendering update.

        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::breakToAllowRenderingUpdate):

2020-02-20  Zalan Bujtas  <zalan@apple.com>

        [LFC] Sometimes subframes don't even have document elements.
        https://bugs.webkit.org/show_bug.cgi?id=208006
        <rdar://problem/59629147>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/subframe-with-display-none-html.html

        Do not try to layout a formatting context when it has no content at all.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):

2020-02-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Fix geometryForBox::isOkToAccessDisplayBox for EscapeReason::FindFixedHeightAncestorQuirk
        https://bugs.webkit.org/show_bug.cgi?id=207983
        <rdar://problem/59615246>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/height-percentage-quirk-to-icb.html

        The height percentage quirk walks the ancestor chain and looks for fixed height block level boxes.
        It can potentially walk all the way up to the ICB. This patch gives access to the ICB's geometry when
        FormattingContext::geometryForBox() has EscapeReason::FindFixedHeightAncestorQuirk. 

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):

2020-02-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][Out-of-flow] FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned should ignore inline boxes
        https://bugs.webkit.org/show_bug.cgi?id=207994
        <rdar://problem/59618280>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/absolute-positioned-box-with-inline-sibling.html

        https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height

        "For the purposes of this section and the next, the term "static position" (of an element) refers, roughly,
        to the position an element would have had in the normal flow."

        This does not seem to be well-defined for sibling inline boxes. Let's just stick with block level boxes for now.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):

2020-02-20  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add WebP targets
        https://bugs.webkit.org/show_bug.cgi?id=207982

        Reviewed by Adrian Perez de Castro.

        Use the WebP targets.

        * platform/ImageDecoders.cmake:

2020-02-20  Rob Buis  <rbuis@igalia.com>

        Lazy load images using base url at parse time
        https://bugs.webkit.org/show_bug.cgi?id=207902

        Reviewed by Darin Adler.

        The spec says to use the base url at parse time for request
        url, ignoring changes to base url after that [1]. To fix this
        add a new state LoadImmediately to LazyImageLoadState where
        the parse time url from the initial request is reused.

        [1] https://html.spec.whatwg.org/multipage/images.html#update-the-image-data

        Tests: imported/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html
               imported/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html

        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement):
        (WebCore::ImageLoader::loadDeferredImage):
        * loader/ImageLoader.h:

2020-02-20  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add WPE::libwpe target
        https://bugs.webkit.org/show_bug.cgi?id=207970

        Reviewed by Adrian Perez de Castro.

        Use the WPE::libwpe target.

        * PlatformGTK.cmake:
        * PlatformPlayStation.cmake:
        * PlatformWPE.cmake:

2020-02-20  Andres Gonzalez  <andresg_22@apple.com>

        [WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange] must run on the main thread.
        https://bugs.webkit.org/show_bug.cgi?id=207958

        Reviewed by Darin Adler.

        Covered by existing tests.

        [WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange]
        calls into TextIterator and Node, thus it must be dispatched to the
        main thread.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):

2020-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Use custom colors for text and listbox selection
        https://bugs.webkit.org/show_bug.cgi?id=207836

        Reviewed by Adrian Perez de Castro.

        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::platformActiveSelectionBackgroundColor const):
        (WebCore::RenderThemeWPE::platformInactiveSelectionBackgroundColor const):
        (WebCore::RenderThemeWPE::platformActiveSelectionForegroundColor const):
        (WebCore::RenderThemeWPE::platformInactiveSelectionForegroundColor const):
        (WebCore::RenderThemeWPE::platformActiveListBoxSelectionBackgroundColor const):
        (WebCore::RenderThemeWPE::platformInactiveListBoxSelectionBackgroundColor const):
        (WebCore::RenderThemeWPE::platformActiveListBoxSelectionForegroundColor const):
        (WebCore::RenderThemeWPE::platformInactiveListBoxSelectionForegroundColor const):
        (WebCore::RenderThemeWPE::paintTextField):
        * platform/wpe/RenderThemeWPE.h:

2020-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Use the theme to render the focus ring
        https://bugs.webkit.org/show_bug.cgi?id=207758

        Reviewed by Adrian Perez de Castro.

        This makes form controls consistent with elements having an auto outline.

        * PlatformWPE.cmake: Add platform/wpe to include dirs.
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::drawFocusRing): Use ThemeWPE::focusColor.
        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::platformFocusRingColor const): Implement it to return the focus color used by ThemeWPE.
        * platform/wpe/RenderThemeWPE.h:
        * platform/wpe/ThemeWPE.cpp:
        (WebCore::ThemeWPE::focusColor): Return the focus color.
        (WebCore::ThemeWPE::paintFocus): Add new methods receiving a path or list of rectangles and a color.
        * platform/wpe/ThemeWPE.h:

2020-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Add support for rendering sliders for range elements
        https://bugs.webkit.org/show_bug.cgi?id=207694

        Reviewed by Adrian Perez de Castro.

        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::supportsFocusRing const):
        (WebCore::RenderThemeWPE::paintSliderTrack):
        (WebCore::RenderThemeWPE::adjustSliderThumbSize const):
        (WebCore::RenderThemeWPE::paintSliderThumb):
        * platform/wpe/RenderThemeWPE.h:

2020-02-19  Jack Lee  <shihchieh_lee@apple.com>

        ASSERTION FAILED: roundedIntPoint(LayoutPoint(rendererMappedResult)) == result in WebCore::RenderGeometryMap::mapToContainer
        https://bugs.webkit.org/show_bug.cgi?id=151030
        <rdar://problem/27711142>

        Reviewed by Darin Adler.

        Track if m_accumulatedOffset ever becomes saturated, and if so, do not assert on unexpected rendererMappedResult.

        Test: fast/layers/geometry-map-saturated-offset-assert.html

        * platform/graphics/LayoutSize.h:
        (WebCore::LayoutSize::mightBeSaturated const):
        * rendering/RenderGeometryMap.cpp:
        (WebCore::RenderGeometryMap::mapToContainer const):
        (WebCore::RenderGeometryMap::stepInserted):
        (WebCore::RenderGeometryMap::stepRemoved):
        * rendering/RenderGeometryMap.h:

2020-02-19  Youenn Fablet  <youenn@apple.com>

        Add support for AudioSession handling in GPUProcess for capture
        https://bugs.webkit.org/show_bug.cgi?id=207950

        Reviewed by Eric Carlson.

        Add a dedicated interface for handling audio capture in session manager.
        This was previoulsy PlatformMediaSessionClient, but this one is more related to audio/video rendering.
        Use this new interface for MediaStreamTrack capture sources.
        The session manager now owns a WeakHashSet of capture sources to compute the correct AudioSession category.

        Modernize the code, for instance use an enum class for MediaType to remove some debug asserts.
        Add a new PlatformMediaSessionManager::create that is used for sharedManager.

        Remove the direct use of PlatformMediaSessionManager::sharedManager from classes that can be used outside of WebProcess.
        This includes BaseAudioSharedUnit, for which we add a audioUnitWillStart callback
        so that we compute the right AudioSession category before starting the capture.

        Covered by existing tests and debug assertions to check for AudioSession category computation.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::~MediaStreamTrack):
        (WebCore::MediaStreamTrack::configureTrackRendering):
        (WebCore::MediaStreamTrack::isCapturingAudio const):
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/webaudio/AudioContext.h:
        * html/HTMLAudioElement.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::shouldDisableSleep const):
        (WebCore::HTMLMediaElement::mediaType const):
        (WebCore::HTMLMediaElement::presentationType const):
        * html/HTMLVideoElement.h:
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::canShowControlsManager const):
        * html/MediaElementSession.h:
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::PlatformMediaSession):
        (WebCore::PlatformMediaSession::activeAudioSessionRequired const):
        * platform/audio/PlatformMediaSession.h:
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::sharedPlatformMediaSessionManager):
        (WebCore::PlatformMediaSessionManager::sharedManager):
        (WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
        (WebCore::PlatformMediaSessionManager::create):
        (WebCore::indexFromMediaType):
        (WebCore::PlatformMediaSessionManager::resetRestrictions):
        (WebCore::PlatformMediaSessionManager::has const):
        (WebCore::PlatformMediaSessionManager::count const):
        (WebCore::PlatformMediaSessionManager::countActiveAudioCaptureSources):
        (WebCore::PlatformMediaSessionManager::addRestriction):
        (WebCore::PlatformMediaSessionManager::removeRestriction):
        (WebCore::PlatformMediaSessionManager::restrictions):
        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
        (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive):
        (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive):
        (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground):
        (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
        (WebCore::PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged):
        (WebCore::PlatformMediaSessionManager::addAudioCaptureSource):
        (WebCore::PlatformMediaSessionManager::removeAudioCaptureSource):
        * platform/audio/PlatformMediaSessionManager.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (PlatformMediaSessionManager::create):
        (MediaSessionManagerCocoa::updateSessionState):
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::PlatformMediaSessionManager::create):
        (WebCore::MediaSessionManageriOS::resetRestrictions):
        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::audioUnitWillStart):
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/mac/BaseAudioSharedUnit.cpp:
        (WebCore::BaseAudioSharedUnit::startUnit):
        * platform/mediastream/mac/BaseAudioSharedUnit.h:
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioCaptureSource::audioUnitWillStart):
        * platform/mediastream/mac/CoreAudioCaptureSource.h:
        * testing/Internals.cpp:
        (WebCore::mediaTypeFromString):
        (WebCore::Internals::setMediaSessionRestrictions):
        (WebCore::Internals::mediaSessionRestrictions const):

2020-02-19  Sunny He  <sunny_he@apple.com>

        Fix crash when Node::normalize() triggers mutation event that modifies child order
        https://bugs.webkit.org/show_bug.cgi?id=207875
        <rdar://58976682>

        Reviewed by Ryosuke Niwa.

        When Node::normalize() merges two text nodes, it calls appendData
        before textNodesMerged. If there is a mutator event registered, it
        will fire on the call to appendData, potentially changing the child
        order and causing a nullptr crash due to incorrect sibling pointers.
        Reverse the order of these calls to ensure order gets correctly
        updated.

        Test: fast/dom/Node/normalize-mutation-event.html

        * dom/Node.cpp:
        (WebCore::Node::normalize):

2020-02-19  Peng Liu  <peng.liu6@apple.com>

        Fix check-webkit-style errors related to AVFoundationSPI.h
        https://bugs.webkit.org/show_bug.cgi?id=207834

        Reviewed by Daniel Bates.

        No new tests, no functional change.

        Revert the change in r256770 regarding the headers ordering.

        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

2020-02-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Do not try to lay out a formatting context unless there's some content in it
        https://bugs.webkit.org/show_bug.cgi?id=207956
        <rdar://problem/59455700>

        Reviewed by Simon Fraser.

        LineLayout::layout() normally don't get called when the block level box has not children (canUse() returns false for such cases), but we are probably missing some invalidation here
        so we end up with an "empty" formatting context.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::layout):

2020-02-19  Zalan Bujtas  <zalan@apple.com>

        [First paint] Introduce FrameView::m_firstVisuallyNonEmptyLayoutMilestoneIsPending
        https://bugs.webkit.org/show_bug.cgi?id=207966
        <rdar://problem/59606528>

        Reviewed by Simon Fraser.

        This is in preparation for decoupling the "content is qualified as visually non-empty" check and layout, when
        the check happens soon after style recalc/render tree building and we need to wait until after layout to
        issue the milestone.

        * page/FrameView.cpp:
        (WebCore::FrameView::resetLayoutMilestones):
        (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
        * page/FrameView.h:

2020-02-19  Youenn Fablet  <youenn@apple.com>

        [mac debug] Regression: http/tests/websocket/tests/hybi/workers/worker-reload.html is a flaky crash
        https://bugs.webkit.org/show_bug.cgi?id=207940
        <rdar://problem/59592000>

        Reviewed by Chris Dumez.

        Covered by debug asserts.

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        Pass registrable domain instead of URL.
        Isolate copy the domain before hopping to main thread for extra protection.

2020-02-19  Youenn Fablet  <youenn@apple.com>

        Remove PlatformMediaSession::characteristics()
        https://bugs.webkit.org/show_bug.cgi?id=207926

        Reviewed by Eric Carlson.

        No change of behavior, removing no longer used code.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::characteristics const): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/webaudio/AudioContext.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::characteristics const): Deleted.
        * html/HTMLMediaElement.h:
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::characteristics const): Deleted.
        * platform/audio/PlatformMediaSession.h:
        (WebCore::PlatformMediaSessionClient::displayType const):

2020-02-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] FloatingContext::constraints should be able to handle empty candidate ranges (points)
        https://bugs.webkit.org/show_bug.cgi?id=207937
        <rdar://problem/59591109>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/floats-shrinking-line-simple.html

        Handle the case when the incoming vertical range is empty (line is empty).

        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::constraints const):
        * layout/floats/FloatingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):

2020-02-19  Brent Fulgham  <bfulgham@apple.com>

        Re-disable top-level data URL navigations
        https://bugs.webkit.org/show_bug.cgi?id=207917
        <rdar://problem/59568037>

        Reviewed by Darin Adler.

        Calls to WKPage and WKWebView API used to load data and strings directly should be recognized by
        the loading code as being from client API calls. This brings these API behaviors into alignment
        with similar API for loading URLs and URLRequests directly. This change also allows us to enforce
        stricter handling of Data URLs, and to remove the need to explicitly permit top-level data URL
        navigation when client APIs are used.

        Tested by TestWebKitAPI Navigation tests.

        * page/Settings.yaml:

2020-02-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Anonymous inline text box container is not the only type of anonymous containers
        https://bugs.webkit.org/show_bug.cgi?id=207945
        <rdar://problem/59592411>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/anonymous-inline-container-simple.html

        We construct anonymous inline containers for certain features like first-letter.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::nextInlineLevelBoxToLayout):
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):

2020-02-19  Megan Gardner  <megan_gardner@apple.com>

        Ensure that contenteditable carets on macCatalyst are the right color, especially in Dark Mode
        https://bugs.webkit.org/show_bug.cgi?id=207789
        <rdar://problem/59429715>

        Reviewed by Tim Horton.

        Factor out caret color calculation to be used in WebPageIOS.

        Fixes EditorStateTests.CaretColorInContentEditable.

        * editing/FrameSelection.cpp:
        (WebCore::CaretBase::computeCaretColor):
        (WebCore::CaretBase::paintCaret const):
        * editing/FrameSelection.h:

2020-02-19  Chris Dumez  <cdumez@apple.com>

        Unreviewed, fix assertions in storage access API layout tests after r256882.

        * dom/DocumentStorageAccess.idl:
        Only expose the storage access API operations to the Web when the corresponding setting is
        enabled instead of relying on an assertion.

        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        Stop disabling the storage access API since the API is enabled by default.

2020-02-18  Zalan Bujtas  <zalan@apple.com>

        Rename ScrollView::styleDidChange to styleAndRenderTreeDidChange
        https://bugs.webkit.org/show_bug.cgi?id=207921

        Reviewed by Simon Fraser.

        When ScrollView::styleDidChange is called we actually finished updating the render tree as well.

        * dom/Document.cpp:
        (WebCore::Document::resolveStyle):
        * page/FrameView.cpp:
        (WebCore::FrameView::styleAndRenderTreeDidChange):
        (WebCore::FrameView::styleDidChange): Deleted.
        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::styleAndRenderTreeDidChange):
        (WebCore::ScrollView::styleDidChange): Deleted.
        * platform/ScrollView.h:
        * rendering/RenderView.cpp: FrameView::styleDidChange gets called by the Document.
        (WebCore::RenderView::styleDidChange): Deleted.
        * rendering/RenderView.h:

2020-02-18  Jack Lee  <shihchieh_lee@apple.com>

        ASSERTION FAILED: !m_embeddedObjectsToUpdate->contains(nullptr) in WebCore::FrameView::updateEmbeddedObjects
        https://bugs.webkit.org/show_bug.cgi?id=191532
        <rdar://problem/46151555>

        Reviewed by Darin Adler.

        Add reentrancy protection for FrameView::updateEmbeddedObjects().
        Move the common code in renderWidgetLoadingPlugin() to inherited class, HTMLPlugInElement.

        Test: fast/text/textCombine-update-embeddedObj-assert.html

        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::renderWidgetLoadingPlugin const):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin const):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::renderWidgetLoadingPlugin const): Deleted.
        * html/HTMLObjectElement.h:
        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::renderWidgetLoadingPlugin const):
        * html/HTMLPlugInElement.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::updateEmbeddedObjects):
        * page/FrameView.h:

2020-02-18  Youenn Fablet  <youenn@apple.com>

        Reduce use of PlatformMediaSessionManager::sharedManager()
        https://bugs.webkit.org/show_bug.cgi?id=207924

        Reviewed by Eric Carlson.

        The plan is to be able to have PlatformMediaSession in GPU process which might have different managers,
        typically a manager per connection to web process.
        For that reason, reduce the use of the sharedManager to classes that can only live in WebProcess.
        No change of behavior.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::MediaElementSession):
        (WebCore::MediaElementSession::clientDataBufferingTimerFired):
        (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::create):
        (WebCore::PlatformMediaSession::PlatformMediaSession):
        (WebCore::PlatformMediaSession::~PlatformMediaSession):
        (WebCore::PlatformMediaSession::setState):
        (WebCore::PlatformMediaSession::clientWillBeginPlayback):
        (WebCore::PlatformMediaSession::processClientWillPausePlayback):
        (WebCore::PlatformMediaSession::stopSession):
        (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTargetChanged):
        (WebCore::PlatformMediaSession::canProduceAudioChanged):
        (WebCore::PlatformMediaSession::clientCharacteristicsChanged):
        (WebCore::PlatformMediaSession::manager):
        * platform/audio/PlatformMediaSession.h:
        * platform/audio/PlatformMediaSessionManager.h:

2020-02-18  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION (r256093): fast/events/touch/ios/block-without-overflow-scroll.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=207919
        <rdar://problem/59565344>

        Reviewed by Tim Horton.

        Three iOS-specific layout tests began to fail after r256093, since they currently depend on a particular
        ordering when iterating over elements in a hash map. Instead of just rebaselining these tests, we can make them
        more robust against similar changes in the future by forcing a deterministic order when printing out synchronous
        touch event regions for testing.

        I arbitrarily chose to sort the keys (which are touch event type names) in alphabetical order.

        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):

2020-02-18  Youenn Fablet  <youenn@apple.com>

        PlatformMediaSessionClient::processingUserGestureForMedia is not needed
        https://bugs.webkit.org/show_bug.cgi?id=207922

        Reviewed by Eric Carlson.

        All code relies on the document and the virtual method is never used so remove it.
        No change of behavior.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::processingUserGestureForMedia const): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::processingUserGestureForMedia const): Deleted.
        * Modules/webaudio/AudioContext.h:
        * html/HTMLMediaElement.h:
        * platform/audio/PlatformMediaSession.h:

2020-02-18  Youenn Fablet  <youenn@apple.com>

        SWServer::claim should check for the service worker to be active
        https://bugs.webkit.org/show_bug.cgi?id=207739
        <rdar://problem/45441129>

        Reviewed by Alex Christensen.

        claim is only working for service workers that are active.
        But there might be a time when a service worker is active in its web process but redundant in networking process.
        Thus, we need to move the check from WebProcess to NetworkProcess.

        * workers/service/ServiceWorkerClients.cpp:
        (WebCore::ServiceWorkerClients::claim):
        * workers/service/context/SWContextManager.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::claim):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerToContextConnection.cpp:
        (WebCore::SWServerToContextConnection::claim):
        * workers/service/server/SWServerToContextConnection.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::claim): Deleted.
        * workers/service/server/SWServerWorker.h:
        (WebCore::SWServerWorker::isActive const):

2020-02-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Replaced elements can also establish formatting contexts.
        https://bugs.webkit.org/show_bug.cgi?id=207923
        <rdar://problem/59571203>

        Reviewed by Simon Fraser.

        While replaced boxes (leaf boxes) can also establish formatting contexts (e.g. style="inline-block"), we
        only need to construct formatting context objects for the root's descendants (and not for the root itself). 

        Test: fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

2020-02-18  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Allow different back-ends for ImageBuffer
        https://bugs.webkit.org/show_bug.cgi?id=207048

        Reviewed by Tim Horton.

        ImageBuffer will be re-factored to decouple the platform specifics and
        the back-end details from the interface "ImageBuffer".

        A class hierarchy for the ImageBufferBackend will added to allow code
        sharing and to split the code according to the platform and the back-end
        details.

        ImageBuffer will be kept interface with the rest of the code but different
        back-ends will be created. ConcreteImageBuffer is a template class which
        inherits ImageBuffer and will  act as a bridge to the concrete
        ImageBufferBackend.

        Based on the RenderingMode, a ConcreteImageBuffer<BackendType> will
        be created. Instead of checking the renderingMode in many places of the
        code and instead of and using preprocessor directives, all these decisions
        will be made in the concrete ImageBufferBackend.

        This re-factoring will allow creating new types of ImageBuffers backed by
        new ImageBufferBackends. These new ImageBufferBackends will implement
        DisplayList drawing and synchronize remote rendering.

        * Headers.cmake:
        * PlatformAppleWin.cmake:
        * PlatformFTW.cmake:
        * PlatformMac.cmake:
        * PlatformWin.cmake:
        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::setImageBuffer const):
        * platform/Cairo.cmake:
        * platform/SourcesCairo.txt:
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation):
        * platform/graphics/ConcreteImageBuffer.h: Added.
        (WebCore::ConcreteImageBuffer::create):
        (WebCore::ConcreteImageBuffer::ConcreteImageBuffer):
        (WebCore::ConcreteImageBuffer::ensureBackend const):
        (WebCore::ConcreteImageBuffer::putImageData):
        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::create):
        (WebCore::ImageBuffer::createCompatibleBuffer):
        (WebCore::ImageBuffer::sizeNeedsClamping):
        (WebCore::ImageBuffer::compatibleBufferSize):
        (WebCore::ImageBuffer::sinkIntoNativeImage):
        (WebCore::ImageBuffer::sinkIntoImage):
        (WebCore::ImageBuffer::drawConsuming):
        (WebCore::ImageBuffer::toBGRAData const): Deleted.
        (WebCore::ImageBuffer::transformColorSpace): Deleted.
        (WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted.
        (WebCore::ImageBuffer::convertToLuminanceMask): Deleted.
        (WebCore::ImageBuffer::platformLayer const): Deleted.
        (WebCore::ImageBuffer::copyToPlatformTexture): Deleted.
        (WebCore::ImageBuffer::memoryCost const): Deleted.
        (WebCore::ImageBuffer::externalMemoryCost const): Deleted.
        * platform/graphics/ImageBuffer.h:
        (WebCore::ImageBuffer::draw):
        (WebCore::ImageBuffer::drawPattern):
        (WebCore::ImageBuffer::drawConsuming):
        (WebCore::ImageBuffer::putImageData):
        (): Deleted.
        (WebCore::ImageBuffer::internalSize const): Deleted.
        (WebCore::ImageBuffer::logicalSize const): Deleted.
        (WebCore::ImageBuffer::resolutionScale const): Deleted.
        (WebCore::ImageBuffer::baseTransform const): Deleted.
        * platform/graphics/ImageBufferBackend.cpp: Added.
        (WebCore::ImageBufferBackend::ImageBufferBackend):
        (WebCore::ImageBufferBackend::calculateBackendSize):
        (WebCore::ImageBufferBackend::sinkIntoNativeImage):
        (WebCore::ImageBufferBackend::sinkIntoImage):
        (WebCore::ImageBufferBackend::drawConsuming):
        (WebCore::ImageBufferBackend::convertToLuminanceMask):
        (WebCore::ImageBufferBackend::toBGRAData const):
        (WebCore::copyPremultipliedToPremultiplied):
        (WebCore::copyPremultipliedToUnpremultiplied):
        (WebCore::copyUnpremultipliedToPremultiplied):
        (WebCore::copyFunctor):
        (WebCore::ImageBufferBackend::copyImagePixels const):
        (WebCore::ImageBufferBackend::getImageData const):
        (WebCore::ImageBufferBackend::putImageData):
        * platform/graphics/ImageBufferBackend.h: Added.
        (WebCore::ImageBufferBackend::flushContext):
        (WebCore::ImageBufferBackend::logicalSize const):
        (WebCore::ImageBufferBackend::backendSize const):
        (WebCore::ImageBufferBackend::resolutionScale const):
        (WebCore::ImageBufferBackend::colorSpace const):
        (WebCore::ImageBufferBackend::baseTransform const):
        (WebCore::ImageBufferBackend::memoryCost const):
        (WebCore::ImageBufferBackend::externalMemoryCost const):
        (WebCore::ImageBufferBackend::transformColorSpace):
        (WebCore::ImageBufferBackend::platformLayer const):
        (WebCore::ImageBufferBackend::copyToPlatformTexture const):
        (WebCore::ImageBufferBackend::bytesPerRow const):
        (WebCore::ImageBufferBackend::backendColorFormat const):
        (WebCore::ImageBufferBackend::toBackendCoordinates const):
        (WebCore::ImageBufferBackend::logicalRect const):
        (WebCore::ImageBufferBackend::backendRect const):
        * platform/graphics/PlatformImageBuffer.h: Added.
        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ShadowBlur::drawShadowBuffer):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawShadowLayerBuffer):
        (WebCore::Cairo::drawShadowImage):
        (WebCore::Cairo::fillShadowBuffer):
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::clipToImageBuffer):
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::clipToImageBuffer):
        * platform/graphics/cairo/ImageBufferCairo.cpp: Removed.
        * platform/graphics/cairo/ImageBufferCairoBackend.cpp: Added.
        (WebCore::ImageBufferCairoBackend::copyImage const):
        (WebCore::ImageBufferCairoBackend::draw):
        (WebCore::ImageBufferCairoBackend::drawPattern):
        (WebCore::ImageBufferCairoBackend::transformColorSpace):
        (WebCore::ImageBufferCairoBackend::toDataURL const):
        (WebCore::ImageBufferCairoBackend::toData const):
        * platform/graphics/cairo/ImageBufferCairoBackend.h: Added.
        (WebCore::ImageBufferCairoBackend::platformTransformColorSpace):
        * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Added.
        (WebCore::clearSurface):
        (WebCore::ImageBufferCairoGLSurfaceBackend::create):
        (WebCore::ImageBufferCairoGLSurfaceBackend::ImageBufferCairoGLSurfaceBackend):
        (WebCore::ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend):
        (WebCore::ImageBuffer::platformLayer const):
        (WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture):
        (WebCore::ImageBufferCairoGLSurfaceBackend::createCompositorBuffer):
        (WebCore::ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded):
        (WebCore::ImageBufferCairoGLSurfaceBackend::paintToTextureMapper):
        * platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Added.
        * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: Added.
        (WebCore::ImageBufferCairoImageSurfaceBackend::create):
        (WebCore::ImageBufferCairoImageSurfaceBackend::ImageBufferCairoImageSurfaceBackend):
        (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace):
        * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.h: Added.
        * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: Added.
        (WebCore::ImageBufferCairoSurfaceBackend::ImageBufferCairoSurfaceBackend):
        (WebCore::ImageBufferCairoSurfaceBackend::context const):
        (WebCore::ImageBufferCairoSurfaceBackend::bytesPerRow const):
        (WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage const):
        (WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage const):
        (WebCore::ImageBufferCairoSurfaceBackend::toBGRAData const):
        (WebCore::ImageBufferCairoSurfaceBackend::getImageData const):
        (WebCore::ImageBufferCairoSurfaceBackend::putImageData):
        * platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h: Added.
        * platform/graphics/cg/ImageBufferCG.cpp: Removed.
        * platform/graphics/cg/ImageBufferCGBackend.cpp: Added.
        (WebCore::ImageBufferCGBackend::contextColorSpace):
        (WebCore::ImageBufferCGBackend::setupContext):
        (WebCore::createCroppedImageIfNecessary):
        (WebCore::createBitmapImageAfterScalingIfNeeded):
        (WebCore::ImageBufferCGBackend::copyImage const):
        (WebCore::ImageBufferCGBackend::sinkIntoImage):
        (WebCore::ImageBufferCGBackend::draw):
        (WebCore::ImageBufferCGBackend::drawPattern):
        (WebCore::ImageBufferCGBackend::baseTransform const):
        (WebCore::ImageBufferCGBackend::toCFData const):
        (WebCore::ImageBufferCGBackend::toData const):
        (WebCore::ImageBufferCGBackend::toDataURL const):
        (WebCore::makeVImageBuffer):
        (WebCore::copyImagePixelsAccelerated):
        (WebCore::ImageBufferCGBackend::copyImagePixels const):
        * platform/graphics/cg/ImageBufferCGBackend.h: Added.
        * platform/graphics/cg/ImageBufferCGBitmapBackend.cpp: Added.
        (WebCore::ImageBufferCGBitmapBackend::create):
        (WebCore::ImageBufferCGBitmapBackend::ImageBufferCGBitmapBackend):
        (WebCore::ImageBufferCGBitmapBackend::context const):
        (WebCore::ImageBufferCGBitmapBackend::copyNativeImage const):
        (WebCore::ImageBufferCGBitmapBackend::toBGRAData const):
        (WebCore::ImageBufferCGBitmapBackend::getImageData const):
        (WebCore::ImageBufferCGBitmapBackend::putImageData):
        * platform/graphics/cg/ImageBufferCGBitmapBackend.h: Added.
        * platform/graphics/cg/ImageBufferDataCG.cpp: Removed.
        * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: Added.
        (WebCore::ImageBufferIOSurfaceBackend::calculateBackendSize):
        (WebCore::ImageBufferIOSurfaceBackend::contextColorSpace):
        (WebCore::ImageBufferIOSurfaceBackend::create):
        (WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend):
        (WebCore::ImageBufferIOSurfaceBackend::context const):
        (WebCore::ImageBufferIOSurfaceBackend::flushContext):
        (WebCore::ImageBufferIOSurfaceBackend::memoryCost const):
        (WebCore::ImageBufferIOSurfaceBackend::externalMemoryCost const):
        (WebCore::ImageBufferIOSurfaceBackend::bytesPerRow const):
        (WebCore::ImageBufferIOSurfaceBackend::backendColorFormat const):
        (WebCore::ImageBufferIOSurfaceBackend::copyNativeImage const):
        (WebCore::ImageBufferIOSurfaceBackend::sinkIntoNativeImage):
        (WebCore::ImageBufferIOSurfaceBackend::drawConsuming):
        (WebCore::ImageBufferIOSurfaceBackend::toBGRAData const):
        (WebCore::ImageBufferIOSurfaceBackend::getImageData const):
        (WebCore::ImageBufferIOSurfaceBackend::putImageData):
        * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Added.
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
        * platform/graphics/cocoa/IOSurface.mm:
        (WebCore::IOSurface::createFromImageBuffer): Deleted.
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas):
        * platform/graphics/win/ImageBufferDataDirect2D.cpp: Removed.
        * platform/graphics/win/ImageBufferDataDirect2D.h: Removed.
        * platform/graphics/win/ImageBufferDirect2D.cpp: Removed.
        * platform/graphics/win/ImageBufferDirect2DBackend.cpp: Added.
        (WebCore::ImageBufferDirect2DBackend::create):
        (WebCore::ImageBufferDirect2DBackend::ImageBufferDirect2DBackend):
        (WebCore::ImageBufferDirect2DBackend::context const):
        (WebCore::ImageBufferDirect2DBackend::flushContext):
        (WebCore::ImageBufferDirect2DBackend::copyNativeImage const):
        (WebCore::createCroppedImageIfNecessary):
        (WebCore::createBitmapImageAfterScalingIfNeeded):
        (WebCore::ImageBufferDirect2DBackend::copyImage const):
        (WebCore::ImageBufferDirect2DBackend::sinkIntoImage):
        (WebCore::ImageBufferDirect2DBackend::compatibleBitmap):
        (WebCore::ImageBufferDirect2DBackend::draw):
        (WebCore::ImageBufferDirect2DBackend::drawPattern):
        (WebCore::ImageBufferDirect2DBackend::toDataURL const):
        (WebCore::ImageBufferDirect2DBackend::toData const):
        (WebCore::ImageBufferDirect2DBackend::toBGRAData const):
        (WebCore::ImageBufferDirect2DBackend::getImageData const):
        (WebCore::ImageBufferDirect2DBackend::putImageData):
        * platform/graphics/win/ImageBufferDirect2DBackend.h: Added.
        * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeVideoSource::updateSampleBuffer):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::bufferForeground):

2020-02-18  Zalan Bujtas  <zalan@apple.com>

        [First paint] Remove elementOverflowRectIsLargerThanThreshold check in qualifiesAsVisuallyNonEmpty
        https://bugs.webkit.org/show_bug.cgi?id=207907
        <rdar://problem/59562169>

        Reviewed by Geoffrey Garen.

        This is in preparation for being able to qualify for visually non-empty content without looking at geometry.
        This check was added long ago, initially with a 200px value which got reduced to 48px to reduce painting latency on google search result page.
        At this point a 48px threshold does not make too much sense.

        * page/FrameView.cpp:
        (WebCore::FrameView::qualifiesAsSignificantRenderedText const):
        (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
        (WebCore::elementOverflowRectIsLargerThanThreshold): Deleted.

2020-02-18  Daniel Bates  <dabates@apple.com>

        Ask the EditorClient whether to reveal the current selection after insertion
        https://bugs.webkit.org/show_bug.cgi?id=207866
        <rdar://problem/59553028>

        Reviewed by Wenson Hsieh.

        Adds a new EditorClient function shouldRevealCurrentSelectionAfterInsertion() that returns whether
        the client wants the engine to reveal the current selection after insertion. The default implementation
        always returns true. On iOS it returns the result of WebPage::shouldRevealCurrentSelectionAfterInsertion().

        * editing/Editor.cpp:
        (WebCore::Editor::insertTextWithoutSendingTextEvent): Call EditorClient::shouldRevealCurrentSelectionAfterInsertion().
        If it returns false then skip the code to reveal the current selection: the UI process will call back
        into WebPage::setShouldRevealCurrentSelectionAfterInsertion() when it is ready to reveal the current
        selection. Otherwise, do what we do now.
        * editing/Editor.h:
        * page/EditorClient.h:
        (WebCore::EditorClient::shouldRevealCurrentSelectionAfterInsertion const): Added.
        * page/Page.cpp:
        (WebCore::Page::revealCurrentSelection): Added.
        * page/Page.h:

2020-02-18  Wenson Hsieh  <wenson_hsieh@apple.com>

        [macOS] Web process may crash under ServicesOverlayController::buildPotentialHighlightsIfNeeded
        https://bugs.webkit.org/show_bug.cgi?id=207899
        <rdar://problem/55658207>

        Reviewed by Tim Horton and Simon Fraser.

        Mitigates a null pointer crash in ServicesOverlayController::buildPotentialHighlightsIfNeeded(), wherein the
        focused frame may not have a FrameView when the ServicesOverlayController's selection invalidation timer fires.
        This is possible if, while being focused, the newly focused subframe is unparented and reparented, which causes
        it to momentarily have a null view. During this time, if a selection change had occurred earlier in the runloop,
        it will schedule the page overlay controller invalidation timer, which will fire and discover that the currently
        focused frame no longer has a FrameView.

        Test: editing/selection/selection-change-in-disconnected-frame-crash.html

        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::buildSelectionHighlight):

2020-02-18  Peng Liu  <peng.liu6@apple.com>

        MediaSource.isTypeSupported() says "video/mp4;codecs=\"avc3.42C015\"" is not supported, but it is
        https://bugs.webkit.org/show_bug.cgi?id=207622

        Reviewed by Eric Carlson.

        Revert the behavior change of MediaPlayerPrivateMediaSourceAVFObjC::supportsType() in r253952.

        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
        (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):

2020-02-18  Antti Koivisto  <antti@apple.com>

        [macOS] Don't fire timers when there is a pending rendering update
        https://bugs.webkit.org/show_bug.cgi?id=207889

        Reviewed by Simon Fraser.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::breakToAllowRenderingUpdate):

        Add the exported interface to WindowEventLoop as the future direction is to do everything via it.
        For now it just calls into ThreadTimers rather than doing anything with the event loop itself.

        * dom/WindowEventLoop.h:
        * platform/ThreadTimers.cpp:
        (WebCore::ThreadTimers::sharedTimerFiredInternal):
        (WebCore::ThreadTimers::breakFireLoopForRenderingUpdate):

        If we are in a firing timer set a flag so that no more timers are fired during the current runloop cycle.

        * platform/ThreadTimers.h:

2020-02-18  Youenn Fablet  <youenn@apple.com>

        Remove PlatformMediaSessionClient dependency on Document
        https://bugs.webkit.org/show_bug.cgi?id=207892

        Reviewed by Eric Carlson.

        Move DocumentIdentifier to Platform folder.
        Use DocumentIdentifier instead of Document in PlatformMediaSession/Manager.
        No change of behavior.

        * Headers.cmake:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::hostingDocumentIdentifier const):
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::hostingDocumentIdentifier const):
        (WebCore::AudioContext::hostingDocument const): Deleted.
        * Modules/webaudio/AudioContext.h:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::stopAllMediaPlayback):
        (WebCore::Document::suspendAllMediaPlayback):
        (WebCore::Document::resumeAllMediaPlayback):
        (WebCore::Document::suspendAllMediaBuffering):
        (WebCore::Document::resumeAllMediaBuffering):
        * html/HTMLMediaElement.h:
        * platform/DocumentIdentifier.h: Renamed from Source/WebCore/dom/DocumentIdentifier.h.
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::PlatformMediaSession):
        * platform/audio/PlatformMediaSession.h:
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument):
        (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
        (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
        (WebCore::PlatformMediaSessionManager::suspendAllMediaBufferingForDocument):
        (WebCore::PlatformMediaSessionManager::resumeAllMediaBufferingForDocument):
        (WebCore::PlatformMediaSessionManager::sessionsMatching const):
        (WebCore::PlatformMediaSessionManager::forEachDocumentSession):
        * platform/audio/PlatformMediaSessionManager.h:

2020-02-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][Quirk] Add additional escape reason to cover the case when body needs access to both the body and the ICB geometry
        https://bugs.webkit.org/show_bug.cgi?id=207869
        <rdar://problem/59531225>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/out-of-flow-html-and-body-stretches-to-viewport.html

        When the body is stretched all the way to the ICB, we have to read both the document box's and the ICB's geometry.
        This patch also refactors Quirks::stretchedInFlowHeight a bit to decouple the document and the body cases.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):
        * layout/FormattingContext.h:
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching const):
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):

2020-02-18  Per Arne Vollan  <pvollan@apple.com>

        Move [UIDevice currentDevice] calls to UI process
        https://bugs.webkit.org/show_bug.cgi?id=204320

        Reviewed by Darin Adler.

        Calling [UIDevice currentDevice] will cause the runningboard daemon to be accessed. Since this service will be removed from
        the WebContent sandbox, these calls should be moved to the UI process. The function exernalDeviceDisplayNameForPlayer in
        MediaPlayerPrivateAVFoundationObjC.mm is calling [[PAL::getUIDeviceClass() currentDevice] localizedModel], which should be
        moved to the UI process.

        API test: WebKit.LocalizedDeviceName

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::exernalDeviceDisplayNameForPlayer):
        * platform/ios/LocalizedDeviceModel.h: Added.
        * platform/ios/LocalizedDeviceModel.mm: Added.
        (WebCore::cachedLocalizedDeviceModel):
        (WebCore::localizedDeviceModel):
        (WebCore::setLocalizedDeviceModel):

2020-02-18  Youenn Fablet  <youenn@apple.com>

        Use more ObjectIdentifier in WebRTC MDNS register
        https://bugs.webkit.org/show_bug.cgi?id=207548

        Reviewed by Eric Carlson.

        Pass document identifiers instead of uint64_t to mdns register.
        No change of behavior.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::registerMDNSName):
        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction):
        (WebCore::Document::suspend):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:

2020-02-18  Kate Cheney  <katherine_cheney@apple.com>

        Web socket loads should be captured for logging per-page prevalent domains
        https://bugs.webkit.org/show_bug.cgi?id=207840
        <rdar://problem/59511746>

        Reviewed by Chris Dumez.

        Test: http/tests/websocket/web-socket-loads-captured-in-per-page-domains.html

        Captures a domain connection via WebSocket to check if it should be
        logged as a prevalent resource.

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):

2020-02-18  Simon Fraser  <simon.fraser@apple.com>

        Move from "layer flush" terminology to "rendering update"
        https://bugs.webkit.org/show_bug.cgi?id=207870

        Reviewed by Tim Horton.

        Rename various functions and member variables to move away from the legacy "layer flush"
        terminology and instead use "rendering update", matching Page::updateRendering(). The fact
        that we have layers is an implementation detail.
        
        Change LayerFlushThrottlingState to be an OptionSet<>.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::scheduleStyleRecalc):
        (WebCore::Document::shouldScheduleLayout):
        * loader/EmptyClients.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::renderingUpdateThrottlingIsActive const):
        (WebCore::ChromeClient::adjustRenderUpdateThrottling):
        (WebCore::ChromeClient::layerFlushThrottlingIsActive const): Deleted.
        (WebCore::ChromeClient::adjustLayerFlushThrottling): Deleted.
        * page/FrameView.cpp:
        (WebCore::determineLayerFlushThrottleState):
        (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
        (WebCore::FrameView::updateLayerFlushThrottling):
        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate):
        * page/RenderingUpdateThrottleState.h: Renamed from Source/WebCore/page/LayerFlushThrottleState.h.

2020-02-18  Chris Dumez  <cdumez@apple.com>

        ASSERT_NOT_REACHED() under WebPageProxy::suspendCurrentPageIfPossible()
        https://bugs.webkit.org/show_bug.cgi?id=207868
        <rdar://problem/59464606>

        Reviewed by John Wilander.

        Test: http/tests/navigation/process-swap-on-client-side-redirect-private.html

        * loader/HistoryController.cpp:
        (WebCore::HistoryController::updateForSameDocumentNavigation):
        Methods in HistoryController avoids updating visited links and calling updateGlobalHistory()
        on the FrameLoaderClient when in an ephemeral session. However, updateForSameDocumentNavigation()
        was returning early in ephemeral sessions, which was overly aggressive and bypasses things we
        really need to do, like updating the current HistoryItem's url.

2020-02-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add missing float check in inline line layout
        https://bugs.webkit.org/show_bug.cgi?id=207878
        <rdar://problem/59537467>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/float-in-inline-context-simple.html

        Make sure float content gets laid out as well. 

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::nextWrapOpportunity):

2020-02-18  Jacob Uphoff  <jacob_uphoff@apple.com>

        Unreviewed, rolling out r256804.

        This broke 50+ media tests on mac debug

        Reverted changeset:

        "MediaSource.isTypeSupported() says
        "video/mp4;codecs=\"avc3.42C015\"" is not supported, but it
        is"
        https://bugs.webkit.org/show_bug.cgi?id=207622
        https://trac.webkit.org/changeset/256804

2020-02-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][TreeBuilding] Take createLineBreakBox's return value
        https://bugs.webkit.org/show_bug.cgi?id=207879
        <rdar://problem/59537585>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/br-in-inline-content-simple.html

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

2020-02-18  Oriol Brufau  <obrufau@igalia.com>

        [css-grid] Improve performance of track sizing algorithm for spanning items
        https://bugs.webkit.org/show_bug.cgi?id=207852

        Reviewed by Javier Fernandez.

        Calculating the used sizing function for a track is not a very expensive
        operation, but it's not trivial either, and the track sizing algorithm
        needs to access sizing functions all over the place. This ends up having
        a performance cost, especially for spanning items.

        Intrinsic contributions from items that span a single track are handled
        in a simpler way than when the span is greater than 1. In the former
        case, SizeTrackToFitNonSpanningItem only calculates the track sizing
        function of each track once per each item in that track. But in the
        latter case we not only calculate the track sizing function of multiple
        tracks per item, we also repeat this 5 times in order to handle the
        various TrackSizeComputationPhase.

        Therefore, to increase performance, this patch caches the used track
        sizing functions in the tracks themselves.

        This is a port of these Chromium patches:
        - https://chromium-review.googlesource.com/c/chromium/src/+/1901292
        - https://chromium-review.googlesource.com/c/chromium/src/+/1919140
        - https://chromium-review.googlesource.com/c/chromium/src/+/1940107

        Chromium has a auto-grid-lots-of-spanning-data perf test. In WebKit, its
        performance improves by 40% with this patch.

        * rendering/GridTrackSizingAlgorithm.cpp:
        (WebCore::GridTrack::setCachedTrackSize):
        (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
        (WebCore::GridTrackSizingAlgorithm::spanningItemCrossesFlexibleSizedTracks const):
        (WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
        (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
        (WebCore::GridTrackSizingAlgorithm::isIntrinsicSizedGridArea const):
        (WebCore::GridTrackSizingAlgorithm::calculateGridTrackSize const):
        (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const):
        (WebCore::GridTrackSizingAlgorithm::computeFlexSizedTracksGrowth const):
        (WebCore::GridTrackSizingAlgorithm::findFrUnitSize const):
        (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
        (WebCore::normalizedFlexFraction):
        (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
        (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
        (WebCore::GridTrackSizingAlgorithm::tracksAreWiderThanMinTrackBreadth const):
        * rendering/GridTrackSizingAlgorithm.h:
        (WebCore::GridTrack::cachedTrackSize const):

2020-02-18  Chris Lord  <clord@igalia.com>

        [ARM] Build failure on arm due to invalid use of incomplete type 'class WebCore::ImageData' in FEBlendNEON.h
        https://bugs.webkit.org/show_bug.cgi?id=207885

        Reviewed by Carlos Alberto Lopez Perez.

        No new tests, no functional change.

        * platform/graphics/cpu/arm/filters/FEBlendNEON.h:

2020-02-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Add support for rendering progress bars
        https://bugs.webkit.org/show_bug.cgi?id=207688

        Reviewed by Adrian Perez de Castro.

        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::animationRepeatIntervalForProgressBar const):
        (WebCore::RenderThemeWPE::animationDurationForProgressBar const):
        (WebCore::RenderThemeWPE::progressBarRectForBounds const):
        (WebCore::RenderThemeWPE::paintProgressBar):
        * platform/wpe/RenderThemeWPE.h:

2020-02-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Add support for rendering spin buttons
        https://bugs.webkit.org/show_bug.cgi?id=207686

        Reviewed by Adrian Perez de Castro.

        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::popupInternalPaddingBox const): Rename arrowSize as menuListButtonArrowSize.
        (WebCore::RenderThemeWPE::paintMenuList): Use ThemeWPE::paintArrow().
        * platform/wpe/ThemeWPE.cpp:
        (WebCore::ThemeWPE::paintArrow): Moved from RenderThemeWPE and added direction parameter.
        (WebCore::ThemeWPE::controlSize const): Set size of spin buttons.
        (WebCore::ThemeWPE::paint): Call paintSpinButton() for spin buttons.
        (WebCore::ThemeWPE::paintSpinButton): Paint the buttons.
        * platform/wpe/ThemeWPE.h:

2020-02-18  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Make ImageBuffer::getImageData() and putImageData() return and take ImageData
        https://bugs.webkit.org/show_bug.cgi?id=206621

        Reviewed by Tim Horton.

        -- Combine ImageBuffer::getUnmultipliedImageData() and getPremultipliedImageData()
           in one function and name it getImageData();

        -- Make getImageData() returns a RefPtr<ImageData> since the canvas code
           used to encapsulate the returned the returned Uint8ClampedArray into
           an ImageData and send it to JavaScriptCore.

        -- Rename ImageBuffer::putByteArray() to ImageBuffer::putImageData() and
           make it take an ImageData since the byte array has to be associated
           with an IntSize and separating them does not look a good design.

        -- Remove the enum ImageBuffer::CoordinateSystem. All the callers need to
           pass rectangles and sizes in logical coordinates. The ImageData has to
           be scaled according to the ImgeBuffer::resolutionScale(). 

        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::dumpImageBitmap):
        (WebCore::CloneDeserializer::readImageBitmap):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::getImageData const):
        (WebCore::CanvasRenderingContext2DBase::putImageData):
        * html/canvas/CanvasRenderingContext2DBase.h:
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):
        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::convertToLuminanceMask):
        (WebCore::ImageBuffer::transformColorSpace): Deleted.
        Move this function to ImageBufferCairo.cpp.

        (WebCore::ImageBuffer::genericConvertToLuminanceMask): Deleted.
        convertToLuminanceMask() and genericConvertToLuminanceMask() are not 
        overridden by any platform. So delete genericConvertToLuminanceMask() and
        move its body to convertToLuminanceMask().

        * platform/graphics/ImageBuffer.h:
        (WebCore::ImageBuffer::draw):
        (WebCore::ImageBuffer::drawPattern):
        (WebCore::ImageBuffer::drawConsuming):
        (WebCore::ImageBuffer::putImageData):
        Make the private functions be public and remove the friend classes.

        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ShadowBlur::blurShadowBuffer):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::transformColorSpace):
        (WebCore::getData):
        (WebCore::ImageBuffer::getImageData const):
        (WebCore::ImageBuffer::putImageData):
        (WebCore::getImageData): Deleted.
        (WebCore::logicalUnit): Deleted.
        (WebCore::backingStoreUnit): Deleted.
        (WebCore::ImageBuffer::getUnmultipliedImageData const): Deleted.
        (WebCore::ImageBuffer::getPremultipliedImageData const): Deleted.
        (WebCore::ImageBuffer::putByteArray): Deleted.
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::getImageData const):
        (WebCore::ImageBuffer::putImageData):
        (WebCore::ImageBuffer::toCFData const):
        (WebCore::ImageBuffer::getUnmultipliedImageData const): Deleted.
        (WebCore::ImageBuffer::getPremultipliedImageData const): Deleted.
        (WebCore::ImageBuffer::putByteArray): Deleted.
        * platform/graphics/cg/ImageBufferDataCG.cpp:
        (WebCore::ImageBufferData::getData const):
        (WebCore::ImageBufferData::putData):
        * platform/graphics/cg/ImageBufferDataCG.h:
        All the rectangles and sizes have to be passed in logical coordinates. To
        deal with the pixels' data we need to scale them by the resolutionScale().

        * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
        (WebCore::FEBlend::platformApplySoftware):
        * platform/graphics/filters/FEColorMatrix.cpp:
        (WebCore::FEColorMatrix::platformApplySoftware):
        * platform/graphics/filters/FEComponentTransfer.cpp:
        (WebCore::FEComponentTransfer::platformApplySoftware):
        * platform/graphics/filters/FEComposite.cpp:
        (WebCore::FEComposite::platformApplySoftware):
        * platform/graphics/filters/FEConvolveMatrix.cpp:
        (WebCore::FEConvolveMatrix::platformApplySoftware):
        * platform/graphics/filters/FEDisplacementMap.cpp:
        (WebCore::FEDisplacementMap::platformApplySoftware):
        * platform/graphics/filters/FEDropShadow.cpp:
        (WebCore::FEDropShadow::platformApplySoftware):
        This was the only place which was passing a rectangle in a the back-end
        coordinates along with BackingStoreCoordinateSystem. Instead we can pass
        the rectangle in logical coordinates and then use ImageData::size() since
        it must be scaled with resolutionScale() when the ImageData is created.

        * platform/graphics/filters/FEGaussianBlur.cpp:
        (WebCore::FEGaussianBlur::platformApplySoftware):
        * platform/graphics/filters/FELighting.cpp:
        (WebCore::FELighting::platformApplySoftware):
        * platform/graphics/filters/FEMorphology.cpp:
        (WebCore::FEMorphology::platformApplySoftware):
        * platform/graphics/filters/FETurbulence.cpp:
        (WebCore::FETurbulence::platformApplySoftware):
        * platform/graphics/filters/FilterEffect.cpp:
        (WebCore::FilterEffect::forceValidPreMultipliedPixels):
        (WebCore::FilterEffect::imageBufferResult):
        (WebCore::FilterEffect::copyUnmultipliedResult):
        (WebCore::FilterEffect::copyPremultipliedResult):
        (WebCore::FilterEffect::createImageBufferResult):
        (WebCore::FilterEffect::createUnmultipliedImageResult):
        (WebCore::FilterEffect::createPremultipliedImageResult):
        * platform/graphics/filters/FilterEffect.h:
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::getData const):
        (WebCore::ImageBufferData::putData):
        * platform/graphics/win/ImageBufferDataDirect2D.h:
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::getImageData const):
        (WebCore::ImageBuffer::putImageData):
        (WebCore::ImageBuffer::getUnmultipliedImageData const): Deleted.
        (WebCore::ImageBuffer::getPremultipliedImageData const): Deleted.
        (WebCore::ImageBuffer::putByteArray): Deleted.
        * rendering/shapes/Shape.cpp:
        (WebCore::Shape::createRasterShape):

2020-02-17  Wenson Hsieh  <wenson_hsieh@apple.com>

        Selection cannot be modified via text interaction in some areas of the compose body field in Gmail
        https://bugs.webkit.org/show_bug.cgi?id=207854
        <rdar://problem/59218824>

        Reviewed by Tim Horton.

        Currently, several codepaths that are consulted when performing text interaction gestures on iOS to make and
        modify text selections (e.g. double taps and long presses) rely on Frame::visiblePositionForPoint to map the
        touch location to a visible editing position on the page. visiblePositionForPoint uses the hit-testing option
        AllowChildFrameContent, which allows it to find and select text within subframes. However, this option also
        includes content in hidden ("visibility: hidden;") frames. This means that text selection gestures on iOS are
        unable to find otherwise selectable text, if a hidden child frame overlaps the text.

        To fix this, we instead use the AllowVisibleChildFrameContentOnly hit-testing option, which will ignore such
        hidden subframes.

        Test: editing/selection/ios/select-text-under-hidden-subframe.html

        * page/Frame.cpp:
        (WebCore::Frame::visiblePositionForPoint const):

2020-02-17  Chris Dumez  <cdumez@apple.com>

        [WK2][Cocoa] Implement in-WebProcess cookie cache to avoid sync IPC for document.cookie in most cases
        https://bugs.webkit.org/show_bug.cgi?id=207593
        <rdar://problem/56027027>

        Reviewed by Antti Koivisto.

        Implement in-WebProcess DOM cookie cache for serving `document.cookie` requests from JavaScript.

        The first time document.cookie is called for a given host, the WebProcess will pull in all the
        non-HTTPOnly cookies for that host from the NetworkProcess (still via sync IPC) and store them
        in an in-memory cookie store. Later document.cookie calls for this host from this WebProcess
        will then leverage the in-memory cookie store and avoid doing a sync IPC to the NetworkProcess
        entirely.

        To maintain the in-process cookie store up-to-date, the WebProcess subscribe for cookie-change
        notifications from the NetworkProcess, only for the hosts it is interested in.

        If the page's JavaScript sets a cookie by setting document.cookie, we will not invalidate the
        cache for performance reasons. Instead, we set the cookie in our in-memory cookie before
        sending the new cookie to the NetworkProcess.

        For compatibility reasons, any sync IPC to a given host will currently invalidate the cookie
        cache for this host. This is because this synchronous load may cause cookies to get set
        synchronously and the page could access document.cookie right after the sync XHR. This behavior
        is covered by the following existing test:
        - http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html

        Another limitation of the current implementation of the cookie cache is that it is currently
        only leveraged for first party content. This is suboptimal and could be improved in a later
        iteration. However, the default behavior in Safari is that third-party iframes do not have
        cookie access unless they request it using the storage access API. We also currently have
        a limit of 5 hosts with cached cookies per WebProcess.

        Tests: http/tests/cookies/document-cookie-after-showModalDialog.html
               http/tests/cookies/document-cookie-during-iframe-parsing.html

        * dom/Document.cpp:
        (WebCore::Document::didLoadResourceSynchronously):
        * dom/Document.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
        * dom/ScriptExecutionContext.h:
        * loader/CookieJar.h:
        * loader/ThreadableLoader.cpp:
        (WebCore::ThreadableLoader::loadResourceSynchronously):
        * page/MemoryRelease.cpp:
        (WebCore::releaseCriticalMemory):
        * page/Settings.yaml:
        * platform/network/NetworkStorageSession.h:
        (WebCore::CookieChangeObserver::~CookieChangeObserver):
        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
        (WebCore::NetworkStorageSession::NetworkStorageSession):
        (WebCore::NetworkStorageSession::cookieStorage const):
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::~NetworkStorageSession):
        (WebCore::NetworkStorageSession::setCookie):
        (WebCore::NetworkStorageSession::setCookies):
        (WebCore::NetworkStorageSession::deleteCookie):
        (WebCore::nsCookiesToCookieVector):
        (WebCore::NetworkStorageSession::nsCookieStorage const):
        (WebCore::createPrivateStorageSession):
        (WebCore::NetworkStorageSession::httpCookies const):
        (WebCore::NetworkStorageSession::deleteHTTPCookie const):
        (WebCore::NetworkStorageSession::setHTTPCookiesForURL const):
        (WebCore::NetworkStorageSession::httpCookiesForURL const):
        (WebCore::filterCookies):
        (WebCore::NetworkStorageSession::cookiesForURL const):
        (WebCore::NetworkStorageSession::cookiesForSession const):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::getRawCookies const):
        (WebCore::NetworkStorageSession::deleteCookiesForHostnames):
        (WebCore::NetworkStorageSession::registerCookieChangeListenersIfNecessary):
        (WebCore::NetworkStorageSession::unregisterCookieChangeListenersIfNecessary):
        (WebCore::NetworkStorageSession::startListeningForCookieChangeNotifications):
        (WebCore::NetworkStorageSession::stopListeningForCookieChangeNotifications):
        (WebCore::NetworkStorageSession::domCookiesForHost):
        (WebCore::NetworkStorageSession::supportsCookieChangeListenerAPI const):

2020-02-17  Chris Dumez  <cdumez@apple.com>

        Defer execution of async scripts until until the document is loaded
        https://bugs.webkit.org/show_bug.cgi?id=207698
        <rdar://problem/57625747>

        Reviewed Antti Koivisto.

        Defer execution of async scripts until until the document is loaded by default to reduce time
        to first paint.

        * dom/ScriptElement.h:
        * dom/ScriptRunner.cpp:
        (WebCore::ScriptRunner::timerFired):
        Make sure we do not defer scripts that were not added by the parser and that do not have the
        'async' attribute set.

        * page/Settings.yaml:

2020-02-17  Youenn Fablet  <youenn@apple.com>

        Do not call whenReady callbacks in case of network process crash
        https://bugs.webkit.org/show_bug.cgi?id=207661

        Reviewed by Chris Dumez.

        * workers/service/WorkerSWClientConnection.cpp:
        (WebCore::WorkerSWClientConnection::~WorkerSWClientConnection):
        The callback is a Function so it is fine not calling it and calling it with a default value is not safe.

2020-02-17  Peng Liu  <peng.liu6@apple.com>

        MediaSource.isTypeSupported() says "video/mp4;codecs=\"avc3.42C015\"" is not supported, but it is
        https://bugs.webkit.org/show_bug.cgi?id=207622

        Reviewed by Eric Carlson.

        Revert the behavior change of MediaPlayerPrivateMediaSourceAVFObjC::supportsType() in r253952.

        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
        (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):

2020-02-17  Youenn Fablet  <youenn@apple.com>

        WebSocketChannelInspector.cpp should include ProgressTracker.h
        https://bugs.webkit.org/show_bug.cgi?id=207862

        Unreviewed, build fix.

        * Modules/websockets/WebSocketChannelInspector.cpp:

2020-02-17  Mark Lam  <mark.lam@apple.com>

        getVTablePointer() should return a const void*.
        https://bugs.webkit.org/show_bug.cgi?id=207871
        <rdar://problem/59525721>

        Reviewed by Yusuke Suzuki.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::toJSNewlyCreated):

2020-02-17  Rob Buis  <rbuis@igalia.com>

        Main implementation for lazy image loading
        https://bugs.webkit.org/show_bug.cgi?id=200764

        Reviewed by Darin Adler.

        Implement lazy image loading as specified here [1]. Lazy image loading
        is controlled by the loading attribute on <img>. When the loading attribute is
        not specified, the behavior is like before this patch, i.e. loading is
        eager.

        Not all loading=lazy requests will turn into actual lazy image loads, when
        scripting is turned off they will not be deferred [2].

        This implementation relies on Intersection Observer and hence works on WK2 only.

        Deferred images are painted using a simple outline until fully loaded.

        [1] https://html.spec.whatwg.org/#attr-img-loading
        [2] https://html.spec.whatwg.org/#will-lazy-load-image-steps

        Tests: http/tests/lazyload/attribute.html
               http/tests/lazyload/js-image.html
               http/tests/lazyload/lazy-image-load-in-iframes-scripting-disabled.html
               http/tests/lazyload/lazy-image-load-in-iframes-scripting-enabled.html
               http/tests/lazyload/lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/below-viewport-image-loading-lazy-load-event.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-eager.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-eager.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-below-viewport-dynamic.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-cross-origin-ifame-001.sub.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-cross-origin-ifame-002.sub.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-script-disabled-iframe.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-viewport-dynamic.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-document.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-multicol.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/invisible-image.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/move-element-and-scroll.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-image-loading-lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-crossorigin-applied.sub.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/original-referrer-policy-applied.sub.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/picture-loading-lazy.html
               imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/remove-element-and-scroll.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::lazyLoadImageObserver):
        * dom/Document.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::create):
        (WebCore::HTMLImageElement::hasLazyLoadableAttributeValue):
        (WebCore::HTMLImageElement::parseAttribute):
        (WebCore::HTMLImageElement::loadDeferredImage):
        (WebCore::HTMLImageElement::didMoveToNewDocument):
        (WebCore::HTMLImageElement::loadingForBindings const):
        (WebCore::HTMLImageElement::setLoadingForBindings):
        (WebCore::HTMLImageElement::isDeferred const):
        (WebCore::HTMLImageElement::isLazyLoadable const):
        * html/HTMLImageElement.h:
        (WebCore::HTMLImageElement::createdByParser const): Deleted.
        * html/HTMLImageElement.idl:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::didMoveToNewDocument):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
        * html/HTMLTagNames.in:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::didMoveToNewDocument):
        * html/LazyLoadImageObserver.cpp: Added.
        (WebCore::LazyLoadImageObserver::observe):
        (WebCore::LazyLoadImageObserver::unobserve):
        (WebCore::LazyLoadImageObserver::intersectionObserver):
        (WebCore::LazyLoadImageObserver::isObserved const):
        * html/LazyLoadImageObserver.h: Added.
        (WebCore::LazyLoadImageObserver::create):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement):
        (WebCore::ImageLoader::notifyFinished):
        (WebCore::ImageLoader::elementDidMoveToNewDocument):
        (WebCore::ImageLoader::loadDeferredImage):
        * loader/ImageLoader.h:
        (WebCore::ImageLoader::isDeferred const):
        * loader/cache/CachedImage.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestImage):
        (WebCore::CachedResourceLoader::requestResource):
        (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
        (WebCore::CachedResourceLoader::clientDefersImage const):
        (WebCore::CachedResourceLoader::shouldDeferImageLoad const):
        (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
        * loader/cache/CachedResourceLoader.h:
        * rendering/RenderImage.cpp:
        (WebCore::isDeferredImage):
        (WebCore::RenderImage::paintReplaced):
        * svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::didMoveToNewDocument):

2020-02-17  Zalan Bujtas  <zalan@apple.com>

        Inline boxes for images that represent nothing should collapse to empty.
        https://bugs.webkit.org/show_bug.cgi?id=207740
        <rdar://problem/57339992>

        Reviewed by Darin Adler.

        Tests: fast/images/inline-image-box-with-no-alt-should-collapse-no-quirks.html
               fast/images/inline-image-box-with-no-alt-should-collapse-quirks.html

        Let's collapse inline boxes when we would display a broken image only and
        1. alt attribute is explicitly set to empty and
        2. both height and width are auto or we are in standards mode.

        https://html.spec.whatwg.org/multipage/rendering.html#images-3

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::shouldCollapseToEmpty const):
        (WebCore::RenderImage::computeReplacedLogicalWidth const):
        (WebCore::RenderImage::computeReplacedLogicalHeight const):
        (WebCore::RenderImage::imageChanged):
        (WebCore::RenderImage::layout):
        * rendering/RenderImage.h:

2020-02-17  Peng Liu  <peng.liu6@apple.com>

        Fix check-webkit-style errors related to AVFoundationSPI.h
        https://bugs.webkit.org/show_bug.cgi?id=207834

        Reviewed by Eric Carlson.

        No new tests, no functional change.

        This patch fixes check-webkit-style errors, especially the ones related to soft-link headers.
        The soft-link headers should be included after other headers.

        * platform/audio/ios/AudioSessionIOS.mm:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm:
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
        * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

2020-02-17  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Null Ptr Deref @ WebCore::Node::Treescope
        https://bugs.webkit.org/show_bug.cgi?id=207748

        Reviewed by Darin Adler.

        Added a check for isTextField after updateLayoutIgnorePendingStylesheets as that could cause modification of input element type.

        Test: editing/selection/ignore-selection-range-on-input-style-change.html

        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::setSelectionRange):

2020-02-17  Youenn Fablet  <youenn@apple.com>

        Add WebInspector support to WebKit::WebSocketChannel
        https://bugs.webkit.org/show_bug.cgi?id=207794

        Reviewed by Darin Adler.

        Add a wrapper around Inspector for using it in WebInspector.
        This allows getting preliminary support of WebInspector for the new WebSocket path.

        * Modules/websockets/WebSocketChannelInspector.cpp: Added.
        (WebCore::WebSocketChannelInspector::WebSocketChannelInspector):
        (WebCore::WebSocketChannelInspector::didCreateWebSocket):
        (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest):
        (WebCore::WebSocketChannelInspector::didReceiveWebSocketHandshakeResponse):
        (WebCore::WebSocketChannelInspector::didCloseWebSocket):
        (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrame):
        (WebCore::WebSocketChannelInspector::didSendWebSocketFrame):
        (WebCore::WebSocketChannelInspector::didReceiveWebSocketFrameError):
        * Modules/websockets/WebSocketChannelInspector.h: Added.
        * Modules/websockets/WebSocketFrame.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2020-02-17  Youenn Fablet  <youenn@apple.com>

        Validate scopeURL is valid when reading it from the database
        https://bugs.webkit.org/show_bug.cgi?id=207721

        Reviewed by Darin Adler.

        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::importRecords):
        In case scopeURL is not good, skip the registration, as done for other registration parameters.

2020-02-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][Out-of-flow] FormattingContext::computeOutOfFlowHorizontalGeometry needs verticalConstraints
        https://bugs.webkit.org/show_bug.cgi?id=207832
        <rdar://problem/59499844>

        Reviewed by Dean Jackson.

        Test: fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html

        Inline replaced width computation needs the value of the computed content height. In case of percentage value, in order to
        resolve it we need the containing block's height. At this point the containing block's vertical values are usually not
        computed yet, unless the current box happens to be an out-of-flow.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

2020-02-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineLayoutContext::nextContentForLine should be able to handle regular inline boxes
        https://bugs.webkit.org/show_bug.cgi?id=207829
        <rdar://problem/59498031>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/simple-inline-block.html

        Add missing inline box handling.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::nextContentForLine):

2020-02-17  James Darpinian  <jdarpinian@chromium.org>

        ANGLE: Fix object deletion behavior.
        https://bugs.webkit.org/show_bug.cgi?id=205610

        Fixes WebGL conformance tests object-deletion-behavior.html and vertex-array-object.html.

        Reviewed by Dean Jackson.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
            No error when getting attachment name with a null attachment.
        * html/canvas/WebGLObject.cpp:
        (WebCore::WebGLObject::deleteObject):
            Don't delay deleting objects when using ANGLE, becuase ANGLE handles object
            deletion correctly with WebGL semantics. This fixes some conformance tests
            including vertex-array-object.html.
        * html/canvas/WebGLObject.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::checkObjectToBeBound):
            Always generate INVALID_OPERATION when the object is deleted.
        (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding):
        (WebCore::WebGLRenderingContextBase::bindFramebuffer):
        (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
        (WebCore::WebGLRenderingContextBase::bindTexture):
        (WebCore::WebGLRenderingContextBase::useProgram):
        * html/canvas/WebGLRenderingContextBase.h:

2020-02-17  Per Arne Vollan  <pvollan@apple.com>

        Use CF prefs direct mode in the WebContent process
        https://bugs.webkit.org/show_bug.cgi?id=203420

        Reviewed by Brent Fulgham.

        Add Internals functions to read preferences.

        API tests: Tests added in PreferenceChanges.mm.

        * testing/Internals.cpp:
        (WebCore::Internals::readPreferenceInteger):
        (WebCore::Internals::encodedPreferenceValue):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/Internals.mm:
        (WebCore::Internals::encodedPreferenceValue):

2020-02-17  Youenn Fablet  <youenn@apple.com>

        Do not send the client URL to network process
        https://bugs.webkit.org/show_bug.cgi?id=207803

        Reviewed by Darin Adler.

        Instead of sending the client URL through threads and IPC, we can retrieve it in NetworkProcess from the client identifier.
        Implement this, as this is more efficient and safer.
        No change of behavior.

        * workers/service/SWClientConnection.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::unregisterRegistration):
        * workers/service/WorkerSWClientConnection.cpp:
        (WebCore::WorkerSWClientConnection::scheduleUnregisterJobInServer):
        * workers/service/WorkerSWClientConnection.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::scheduleUnregisterJob):
        * workers/service/server/SWServer.h:

2020-02-17  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        a lot gcc warnings because of %{public}s format specifier
        https://bugs.webkit.org/show_bug.cgi?id=207478

        Reviewed by Darin Adler.

        Add PUBLIC_LOG_STRING macro which is defined depending on if
        os_log()[1] is used or rather old printf().

        OS Logging processes format specifiers for privacy matters, for
        example dynamic strings, which demands %{public}s. But these
        specifiers are not valid for printf().

        Calls to logging with this specifier, if they are not Mac/Darwing
        exclusive, use this new macro to avoid gcc warnings.

        1. https://developer.apple.com/documentation/os/logging?language=objc

        No new tests. Covered by existing tests.

        * loader/AdClickAttribution.cpp:
        (WebCore::AdClickAttribution::parseConversionRequest):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::doReleaseLogging):
        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::openSQLiteDatabase):

2020-02-17  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: index cursor iteration is slow when there are a lot of index records from different object stores
        https://bugs.webkit.org/show_bug.cgi?id=207377
        <rdar://problem/59288679>

        Reviewed by Brady Eidson.

        Make the Index of IndexRecords table include indexID since we always perform search with indexID.
        This would let SQLite optimize the index statement in SQLiteCursor with Covering Index and fix the slowness.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
        (WebCore::IDBServer::v1IndexRecordsIndexSchema): Deleted.

2020-02-17  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove ReplacedBox::m_layoutBox
        https://bugs.webkit.org/show_bug.cgi?id=207830
        <rdar://problem/59498829>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/simple-absolute-positioned-inline-element.html

        This is not needed after r256380 ([LFC] Introduce Layout::ReplacedBox).

        * layout/layouttree/LayoutReplacedBox.cpp:
        (WebCore::Layout::ReplacedBox::hasIntrinsicWidth const):
        (WebCore::Layout::ReplacedBox::hasIntrinsicHeight const):
        (WebCore::Layout::ReplacedBox::intrinsicWidth const):
        (WebCore::Layout::ReplacedBox::intrinsicHeight const):
        (WebCore::Layout::ReplacedBox::hasAspectRatio const):
        * layout/layouttree/LayoutReplacedBox.h:

2020-02-17  Zalan Bujtas  <zalan@apple.com>

        [LFC] The initial containing block does not necessarily have in-flow content.
        https://bugs.webkit.org/show_bug.cgi?id=207833
        <rdar://problem/59500650>

        Reviewed by Antti Koivisto.

        Test: fast/layoutformattingcontext/html-is-absolute-positioned.html

        When the <html> is out-of-flow positioned, the initial containing block has no in-flow direct children.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):

2020-02-17  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Use builtin targets
        https://bugs.webkit.org/show_bug.cgi?id=205166

        Reviewed by Darin Adler.

        * CMakeLists.txt:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * platform/Curl.cmake:
        * platform/FreeType.cmake:
        * platform/ImageDecoders.cmake:

2020-02-17  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Use shared single thread for WebSocket connections
        https://bugs.webkit.org/show_bug.cgi?id=187984

        Reviewed by Fujii Hironori.

        This patch suppresses invoking worker threads for websocket connections.
        CurlStreamScheduler starts up to one worker thread.

        No new tests. Covered by existing WebSocket tests.

        * platform/Curl.cmake:
        * platform/network/curl/CurlContext.cpp:
        (WebCore::CurlContext::streamScheduler):
        (WebCore::CurlHandle::getActiveSocket):
        (WebCore::CurlHandle::send):
        (WebCore::CurlHandle::receive):
        (WebCore::CurlSocketHandle::CurlSocketHandle): Deleted.
        (WebCore::CurlSocketHandle::connect): Deleted.
        (WebCore::CurlSocketHandle::send): Deleted.
        (WebCore::CurlSocketHandle::receive): Deleted.
        (WebCore::CurlSocketHandle::wait): Deleted.
        * platform/network/curl/CurlContext.h:
        * platform/network/curl/CurlStream.cpp: Added.
        (WebCore::CurlStream::CurlStream):
        (WebCore::CurlStream::~CurlStream):
        (WebCore::CurlStream::destroyHandle):
        (WebCore::CurlStream::send):
        (WebCore::CurlStream::appendMonitoringFd):
        (WebCore::CurlStream::tryToTransfer):
        (WebCore::CurlStream::tryToReceive):
        (WebCore::CurlStream::tryToSend):
        (WebCore::CurlStream::notifyFailure):
        * platform/network/curl/CurlStream.h: Added.
        (WebCore::CurlStream::create):
        * platform/network/curl/CurlStreamScheduler.cpp: Added.
        (WebCore::CurlStreamScheduler::CurlStreamScheduler):
        (WebCore::CurlStreamScheduler::~CurlStreamScheduler):
        (WebCore::CurlStreamScheduler::createStream):
        (WebCore::CurlStreamScheduler::destroyStream):
        (WebCore::CurlStreamScheduler::send):
        (WebCore::CurlStreamScheduler::callOnWorkerThread):
        (WebCore::CurlStreamScheduler::callClientOnMainThread):
        (WebCore::CurlStreamScheduler::startThreadIfNeeded):
        (WebCore::CurlStreamScheduler::stopThreadIfNoMoreJobRunning):
        (WebCore::CurlStreamScheduler::executeTasks):
        (WebCore::CurlStreamScheduler::workerThread):
        * platform/network/curl/CurlStreamScheduler.h: Added.
        * platform/network/curl/SocketStreamHandleImpl.h:
        (WebCore::SocketStreamHandleImpl::isStreamInvalidated):
        * platform/network/curl/SocketStreamHandleImplCurl.cpp:
        (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
        (WebCore::SocketStreamHandleImpl::~SocketStreamHandleImpl):
        (WebCore::SocketStreamHandleImpl::platformSendInternal):
        (WebCore::SocketStreamHandleImpl::platformClose):
        (WebCore::SocketStreamHandleImpl::didOpen):
        (WebCore::SocketStreamHandleImpl::didSendData):
        (WebCore::SocketStreamHandleImpl::didReceiveData):
        (WebCore::SocketStreamHandleImpl::didFail):
        (WebCore::SocketStreamHandleImpl::destructStream):
        (WebCore::SocketStreamHandleImpl::threadEntryPoint): Deleted.
        (WebCore::SocketStreamHandleImpl::handleError): Deleted.
        (WebCore::SocketStreamHandleImpl::stopThread): Deleted.
        (WebCore::SocketStreamHandleImpl::callOnWorkerThread): Deleted.
        (WebCore::SocketStreamHandleImpl::executeTasks): Deleted.

2020-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Use custom theme style to render buttons
        https://bugs.webkit.org/show_bug.cgi?id=207471

        Reviewed by Adrian Perez de Castro.

        This includes push, check and radio buttons.

        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::supportsFocusRing const): Return true for buttons.
        (WebCore::RenderThemeWPE::paintMenuList): Move mthe code to Theme and use ThemeWPE::paintButton() +
        ThemeWPE::paintFocus().
        * platform/wpe/ThemeWPE.cpp:
        (WebCore::ThemeWPE::paintFocus): Moved from RenderThemeWPE, adding the offset as a parameter.
        (WebCore::ThemeWPE::paint): Remove part parameter from call to paintButton().
        (WebCore::ThemeWPE::paintCheckbox):
        (WebCore::ThemeWPE::paintRadio):
        (WebCore::ThemeWPE::paintButton):
        * platform/wpe/ThemeWPE.h:

2020-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        Search cancel button becomes visible when there's a hover effect in CSS
        https://bugs.webkit.org/show_bug.cgi?id=207328

        Reviewed by Adrian Perez de Castro.

        Use a custom style resolver for search cancel button element to ensure it's always hidden when the input element
        is empty.

        Test: fast/forms/search-cancel-button-hover.html

        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): Call setHasCustomStyleResolveCallbacks().
        (WebCore::SearchFieldCancelButtonElement::resolveCustomStyle): Set the render style visibility depending on
        input current value.
        * html/shadow/TextControlInnerElements.h:

2020-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Use custom theme style to render text fields
        https://bugs.webkit.org/show_bug.cgi?id=207379

        Reviewed by Adrian Perez de Castro.

        This includes text entries, text areas and search fields. The search field icons are rendered using an extra
        default style sheet for the theme, using Adwaita svg icons in the CSS.

        * PlatformWPE.cmake:
        * css/themeAdwaita.css: Added.
        (input[type="search"]::-webkit-search-results-button,):
        (input[type="search"]::-webkit-search-results-button:hover,):
        (input[type="search"]::-webkit-search-cancel-button):
        (body[dir="rtl"] input[type="search"]::-webkit-search-cancel-button):
        (input[type="search"]::-webkit-search-cancel-button:hover):
        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::supportsFocusRing const): Return true for TextFieldPart, TextAreaPart and SearchFieldPart.
        (WebCore::RenderThemeWPE::extraDefaultStyleSheet): Return themeAdwaita.css.
        (WebCore::RenderThemeWPE::paintTextField):
        (WebCore::RenderThemeWPE::paintTextArea):
        (WebCore::RenderThemeWPE::paintSearchField):
        * platform/wpe/RenderThemeWPE.h:

2020-02-16  Peng Liu  <peng.liu6@apple.com>

        Remove class VideoLayerManager since it is not used
        https://bugs.webkit.org/show_bug.cgi?id=207800

        Reviewed by Eric Carlson.

        No behavior change.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/VideoLayerManager.h: Removed.
        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h:
        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
        (WebCore::VideoLayerManagerObjC::VideoLayerManagerObjC):

2020-02-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        Remove remaining WTF_EXPORT and WTF_IMPORT by replacing them with WTF_EXPORT_DECLARATION and WTF_IMPORT_DECLARATION
        https://bugs.webkit.org/show_bug.cgi?id=207746

        Reviewed by Don Olmstead.

        * platform/PlatformExportMacros.h:

2020-02-16  Alexey Shvayka  <shvaikalesh@gmail.com>

        Implement EventTarget constructor
        https://bugs.webkit.org/show_bug.cgi?id=174313

        Reviewed by Darin Adler.

        Currently, EventTarget can't be directly constructed or be subclassed in JavaScript.
        The spec for EventTarget was updated (https://github.com/whatwg/dom/pull/467) to allow
        constructing and subclassing EventTarget. This feature was shipped in Chrome 64 and Firefox 59.

        This patch introduces EventTargetConcrete class, a user-constructable version of EventTarget,
        exposed as "EventTarget" to JavaScript. We don't use EventTarget directly because it is an abstract
        class and making it non-abstract is unfavorable due to size increase of EventTarget and all of its
        subclasses with code that is mostly unnecessary for them, resulting in a performance decrease.

        To prevent definition of specific to EventTargetConcrete `toJS` and `toJSNewlyCreated` functions,
        we don't define EventTargetConcrete interface type, but rather tweak make_event_factory.pl to
        default to base interface (like it does for Event).

        To allow subclassing of all DOM constructors, non-custom ones replace structures of newly created
        wrapper objects with ones returned by InternalFunction::createSubclassStructure. Per WebIDL spec [1],
        `setSubclassStructureIfNeeded` helper uses realm of `newTarget` for default prototypes.

        This approach was chosen because a) detecting [[Construct]] with callFrame->newTarget() is
        unreliable outside constructor, and b) passing `newTarget` down to `createWrapper` via
        `toJSNewlyCreated` is quite awkward and would result in massive code change.

        [1] https://heycam.github.io/webidl/#internally-create-a-new-object-implementing-the-interface
        (step 3.3.2)

        Tests: fast/dom/dom-constructors.html
               imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/constructors.html
               imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors.html
               imported/w3c/web-platform-tests/dom/events/EventTarget-constructible.any.html
               imported/w3c/web-platform-tests/dom/idlharness.window.html

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMWrapperCache.h:
        (WebCore::setSubclassStructureIfNeeded):
        * bindings/js/JSEventTargetCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateConstructorDefinition):
        * bindings/scripts/InFilesCompiler.pm:
        (generateInterfacesHeader):
        * bindings/scripts/test/JS/*: Adjust bindings expectations.
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::create):
        * dom/EventTarget.h:
        * dom/EventTarget.idl:
        * dom/EventTargetConcrete.cpp: Added.
        * dom/EventTargetConcrete.h: Added.
        * dom/make_event_factory.pl:
        (generateImplementation):

2020-02-16  Brady Eidson  <beidson@apple.com>

        Expose "allowsContentJavaScript" on WKWebpagePreferences
        <rdar://problem/51534967> and https://bugs.webkit.org/show_bug.cgi?id=207427

        Reviewed by Darin Adler.

        Covered by new API tests.

        * dom/Document.cpp:
        (WebCore::Document::allowsContentJavaScript const):
        * dom/Document.h:
        
        * dom/ScriptableDocumentParser.cpp:
        (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
        
        * loader/FrameLoaderClient.h:
        * loader/FrameLoaderTypes.h:
        
        * page/Settings.yaml:
        
        * xml/XMLHttpRequest.cpp: Make sure the context document is set BEFORE we parse the document contents.

2020-02-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][Float] Simplify BlockFormattingContext::usedAvailableWidthForFloatAvoider
        https://bugs.webkit.org/show_bug.cgi?id=207823
        <rdar://problem/59490669>

        Reviewed by Antti Koivisto.

        The containing block of this float avoider is either a non-avoider or a formatting context root avoider,
        so we don't have to map the left position (and now LFC passes fast/block/block-only again).

        * layout/FormattingContext.cpp:
        (WebCore::Layout::mapHorizontalPositionToAncestor): Deleted.
        (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const): Deleted.
        (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const): Deleted.
        (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const): Deleted.
        * layout/FormattingContext.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):

2020-02-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Formatting context roots position their own relative children
        https://bugs.webkit.org/show_bug.cgi?id=207822
        <rdar://problem/59490353>

        Reviewed by Antti Koivisto.

        Since FCs are responsible for positioning their relative positioned children, we
        don't have to do it as part of the final positioning.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        * layout/blockformatting/BlockFormattingContext.h:

2020-02-16  Zalan Bujtas  <zalan@apple.com>

        [LFC] A box establishing an independent formatting context is not a float avoider
        https://bugs.webkit.org/show_bug.cgi?id=207820
        <rdar://problem/59490056>

        Reviewed by Antti Koivisto.

        Since the independent formatting context does not inherit the parent's floating context,
        the box's content essentially ignores the floats and the box itself does not avoid them either
        (aka its position is independent of the floats in the same context).

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isFloatAvoider const):

2020-02-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] FloatingContext::positionForFloat needs the horizontal constrains
        https://bugs.webkit.org/show_bug.cgi?id=207818
        <rdar://problem/59489777>

        Reviewed by Antti Koivisto.

        We need to access the containing block's geometry (horizontal constraints) to align a floating positioned
        box in an empty floating context.

        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::positionForFloat const):

2020-02-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Fix horizontal/verticalConstraintsForAncestor in BlockFormattingContext::precomputeVerticalPositionForAncestors
        https://bugs.webkit.org/show_bug.cgi?id=207817
        <rdar://problem/59489735>

        Reviewed by Antti Koivisto.

        horizontalConstraintsForAncestor/verticalConstraintsForAncestor should return the constraints (containing block's content box width etc)
        of the ancestor.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors):

2020-02-15  Adrian Perez de Castro  <aperez@igalia.com>

        [GStreamer] Build failure with Clang/libc++ due to missing WallTime→float for std::isnan()
        https://bugs.webkit.org/show_bug.cgi?id=207757

        Unreviewed build fix.

        No new tests needed.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (CachedResourceStreamingClient::dataReceived): Add std:: namespace to overloaded
        std::isnan() function call to ensure that the overloaded version for WTF::WallTime
        is used.

2020-02-15  Adrian Perez de Castro  <aperez@igalia.com>

        Unreviewed build fix for non-unified builds.

        No new tests needed.

        * animation/AnimationEventBase.cpp: Add missing include.
        * animation/DeclarativeAnimation.cpp: Ditto.

2020-02-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] ConstraintsPair is only needed for the pre-computed vertical position
        https://bugs.webkit.org/show_bug.cgi?id=207814
        <rdar://problem/59485612>

        Reviewed by Antti Koivisto.

        After r256099 (Pre-compute vertical position only when we really need it), ConstraintsPair<> is only
        needed in few functions.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:

2020-02-15  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce OutOfFlowHorizontalConstraints
        https://bugs.webkit.org/show_bug.cgi?id=207805
        <rdar://problem/59482286>

        Reviewed by Antti Koivisto.

        Borders and paddings are resolved against the containing block's content box as if the box was an in-flow box.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::horizontalConstraintsForOutOfFlow):
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

2020-02-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Anonymous inline boxes/line break boxes do not generate Display::Boxes
        https://bugs.webkit.org/show_bug.cgi?id=207802
        <rdar://problem/59480138>

        Reviewed by Antti Koivisto.

        1. Painting should not expect a Display::Box per Layout::Box.
        2. Do not generate empty Display::Boxes for anonymous inline text boxes/line breaks. 

        * layout/FormattingState.cpp:
        (WebCore::Layout::FormattingState::displayBox):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintSubtree):
        (WebCore::Display::collectPaintRootsAndContentRect):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

2020-02-14  Jon Lee  <jonlee@apple.com>

        Mask WebGL strings
        https://bugs.webkit.org/show_bug.cgi?id=207608

        Reviewed by Dean Jackson.

        Test: platform/mac/webgl/fingerprinting-strings.html

        Add new experimental feature to mask WebGL vendor, renderer, and shading language strings.

        * html/canvas/WebGL2RenderingContext.cpp: Whitespace cleanup also.
        (WebCore::WebGL2RenderingContext::getParameter): Check against the runtime feature to return the
        old string.
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getParameter): Ditto.
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setMaskWebGLStringsEnabled):
        (WebCore::RuntimeEnabledFeatures::maskWebGLStringsEnabled const):

2020-02-14  Youenn Fablet  <youenn@apple.com>

        Simplify WebProcess handling of unregistering of service workers
        https://bugs.webkit.org/show_bug.cgi?id=207669

        Reviewed by Chris Dumez.

        Instead of creating a job in WebProcess, we now create it at SWServer level.
        This allows the ServiceWorkerContainer to only provide the service worker registration identifier
        to start the unregistering process.
        To simplify things, a completion handler is used to resolve the promise once the unregister job run.

        This allows to send less information from ServiceWorkerContainer to SWServer through IPC.

        No observable change of behavior.

        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::unregistrationJobResolvedInServer): Deleted.
        * workers/service/SWClientConnection.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::unregisterRegistration):
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerJobData.cpp:
        (WebCore::serviceWorkerOrClientIdentifier):
        (WebCore::ServiceWorkerJobData::ServiceWorkerJobData):
        * workers/service/ServiceWorkerJobData.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::unregister):
        * workers/service/WorkerSWClientConnection.cpp:
        (WebCore::WorkerSWClientConnection::scheduleUnregisterJobInServer):
        * workers/service/WorkerSWClientConnection.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::scheduleUnregisterJob):
        * workers/service/server/SWServer.h:

2020-02-14  Nikos Mouchtaris  <nmouchtaris@apple.com>

        new FontFace() should not throw when failing to parse arguments
        https://bugs.webkit.org/show_bug.cgi?id=205770

        Reviewed by Myles Maxfield.

        Change FontFace constructor to conform to API specification:
        https://drafts.csswg.org/css-font-loading/#dom-fontface-fontface.
        No longer throws. For parsing failure, now rejects promise, sets 
        status to error, and sets FontFace members to default string.

        Test: http/tests/css/font-face-constructor.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::setErrorState):
        * css/CSSFontFace.h:
        * css/CSSFontFaceSet.cpp:
        (WebCore::CSSFontFaceSet::addToFacesLookupTable):
        (WebCore::CSSFontFaceSet::remove):
        (WebCore::CSSFontFaceSet::fontFace):
        * css/CSSSegmentedFontFace.cpp:
        (WebCore::CSSSegmentedFontFace::fontRanges):
        * css/FontFace.cpp:
        (WebCore::FontFace::setErrorState):
        (WebCore::FontFace::create):
        (WebCore::FontFace::family const):
        (WebCore::FontFace::style const):
        (WebCore::FontFace::weight const):
        (WebCore::FontFace::stretch const):
        (WebCore::FontFace::unicodeRange const):
        (WebCore::FontFace::featureSettings const):
        (WebCore::FontFace::display const):
        (WebCore::FontFace::fontStateChanged):
        * css/FontFace.h:
        * css/FontFace.idl:

2020-02-14  Youenn Fablet  <youenn@apple.com>

        Introduce MediaStreamPrivate::forEachTrack
        https://bugs.webkit.org/show_bug.cgi?id=207773

        Reviewed by Eric Carlson.

        Introduce forEachTrack to allow read-only iterating through the tracks.
        This is more efficient than copying the tracks.
        Add a helper routine to select the tracks to record in MediaRecorderPrivate.
        No change of behavior.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState):
        * platform/mediarecorder/MediaRecorderPrivate.cpp: Added.
        (WebCore::MediaRecorderPrivate::selectTracks):
        * platform/mediarecorder/MediaRecorderPrivate.h:
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::forEachTrack const):
        * platform/mediastream/MediaStreamPrivate.h:

2020-02-14  Pavel Feldman  <pavel.feldman@gmail.com>

        [Curl] Implement NetworkStorageSession::get/set/deleteCookie
        https://bugs.webkit.org/show_bug.cgi?id=207450

        Reviewed by Don Olmstead.

        * platform/network/curl/CookieJarCurl.cpp:
        (WebCore::CookieJarCurl::getAllCookies const):
        (WebCore::CookieJarCurl::setCookie const):
        (WebCore::CookieJarCurl::deleteCookie const):
        * platform/network/curl/CookieJarCurl.h:
        * platform/network/curl/CookieJarDB.cpp:
        (WebCore::CookieJarDB::getAllCookies):
        * platform/network/curl/CookieJarDB.h:
        * platform/network/curl/NetworkStorageSessionCurl.cpp:
        (WebCore::NetworkStorageSession::NetworkStorageSession):
        (WebCore::NetworkStorageSession::setCookie):
        (WebCore::NetworkStorageSession::deleteCookie):
        (WebCore::NetworkStorageSession::getAllCookies):

2020-02-14  Nikos Mouchtaris  <nmouchtaris@apple.com>

        WebKit support for Apple Pay Buttons with custom corner radii
        https://bugs.webkit.org/show_bug.cgi?id=207664
        <rdar://problem/43718114> 

        Reviewed by Andy Estes.

        Added support for border-radius css property for apple pay
        button drawing.

        Modified old tests to test this new behavior.

        * rendering/RenderThemeCocoa.mm:
        (WebCore::RenderThemeCocoa::paintApplePayButton):

2020-02-14  Antoine Quint  <graouts@webkit.org>

        [Web Animations] Missing call to DocumentTimeline::resumeAnimations() in Frame::resumeActiveDOMObjectsAndAnimations()
        https://bugs.webkit.org/show_bug.cgi?id=207784
        <rdar://problem/59251858>

        Reviewed by Dean Jackson.

        After auditing the code, there was one call to CSSAnimationController::resumeAnimationsForDocument() that missed a matching DocumentTimeline::resumeAnimations()
        call should the Web Animations flag be on.

        * page/Frame.cpp:
        (WebCore::Frame::resumeActiveDOMObjectsAndAnimations):

2020-02-14  Yusuke Suzuki  <ysuzuki@apple.com>

        NetworkLoadMetrics should be shared by multiple ResourceResponse instances
        https://bugs.webkit.org/show_bug.cgi?id=207747

        Reviewed by Keith Miller.

        ResourceResponse is value data, and it is copied multiple times in various places, (1) to create a new ResourceResponse
        which has slightly different fields, or (1) to hold ResourceResponse even after loading finishes. For example, DocumentLoader
        has Vector<ResourceResponse> to replay response dispatching in the case of loading from BackForwardCache. The problem is
        that ResourceResponse is very large: 440 bytes.

        While we sometimes copy ResourceResponse to modify some part of it, NetworkLoadMetrics is immutable. It is set when response is created,
        and is never changed. And NetworkLoadMetrics is large: sizeof(NetworkLoadMetrics) is 184 bytes. Given that we have multiple
        copies of ResourceResponse in WebCore, we should share NetworkLoadMetrics by them.

        This patch puts Box<NetworkLoadMetrics> in ResourceResponse to share it with all copied ResourceResponses. We do not make NetworkLoadMetrics
        RefCounted<> for now since some legit data structures embed NetworkLoadMetrics. This patch adds ArgumentCoder for Box so that we
        can encode / decode Box<NetworkLoadMetrics> in ResourceResponse in IPC. To ensure NetworkLoadMetrics in ResourceResponse immutable,
        we add ResourceResponse::setDeprecatedNetworkLoadMetrics instead of modifying NetworkLoadMetrics already created in ResourceResponse.

        We also attempt to compact ResourceResponse more by using bit-fields. And removing m_isValid field in ParsedContentRange since
        this can be represented by the different field. These changes make sizeof(ResourceResponse) from 440 to 248.

        No behavior change.

        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::buildObjectForTiming):
        (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
        * inspector/agents/InspectorNetworkAgent.h:
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::loadRequest):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didFinishLoading):
        * page/PerformanceTiming.cpp:
        (WebCore::PerformanceTiming::domainLookupStart const):
        (WebCore::PerformanceTiming::domainLookupEnd const):
        (WebCore::PerformanceTiming::connectStart const):
        (WebCore::PerformanceTiming::connectEnd const):
        (WebCore::PerformanceTiming::secureConnectionStart const):
        (WebCore::PerformanceTiming::requestStart const):
        (WebCore::PerformanceTiming::responseStart const):
        * platform/network/NetworkLoadMetrics.h:
        * platform/network/ParsedContentRange.cpp:
        (WebCore::areContentRangeValuesValid):
        (WebCore::parseContentRange):
        (WebCore::ParsedContentRange::ParsedContentRange):
        (WebCore::ParsedContentRange::headerValue const):
        * platform/network/ParsedContentRange.h:
        (WebCore::ParsedContentRange::isValid const):
        (WebCore::ParsedContentRange::invalidValue):
        (WebCore::ParsedContentRange::MarkableTraits::isEmptyValue):
        (WebCore::ParsedContentRange::MarkableTraits::emptyValue):
        (WebCore::ParsedContentRange::ParsedContentRange): Deleted.
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::ResourceResponseBase):
        (WebCore::ResourceResponseBase::crossThreadData const):
        (WebCore::ResourceResponseBase::fromCrossThreadData):
        (WebCore::ResourceResponseBase::compare):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::deprecatedNetworkLoadMetricsOrNull const):
        (WebCore::ResourceResponseBase::setDeprecatedNetworkLoadMetrics):
        (WebCore::ResourceResponseBase::encode const):
        (WebCore::ResourceResponseBase::decode):
        (WebCore::ResourceResponseBase::deprecatedNetworkLoadMetrics const): Deleted.
        * platform/network/cf/ResourceResponse.h:
        (WebCore::ResourceResponse::ResourceResponse):
        * platform/network/cocoa/NetworkLoadMetrics.mm:
        (WebCore::copyTimingData):
        * platform/network/curl/CurlResourceHandleDelegate.cpp:
        (WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):
        * platform/network/curl/ResourceResponse.h:
        * platform/network/curl/ResourceResponseCurl.cpp:
        (WebCore::ResourceResponse::setDeprecatedNetworkLoadMetrics): Deleted.
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::getConnectionTimingData):
        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):

2020-02-14  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of AXIsolatedObject::isDescendantOfObject.
        https://bugs.webkit.org/show_bug.cgi?id=207697

        Reviewed by Chris Fleizach.

        - Moved the implementation of AccessibilityObject::isDescendantOfObject
        and isAncestorOfObject to the base class AXCoreObject.
        - Implemented AXIsolatedObject::hasChildren by caching the value from
        the associated AXObject. It is used in isDescendantOfObject.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::isDescendantOfObject const): MOved to AXCoreObject.
        (WebCore::AccessibilityObject::isAncestorOfObject const): Moved to AXCoreObject.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::isDescendantOfObject const):
        (WebCore::AXCoreObject::isAncestorOfObject const):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData): Sets the HasChildren attribute.
        (WebCore::AXIsolatedObject::hasChildren const): Deleted.
        (WebCore::AXIsolatedObject::isDescendantOfObject const): Deleted.
        (WebCore::AXIsolatedObject::isAncestorOfObject const): Deleted.
        * accessibility/isolatedtree/AXIsolatedObject.h:

2020-02-14  Andres Gonzalez  <andresg_22@apple.com>

        When updating a subtree of the IsolatedTree, first remove the entire subtree, not just the subtree root.
        https://bugs.webkit.org/show_bug.cgi?id=207759

        Reviewed by Chris Fleizach.

        When updating an IsolatedTree subtree, we were removing just the root
        of the subtree. Added AXIsolatedTree::removeSubtree that is now used in
        updateIsolatedTree.

        * accessibility/AXObjectCache.cpp:
        (WebCore::createIsolatedTreeHierarchy): If the wrapper is attached
        during creation, set it to null in the NodeChange so that it is not
        re-attached on the AX thread.
        (WebCore::AXObjectCache::updateIsolatedTree): removeSubtree instead of
        removeNode.
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::~AXIsolatedObject): When an IsolatedObject
        is destroyed, it must have been detached from its wrapper.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::NodeChange::NodeChange): Constructors now
        take an IsolatedObject instead of a Ref.
        (WebCore::AXIsolatedTree::removeNode):
        (WebCore::AXIsolatedTree::removeSubtree):
        (WebCore::AXIsolatedTree::applyPendingChanges): Attach wrappers only if
        not null. The IsolatedObject refCount must be 2 at that point.
        * accessibility/isolatedtree/AXIsolatedTree.h:

2020-02-14  Antoine Quint  <graouts@webkit.org>

        [Web Animations] Style changes due to Web Animations should not trigger CSS Transitions 
        https://bugs.webkit.org/show_bug.cgi?id=207760
        <rdar://problem/59458111>

        Reviewed by Simon Fraser.

        While we would consider the unanimated style of CSS Animations specifically when considering what the "start" style values (before-change style in spec terminology)
        should be when considering whether to start a CSS Transition during style resolution, we would not consider other types of animations, specifically JS-created Web
        Animations. However, Web Platform Tests specifically test whether changes made using the Web Animations API may trigger transitions, and until now they would because
        the RenderStyle used to determine the before-change style was the style from the previous resolution, which would include animated values.

        To fix this, we make it so that KeyframeEffect objects now keep a copy of the unanimated style used when blending animated values for the very first time. That style
        is cleared each time keyframes change, which is rare, but may happen through the Web Animations API. Then in AnimationTimeline::updateCSSTransitionsForElementAndProperty(),
        we look for a KeyframeEffect currently affecting the property for which we're considering starting a CSS Transition, and use its unanimated style.

        If that unanimated style has not been set yet, this is because the KeyframeEffect has not had a chance to apply itself with a non-null progress. In this case, the before-change
        and after-change styles should be the same in order to prevent a transition from being triggered as the unanimated style for this keyframe effect will most likely be this
        after-change style, or any future style change that may happen before the keyframe effect starts blending animated values.

        Finally, tracking the unanimated style at the KeyframeEffect level means we no longer to track it specifically for CSSAnimation.

        * animation/AnimationTimeline.cpp:
        (WebCore::keyframeEffectForElementAndProperty):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
        * animation/AnimationTimeline.h:
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::create):
        (WebCore::CSSAnimation::CSSAnimation):
        * animation/CSSAnimation.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::animatesProperty const): Because the backing KeyframeList object may not have been created by the first time we query a KeyframeEffect during
        CSS Transitions resolution, we provide a method that will check the values provided by the Web Animations API to determine whether it targets a given CSS property.
        (WebCore::KeyframeEffect::clearBlendingKeyframes):
        (WebCore::KeyframeEffect::computeDeclarativeAnimationBlendingKeyframes):
        (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
        (WebCore::KeyframeEffect::apply):
        * animation/KeyframeEffect.h:
        (WebCore::KeyframeEffect::unanimatedStyle const):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

2020-02-14  Sunny He  <sunny_he@apple.com>

        Ensure animations that lose their effect don't schedule an animation update
        https://bugs.webkit.org/show_bug.cgi?id=207713
        rdar://59174840

        Reviewed by Antoine Quint.

        Source/WebCore:
        An active animation for which the effect is removed may be considered for
        an upcoming animation resolution. However, WebAnimation::timeToNextTick()
        expects a valid effect to be available to be able to determine timing.
        We now check an animation is relevant before calling timeToNextTick() and
        add an ASSERT() in that function to catch cases where an animation effect
        might not be available.

        Test: webanimations/animation-null-effect.html

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::scheduleNextTick):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::timeToNextTick const):

2020-02-14  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: prefetch cursor records on client side
        https://bugs.webkit.org/show_bug.cgi?id=207602
        <rdar://problem/58483927>

        Reviewed by Brady Eidson.

        Cache cursor records on client side and use those records for iterate operations.

        This makes cursor continue/advance tests in PerformanceTests/IndexedDB/basics ~3x faster.

        * Headers.cmake:

        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::setGetResult): Record the ID of TransactionOperation that updates cached record.
        (WebCore::IDBCursor::iterateWithPrefetchedRecords): IDBCursor uses cached records for iterate opertaions if 
        there is no write operation between last cached records update and current iteration operation.
        (WebCore::IDBCursor::clearPrefetchedRecords):
        * Modules/indexeddb/IDBCursor.h:

        * Modules/indexeddb/IDBGetResult.cpp:
        (WebCore::IDBGetResult::isolatedCopy):
        * Modules/indexeddb/IDBGetResult.h:
        (WebCore::IDBGetResult::IDBGetResult):
        (WebCore::IDBGetResult::prefetchedRecords const):
        (WebCore::IDBGetResult::encode const):
        (WebCore::IDBGetResult::decode):

        * Modules/indexeddb/IDBRequest.cpp: Record corresponding TransactionOperation ID in request.
        (WebCore::IDBRequest::didOpenOrIterateCursor):
        * Modules/indexeddb/IDBRequest.h:
        (WebCore::IDBRequest::pendingCursor const):
        (WebCore::IDBRequest::setTransactionOperationID):

        * Modules/indexeddb/IDBTransaction.cpp: If a cursor iterate request can be handled with cached records,
        IDBClient does not need to send request to IDBServer and wait for response. But requests before that iterate 
        request may need to wait server to answer, and spec requires to handle requests in order. Therefore, we now keep
        all the results in m_transactionOperationResultMap and handle them according to the ordering in 
        m_transactionOperationsInProgressQueue.
        (WebCore::IDBTransaction::abortInProgressOperations):
        (WebCore::IDBTransaction::removeRequest): Because result of a cursor request can be answered sooner, it is 
        possible that in finishedDispatchEventForRequest, m_currentlyCompletingRequest (which is a cursor request) is 
        set to nullptr, and then it is set back to the same cursor request in handleOperationsCompletedOnServer right 
        after. This happens in dispatchEvent of the cursor request, where request would remove itself from request list
        of transaction at the end.
        In this case, when request list becomes empty, transaction may commit automatically. But transaction should not 
        because that request is still valid as m_currentlyCompletingRequest and should not be removed from list.
        (WebCore::IDBTransaction::scheduleOperation):
        (WebCore::IDBTransaction::operationCompletedOnServer):
        (WebCore::IDBTransaction::handleOperationsCompletedOnServer): All requests were sent to IDBServer and the
        response/result ordering would naturally be the same as request order. Now that results can be created in both 
        IDBClient and IDBServer, we no longer handle requests using m_completedOnServerQueue.
        (WebCore::IDBTransaction::createObjectStore): Mark as write operation to track last write operation.
        (WebCore::IDBTransaction::renameObjectStore): Ditto.
        (WebCore::IDBTransaction::createIndex): Ditto.
        (WebCore::IDBTransaction::renameIndex): Ditto.
        (WebCore::IDBTransaction::requestDeleteRecord): Ditto.
        (WebCore::IDBTransaction::requestClearObjectStore): Ditto.
        (WebCore::IDBTransaction::requestPutOrAdd): Ditto.
        (WebCore::IDBTransaction::deleteObjectStore): Ditto.
        (WebCore::IDBTransaction::deleteIndex): Ditto.
        (WebCore::IDBTransaction::iterateCursorOnServer): Only use cached records if the request does not specify target
        key. If cursor is iterated successfully with cache, send a message to IDBServer to notify about the progress.
        Otherwise, fall back to depend on IDBServer to answer the request.
        (WebCore::IDBTransaction::generateOperationID): TransactionOperation ID is unique in a transaction.
        * Modules/indexeddb/IDBTransaction.h:

        * Modules/indexeddb/IndexedDB.h:
        * Modules/indexeddb/client/IDBConnectionProxy.cpp: 
        (WebCore::IDBClient::IDBConnectionProxy::iterateCursor): Don't track result of TransactionOperation in 
        IDBConnectionProxy if TransactionOperation does not need a reply from IDBServer.

        * Modules/indexeddb/client/TransactionOperation.cpp:
        (WebCore::IDBClient::TransactionOperation::TransactionOperation):
        * Modules/indexeddb/client/TransactionOperation.h: Add ID to TransactionOperation.
        (WebCore::IDBClient::TransactionOperation::operationID const):
        (WebCore::IDBClient::TransactionOperation::TransactionOperation):

        * Modules/indexeddb/server/IDBBackingStore.h: remove prefetchCursor as it is not used now.
        * Modules/indexeddb/server/MemoryIDBBackingStore.h: Ditto. Also this patch only deals with prefetching in 
        persistent store.
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor): Only prefetch at when request needs to be answered.
        (WebCore::IDBServer::SQLiteIDBBackingStore::prefetchCursor): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:

        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::currentData): Provide an option to include prefetched records in result.
        (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged): Reset count to prefetch when there is a 
        change. This is used with increaseCountToPrefetch to make prefetch adaptive.
        (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
        (WebCore::IDBServer::SQLiteIDBCursor::prefetchOneRecord):
        (WebCore::IDBServer::SQLiteIDBCursor::increaseCountToPrefetch):
        (WebCore::IDBServer::SQLiteIDBCursor::prefetch): Count to prefetch is decided by SQLiteCursor now.
        (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
        (WebCore::IDBServer::SQLiteIDBCursor::currentValue const):
        * Modules/indexeddb/server/SQLiteIDBCursor.h:

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor): Move call to prefetch cursor to SQLiteIDBBackingStore.
        (WebCore::IDBServer::UniqueIDBDatabase::prefetchCursor): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):

        * Modules/indexeddb/shared/IDBCursorRecord.h: Stop using pointer for IDBValue for easier encoding and decoding.
        (WebCore::IDBCursorRecord::size const):
        (WebCore::IDBCursorRecord::isolatedCopy const):

        * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
        (WebCore::IDBIterateCursorData::isolatedCopy const):
        * Modules/indexeddb/shared/IDBIterateCursorData.h: Add an option to let IDBServer know whether it should answer
        the cursor request. 
        (WebCore::IDBIterateCursorData::encode const):
        (WebCore::IDBIterateCursorData::decode):

        * WebCore.xcodeproj/project.pbxproj:

2020-02-14  Charles Turner  <cturner@igalia.com>

        [GStreamer][EME] Fix warnings in LOG_DISABLED build
        https://bugs.webkit.org/show_bug.cgi?id=207691

        Unreviewed build fix.

        * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: It would
        be nice if the LOG macros could arrange for the VA_ARGS to be
        UNUSED_VARIABLE's. Not sure if that is possible, so be ugly with
        the ifdef's instead.
        (WebCore::CDMProxyClearKey::cencSetCounterVector):
        (WebCore::CDMProxyClearKey::cencSetDecryptionKey):
        (WebCore::CDMProxyClearKey::cencDecryptFullSample):

2020-02-14  Antoine Quint  <graouts@webkit.org>

        [Web Animations] Ensure CSS Transition and CSS Animation events are queued, sorted and dispatched by their timeline
        https://bugs.webkit.org/show_bug.cgi?id=207364
        <rdar://problem/59370413>

        Reviewed by Simon Fraser.

        Until now, AnimationPlaybackEvent events, which are new events introduced by the Web Animations spec, were enqueued in a shared queue on the DocumentTimeline
        and dispatched during the "update animations and send events" procedure. However, AnimationEvent and TransitionEvent events, dispatched by CSS Animations
        and CSS Transitions, were dispatched via a dedicated per-animation queue, which meant typically that those events were dispathed one runloop after the
        AnimationPlaybackEvent events.

        We now remove the dedicated per-animation queue and enqueue all events in the shared DocumentTimeline queue for dispatch during the "update animations and send
        events" procedure. To do this correctly, we need to do a couple of other things that ensure we don't regress tests.

        First, we update the DocumentTimeline::shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState() to account for whether there are pending animation events,
        guaranteeing that an animation update is scheduled should there be any.

        Second, when animation events are enqueued in DocumentTimeline::enqueueAnimationEvent() we schedule an animation update if needed, since we know we now
        have pending events that will need to be delivered in an upcoming update. We also maintain a flag between the start of the "update animations and send events"
        procedure and the moment when the pending animation events queue is cleared prior to dispatching events so that events enqueued in the meantime do not
        prematurely schedule animation resolution. The need for a new animation resolution will be checked at the end of the procedure.

        Finally, declarative animations used to have a special suclass of WebAnimation::needsTick() that would check whether they had any pending events, ensuring
        they would not be removed prematurely. We now reset a flag to false as WebAnimation::tick() is called (as part of the "update animations and send events"
        procedure) and set it to true in case an animation is enqueued. This flag is then used in needsTick() to guarantee the animation is not removed before
        the DocumentTimeline has had a chance to dispatch the enqueued event.

        Note also that, for clarity, the DocumentTimeline::unscheduleAnimationResolution() was renamed to DocumentTimeline::clearTickScheduleTimer() since it wouldn't
        actually cancel a previous animation resolution schedule.

        * animation/CSSTransition.h: Fix a newly found build error due to the missing wtf/MonotonicTime.h header.
        * animation/DeclarativeAnimation.cpp: Remove all code related to the dedicated per-animation queue and instead call the new WebAnimation::enqueueAnimationEvent()
        method to enqueue events on the DocumentTimeline.
        (WebCore::DeclarativeAnimation::DeclarativeAnimation):
        (WebCore::DeclarativeAnimation::tick):
        (WebCore::DeclarativeAnimation::enqueueDOMEvent):
        * animation/DeclarativeAnimation.h:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::detachFromDocument): Ensure the pending events queue is cleared when the timeline is detached from a document, ensuring that there no
        longer events that would cause a ref-cycle (DocumentTimeline -> AnimationPlaybackEvent -> WebAnimation -> DocumentTimeline).
        (WebCore::DocumentTimeline::suspendAnimations):
        (WebCore::DocumentTimeline::removeAnimation):
        (WebCore::DocumentTimeline::scheduleAnimationResolution):
        (WebCore::DocumentTimeline::clearTickScheduleTimer):
        (WebCore::DocumentTimeline::shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState const):
        (WebCore::DocumentTimeline::updateCurrentTime):
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::scheduleNextTick):
        (WebCore::DocumentTimeline::animationAcceleratedRunningStateDidChange):
        (WebCore::DocumentTimeline::enqueueAnimationEvent):
        * animation/DocumentTimeline.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
        (WebCore::WebAnimation::enqueueAnimationEvent):
        (WebCore::WebAnimation::needsTick const):
        (WebCore::WebAnimation::tick):
        * animation/WebAnimation.h:

2020-02-14  Antoine Quint  <graouts@webkit.org>

        [Web Animations] Make all animation event types inherit from the same base class
        https://bugs.webkit.org/show_bug.cgi?id=207629

        Reviewed by Simon Fraser.

        Currently we dispatch events CSS Transitions and CSS Animations events using a dedicated event queue on DeclarativeAnimation, while the events
        added by the Web Animations specification (of type AnimationPlaybackEvent) are dispatched using a shared queue on the DocumentTimeline that is
        processed during the "update animations and send events procedure". The Web Animations specification dictates that all events should be dispatched
        during that procedure, which includes sorting of such events based on their timeline time and associated animation relative composite order.

        In this patch, we prepare the work towards spec compliance for animation events dispatch by making all event types (AnimationPlaybackEvent,
        TransitionEvent and AnimationEvent) inherit from a single AnimationEventBase interface. This will allow DocumentTimeline to enqueue, sort and
        dispatch all such events with a single queue in a future patch.

        Due to CSSAnimationController, we must make the "timeline time" and "animation" parameters optional. When we drop support for CSSAnimationController
        we'll be able to enforce stronger requirements for these.

        No new test since this should not introduce any behavior change.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/AnimationEventBase.cpp: Added.
        (WebCore::AnimationEventBase::AnimationEventBase):
        * animation/AnimationEventBase.h: Added.
        (WebCore::AnimationEventBase::create):
        (WebCore::AnimationEventBase::isAnimationPlaybackEvent const):
        (WebCore::AnimationEventBase::isAnimationEvent const):
        (WebCore::AnimationEventBase::isTransitionEvent const):
        (WebCore::AnimationEventBase::timelineTime const):
        (WebCore::AnimationEventBase::animation const):
        * animation/AnimationPlaybackEvent.cpp:
        (WebCore::AnimationPlaybackEvent::AnimationPlaybackEvent):
        (WebCore::AnimationPlaybackEvent::bindingsTimelineTime const):
        * animation/AnimationPlaybackEvent.h:
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::createEvent):
        * animation/CSSAnimation.h:
        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::createEvent):
        * animation/CSSTransition.h:
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::enqueueDOMEvent):
        * animation/DeclarativeAnimation.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
        * dom/AnimationEvent.cpp:
        (WebCore::AnimationEvent::AnimationEvent):
        * dom/AnimationEvent.h:
        * dom/TransitionEvent.cpp:
        (WebCore::TransitionEvent::TransitionEvent):
        * dom/TransitionEvent.h:
        * page/animation/CSSAnimationController.cpp:
        (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):

2020-02-14  Antoine Quint  <graouts@webkit.org>

        [Web Animations] Make all animation event types inherit from the same base class
        https://bugs.webkit.org/show_bug.cgi?id=207629

        Reviewed by Simon Fraser.

        Currently we dispatch events CSS Transitions and CSS Animations events using a dedicated event queue on DeclarativeAnimation, while the events
        added by the Web Animations specification (of type AnimationPlaybackEvent) are dispatched using a shared queue on the DocumentTimeline that is
        processed during the "update animations and send events procedure". The Web Animations specification dictates that all events should be dispatched
        during that procedure, which includes sorting of such events based on their timeline time and associated animation relative composite order.

        In this patch, we prepare the work towards spec compliance for animation events dispatch by making all event types (AnimationPlaybackEvent,
        TransitionEvent and AnimationEvent) inherit from a single AnimationEventBase interface. This will allow DocumentTimeline to enqueue, sort and
        dispatch all such events with a single queue in a future patch.

        Due to CSSAnimationController, we must make the "timeline time" and "animation" parameters optional. When we drop support for CSSAnimationController
        we'll be able to enforce stronger requirements for these.

        No new test since this should not introduce any behavior change.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/AnimationEventBase.cpp: Added.
        (WebCore::AnimationEventBase::AnimationEventBase):
        * animation/AnimationEventBase.h: Added.
        (WebCore::AnimationEventBase::create):
        (WebCore::AnimationEventBase::isAnimationPlaybackEvent const):
        (WebCore::AnimationEventBase::isAnimationEvent const):
        (WebCore::AnimationEventBase::isTransitionEvent const):
        (WebCore::AnimationEventBase::timelineTime const):
        (WebCore::AnimationEventBase::animation const):
        * animation/AnimationPlaybackEvent.cpp:
        (WebCore::AnimationPlaybackEvent::AnimationPlaybackEvent):
        (WebCore::AnimationPlaybackEvent::bindingsTimelineTime const):
        * animation/AnimationPlaybackEvent.h:
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::createEvent):
        * animation/CSSAnimation.h:
        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::createEvent):
        * animation/CSSTransition.h:
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::enqueueDOMEvent):
        * animation/DeclarativeAnimation.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
        * dom/AnimationEvent.cpp:
        (WebCore::AnimationEvent::AnimationEvent):
        * dom/AnimationEvent.h:
        * dom/TransitionEvent.cpp:
        (WebCore::TransitionEvent::TransitionEvent):
        * dom/TransitionEvent.h:
        * page/animation/CSSAnimationController.cpp:
        (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):

2020-02-14  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add Fontconfig::Fontconfig target
        https://bugs.webkit.org/show_bug.cgi?id=207730

        Reviewed by Adrian Perez de Castro.

        Use the Fontconfig::Fontconfig target.

        * platform/FreeType.cmake:

2020-02-13  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for WebCore shared library builds.

        * crypto/openssl/SerializedCryptoKeyWrapOpenSSL.cpp: Include "SerializedCryptoKeyWrap.h".

2020-02-13  Jer Noble  <jer.noble@apple.com>

        MediaToolbox may not be available; check before calling MTOverrideShouldPlayHDRVideo()
        https://bugs.webkit.org/show_bug.cgi?id=207733
        <rdar://problem/59441647>

        Reviewed by Maciej Stachowiak.

        * platform/mac/PlatformScreenMac.mm:
        (WebCore::setShouldOverrideScreenSupportsHighDynamicRange):

2020-02-13  Kate Cheney  <katherine_cheney@apple.com>

        Expose prevalent domains on a per-page basis
        https://bugs.webkit.org/show_bug.cgi?id=207523
        <rdar://problem/59270758>

        Reviewed by Chris Dumez.

        Tests: http/tests/resourceLoadStatistics/prevalent-domains-per-page-database.html
               http/tests/resourceLoadStatistics/prevalent-domains-per-page.html

        Logs subresource loads in CachedResourceLoader::requestResource, and
        redirects in ResourceLoader::willSendRequestInternal,
        and reports domains to the Web Process.

        * loader/FrameLoaderClient.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * loader/cache/ResourceLoader.cpp:
        (WebCore::ResourceLoader::willSendRequestInternal):

2020-02-13  Ryosuke Niwa  <rniwa@webkit.org>

        Dark Mode: In Notes, list item becomes invisible in dark mode after outdenting
        https://bugs.webkit.org/show_bug.cgi?id=207676

        Reviewed by Wenson Hsieh and Timothy Hatcher.

        The bug was caused by EditingStyle::inverseTransformColorIfNeeded converting -apple-system-label to
        transparent color in ReplaceSelectionCommand when InsertListCommand invokes moveParagraphs.

        This patch fixes the bug in EditingStyle::inverseTransformColorIfNeeded by treating any semantic color
        name or semantic RGB color value as if the color was not specified.

        It also fixes the bug that removeStyleFromRulesAndContext was incapable of removing superflous semantic
        color names that appear in the inline since the context's computed style only contain RGB values by
        replacing the inline style's color values with that of the computed style. This fix is necessary to
        eliminate -apple-system-label in the pasted content, which can cause issues when such a content is
        sync'ed to other devices via iCloud, etc...

        Tests: PasteHTML.TransformColorsOfDarkContentButNotSemanticColor
               PasteHTML.DoesNotTransformColorsOfLightContentDuringOutdent

        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::removeStyleFromRulesAndContext):
        (WebCore::EditingStyle::inverseTransformColorIfNeeded):

2020-02-13  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r255961): Default state for data URL handling is incorrect
        https://bugs.webkit.org/show_bug.cgi?id=207719
        <rdar://problem/59334011>

        Reviewed by Chris Dumez.

        The default selected in r255961 breaks too many WebKit framework users. Switch from opt-out to opt-in
        while we work through compatibility issues.

        Tested by existing test cases.

        * page/Settings.yaml:

2020-02-13  Keith Rollin  <krollin@apple.com>

        Add missing call to completionHandler
        https://bugs.webkit.org/show_bug.cgi?id=207720
        <rdar://problem/59436915>

        Reviewed by Chris Dumez.

        Bug 179641 (r225702) updated
        SubresourceLoader::willSendRequestInternal with a return call without
        first calling the completionHandler. Address this by adding the call
        to the completionHandler.

        No new tests -- it's not possible to control execution into the
        affected code path.

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::willSendRequestInternal):

2020-02-13  Tim Horton  <timothy_horton@apple.com>

        iOS: Autoscrolling is too fast and way too aggressive
        https://bugs.webkit.org/show_bug.cgi?id=207717
        <rdar://problem/59208122>

        Reviewed by Simon Fraser.

        * page/EventHandler.h:
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::startSelectionAutoscroll):
        (WebCore::EventHandler::cancelSelectionAutoscroll):
        (WebCore::adjustAutoscrollDestinationForInsetEdges):
        (WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll const):
        (WebCore::autoscrollAdjustmentFactorForScreenBoundaries): Deleted.
        Make a few small changes to autoscrolling on iOS to make it feel better:

        - Store the autoscrolling position in "unscrolled" coordinates, and do
        all work in this space, converting back when it's time to actually scroll.
        This fixes the problem where you have to wiggle your finger to autoscroll,
        because now when the timer fires, the point actually moves (before, it was
        all stored in "content" coordinates, so wouldn't actually change until
        the client pushed a new point).

        - Reintroduce the macOS-style linear scaling of scrolling velocity
        in (and beyond) the inset region. We scale the fractional distance into
        the inset region to a 20pt/50ms scroll velocity; when you exit the inset
        it continues scaling up linearly from there.

        - Only apply insets in the direction that the autoscroll drag is occurring
        in. This avoids a problem where e.g. horizontally selecting text on the
        first visible line of a page would cause us to scroll up, as it sat
        within the top inset. Instead, we only apply an inset in the direction of
        the drag, and do not allow its magnitude to exceed the currently dragged
        distance.

2020-02-13  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254557.
        https://bugs.webkit.org/show_bug.cgi?id=207725

        The assert is correct, but unfortunately it will alwasy fail
        since there is an existing bug in
        HTMLTextFormControlElement::indexForPosition(). See bug
        #207724 for more details. (Requested by dydz on #webkit).

        Reverted changeset:

        "Enable the offset assertion in
        HTMLTextFormControlElement::indexForPosition"
        https://bugs.webkit.org/show_bug.cgi?id=205706
        https://trac.webkit.org/changeset/254557

2020-02-13  Eric Carlson  <eric.carlson@apple.com>

        Rename SerializedPlatformRepresentation to SerializedPlatformDataCue
        https://bugs.webkit.org/show_bug.cgi?id=207695
        <rdar://problem/59422673>

        Reviewed by Youenn Fablet.

        No new tests, no functional change.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/track/DataCue.cpp:
        (WebCore::DataCue::DataCue):
        (WebCore::DataCue::cueContentsMatch const):
        * html/track/DataCue.h:
        * html/track/InbandDataTextTrack.cpp:
        (WebCore::InbandDataTextTrack::addDataCue):
        (WebCore::InbandDataTextTrack::updateDataCue):
        (WebCore::InbandDataTextTrack::removeDataCue):
        (WebCore::InbandDataTextTrack::removeCue):
        * html/track/InbandDataTextTrack.h:
        * html/track/InbandTextTrack.h:
        * platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h.
        * platform/graphics/InbandTextTrackPrivateClient.h:
        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
        (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        * platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h.
        (WebCore::SerializedPlatformDataCueMac::nativeValue const):
        * platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm.
        (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac):
        (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac):
        (WebCore::SerializedPlatformDataCueMac::create):
        (WebCore::SerializedPlatformDataCueMac::data const):
        (WebCore::SerializedPlatformDataCueMac::deserialize const):
        (WebCore::SerializedPlatformDataCueMac::isEqual const):
        (WebCore::toSerializedPlatformDataCueMac):
        (WebCore::jsValueWithValueInContext):
        (WebCore::jsValueWithDataInContext):
        (WebCore::jsValueWithArrayInContext):
        (WebCore::jsValueWithDictionaryInContext):
        (WebCore::jsValueWithAVMetadataItemInContext):

2020-02-13  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Check if PIP is supported in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=207406

        Reviewed by Brent Fulgham.

        This is currently being checked in the WebProcess, but since this check is initiating communication with the frontboard
        service which will be blocked, this check should be moved to the UI process. In the UI process, this is checked when
        starting a new WebContent process, and sent to the WebContent process as part of the process creation parameters. The
        WebContent is storing the received value.

        API test: WebKit.PictureInPictureSupport

        * platform/PictureInPictureSupport.h:
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (WebCore::setSupportsPictureInPicture):
        (WebCore::supportsPictureInPicture):
        * testing/Internals.cpp:
        (WebCore::Internals::supportsPictureInPicture):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-02-13  Benjamin Nham  <nham@apple.com>

        Allow use of proxies in MiniBrowser
        https://bugs.webkit.org/show_bug.cgi?id=207598

        For testing purposes, we allow Safari to use a custom HTTP/HTTPS proxy passed through
        command line arguments. This gives MiniBrowser the same ability.

        $ run-minibrowser --release -WebKit2HTTPProxy "http://127.0.0.1:8080" \
                                    -WebKit2HTTPSProxy "http://127.0.0.1:8080"

        Reviewed by Antti Koivisto.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::MacApplication::isMiniBrowser):
        (WebCore::IOSApplication::isMiniBrowser):

2020-02-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBreaker should not hold on to the lastWrapOpportunity inline item
        https://bugs.webkit.org/show_bug.cgi?id=207707
        <rdar://problem/59427376>

        Reviewed by Antti Koivisto.

        LineBreaker only needs a flag indicating that there's a wrapping opportunity on the line.
        LineLayoutContext needs to know what the position is (as an InlineItem) so that it could initiate a revert if needed.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
        (WebCore::Layout::LineBreaker::wordBreakBehavior const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItem):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
        (WebCore::Layout::LineLayoutContext::rebuildLine):
        (WebCore::Layout::LineLayoutContext::rebuildLineForRevert): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:
        (WebCore::Layout::LineLayoutContext::InlineItemRange::size const):

2020-02-13  Adrian Perez de Castro  <aperez@igalia.com>

        Non-unified build fixes mid February 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=207693

        Unreviewed build fix.

        No new tests needed.

        * html/parser/HTMLPreloadScanner.cpp: Add missing include.
        * platform/wpe/ScrollbarThemeWPE.cpp: Ditto.
        * rendering/InlineTextBox.cpp: Ditto.

2020-02-13  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r255037): Zooming in and out on Quip in macOS Safari can cause the content to be offset to the side
        https://bugs.webkit.org/show_bug.cgi?id=207674
        rdar://problem/59404866

        Reviewed by Antti Koivisto.
        
        Remove the early return in ScrollingStateScrollingNode::setRequestedScrollData(); comparing
        with the last m_requestedScrollData is wrong, because requested scroll positions are not "state"
        in the scrolling tree, they are requests to scroll. Ideally, they would be represented in some
        different way in the scrolling tree.

        Test: fast/scrolling/programmatic-scroll-to-zero-zero.html

        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::setRequestedScrollData):

2020-02-13  Said Abou-Hallawa  <said@apple.com>

        Unreviewed, rolling out r255158, 255405 and r255486

        Caused test flakiness and PLT regression.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::updateThrottlingState):
        (WebCore::DocumentTimeline::animationInterval const):
        * animation/DocumentTimeline.h:
        * dom/Document.cpp:
        (WebCore::Document::requestAnimationFrame):
        (WebCore::Document::updateLastHandledUserGestureTimestamp):
        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::ScriptedAnimationController):
        (WebCore::throttlingReasonToString):
        (WebCore::throttlingReasonsToString):
        (WebCore::ScriptedAnimationController::addThrottlingReason):
        (WebCore::ScriptedAnimationController::removeThrottlingReason):
        (WebCore::ScriptedAnimationController::isThrottled const):
        (WebCore::ScriptedAnimationController::registerCallback):
        (WebCore::ScriptedAnimationController::cancelCallback):
        (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
        (WebCore::ScriptedAnimationController::interval const):
        (WebCore::ScriptedAnimationController::page const):
        (WebCore::ScriptedAnimationController::scheduleAnimation):
        (WebCore::ScriptedAnimationController::animationTimerFired):
        (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): Deleted.
        (WebCore::ScriptedAnimationController::isThrottledRelativeToPage const): Deleted.
        (WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const): Deleted.
        * dom/ScriptedAnimationController.h:
        (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
        * page/FrameView.cpp:
        (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
        * page/Page.cpp:
        (WebCore::m_deviceOrientationUpdateProvider):
        (WebCore::Page::isLowPowerModeEnabled const):
        (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
        (WebCore::updateScriptedAnimationsThrottlingReason):
        (WebCore::Page::setIsVisuallyIdleInternal):
        (WebCore::Page::handleLowModePowerChange):
        (WebCore::Page::renderingUpdateThrottlingEnabled const): Deleted.
        (WebCore::Page::renderingUpdateThrottlingEnabledChanged): Deleted.
        (WebCore::Page::isRenderingUpdateThrottled const): Deleted.
        (WebCore::Page::preferredRenderingUpdateInterval const): Deleted.
        * page/Page.h:
        (WebCore::Page::isLowPowerModeEnabled const): Deleted.
        (WebCore::Page::canUpdateThrottlingReason const): Deleted.
        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
        (WebCore::RenderingUpdateScheduler::startTimer):
        (WebCore::RenderingUpdateScheduler::adjustFramesPerSecond): Deleted.
        (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency): Deleted.
        * page/RenderingUpdateScheduler.h:
        * page/Settings.yaml:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged): Deleted.
        * page/SettingsBase.h:
        * platform/graphics/AnimationFrameRate.h: Removed.
        * platform/graphics/DisplayRefreshMonitor.h:
        (WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond): Deleted.
        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
        (WebCore::DisplayRefreshMonitorManager::registerClient):
        (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
        (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
        (WebCore::DisplayRefreshMonitorManager::monitorForClient): Deleted.
        (WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond): Deleted.
        * platform/graphics/DisplayRefreshMonitorManager.h:
        (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager):
        * platform/graphics/GraphicsLayerUpdater.cpp:
        (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
        * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
        (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]): Deleted.

2020-02-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineCandidateContent can have only one float item
        https://bugs.webkit.org/show_bug.cgi?id=207681
        <rdar://problem/59413044>

        Reviewed by Antti Koivisto.

        Floats should not be considered as inline content. They shrink the available space but we never
        add them to the line. This patch decouples InlineContent and candidate floats. Also there can only be
        one float box per candidate content (since there's always a soft wrap opportunity before/after the float box). 

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineCandidate::InlineContent::runs const):
        (WebCore::Layout::LineCandidate::InlineContent::logicalWidth const):
        (WebCore::Layout::LineCandidate::InlineContent::trailingLineBreak const):
        (WebCore::Layout::LineCandidate::InlineContent::appendLineBreak):
        (WebCore::Layout::LineCandidate::InlineContent::setTrailingLineBreak):
        (WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):
        (WebCore::Layout::LineCandidate::reset):
        (WebCore::Layout::LineCandidate::InlineContent::reset):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItem):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
        (WebCore::Layout::LineCandidateContent::appendLineBreak): Deleted.
        (WebCore::Layout::LineCandidateContent::appendFloat): Deleted.
        (WebCore::Layout::LineCandidateContent::hasIntrusiveFloats const): Deleted.
        (WebCore::Layout::LineCandidateContent::inlineRuns const): Deleted.
        (WebCore::Layout::LineCandidateContent::inlineContentLogicalWidth const): Deleted.
        (WebCore::Layout::LineCandidateContent::floats const): Deleted.
        (WebCore::Layout::LineCandidateContent::trailingLineBreak const): Deleted.
        (WebCore::Layout::LineCandidateContent::setTrailingLineBreak): Deleted.
        (WebCore::Layout::LineCandidateContent::appendInlineContent): Deleted.
        (WebCore::Layout::LineCandidateContent::reset): Deleted.
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItems): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2020-02-13  Chris Lord  <clord@igalia.com>

        Implement OffscreenCanvas.copiedImage
        https://bugs.webkit.org/show_bug.cgi?id=206220

        Reviewed by Žan Doberšek.

        No new tests. Covered by existing tests.

        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::didDraw):
        (WebCore::OffscreenCanvas::copiedImage const):
        (WebCore::OffscreenCanvas::clearCopiedImage const):
        (WebCore::OffscreenCanvas::takeImageBuffer const):
        (WebCore::OffscreenCanvas::reset):
        * html/OffscreenCanvas.h:

2020-02-12  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>

        [WebCrypto][CommonCrypto] Incorrect AES-CTR with counterLength longer than 64
        https://bugs.webkit.org/show_bug.cgi?id=207238

        Reviewed by Jiewen Tan.

        Add CounterBlockHelper to calculate the remaining count for counter bits to overflow
        and the whole counter block bits (nonce + zero counter bits) after overflow.

        With this helper, simplify the AES-CTR implementation on CommonCrypto.

        * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
        (WebCore::CryptoAlgorithmAES_CTR::CounterBlockHelper::CounterBlockHelper):
        (WebCore::CryptoAlgorithmAES_CTR::CounterBlockHelper::countToOverflowSaturating const):
        (WebCore::CryptoAlgorithmAES_CTR::CounterBlockHelper::counterVectorAfterOverflow const):
        * crypto/algorithms/CryptoAlgorithmAES_CTR.h:
        * crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:
        (WebCore::transformAES_CTR):
        (WebCore::bigIntegerToSizeT): Deleted.

2020-02-12  Said Abou-Hallawa  <sabouhallawa@apple.com>

        WebP image format is not supported
        https://bugs.webkit.org/show_bug.cgi?id=192672

        Reviewed by Youenn Fablet.

        Add the mime type and the UTI of the WebP to the list of the allowed image
        formats. WebP should be enabled only on macOS and iOS post Catalina.

        Tests: fast/images/animated-webp-as-image.html
               fast/images/webp-as-image.html

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::supportedImageMIMETypes):
        * platform/graphics/cg/ImageDecoderCG.cpp:
        (WebCore::animationPropertiesFromProperties):
        * platform/graphics/cg/UTIRegistry.cpp:
        (WebCore::defaultSupportedImageTypes):

2020-02-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Remove LineLayoutContext::m_partialTrailingTextItem
        https://bugs.webkit.org/show_bug.cgi?id=207670
        <rdar://problem/59405854>

        Reviewed by Antti Koivisto.

        LineBuilder::Run does not hold a reference to these InlineItems anymore.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::commitPartialContent):
        * layout/inlineformatting/LineLayoutContext.h:

2020-02-12  Pavel Feldman  <pavel.feldman@gmail.com>

        Web Inspector: encode binary web socket frames using base64
        https://bugs.webkit.org/show_bug.cgi?id=207448
        
        Previous representation of binary frames is lossy using fromUTF8WithLatin1Fallback,
        this patch consistently encodes binary data using base64.

        Reviewed by Timothy Hatcher.

        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::Inspector::buildWebSocketMessage):
        (WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame):
        (WebCore::InspectorNetworkAgent::didSendWebSocketFrame):

2020-02-12  Pavel Feldman  <pavel.feldman@gmail.com>

        [WK2][Soup] Implement NetworkStorageSession::getAllCookies
        https://bugs.webkit.org/show_bug.cgi?id=207449

        Reviewed by Carlos Garcia Campos.

        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::getAllCookies):

2020-02-12  Yusuke Suzuki  <ysuzuki@apple.com>

        CSSValuePool's constant CSS values should not be allocated dynamically (and same for Vectors)
        https://bugs.webkit.org/show_bug.cgi?id=207666

        Reviewed by Mark Lam.

        r252785 changes contents (CSSValues and Vectors) of CSSValuePool from static ones to
        dynamically allocated ones. This was done since we would like to use static CSSValues
        even in the other threads (workers etc.) for OffscreenCanvas feature.

        But this causes memory regression in Membuster since we allocates many CSSValues and
        large Vectors, and they are kept persistently.

        This patch removes dynamic allocation part of r252785 to recover memory regression.
        The key of this patch is introducing Static CSSValue feature. When incrementing / decrementing
        m_refCount of CSSValue, we add / subtract by 0x2. And we put 0x1 as a static-flag. So, even if
        this CSSValue is used by multiple threads, we never see that CSSValue gets 0 m_refCount if
        it is marked as static (having 0x1). This is the same design to our static StringImpl.

        No behavior change.

        * css/CSSInheritedValue.h:
        * css/CSSInitialValue.h:
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSPrimitiveValue.h:
        * css/CSSRevertValue.h:
        * css/CSSUnsetValue.h:
        * css/CSSValue.cpp:
        * css/CSSValue.h:
        (WebCore::CSSValue::ref const):
        (WebCore::CSSValue::hasOneRef const):
        (WebCore::CSSValue::refCount const):
        (WebCore::CSSValue::hasAtLeastOneRef const):
        (WebCore::CSSValue::deref):
        (WebCore::CSSValue::makeStatic):
        * css/CSSValuePool.cpp:
        (WebCore::StaticCSSValuePool::StaticCSSValuePool):
        (WebCore::StaticCSSValuePool::init):
        (WebCore::CSSValuePool::CSSValuePool):
        (WebCore::CSSValuePool::singleton):
        (WebCore::CSSValuePool::createIdentifierValue):
        (WebCore::CSSValuePool::createColorValue):
        (WebCore::CSSValuePool::createValue):
        * css/CSSValuePool.h:
        (WebCore::CSSValuePool::createInheritedValue):
        (WebCore::CSSValuePool::createImplicitInitialValue):
        (WebCore::CSSValuePool::createExplicitInitialValue):
        (WebCore::CSSValuePool::createUnsetValue):
        (WebCore::CSSValuePool::createRevertValue):

2020-02-12  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r256010.

        Introduced ASan crashes

        Reverted changeset:

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/r256010

2020-02-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBuilder should be able to take a partial trailing inline text item
        https://bugs.webkit.org/show_bug.cgi?id=207640
        <rdar://problem/59390284>

        Reviewed by Antti Koivisto.

        With this patch, now the trailing run on the line has the needsHyphen bit set.
        When constructing the final Display:Runs in InlineFormattingContext::setDisplayBoxesForLine using
        the line runs, we transfer the needsHyphen bit instead of explicitly set on the trailing run.  

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContent::TextContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::appendPartialTrailingTextItem):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::m_textContent):
        (WebCore::Layout::LineBuilder::Run::Run):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::setNeedsHyphen):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
        (WebCore::Layout::LineLayoutContext::commitPartialContent):
        * layout/inlineformatting/LineLayoutContext.h:

2020-02-12  Basuke Suzuki  <basuke.suzuki@sony.com>

        [Curl] Force HTTP/1.1 for WebSocket connection
        https://bugs.webkit.org/show_bug.cgi?id=207656

        Reviewed by Fujii Hironori.

        No tests for H2 in LayoutTests. Checked in real site.
        See: https://bugs.webkit.org/show_bug.cgi?id=176483

        * platform/network/curl/CurlContext.cpp:
        (WebCore::CurlHandle::enableConnectionOnly):

2020-02-12  Wenson Hsieh  <wenson_hsieh@apple.com>

        Composition highlight rects should be rounded and inset
        https://bugs.webkit.org/show_bug.cgi?id=207655
        <rdar://problem/59362474>

        Reviewed by Tim Horton.

        Apply a couple of minor adjustments to the appearance of composition highlight rects that appear behind marked
        text, in the case where the client specifies attributed marked text with background colors.

        Test: editing/input/composition-highlights.html

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintMarkedTextBackground):
        (WebCore::InlineTextBox::paintCompositionBackground):

        In the case where custom composition rects are specified, add a half-pixel inset to all sides of the background
        rect, and add a slight corner radius around each background rect.

        * rendering/InlineTextBox.h:

2020-02-12  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r256463.

        Caused major flakiness on Mac wk2

        Reverted changeset:

        "REGRESSION (r255158): http/tests/frame-throttling/raf-
        throttle-in-cross-origin-subframe.html is a flaky failure"
        https://bugs.webkit.org/show_bug.cgi?id=206839
        https://trac.webkit.org/changeset/256463

2020-02-12  Yusuke Suzuki  <ysuzuki@apple.com>

        Shrink CachedResource
        https://bugs.webkit.org/show_bug.cgi?id=207618

        Reviewed by Mark Lam.

        This patch shrinks sizeof(CachedResource) by 80 bytes by aggressively using bit-fields and Markable<>.
        For each enum class, we define `bitsOfXXX` value, which indicates # of bits to represent it. And using
        this value for bit-field's width.

        No behavior change.

        * loader/FetchOptions.h:
        (WebCore::FetchOptions::encode const):
        * loader/ResourceLoaderOptions.h:
        (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
        (WebCore::ResourceLoaderOptions::loadedFromOpaqueSource):
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::CachedImage):
        (WebCore::CachedImage::shouldDeferUpdateImageData const):
        (WebCore::CachedImage::didUpdateImageData):
        * loader/cache/CachedImage.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::load):
        (WebCore::CachedResource::finish):
        * loader/cache/CachedResource.h:
        (WebCore::CachedResource::setStatus):
        * page/csp/ContentSecurityPolicyResponseHeaders.h:
        (WebCore::ContentSecurityPolicyResponseHeaders::MarkableTraits::isEmptyValue):
        (WebCore::ContentSecurityPolicyResponseHeaders::MarkableTraits::emptyValue):
        (WebCore::ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders):
        * platform/network/NetworkLoadMetrics.h:
        (WebCore::NetworkLoadMetrics::isolatedCopy const):
        (WebCore::NetworkLoadMetrics::clearNonTimingData):
        (WebCore::NetworkLoadMetrics::operator== const):
        (WebCore::NetworkLoadMetrics::encode const):
        (WebCore::NetworkLoadMetrics::decode):
        * platform/network/ResourceLoadPriority.h:
        * platform/network/ResourceRequestBase.h:
        (WebCore::ResourceRequestBase::ResourceRequestBase):
        * platform/network/ResourceResponseBase.h:
        * platform/network/StoredCredentialsPolicy.h:

2020-02-12  Simon Fraser  <simon.fraser@apple.com>

        Remove CSS_DEVICE_ADAPTATION
        https://bugs.webkit.org/show_bug.cgi?id=203479

        Reviewed by Tim Horton.

        CSS Working Group resolved to remove @viewport <https://github.com/w3c/csswg-drafts/issues/4766>,
        so remove the code.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSCSSRuleCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSProperties.json:
        * css/CSSProperty.cpp:
        (WebCore::CSSProperty::isDescriptorOnly):
        * css/CSSRule.cpp:
        * css/CSSRule.h:
        * css/CSSRule.idl:
        * css/CSSValueKeywords.in:
        * css/StyleRule.cpp:
        (WebCore::StyleRuleBase::destroy):
        (WebCore::StyleRuleBase::copy const):
        (WebCore::StyleRuleBase::createCSSOMWrapper const):
        (WebCore::StyleRuleViewport::StyleRuleViewport): Deleted.
        (WebCore::StyleRuleViewport::mutableProperties): Deleted.
        * css/StyleRule.h:
        (WebCore::StyleRuleBase::isSupportsRule const):
        (WebCore::StyleRuleBase::isViewportRule const): Deleted.
        * css/StyleRuleType.h:
        * css/StyleSheetContents.cpp:
        (WebCore::traverseRulesInVector):
        (WebCore::StyleSheetContents::traverseSubresources const):
        * css/ViewportStyleResolver.cpp: Removed.
        * css/ViewportStyleResolver.h: Removed.
        * css/WebKitCSSViewportRule.cpp: Removed.
        * css/WebKitCSSViewportRule.h: Removed.
        * css/WebKitCSSViewportRule.idl: Removed.
        * css/parser/CSSParserImpl.cpp:
        (WebCore::CSSParserImpl::consumeAtRule):
        (WebCore::CSSParserImpl::consumeViewportRule): Deleted.
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseValue):
        (WebCore::consumeSingleViewportDescriptor): Deleted.
        (WebCore::CSSPropertyParser::parseViewportDescriptor): Deleted.
        * dom/Document.cpp:
        (WebCore::Document::initialViewportSize const): Deleted.
        * dom/Document.h:
        * page/FrameView.h:
        * style/RuleData.cpp:
        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::addChildRules):
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::Resolver):
        (WebCore::Style::Resolver::appendAuthorStyleSheets):
        (WebCore::Style::Resolver::~Resolver):
        * style/StyleResolver.h:
        (WebCore::Style::Resolver::viewportStyleResolver): Deleted.

2020-02-12  Brian Burg  <bburg@apple.com>

        Web Inspector: inspector/cpu-profiler/threads.html is flaky crashing
        https://bugs.webkit.org/show_bug.cgi?id=207588
        <rdar://problem/57458123>

        Reviewed by Yusuke Suzuki.

        * page/cocoa/ResourceUsageThreadCocoa.mm:
        (WebCore::ResourceUsageThread::platformCollectCPUData):
        Use a fence to force Thread to be completely ready for use by other threads
        prior to storing it. Otherwise, ResourceUsageThread may see it too early.

        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::start): Ignore worker threads that are
        not fully initialized.

2020-02-12  Youenn Fablet  <youenn@apple.com>

        ServiceWorkerContainer::jobResolvedWithRegistration scopeExit should capture all lambda parameters by value
        https://bugs.webkit.org/show_bug.cgi?id=207657

        Reviewed by Chris Dumez.

        shouldNotifyWhenResolved is captured by reference in the notifyIfExitEarly ScopeExit lambda.
        The ScopeExit is not always called synchronously so it is unsafe to capture values by reference here.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

2020-02-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Do not create Display::Boxes for anonymous inline text boxes
        https://bugs.webkit.org/show_bug.cgi?id=207612
        <rdar://problem/59374909>

        Reviewed by Antti Koivisto.

        <div>text content</div> : [text content] only needs a Display::Run.
        <div><span>text content</span></div> [span] needs a Display::Box and [text content] needs a Display::Run.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

2020-02-12  Said Abou-Hallawa  <said@apple.com>

        REGRESSION (r255158): http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=206839

        Reviewed by Simon Fraser.

        Remove the setting 'RenderingUpdateThrottling'. We will disable the
        RenderingUpdateThrottling till the first layout happens. Then it will be
        enabled for the rest of the page's life. This ensures VisuallyIdle won't
        throttle the RenderingUpdate steps before the first paint.

        * page/Page.cpp:
        (WebCore::Page::renderingUpdateThrottlingEnabled const):
        (WebCore::Page::addLayoutMilestones):
        (WebCore::Page::renderingUpdateThrottlingEnabledChanged): Deleted.
        * page/Page.h:
        * page/Settings.yaml:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged): Deleted.
        * page/SettingsBase.h:

2020-02-12  Youenn Fablet  <youenn@apple.com>

        Refactor DocumentLoader::commitData to use a Document& internally
        https://bugs.webkit.org/show_bug.cgi?id=207579

        Reviewed by Chris Dumez.

        Once we write some bytes, the frame has a Document.
        Put it in a local variable to improve readability of the code.
        No change of behavior.

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

2020-02-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Display::Run should not have any geometry mutation functions.
        https://bugs.webkit.org/show_bug.cgi?id=207633
        <rdar://problem/59386235>

        Reviewed by Antti Koivisto.

        Now that Display::Runs are constructed after merging the runs on the line, we don't need any of
        these mutation functions.

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::textContent const):
        (WebCore::Display::Run::isLineBreak const):
        (WebCore::Display::Run::lineIndex const):
        (WebCore::Display::Run::setWidth): Deleted.
        (WebCore::Display::Run::setTop): Deleted.
        (WebCore::Display::Run::setlLeft): Deleted.
        (WebCore::Display::Run::moveVertically): Deleted.
        (WebCore::Display::Run::moveHorizontally): Deleted.
        (WebCore::Display::Run::expandVertically): Deleted.
        (WebCore::Display::Run::expandHorizontally): Deleted.
        (WebCore::Display::Run::setTextContent): Deleted.
        (WebCore::Display::Run::setExpansion): Deleted.
        (WebCore::Display::Run::setImage): Deleted.

2020-02-12  Megan Gardner  <megan_gardner@apple.com>

        Fix highlight text decorations to work with all decoration types and colors
        https://bugs.webkit.org/show_bug.cgi?id=207601

        Reviewed by Dean Jackson.

        MarkedText styles were incorrectly setting styles, and colors were being 
        calculated incorrectly.

        Extended http/wpt/css/css-highlight-api/highlight-text-decorations.html.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::resolveStyleForMarkedText):
        Correctly pass information about text decorations to MarkedTexts styles.
        
        * rendering/TextDecorationPainter.cpp:
        (WebCore::collectStylesForRenderer):
        (WebCore::TextDecorationPainter::decorationColor):
        (WebCore::decorationColor): Deleted.
        Expose decorationColor calculator for use in InlineTextBox. 
        * rendering/TextDecorationPainter.h:

2020-02-12  Chris Dumez  <cdumez@apple.com>

        RELEASE_ASSERT() under WebSWClientConnection::didResolveRegistrationPromise()
        https://bugs.webkit.org/show_bug.cgi?id=207637
        <rdar://problem/59093490>

        Reviewed by Youenn Fablet.

        We were capturing data by reference in the notifyIfExitEarly ScopeExit lambda and then capturing it
        in the task posted to the event loop, which was unsafe.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

2020-02-12  Andres Gonzalez  <andresg_22@apple.com>

        Support event notifications in IsolatedTree mode.
        https://bugs.webkit.org/show_bug.cgi?id=207581

        Reviewed by Chris Fleizach.

        - DOM/Render trees notifications are listened to by AXObjectCache and
        the corresponding IsolatedTree is updated.
        - The update is now happening for state, value and children change
        notifications.
        - AXObjectCache::updateIsolatedTree re-generates the subtree rooted at
        the node receiving the notification.
        - Consolidated creation of AXIsolatedObjects by passing treeID and
        parentID to the create method and constructor.
        - Changes to the IsolatedTree are set on the main thread using the
        NodeChange structure, and applied to the tree on the AX thread.
        - The updated IsolatedObjects are attached to their corresponding
        platform wrappers on the AX thread, so that after creation they are only
        accessed on the secondary thread.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::postNotification): Invokes updateIsolatedTree.
        (WebCore::createIsolatedTreeHierarchy):
        (WebCore::AXObjectCache::generateIsolatedTree):
        (WebCore::AXObjectCache::updateIsolatedTree):
        (WebCore::AXObjectCache::createIsolatedTreeHierarchy): Became a static helper function.
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::AXIsolatedObject):
        (WebCore::AXIsolatedObject::create):
        (WebCore::AXIsolatedObject::setProperty):
        (WebCore::AXIsolatedObject::setParent):
        (WebCore::AXIsolatedObject::detachFromParent):
        (WebCore::AXIsolatedObject::setTreeIdentifier): Deleted, the tree identifier is set in the constructor.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::NodeChange::NodeChange):
        (WebCore::AXIsolatedTree::appendNodeChanges):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
        (WebCore::AXIsolatedObject::attachPlatformWrapper):
        * accessibility/mac/AXObjectCacheMac.mm:

2020-02-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Rename Display::Run::TextContext to TextContent
        https://bugs.webkit.org/show_bug.cgi?id=207611
        <rdar://problem/59374523>

        Reviewed by Antti Koivisto.

        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::checkForMatchingTextRuns):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::setTextContent):
        (WebCore::Display::Run::textContent const):
        (WebCore::Display::Run::textContent):
        (WebCore::Display::Run::isLineBreak const):
        (WebCore::Display::Run::Run):
        (WebCore::Display::Run::TextContent::TextContent):
        (WebCore::Display::Run::TextContext::start const): Deleted.
        (WebCore::Display::Run::TextContext::end const): Deleted.
        (WebCore::Display::Run::TextContext::length const): Deleted.
        (WebCore::Display::Run::TextContext::content const): Deleted.
        (WebCore::Display::Run::TextContext::needsHyphen const): Deleted.
        (WebCore::Display::Run::TextContext::setNeedsHyphen): Deleted.
        (WebCore::Display::Run::TextContext::expand): Deleted.
        (WebCore::Display::Run::setTextContext): Deleted.
        (WebCore::Display::Run::textContext const): Deleted.
        (WebCore::Display::Run::textContext): Deleted.
        (WebCore::Display::Run::TextContext::TextContext): Deleted.
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::m_textContent):
        (WebCore::Layout::LineBuilder::Run::expand):
        (WebCore::Layout::LineBuilder::Run::removeTrailingWhitespace):
        (WebCore::Layout::m_textContext): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::textContent const):
        (WebCore::Layout::LineBuilder::Run::textContext const): Deleted.
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):
        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::DisplayRunPath::hasHyphen const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::text const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::length const):

2020-02-12  Charles Turner  <cturner@igalia.com>

        [GStreamer][EME] Fix build with ENCRYPTED_MEDIA=OFF
        https://bugs.webkit.org/show_bug.cgi?id=207628

        Unreviewed build fix.

        Covered by existing tests.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
        (WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):

2020-02-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move expansion struct out of Display::Run::TextContext to Display::Run
        https://bugs.webkit.org/show_bug.cgi?id=207610
        <rdar://problem/59374136>

        Reviewed by Antti Koivisto.

        This is in preparation for renaming Display::Run::TextContext to Display::Run:TextContent.
        Non-text runs now have the default expansion behavior with 0 horizontal expansion.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::setNeedsHyphen):
        (WebCore::Display::Run::TextContext::expand):
        (WebCore::Display::Run::setExpansion):
        (WebCore::Display::Run::expansion const):
        (WebCore::Display::Run::TextContext::setExpansion): Deleted.
        (WebCore::Display::Run::TextContext::expansion const): Deleted.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::justifyRuns):
        (WebCore::Layout::LineBuilder::Run::expand):
        (WebCore::Layout::LineBuilder::Run::visuallyCollapseTrailingWhitespace):
        (WebCore::Layout::LineBuilder::Run::setExpansionBehavior):
        (WebCore::Layout::LineBuilder::Run::expansionBehavior const):
        (WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
        (WebCore::Layout::LineBuilder::Run::adjustExpansionBehavior): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):

2020-02-12  Charlie Turner  <cturner@igalia.com>

        [EME][GStreamer] Introduce CDMProxy
        https://bugs.webkit.org/show_bug.cgi?id=206730

        Reviewed by Xabier Rodriguez-Calvar.

        Introduce a new subclass of CDMInstance, CDMProxyInstance.

        CDMInstance is a main-thread only class, its purpose is to provide
        an interface that will satisfy the JavaScript EME APIs, which by
        design, don't actually interact with a real DRM system, what might
        also be called "The CDM Instance". That's why the naming is
        misleading here, CDMInstance isn't actually an instance of a real
        CDM, rather it is a facade for JavaScript.

        CDMProxyInstance is a sub-class which provides two APIs,
        1/ For background media threads to safely interrogate the status
        of keys and to perform decryption using said keys. This API is
        exposed by CDMProxy and is platform specific.
        2/ For media players to safely assess the state of decryptors and
        what their status is.

        CDMProxy exists to allow thread-safe access to a real CDM, along
        with their quirks. The two main problems GTK integrators of a CDM
        have in WebKit is key management and CDM access from background
        media threads.

        Key management is how to manage the state of keys in a way
        coherent with JavaScript, the cross-platform EME implementation,
        the real CDMs themselves, and the background media
        threads. CDMProxy provides a default key store interface for
        sub-classes. Sub-classes can, on receipt of new information from a
        real CDM, tell CDMProxy about the keys and their
        statuses. CDMProxy is intended to Do The Right Thing from there,
        letting JavaScript and WebCore know all the details they need to
        about the new state, as well as the media decode threads when they
        next come asking.

        Access from background threads is ill-advised when using the
        thread-unsafe CDMInstance. We used to get away with doing exactly
        this, but WebCore recently became more diligent about
        thread-unsafe access of main-thread-only data, and we had to do
        something to fix the asserts. That something was ProxyCDM (a
        terrible name, removed now), which was a hack and please forget
        about it. CDMProxy can be safely passed to background threads, and
        it will by default provide a thread-safe view of the key store for
        background threads to interrogate the key store and perform
        CDM-specific decryption / decode.

        Covered by existing tests.

        * WebCore.xcodeproj/project.pbxproj: Add CDMProxy to build
        definition.
        * platform/GStreamer.cmake: Add CDMProxy include directories and
        implementation files.
        * platform/encryptedmedia/CDMInstance.h: Remove references to old
        ProxyCDM shim. This approach was a temporary hack to avoid some
        thread-safety asserts. I took the liberty of renaming to CDMProxy,
        for no other reason that it felt like a better name, sorry for the
        confusion.
        * platform/encryptedmedia/CDMProxy.cpp: Added.
        (WebCore::Key::idAsString const):
        (WebCore::Key::valueAsString const):
        (WebCore::KeyStore::containsKeyID const):
        (WebCore::KeyStore::merge):
        (WebCore::KeyStore::allKeysAsReleased const):
        (WebCore::KeyStore::addKeys):
        (WebCore::KeyStore::add):
        (WebCore::KeyStore::removeAllKeysFrom):
        (WebCore::KeyStore::remove):
        (WebCore::KeyStore::keyValue const):
        (WebCore::KeyStore::convertToJSKeyStatusVector const):
        (WebCore::CDMProxy::updateKeyStore):
        (WebCore::CDMProxy::setInstance):
        (WebCore::CDMProxy::keyValue const):
        (WebCore::CDMProxy::startedWaitingForKey const):
        (WebCore::CDMProxy::stoppedWaitingForKey const):
        (WebCore::CDMProxy::tryWaitForKey const):
        (WebCore::CDMProxy::keyAvailableUnlocked const):
        (WebCore::CDMProxy::keyAvailable const):
        (WebCore::CDMProxy::getOrWaitForKey const):
        (WebCore::CDMInstanceProxy::startedWaitingForKey):
        (WebCore::CDMInstanceProxy::stoppedWaitingForKey):
        (WebCore::CDMInstanceProxy::mergeKeysFrom):
        (WebCore::CDMInstanceProxy::removeAllKeysFrom):
        * platform/encryptedmedia/CDMProxy.h: Added.
        (WebCore::Key::create):
        (WebCore::Key::idAsSharedBuffer const):
        (WebCore::Key::id const):
        (WebCore::Key::value const):
        (WebCore::Key::value):
        (WebCore::Key::status const):
        (WebCore::Key::operator==):
        (WebCore::Key::addSessionReference):
        (WebCore::Key::removeSessionReference):
        (WebCore::Key::numSessionReferences const):
        (WebCore::Key::Key):
        (WebCore::KeyStore::removeAllKeys):
        (WebCore::KeyStore::numKeys const):
        (WebCore::KeyStore::begin):
        (WebCore::KeyStore::begin const):
        (WebCore::KeyStore::end):
        (WebCore::KeyStore::end const):
        (WebCore::KeyStore::rbegin):
        (WebCore::KeyStore::rbegin const):
        (WebCore::KeyStore::rend):
        (WebCore::KeyStore::rend const):
        (WebCore::CDMInstanceProxy::setProxy):
        (WebCore::CDMInstanceProxy::proxy const):
        (WebCore::CDMInstanceProxy::isWaitingForKey const):
        (WebCore::CDMInstanceProxy::setPlayer):
        (WebCore::CDMInstanceProxy::trackSession):
        * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
        (WebCore::parseLicenseFormat): Refactored to use new Key class.
        (WebCore::extractKeyidsLocationFromCencInitData): Refactored to
        use better named constants.
        (WebCore::extractKeyidsFromCencInitData): Ditto.
        (WebCore::CDMInstanceClearKey::createSession): Use the
        trackSession method to allow easier monitoring of all EME
        sessions.
        (WebCore::CDMInstanceSessionClearKey::requestLicense): Refactor to
        keep track of generated session IDs.
        (WebCore::CDMInstanceSessionClearKey::updateLicense): Refactor to
        use new key management classes.
        (WebCore::CDMInstanceSessionClearKey::loadSession): Ditto.
        (WebCore::CDMInstanceSessionClearKey::removeSessionData): Ditto.
        (WebCore::ClearKeyState::keys): Deleted.
        (WebCore::ClearKeyState::singleton): Deleted.
        (WebCore::isolatedKey): Deleted.
        (WebCore::ProxyCDMClearKey::isolatedKeys const): Deleted.
        (WebCore::CDMInstanceClearKey::CDMInstanceClearKey): Deleted.
        (WebCore::CDMInstanceClearKey::Key::keyIDAsString const): Deleted.
        (WebCore::CDMInstanceClearKey::Key::keyValueAsString const): Deleted.
        (WebCore::operator==): Deleted.
        (WebCore::operator<): Deleted. It looks like we were unnecessarily
        sorting the key vectors. It doesn't make any sense to impose an
        ordering on keys, so I removed it.
        * platform/encryptedmedia/clearkey/CDMClearKey.h: Refactor to use
        new key management classes.
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        Remove obsolete ProxyCDM method.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
        Refactored out of syncMessage. The code was moved here and into
        waitForCDMAttachment.
        (WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):
        Ditto.
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
        waiting-for-key code, it was all broken anyway.
        (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
        Enforce use of CDMInstanceProxy, all GStreamer-based ports will be
        using the CDMProxy derived classes from background
        threads. CDMProxy's need a handle to the MediaPlayer for
        waitingForKey management, so wire that in here too. Also wire the
        GStreamer specific ClearKey proxy here.
        (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached):
        (WebCore::MediaPlayerPrivateGStreamer::waitingForKey const): Key
        status notifications are the responsibility of the CDMProxy now.
        (WebCore::MediaPlayerPrivateGStreamer::setWaitingForKey): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Now
        we use CDMInstanceProxy, not CDMInstance.
        * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:
        Added. G*-specific ClearKey implementation.
        (WebCore::CDMProxyClearKey::~CDMProxyClearKey):
        (WebCore::CDMProxyClearKey::cencSetCounterVector):
        (WebCore::CDMProxyClearKey::cencSetDecryptionKey):
        (WebCore::CDMProxyClearKey::cencDecryptFullSample):
        (WebCore::CDMProxyClearKey::cencDecryptSubsampled):
        (WebCore::CDMProxyClearKey::cencDecrypt):
        (WebCore::CDMProxyClearKey::initializeGcrypt):
        * platform/graphics/gstreamer/eme/CDMProxyClearKey.h: Added.
        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
        Refactor to use CDMProxy.
        (webkit_media_clear_key_decrypt_class_init):
        (webkit_media_clear_key_decrypt_init):
        (finalize):
        (cdmProxyAttached):
        (decrypt):
        (handleKeyResponse): Deleted. This was a badly named method that
        has been changed to cdmProxyAttached.
        (findAndSetKey): Deleted.
        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
        (webkit_media_common_encryption_decrypt_class_init):
        (transformInPlace):
        (isCDMProxyAvailable):
        (getCDMProxyFromGstContext):
        (attachCDMProxy):
        (installCDMProxyIfNotAvailable):
        (sinkEventHandler):
        (changeState):
        (setContext):
        (): Deleted.
        (isCDMInstanceAvailable): Deleted.
        (queryHandler): Deleted.
        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
        * testing/MockCDMFactory.cpp:
        (WebCore::MockCDMInstance::proxyCDM const): Deleted.
        * testing/MockCDMFactory.h:

2020-02-12  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        [GL] Remove unused methods in GLContext
        https://bugs.webkit.org/show_bug.cgi?id=207564

        Reviewed by Carlos Alberto Lopez Perez.

        These declarations are crumbs left from
        https://bugs.webkit.org/show_bug.cgi?id=161605

        No new tests because there's no behavior change.

        * platform/graphics/GLContext.h:

2020-02-12  Sunny He  <sunny_he@apple.com>

        Fix crash due to uninitialized currentStyle in CSSTransition
        https://bugs.webkit.org/show_bug.cgi?id=205959
        <rdar://57073673>

        Reviewed by Antoine Quint.

        Test: legacy-animation-engine/transitions/svg-bad-scale-crash.html

        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::create):
        (WebCore::CSSTransition::CSSTransition):
        * animation/CSSTransition.h:

2020-02-11  Peng Liu  <peng.liu6@apple.com>

        Rename VideoFullscreenLayerManager to VideoLayerManager
        https://bugs.webkit.org/show_bug.cgi?id=207502

        Reviewed by Youenn Fablet.

        No new tests -- no new or changed functionality.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/VideoLayerManager.h: Renamed from Source/WebCore/platform/graphics/VideoFullscreenLayerManager.h.
        (WebCore::VideoLayerManager::~VideoLayerManager):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoFullscreenInlineImage):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer const):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::requiresTextTrackRepresentation const):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::syncTextTrackBounds):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setTextTrackRepresentation):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenFrame):
        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.h.
        * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm.
        (WebCore::VideoLayerManagerObjC::VideoLayerManagerObjC):
        (WebCore::VideoLayerManagerObjC::setVideoLayer):
        (WebCore::VideoLayerManagerObjC::updateVideoFullscreenInlineImage):
        (WebCore::VideoLayerManagerObjC::setVideoFullscreenLayer):
        (WebCore::VideoLayerManagerObjC::setVideoFullscreenFrame):
        (WebCore::VideoLayerManagerObjC::didDestroyVideoLayer):
        (WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const):
        (WebCore::VideoLayerManagerObjC::syncTextTrackBounds):
        (WebCore::VideoLayerManagerObjC::setTextTrackRepresentation):
        (WebCore::VideoLayerManagerObjC::logChannel const):

2020-02-11  Yusuke Suzuki  <ysuzuki@apple.com>

        Compress ImmutableStyleProperties by using PackedPtr
        https://bugs.webkit.org/show_bug.cgi?id=207604

        Reviewed by Mark Lam.

        ImmutableStyleProperties is kept so long and consumes enough memory.
        We already attempted to compact it by storing CSSProperty's members separately.
        But we can compact further by using PackedPtr. This patch makes,

            1. Use PackedPtr for CSSValue* in ImmutableStyleProperties so that we can cut some bytes
            2. Reorder CSSValue* and StylePropertyMetadata arrays since StylePropertyMetadata requires alignment while PackedPtr<CSSValue> is not.

        No behavior change.

        * css/StyleProperties.cpp:
        (WebCore::sizeForImmutableStylePropertiesWithPropertyCount):
        (WebCore::ImmutableStyleProperties::ImmutableStyleProperties):
        (WebCore::ImmutableStyleProperties::~ImmutableStyleProperties):
        (WebCore::ImmutableStyleProperties::findCustomPropertyIndex const):
        * css/StyleProperties.h:
        (WebCore::ImmutableStyleProperties::valueArray const):
        (WebCore::ImmutableStyleProperties::metadataArray const):
        (WebCore::ImmutableStyleProperties::propertyAt const):

2020-02-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GStreamer] Debug build fix after r256353.

        Unreviewed build fix.

        * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
        (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
        (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue):

2020-02-11  Fujii Hironori  <Hironori.Fujii@sony.com>

        Fix declarations marked by wrong export macros (WEBCORE_EXPORT and WTF_EXPORT)
        https://bugs.webkit.org/show_bug.cgi?id=207453

        Reviewed by Ross Kirsling.

        No new tests because there is no behavior change.

        * rendering/RenderTheme.h:
        * testing/MockContentFilterSettings.h:
        * testing/MockGamepadProvider.h:

2020-02-11  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r236025): Correct flaky WebGL2 test failures
        https://bugs.webkit.org/show_bug.cgi?id=207595
        <rdar://problem/59367393>

        Reviewed by Jon Lee.

        Correct handling of sample parameters in the prototype WebGL2 implementation.

        Tested by existing tests.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getInternalformatParameter):

2020-02-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Rename Layout::Container to Layout::ContainerBox
        https://bugs.webkit.org/show_bug.cgi?id=207585
        <rdar://problem/59363845>

        Reviewed by Antti Koivisto.

        ContainerBox name is more inline with the rest of the box classes.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::FormattingContext):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        (WebCore::Layout::mapHorizontalPositionToAncestor):
        (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::root const):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        (WebCore::Layout::LayoutContext::createFormattingContext):
        * layout/LayoutContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::LayoutState):
        (WebCore::Layout::LayoutState::establishedFormattingState const):
        (WebCore::Layout::LayoutState::establishedInlineFormattingState const):
        (WebCore::Layout::LayoutState::establishedBlockFormattingState const):
        (WebCore::Layout::LayoutState::establishedTableFormattingState const):
        (WebCore::Layout::LayoutState::ensureFormattingState):
        (WebCore::Layout::LayoutState::ensureInlineFormattingState):
        (WebCore::Layout::LayoutState::ensureBlockFormattingState):
        (WebCore::Layout::LayoutState::ensureTableFormattingState):
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::hasInlineFormattingState const):
        (WebCore::Layout::LayoutState::root const):
        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        (WebCore::Layout::verifyAndOutputSubtree):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::initialContainingBlock):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::absoluteDisplayBox):
        (WebCore::Display::paintSubtree):
        (WebCore::Display::collectPaintRootsAndContentRect):
        * layout/floats/FloatAvoider.cpp:
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::FloatingContext):
        (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        * layout/floats/FloatingContext.h:
        (WebCore::Layout::FloatingContext::root const):
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::FloatingState):
        (WebCore::Layout::FloatingState::append):
        (WebCore::Layout::FloatingState::bottom const):
        (WebCore::Layout::FloatingState::top const):
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::create):
        (WebCore::Layout::FloatingState::root const):
        (WebCore::Layout::FloatingState::leftBottom const):
        (WebCore::Layout::FloatingState::rightBottom const):
        (WebCore::Layout::FloatingState::bottom const):
        (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
        (WebCore::Layout::nextInlineLevelBoxToLayout):
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::computedTextIndent const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::LineLayoutContext):
        * layout/inlineformatting/LineLayoutContext.h:
        (WebCore::Layout::LineLayoutContext::root const):
        * layout/integration/LayoutIntegrationBoxTree.h:
        (WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
        (WebCore::LayoutIntegration::BoxTree::rootLayoutBox):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::rootLayoutBox const):
        (WebCore::LayoutIntegration::LineLayout::rootLayoutBox):
        * layout/integration/LayoutIntegrationLineLayout.h:
        * layout/invalidation/InvalidationState.h:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesInlineFormattingContext const):
        (WebCore::Layout::Box::containingBlock const):
        (WebCore::Layout::Box::formattingContextRoot const):
        (WebCore::Layout::Box::initialContainingBlock const):
        (WebCore::Layout::Box::isDescendantOf const):
        (WebCore::Layout::Box::isContainingBlockDescendantOf const):
        (WebCore::Layout::Box::isOverflowVisible const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::parent const):
        (WebCore::Layout::Box::isContainerBox const):
        (WebCore::Layout::Box::setParent):
        (WebCore::Layout::Box::isContainer const): Deleted.
        * layout/layouttree/LayoutChildIterator.h:
        (WebCore::Layout::LayoutChildIterator<T>::LayoutChildIterator):
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::LayoutChildIteratorAdapter):
        (WebCore::Layout::childrenOfType):
        * layout/layouttree/LayoutContainerBox.cpp: Renamed from Source/WebCore/layout/layouttree/LayoutContainer.cpp.
        (WebCore::Layout::ContainerBox::ContainerBox):
        (WebCore::Layout::ContainerBox::firstInFlowChild const):
        (WebCore::Layout::ContainerBox::firstInFlowOrFloatingChild const):
        (WebCore::Layout::ContainerBox::lastInFlowChild const):
        (WebCore::Layout::ContainerBox::lastInFlowOrFloatingChild const):
        (WebCore::Layout::ContainerBox::setFirstChild):
        (WebCore::Layout::ContainerBox::setLastChild):
        (WebCore::Layout::ContainerBox::appendChild):
        * layout/layouttree/LayoutContainerBox.h: Renamed from Source/WebCore/layout/layouttree/LayoutContainer.h.
        * layout/layouttree/LayoutDescendantIterator.h:
        (WebCore::Layout::LayoutDescendantIterator<T>::LayoutDescendantIterator):
        (WebCore::Layout::LayoutDescendantIteratorAdapter<T>::LayoutDescendantIteratorAdapter):
        (WebCore::Layout::descendantsOfType):
        * layout/layouttree/LayoutIterator.h:
        (WebCore::Layout::LayoutBoxTraversal::firstChild):
        (WebCore::Layout::LayoutBoxTraversal::nextAncestorSibling):
        (WebCore::Layout::LayoutBoxTraversal::next):
        (WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren):
        (WebCore::Layout::Traversal::next):
        (WebCore::Layout::LayoutIterator<T>::LayoutIterator):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::LayoutTreeContent::LayoutTreeContent):
        (WebCore::Layout::appendChild):
        (WebCore::Layout::TreeBuilder::buildLayoutTree):
        (WebCore::Layout::TreeBuilder::createContainer):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::TreeBuilder::buildTableStructure):
        (WebCore::Layout::TreeBuilder::buildSubTree):
        (WebCore::Layout::outputInlineRuns):
        (WebCore::Layout::outputLayoutTree):
        * layout/layouttree/LayoutTreeBuilder.h:
        (WebCore::Layout::LayoutTreeContent::rootLayoutBox const):
        (WebCore::Layout::LayoutTreeContent::rootLayoutBox):
        (WebCore::Layout::LayoutTreeContent::addBox):
        (WebCore::Layout::LayoutTreeContent::addContainer):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::TableFormattingContext):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::ensureTableGrid):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        * layout/tableformatting/TableFormattingContext.h:

2020-02-11  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: iteration of cursors skip records if deleted
        https://bugs.webkit.org/show_bug.cgi?id=207437

        Reviewed by Brady Eidson.

        When changes are made to records, cursors will dump cached records and set new key range for iteration.
        The new range did not include key of current cursor record, which is wrong because two index records can have 
        the same key but different values.
        r237590 tried fixing this issue by caching all the following records which have the same key as current record.
        That is not quite right as there could be changes on the cached records, and the cached records were not 
        updated.

        To correctly fix the issue, set the new key range to include key of current cursor record and exclude values
        visited before. To not regress preformance, we complete this by making an extra statment and changing
        IndexRecordsIndex index of table IndexRecords to cover value column.

        Added test case in: storage/indexeddb/cursor-update-while-iterating.html
        Index upgrade covered by existing API test: IndexedDB.IDBObjectStoreInfoUpgradeToV2

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::buildPreIndexStatement):
        (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
        (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindPreIndexStatementIfNecessary):
        (WebCore::IDBServer::SQLiteIDBCursor::fetch):
        (WebCore::IDBServer::SQLiteIDBCursor::fetchNextRecord):
        (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
        * Modules/indexeddb/server/SQLiteIDBCursor.h:
        (WebCore::IDBServer::SQLiteIDBCursor::isDirectionNext const):

2020-02-11  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, partial rollout of r255037.
        <rdar://problem/59240559>

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

2020-02-11  Rob Buis  <rbuis@igalia.com>

        Bug 207424: Crash in WebCore::ParsedContentType::parseContentType when parsing invalid MIME type
        <https://webkit.org/b/207424>
        <rdar://problem/59250384>

        Reviewed by Rob Buis.

        Return StringView directly rather than wrapping
        it in Optional, since StringView's can be null tested.

        Tests: TestWebKitAPI.ParsedContentType

        * platform/network/ParsedContentType.cpp:
        (WebCore::parseToken):
        (WebCore::parseQuotedString):
        (WebCore::ParsedContentType::parseContentType): Don't set type
        parameter if parameterName is null string.  Remove unneeded
        `parameterName` variable; use keyRange.toString() instead.

2020-02-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Do not create generic Layout::Box leaf boxes
        https://bugs.webkit.org/show_bug.cgi?id=207570
        <rdar://problem/59356417>

        Reviewed by Antti Koivisto.

        A Layout::Box is either a container box or a very specific leaf type (text, replaced etc).

        * layout/layouttree/LayoutBox.cpp:
        * layout/layouttree/LayoutBox.h:

2020-02-11  Youenn Fablet  <youenn@apple.com>

        Parent service worker controller should be used for child iframe as per https://w3c.github.io/ServiceWorker/#control-and-use-window-client
        https://bugs.webkit.org/show_bug.cgi?id=207506

        Reviewed by Darin Adler.

        Instead of checking document URL protocol, implement the rules as per spec, in particular:
        - If http/https, do not reuse controller
        - If iframe has a unique origin, do not reuse controller
        - If iframe does not have same origin as parent, do not reuse controller.

        Covered by rebased test.

        * loader/DocumentLoader.cpp:
        (WebCore::isInheritingControllerFromParent):
        (WebCore::DocumentLoader::commitData):
        (WebCore::isLocalURL): Deleted.

2020-02-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce Layout::ReplacedBox
        https://bugs.webkit.org/show_bug.cgi?id=207561
        <rdar://problem/59353151>

        Reviewed by Antti Koivisto.

        This is in preparation for making Layout::Box an "abstract" box (so that it stops being a leaf type of box).

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedMarginBefore):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::append):
        (WebCore::Layout::LineBuilder::appendReplacedInlineBox):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::inlineItemWidth const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::Box):
        (WebCore::Layout::Box::isInlineBox const):
        (WebCore::Layout::Box::replaced const): Deleted.
        (WebCore::Layout::Box::replaced): Deleted.
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isTableCell const):
        (WebCore::Layout::Box::isReplacedBox const):
        (WebCore::Layout::Box::isReplaced const): Deleted.
        * layout/layouttree/LayoutReplacedBox.cpp: Renamed from Source/WebCore/layout/layouttree/LayoutReplaced.cpp.
        (WebCore::Layout::ReplacedBox::ReplacedBox):
        (WebCore::Layout::ReplacedBox::hasIntrinsicWidth const):
        (WebCore::Layout::ReplacedBox::hasIntrinsicHeight const):
        (WebCore::Layout::ReplacedBox::hasIntrinsicRatio const):
        (WebCore::Layout::ReplacedBox::intrinsicWidth const):
        (WebCore::Layout::ReplacedBox::intrinsicHeight const):
        (WebCore::Layout::ReplacedBox::intrinsicRatio const):
        (WebCore::Layout::ReplacedBox::hasAspectRatio const):
        * layout/layouttree/LayoutReplacedBox.h: Renamed from Source/WebCore/layout/layouttree/LayoutReplaced.h.
        (WebCore::Layout::ReplacedBox::setCachedImage):
        (WebCore::Layout::ReplacedBox::cachedImage const):
        (WebCore::Layout::ReplacedBox::setIntrinsicSize):
        (WebCore::Layout::ReplacedBox::setIntrinsicRatio):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::outputLayoutBox):

2020-02-11  Youenn Fablet  <youenn@apple.com>

        Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
        https://bugs.webkit.org/show_bug.cgi?id=207325
        <rdar://problem/59224810>

        Reviewed by Eric Carlson.

        Manually tested and covered by API test.

        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
        (WebCore::LibWebRTCProvider::webRTCAvailable):
        Return true unconditionally on iOS since libwebrtc.dylib is always available.

2020-02-11  Peng Liu  <peng.liu6@apple.com>

        Cleanup WebCore.xcodeproj/project.pbxproj
        https://bugs.webkit.org/show_bug.cgi?id=207573

        Reviewed by Darin Adler.

        No new tests -- no new or changed functionality.

        * WebCore.xcodeproj/project.pbxproj:

2020-02-11  Megan Gardner  <megan_gardner@apple.com>

        Draw underlines when specified in highlights
        https://bugs.webkit.org/show_bug.cgi?id=207319

        Reviewed by Simon Fraser.

        Test: http/wpt/css/css-highlight-api/highlight-text-decorations.html

        When determining if we have any text decorations, currently we were only looking at the lineStyle,
        but since highlights can have text decorations, they need to be considered in these calculations.

        * dom/Document.cpp:
        (WebCore::Document::updateHighlightPositions):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):
        (WebCore::InlineTextBox::paintMarkedTextDecoration):
        * rendering/TextDecorationPainter.cpp:
        (WebCore::TextDecorationPainter::textDecorationsInEffectForStyle):
        * rendering/TextDecorationPainter.h:

2020-02-11  Eric Carlson  <eric.carlson@apple.com>

        Support in-band VTT captions when loading media in the GPU Process
        https://bugs.webkit.org/show_bug.cgi?id=207467
        <rdar://problem/59312749>

        Reviewed by Jer Noble.

        No new tests, existing tests enabled in GPU process.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        * Modules/webaudio/AudioContext.h:
        (WebCore::AudioContext::nextAudioNodeLogIdentifier):
        (WebCore::AudioContext::nextAudioParameterLogIdentifier):
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
        (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
        (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack):
        * html/track/AudioTrack.cpp:
        (WebCore::AudioTrack::AudioTrack):
        (WebCore::AudioTrack::willRemove):
        (WebCore::AudioTrack::setMediaElement):
        (WebCore::AudioTrack::setLogger):
        * html/track/AudioTrack.h:
        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::InbandGenericTextTrack::parseWebVTTCueData):
        * html/track/InbandGenericTextTrack.h:
        * html/track/InbandTextTrack.cpp:
        (WebCore::InbandTextTrack::create):
        (WebCore::InbandTextTrack::InbandTextTrack):
        (WebCore::toPrivate):
        (WebCore::InbandTextTrack::updateKindFromPrivate):
        (WebCore::InbandTextTrack::setLogger):
        * html/track/InbandTextTrack.h:
        * html/track/InbandWebVTTTextTrack.cpp:
        (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
        * html/track/InbandWebVTTTextTrack.h:
        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::setKind):
        (WebCore::TextTrack::setMode):
        (WebCore::TextTrack::removeAllCues):
        (WebCore::TextTrack::addCue):
        * html/track/TextTrack.h:
        (WTF::LogArgument<WebCore::TextTrack::Kind>::toString):
        (WTF::LogArgument<WebCore::TextTrack::Mode>::toString):
        * html/track/TrackBase.cpp:
        (WebCore::TrackBase::TrackBase):
        (WebCore::TrackBase::setMediaElement):
        (WebCore::TrackBase::setLogger):
        (WebCore::nextLogIdentifier): Deleted.
        * html/track/TrackBase.h:
        * html/track/VideoTrack.cpp:
        (WebCore::VideoTrack::VideoTrack):
        (WebCore::VideoTrack::setMediaElement):
        (WebCore::VideoTrack::setLogger):
        * html/track/VideoTrack.h:
        * platform/graphics/InbandTextTrackPrivate.h:
        (WebCore::InbandTextTrackPrivate::kind const):
        (WebCore::InbandTextTrackPrivate::cueFormat const):
        (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate):
        * platform/graphics/InbandTextTrackPrivateClient.h:
        * platform/graphics/MediaPlayerEnums.h:
        * platform/graphics/TrackPrivateBase.cpp:
        (WebCore::TrackPrivateBase::setLogger):
        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
        (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks):
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
        (WebCore::InbandTextTrackPrivateAVFObjC::kind const):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack):
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
        (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
        * platform/graphics/iso/ISOVTTCue.cpp:
        (WebCore::ISOWebVTTCue::ISOWebVTTCue):
        * platform/graphics/iso/ISOVTTCue.h:
        * platform/mock/mediasource/MockTracks.h:
        (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):

2020-02-11  Andres Gonzalez  <andresg_22@apple.com>

        Fix for crashes in WebAccessibilityObjectWrapper after notification updates in IsolatedTree mode.
        https://bugs.webkit.org/show_bug.cgi?id=207558

        Reviewed by Chris Fleizach.

        - Accessibility methods invoked in the secondary thread that Return id
        values retrieved from the main thread, need to retain/autorelease the
        returned ids.
        - When serving a request on the AX thread that requires retrieving a
        value from the main thread, the backing obbject on the main thread may
        have gone away, so need to check for nullity of the backing object also
        on the main thread.

        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::Accessibility::retrieveAutoreleasedValueFromMainThread):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromRange:]):
        (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper scrollViewParent]):
        (-[WebAccessibilityObjectWrapper windowElement:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2020-02-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce Layout::LineBreakBox
        https://bugs.webkit.org/show_bug.cgi?id=207550
        <rdar://problem/59348274>

        Reviewed by Antti Koivisto.

        This is in preparation for making Layout::Box an abstract box (so that it stops being a leaf type of box).

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        * layout/integration/LayoutIntegrationBoxTree.cpp:
        (WebCore::LayoutIntegration::BoxTree::buildTree):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isImage const):
        (WebCore::Layout::Box::isLineBreakBox const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLineBreakBox):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        * layout/layouttree/LayoutTreeBuilder.h:

2020-02-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce Layout::InlineTextBox
        https://bugs.webkit.org/show_bug.cgi?id=207530
        <rdar://problem/59336020>

        Reviewed by Antti Koivisto.

        Any text that is directly contained inside a block container element (not inside an inline element) must be treated as an anonymous inline element.

        * Sources.txt:
        * layout/Verification.cpp:
        (WebCore::Layout::checkForMatchingTextRuns):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::m_textContext):
        * layout/inlineformatting/InlineSoftLineBreakItem.h:
        (WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem):
        (WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::isEmptyContent const):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::inlineTextBox const):
        (WebCore::Layout::InlineTextItem::createWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createEmptyItem):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        (WebCore::Layout::InlineTextItem::left const):
        (WebCore::Layout::InlineTextItem::right const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::split):
        * layout/inlineformatting/text/TextUtil.h:
        * layout/integration/LayoutIntegrationBoxTree.cpp:
        (WebCore::LayoutIntegration::BoxTree::buildTree):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::Box):
        (): Deleted.
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isInlineTextBox const):
        (WebCore::Layout::Box::hasTextContent const): Deleted.
        (WebCore::Layout::Box::textContext const): Deleted.
        * layout/layouttree/LayoutContainer.cpp:
        (WebCore::Layout::Container::Container):
        (): Deleted.
        * layout/layouttree/LayoutInlineTextBox.cpp: Copied from Source/WebCore/layout/layouttree/TextContext.h.
        (WebCore::Layout::InlineTextBox::InlineTextBox):
        (WebCore::Layout::m_canUseSimplifiedContentMeasuring):
        * layout/layouttree/LayoutInlineTextBox.h: Renamed from Source/WebCore/layout/layouttree/TextContext.h.
        (WebCore::Layout::InlineTextBox::content const):
        (WebCore::Layout::InlineTextBox::canUseSimplifiedContentMeasuring const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createTextBox):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::outputLayoutBox):
        * layout/layouttree/LayoutTreeBuilder.h:

2020-02-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix WPE build after r256298

        It started to fail in r256298 because of unified builds, but the issue was introduced in r256013.

        * platform/network/soup/ResourceRequestSoup.cpp: Add missing header include.

2020-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Add initial support for rendering scrollbars
        https://bugs.webkit.org/show_bug.cgi?id=206999

        Reviewed by Michael Catanzaro.

        Show overlay scrollbars with a style similar to Adwaita.

        * SourcesWPE.txt: Add ScrollAnimatorGeneric.cpp to the build.
        * platform/ScrollAnimator.cpp: Switch to use ScrollAnimatorGeneric, required to show/hide the overlay scrollbars.
        * platform/wpe/ScrollbarThemeWPE.cpp:
        (WebCore::ScrollbarThemeWPE::scrollbarThickness):
        (WebCore::ScrollbarThemeWPE::minimumThumbLength):
        (WebCore::ScrollbarThemeWPE::hasButtons):
        (WebCore::ScrollbarThemeWPE::hasThumb):
        (WebCore::ScrollbarThemeWPE::backButtonRect):
        (WebCore::ScrollbarThemeWPE::forwardButtonRect):
        (WebCore::ScrollbarThemeWPE::trackRect):
        (WebCore::ScrollbarThemeWPE::paint):
        * platform/wpe/ScrollbarThemeWPE.h:

2020-02-10  Keith Rollin  <krollin@apple.com>

        Adjust the minor version number for the desktop user agent string.
        https://bugs.webkit.org/show_bug.cgi?id=207498
        <rdar://problem/59274765>

        Reviewed by Wenson Hsieh.

        This helps with Netflix compatibility on the iPad.

        No new tests -- no new or changed functionality.

        * platform/ios/UserAgentIOS.mm:
        (WebCore::standardUserAgentWithApplicationName):

2020-02-10  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] REGRESSION (r255592): The simulated mouse event dispatch quirk should not be on by default
        https://bugs.webkit.org/show_bug.cgi?id=207513
        <rdar://problem/59326119>

        Reviewed by Tim Horton.

        Turn `shouldDispatchSimulatedMouseEvents` back off by default (r255592 enabled it by default on all web pages).

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

2020-02-10  Basuke Suzuki  <basuke.suzuki@sony.com>

        [WebCore] Shrink Vectors passed to SharedBuffer
        https://bugs.webkit.org/show_bug.cgi?id=207503

        Reviewed by Yusuke Suzuki.

        Once SharedBuffer::DataSegment is created, the content won't change in its life cycle. Shrink the passed vector
        before assigning to member variable to save space.

        With the quick research, when displaying Apple's website, 1~3% RSS usage reduction on PlayStation port.

        No new tests because there's no behavior change.

        * platform/SharedBuffer.h:

2020-02-10  Timothy Hatcher  <timothy@apple.com>

        REGRESSION (r246055): Data detected URLs are no longer blue
        https://bugs.webkit.org/show_bug.cgi?id=207490
        rdar://problem/58760796

        Reviewed by Tim Horton.

        This matches how the old code ended up working, since the old approach inlined the blue link color when
        "shouldUseLightLinks" was false. This change allows the link style color to naturally apply as expected.
        DD only uses light links when the category is "link" or "phone number" and not in the email signature.

        * editing/cocoa/DataDetection.mm:
        (WebCore::DataDetection::detectContentInRange): Only set color: currentColor when setting underline color.

2020-02-10  James Howard  <jameshoward@mac.com>

        Standard gamepad mapping for GameControllerGamepads
        https://bugs.webkit.org/show_bug.cgi?id=206033

        Reviewed by Dean Jackson.

        Extend PlatformGamepad to add a field for the gamepad mapping.
        The mapping defines the order and interpretation of the axes and
        buttons vectors, and is passed along to users of the Gamepad
        API[1].

        Letting PlatformGamepad subclassers define their mapping is the
        natural place for this functionality. The PlatformGamepad
        already defines the order of the axes and buttons and
        PlatformGamepad subclassers may know something about the
        physical layout of the gamepad they represent.

        This change modifies the GameControllerGamepad subclass of
        PlatformGamepad to set the mapping to "standard" when a
        GCExtendedGamepad is detected, and to bind the axes and buttons
        appropriately. Previously, the buttons and axes were bound
        arbitrarily, and in some cases incompletely. While that wasn't a
        bug per se, because with the mapping set to the empty string an
        implementation is free to provide any interpretation of the
        gamepad elements it likes, it was certainly less useful than the
        "standard" mapping.

        [1] https://www.w3.org/TR/gamepad/#remapping

        * Modules/gamepad/Gamepad.cpp:
        (WebCore::Gamepad::Gamepad):
        * platform/gamepad/PlatformGamepad.h:
        (WebCore::PlatformGamepad::mapping const):
        * platform/gamepad/cocoa/GameControllerGamepad.mm:
        (WebCore::GameControllerGamepad::setupAsExtendedGamepad):
        * testing/MockGamepad.cpp:
        (WebCore::MockGamepad::MockGamepad):
        (WebCore::MockGamepad::updateDetails):
        * testing/MockGamepad.h:
        * testing/MockGamepadProvider.cpp:
        (WebCore::MockGamepadProvider::setMockGamepadDetails):
        * testing/MockGamepadProvider.h:
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::setMockGamepadDetails):
        * testing/js/WebCoreTestSupport.h:

2020-02-07  Ryosuke Niwa  <rniwa@webkit.org>

        Don't update selection when calling setSelectionRange on a disconnected input element
        https://bugs.webkit.org/show_bug.cgi?id=207357

        Reviewed by Antti Koivisto.

        Don't update FrameSelection when the text form control element is disconnected from document.

        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::setSelectionRange):

2020-02-10  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Merge some of the CTAP response decoder's code
        https://bugs.webkit.org/show_bug.cgi?id=205375

        Reviewed by Darin Adler.

        This patch makes those code more compact and maintainable.

        No change of behaviors.

        * Modules/webauthn/fido/DeviceResponseConverter.cpp:
        (fido::decodeResponseMap):
        (fido::readCTAPMakeCredentialResponse):
        (fido::readCTAPGetAssertionResponse):
        (fido::readCTAPGetInfoResponse):
        * Modules/webauthn/fido/DeviceResponseConverter.h:
        * Modules/webauthn/fido/Pin.cpp:
        (fido::pin::encodePinCommand):
        (fido::pin::RetriesResponse::parse):
        (fido::pin::KeyAgreementResponse::parse):
        (fido::pin::TokenResponse::parse):

2020-02-10  Megan Gardner  <megan_gardner@apple.com>

        Rename SelectionData classes and structures HighlightData, etc to be more inclusive for their new use cases
        https://bugs.webkit.org/show_bug.cgi?id=206340

        Reviewed by Ryosuke Niwa.

        Rename only, no behaviour change.

        With the new Highlight API, we will be using these data structures to support Highlights as well as Selection, 
        rename to Highlight, as a Selection is a type of Highlight.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/DragImage.cpp:
        (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
        (WebCore::createDragImageForRange):
        * rendering/ComplexLineLayout.cpp:
        (WebCore::ComplexLineLayout::constructLine):
        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::paint):
        * rendering/EllipsisBox.h:
        * rendering/HighlightData.cpp: Renamed from Source/WebCore/rendering/SelectionRangeData.cpp.
        (WebCore::isValidRendererForSelection):
        (WebCore::collect):
        (WebCore::HighlightData::HighlightData):
        (WebCore::HighlightData::setRenderRange):
        (WebCore::HighlightData::selectionStateForRenderer):
        (WebCore::HighlightData::set):
        (WebCore::HighlightData::clear):
        (WebCore::HighlightData::repaint const):
        (WebCore::HighlightData::collectBounds const):
        (WebCore::HighlightData::apply):
        * rendering/HighlightData.h: Renamed from Source/WebCore/rendering/SelectionRangeData.h.
        (WebCore::HighlightData::RenderRange::RenderRange):
        (WebCore::HighlightData::RenderRange::operator== const):
        (WebCore::HighlightData::get const):
        (WebCore::HighlightData::start const):
        (WebCore::HighlightData::end const):
        (WebCore::HighlightData::startOffset const):
        (WebCore::HighlightData::endOffset const):
        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::selectionState):
        * rendering/InlineBox.h:
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::selectionState):
        * rendering/InlineFlowBox.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::selectionState):
        (WebCore::InlineTextBox::verifySelectionState const):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::clampedStartEndForState const):
        (WebCore::InlineTextBox::highlightStartEnd const):
        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):
        * rendering/InlineTextBox.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::shouldPaintSelectionGaps const):
        (WebCore::RenderBlock::selectionGaps):
        (WebCore::RenderBlock::blockSelectionGaps):
        (WebCore::RenderBlock::getSelectionGapInfo):
        * rendering/RenderBlock.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::setSelectionState):
        (WebCore::RenderBlockFlow::inlineSelectionGaps):
        * rendering/RenderBlockFlow.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::setSelectionState):
        * rendering/RenderBoxModelObject.h:
        * rendering/RenderLineBreak.cpp:
        (WebCore::RenderLineBreak::setSelectionState):
        * rendering/RenderLineBreak.h:
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::paint):
        (WebCore::RenderListMarker::setSelectionState):
        (WebCore::RenderListMarker::selectionRectForRepaint):
        * rendering/RenderListMarker.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::isSelectionBorder const):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::selectionState const):
        (WebCore::RenderObject::setSelectionState):
        (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
        (WebCore::RenderObject::RenderObjectBitfields::selectionState const):
        (WebCore::RenderObject::RenderObjectBitfields::setSelectionState):
        (WebCore::RenderObject::setSelectionStateIfNeeded):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::shouldDrawSelectionTint const):
        (WebCore::RenderReplaced::paint):
        (WebCore::RenderReplaced::setSelectionState):
        (WebCore::RenderReplaced::isSelected const):
        * rendering/RenderReplaced.h:
        * rendering/RenderSelectionInfo.h:
        (WebCore::RenderSelectionInfoBase::state const):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::setSelectionState):
        (WebCore::RenderText::collectSelectionRectsForLineBoxes):
        * rendering/RenderText.h:
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::setSelectionState):
        * rendering/RenderTextLineBoxes.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintAttachment):
        * rendering/RenderView.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::setSelectionState):
        * rendering/RenderWidget.h:
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::lineSelectionGap):
        (WebCore::RootInlineBox::selectionState):
        (WebCore::RootInlineBox::firstSelectedBox):
        (WebCore::RootInlineBox::lastSelectedBox):
        (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock const):
        * rendering/RootInlineBox.h:
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseForWithReason):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::paintSelectionBackground):
        (WebCore::SVGInlineTextBox::paint):
        * rendering/svg/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::paint):

2020-02-10  Simon Fraser  <simon.fraser@apple.com>

        WebContent jetsams on Sony lens webpage due to spike of IOSurfaces
        https://bugs.webkit.org/show_bug.cgi?id=207493
        rdar://problem/59020443

        Reviewed by Zalan Bujtas.

        There were three issues that contributed to massive backing store allocation on
        <https://www.sony.com/electronics/lenses/t/camera-lenses>.

        The first, fixed in r256095, was that the Web Animations code unioned the untransitioning
        bounds with the transitioning bounds, causing the computation of large extent rects.

        The second, fixed in r256181, was that GraphicsLayerCA would keep hold of a transform
        animation for an extra frame, causing a rendering update where
        RenderLayerBacking::updateGeometry() would have cleared the extent, but GraphicsLayerCA
        still thought transform was animating, causing GraphicsLayerCA::updateCoverage() to keep
        backing store attached.

        This patch is the final fix; when animations start and end, we need to ensure that
        RenderLayerBacking::updateGeometry() is called so that we compute the animation extent in
        the same frame that adds the animation.

        Test: compositing/backing/transition-extent.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::startAnimation):
        (WebCore::RenderLayerBacking::animationFinished):

2020-02-10  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Unreachable code hit in WebCore::Shape::createShape
        https://bugs.webkit.org/show_bug.cgi?id=207399

        Reviewed by Darin Adler.

        CSS parser should not consume the 'shape-outside' property with type 'path' 
        since it has not been implemented yet. This will prevent an assertion in
        the debug build and null dref in the release build.

        Test: css3/shapes/shape-outside-path-no-crash.html

        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeBasicShape):
        (WebCore::consumeShapeOutside):

2020-02-10  Daniel Bates  <dabates@apple.com>

        Disallow setting base URL to a data or JavaScript URL
        https://bugs.webkit.org/show_bug.cgi?id=207136

        Reviewed by Brent Fulgham.

        Inspired by <https://bugs.chromium.org/p/chromium/issues/detail?id=679318>.

        Block setting the base URL to a data URL or JavaScript URL as such usage is questionable.
        This makes WebKit match the behavior of Chrome and Firefox and is in the spirit of the
        discussion in <https://github.com/whatwg/html/issues/2249>.

        On Mac and iOS, this restriction is applied only to apps linked against a future SDK to
        avoid breaking shipped apps.

        For all other ports, this restriction is enabled by default.

        Tests: fast/url/relative2.html
               fast/url/segments-from-data-url2.html
               http/tests/security/allowed-base-url-data-url-via-setting.html
               http/tests/security/denied-base-url-data-url.html
               http/tests/security/denied-base-url-javascript-url.html

        * dom/Document.cpp:
        (WebCore::Document::processBaseElement): Condition updating the parsed
        base URL on whether is has an allowed scheme, if restrictions are enabled. Otherwise,
        do what we do now. If the scheme is disallowed then log a message to the console to
        explain this to web developers.
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::scan): Pass whether to apply restrictons to the base URL
        to updatePredictedBaseURL(). This depends on whether the setting is enabled or not.
        (WebCore::TokenPreloadScanner::updatePredictedBaseURL): Modifed to take a boolean as to
        whether to apply restrictions. If restrictions are not to be applied do what we do now.
        Otherwise, only do what we do now if the scheme for the predicated base URL is allowed.
        * html/parser/HTMLPreloadScanner.h:
        * page/SecurityPolicy.cpp:
        (WebCore::SecurityPolicy::isBaseURLSchemeAllowed): Added.
        * page/SecurityPolicy.h:
        * page/Settings.yaml: Add a setting to toggle restrictions on the base URL scheme.

2020-02-10  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r256091.

        Broke internal builds

        Reverted changeset:

        "Move trivial definitions from FeatureDefines.xcconfig to
        PlatformEnableCocoa.h"
        https://bugs.webkit.org/show_bug.cgi?id=207155
        https://trac.webkit.org/changeset/256091

2020-02-10  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r256103.

        This patch is blocking the rollout of r256091

        Reverted changeset:

        "Move JavaScriptCore related feature defines from
        FeatureDefines.xcconfig to PlatformEnableCocoa.h"
        https://bugs.webkit.org/show_bug.cgi?id=207436
        https://trac.webkit.org/changeset/256103

2020-02-10  Antoine Quint  <graouts@webkit.org>

        There's an event loop cycle between an animation finishing, and it being removed from GraphicsLayerCA
        https://bugs.webkit.org/show_bug.cgi?id=207361
        <rdar://problem/59280370>

        Reviewed by Simon Fraser.

        Animations should be removed from GraphicsLayersCAs in the same rendering update that changes the playState of the 
        animation to "finished", to avoid layer flush where a GraphicsLayersCAs has no extent set, but thinks there is
        an active transform animation.

        To do this, instead of enqueuing accelerated actions when resolving animations during style resolution, in
        KeyframeAnimation::apply(), we enqueue them as soon as an animation's current time may have changed: in
        WebAnimation::tick() and WebAnimation::play() with supporting functions newly exposed on AnimationEffect.

        Now, accelerated animations are enqueued and applied during the "update animations and send events" procedure.

        * animation/AnimationEffect.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::apply):
        (WebCore::KeyframeEffect::updateAcceleratedActions):
        (WebCore::KeyframeEffect::animationDidTick):
        (WebCore::KeyframeEffect::animationDidPlay):
        * animation/KeyframeEffect.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::play):
        (WebCore::WebAnimation::tick):

2020-02-10  Chris Dumez  <cdumez@apple.com>

        Make FormDataElement::lengthInBytes() safe to call on a non-main thread
        https://bugs.webkit.org/show_bug.cgi?id=207419
        <rdar://problem/54386521>

        Reviewed by Youenn Fablet.

        Make FormDataElement::lengthInBytes() safe to call on a non-main thread by using the
        ThreadableBlobRegistry. DOMCache code in workers may call this on worker threads for
        example.

        * platform/network/FormData.cpp:
        (WebCore::FormDataElement::lengthInBytes const):

2020-02-10  Rob Buis  <rbuis@igalia.com>

        Remove setHTTPAccept call for main resources
        https://bugs.webkit.org/show_bug.cgi?id=207441

        Reviewed by Darin Adler.

        Remove setHTTPAccept call for main resources since all main resource loading goes
        through CachedResourceLoader, which sets the Accept header as specified in:
        https://fetch.spec.whatwg.org/#fetching (Step 1.3).

        This patch also removed unused Accept header related functionality
        in ResourceRequest.

        No test since no change in behavior, tested by http/tests/misc/xhtml.php.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::ResourceRequestBase::httpAccept const): Deleted.
        (WebCore::ResourceRequestBase::setHTTPAccept): Deleted.
        (WebCore::ResourceRequestBase::clearHTTPAccept): Deleted.
        * platform/network/ResourceRequestBase.h:

2020-02-09  Basuke Suzuki  <basuke.suzuki@sony.com>

        Replace redundant functions with variadic template function.
        https://bugs.webkit.org/show_bug.cgi?id=207413

        Reviewed by Darin Adler.

        No new tests. Covered by existing tests.

        * loader/TextResourceDecoder.cpp:
        (WebCore::bytesEqual):

2020-02-09  Keith Rollin  <krollin@apple.com>

        Re-enable LTO for ARM builds
        https://bugs.webkit.org/show_bug.cgi?id=207402
        <rdar://problem/49190767>

        Reviewed by Sam Weinig.

        Bug 190758 re-enabled LTO for Production builds for x86-family CPUs.
        Enabling it for ARM was left out due to a compiler issue. That issue
        has been fixed, and so now we can re-enable LTO for ARM.

        No new tests -- no new or changed functionality.

        * Configurations/Base.xcconfig:

2020-02-09  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Support intruding floats
        https://bugs.webkit.org/show_bug.cgi?id=207099

        Reviewed by Zalan Bujtas.

        Add support for for floats placed by the legacy render tree layout intruding to IFC flow.

        This was the last frequently used feature supported by the simple line layout but not
        the integrated LFC (pagination is the final missing piece).

        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::remove): Deleted.
        * layout/floats/FloatingContext.h:
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::FloatItem::FloatItem):
        (WebCore::Layout::FloatingState::FloatingState):
        (WebCore::Layout::FloatingState::remove): Deleted.

        Delete some unused functions.

        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::FloatItem::isLeftPositioned const):
        (WebCore::Layout::FloatingState::clear):
        (WebCore::Layout::FloatingState::FloatItem::operator== const): Deleted.
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::canUseFor):

        Allow floats.

        (WebCore::LayoutIntegration::LineLayout::layout):
        (WebCore::LayoutIntegration::LineLayout::prepareLayoutState):
        (WebCore::LayoutIntegration::LineLayout::prepareFloatingState):

        Translate floats from render tree to IFC float structures.

        * layout/integration/LayoutIntegrationLineLayout.h:

2020-02-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Move updatePositiveNegativeMarginValues out of MarginCollapse class
        https://bugs.webkit.org/show_bug.cgi?id=207445
        <rdar://problem/59297879>

        Reviewed by Antti Koivisto.

        MarginCollapse::updatePositiveNegativeMarginValues is just a static helper.
        Let's split this function so that it can be just a regular member function (move the state updating to the BlockFormattingContext caller).

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::resolvedPositiveNegativeMarginValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues): Deleted.

2020-02-08  Sam Weinig  <weinig@apple.com>

        Move JavaScriptCore related feature defines from FeatureDefines.xcconfig to PlatformEnableCocoa.h
        https://bugs.webkit.org/show_bug.cgi?id=207436

        Reviewed by Tim Horton.

        * Configurations/FeatureDefines.xcconfig:
        Remove ENABLE_FAST_JIT_PERMISSIONS and ENABLE_FTL_JIT.

2020-02-08  Simon Fraser  <simon.fraser@apple.com>

        Optimize Style::determineChange()
        https://bugs.webkit.org/show_bug.cgi?id=207438

        Reviewed by Antti Koivisto.

        Style::determineChange() called RenderStyle::operator!=() before the testing some other
        sets of properties for inequality.
        
        It's faster to call inheritedEqual() etc before the full style compare. Also optimize
        comparing alignItems() and justifyItems() by adding a helper function that first tests
        for equality of the m_rareNonInheritedData pointer. These (added in r213480) return Inherit
        because align-items and justify-items affect child layout.
        
        This is a ~4% progression on some MotionMark subtests. Time under TreeResolver::createAnimatedElementUpdate()
        drops from 2.4% to 0.9%.

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::descendantAffectingNonInheritedPropertiesEqual const):
        * rendering/style/RenderStyle.h:
        * style/StyleChange.cpp:
        (WebCore::Style::determineChange):

2020-02-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] FloatingContext::constraints should take a vertical range instead of just vertical position.
        https://bugs.webkit.org/show_bug.cgi?id=207440
        <rdar://problem/59295022>

        Reviewed by Antti Koivisto.

        In an IFC, this covers the entire line when searching for intrusive float to shrink the available horizontal space.
        (This fix is limited to content with fixed line height)

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::constraints const):
        * layout/floats/FloatingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):

2020-02-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Replace "estimated" term with "precomputed"
        https://bugs.webkit.org/show_bug.cgi?id=207433
        <rdar://problem/59288794>

        Reviewed by Antti Koivisto.

        The term "pre-computed" describes better what this value is.

        * layout/MarginTypes.h:
        (WebCore::Layout::EstimatedMarginBefore::usedValue const): Deleted.
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRoot):
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::setPrecomputedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::hasPrecomputedMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors): Deleted.
        (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::hasEstimatedMarginBefore const): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::hasClearance const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore): Deleted.
        * layout/displaytree/DisplayBox.cpp:
        (WebCore::Display::Box::Box):
        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::setHasPrecomputedMarginBefore):
        (WebCore::Display::Box::invalidatePrecomputedMarginBefore):
        (WebCore::Display::Box::top const):
        (WebCore::Display::Box::topLeft const):
        (WebCore::Display::Box::setVerticalMargin):
        (WebCore::Display::Box::setHasEstimatedMarginBefore): Deleted.
        (WebCore::Display::Box::invalidateEstimatedMarginBefore): Deleted.

2020-02-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Pre-compute vertical position only when we really need it.
        https://bugs.webkit.org/show_bug.cgi?id=207432
        <rdar://problem/59288539>

        Reviewed by Antti Koivisto.

        Instead of pre-computing the vertical position at computeStaticVerticalPosition, let's compute it when
        1. we are about to layout a new non-float-avoider/float clear FC (e.g. so that intrusive floats can shrink the lines inside IFCs)
        2. we are about to compute the non-static vertical position of a float avoider block level box.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRoot):
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
        (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear): Deleted.
        (WebCore::Layout::BlockFormattingContext::hasPrecomputedMarginBefore const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeFloatingPosition): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:

2020-02-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Remove establishesBlockFormattingContextOnly and establishesInlineFormattingContextOnly
        https://bugs.webkit.org/show_bug.cgi?id=207431
        <rdar://problem/59288366>

        Reviewed by Antti Koivisto.

        The current caller of establishesInlineFormattingContextOnly is actually interested in whether the box is float avoider
        (and the debug-only caller of establishesBlockFormattingContextOnly should instead check if the box also establishes an IFC).

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::createFormattingContext):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesInlineFormattingContextOnly const): Deleted.
        (WebCore::Layout::Box::establishesBlockFormattingContextOnly const): Deleted.
        * layout/layouttree/LayoutBox.h:

2020-02-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Adjust Box::isFloatAvoider() for Inline and Independent FCs.
        https://bugs.webkit.org/show_bug.cgi?id=207430
        <rdar://problem/59288236>

        Reviewed by Antti Koivisto.

        A block container box that establishes both BFC and IFC is not a float avoider (add support for independent formatting context too).

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isFloatAvoider const):

2020-02-08  Simon Fraser  <simon.fraser@apple.com>

        Extent of a composited animation should not include the untransformed position
        https://bugs.webkit.org/show_bug.cgi?id=207434

        Reviewed by Sam Weinig.

        To determine whether to create ("attach") backing store for layers with transform animations,
        we compute the union of all the states of the animation as an "extent", and ask whether it intersects
        the coverage rect in GraphicsLayerCA.

        The non-Web Animations transition code did this correctly, just unioning the bounds transformed by
        the start and end state.

        The non-Web Animations keyframe code, and the Web Animations KeyframeEffect code (used for both CSS transitions
        and animations) also unioned with the unanimated bounds, which could create overly large extents in some
        cases, contributing to jetsams on iOS (rdar://problem/59020443).

        Fix KeyframeAnimation and KeyframeEffect to not union with the untransformed bounds.

        Tests: compositing/backing/backing-store-attachment-animating-outside-viewport.html
               legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const):

2020-02-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Box::isFloatAvoider should not check for isFloatingPositioned()
        https://bugs.webkit.org/show_bug.cgi?id=207429
        <rdar://problem/59288204>

        Reviewed by Antti Koivisto.

        Box::isFloatAvoider() already checks for establishesBlockFormattingContext() (and floats do establish BFCs). 

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isFloatAvoider const):

2020-02-08  Sam Weinig  <weinig@apple.com>

        Move trivial definitions from FeatureDefines.xcconfig to PlatformEnableCocoa.h
        https://bugs.webkit.org/show_bug.cgi?id=207155

        Reviewed by Tim Horton.

        Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
        from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
        also has a default value in PlatformEnable.h

        To support the move, DerivedSources.make and generate-unified-sources.sh have been 
        updated to generate the list of ENABLE_* features by directly from preprocessing 
        Platform.h, rather than just getting the partial list from the xcconfig file.

        * Configurations/FeatureDefines.xcconfig:
        * Configurations/WebCore.xcconfig:
        * DerivedSources.make:
        * Scripts/generate-unified-sources.sh:

2020-02-08  Doug Kelly  <dougk@apple.com>

        Crash in RenderTreeBuilder::Table::findOrCreateParentForChild with multicol spanner
        https://bugs.webkit.org/show_bug.cgi?id=206917

        Reviewed by Zalan Bujtas.

        During render tree construction, multi-column spanners are moved from their original tree position to
        next to the enclosing anonymous fragmented flow and we mark their previous location with a spanner placeholder.
        If we try to add a new renderer right before the spanner (beforeChild is the spanner renderer), we need to use
        the spanner's original position as the insertion point.
        This patch addresses the mismatching position issue by adjusting the spanner beforeChild right before
        we start searching for the final insertion point.

        Test: fast/multicol/spanner-crash-when-finding-table-parent.html

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::attach):
        * rendering/updating/RenderTreeBuilderTable.cpp:
        (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):

2020-02-07  Jon Lee  <jonlee@apple.com>

        Web Inspector: Revert slim toolbar
        https://bugs.webkit.org/show_bug.cgi?id=207422

        Reviewed by Timothy Hatcher.

        The slim toolbar needs a little more work before landing.

        This patch reverts r255547, r255557, r255890, r255892, r255893, r255901, r255980.

        * en.lproj/Localizable.strings:
        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendHost.cpp:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.idl:

2020-02-07  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::FontFamilySpecificationCoreText::fontRanges
        https://bugs.webkit.org/show_bug.cgi?id=207236
        <rdar://problem/57214193>

        Reviewed by Ryosuke Niwa.

        Add a state variable in FontDescriptionKey for tracking hash entry deletion.

        * platform/graphics/FontCache.h:
        (WebCore::FontDescriptionKey::FontDescriptionKey):
        (WebCore::FontDescriptionKey::operator== const):
        (WebCore::FontDescriptionKey::isHashTableDeletedValue const):

2020-02-07  Chris Dumez  <cdumez@apple.com>

        [Hardening] Validate Geolocation access permission on UIProcess side
        https://bugs.webkit.org/show_bug.cgi?id=207393
        <rdar://problem/56816051>

        Reviewed by Brent Fulgham.

        Validate Geolocation access permission on UIProcess side, instead of only relying solely on the WebProcess for this.

        The workflow is as follows:
        - The Geolocation objects request for permission to access location data
        - The UIProcess shows a prompt
        - If the user accepts, the UIProcess sends an authorization token (a UUID
          string) to the Geolocation object.
        - When the Geolocation object later asks for location updates from the UIProcess, the UIProcess validates
          that this is a valid authorization token (one that it previously issued for this page)
        - When the Geolocation objects gets destroyed (or resets its permission), the authorization token gets
          revoked so that it is no longer valid.

        No new tests, no Web-facing behavior change, merely hardening.

        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::~Geolocation):
        (WebCore::Geolocation::resumeTimerFired):
        (WebCore::Geolocation::resetAllGeolocationPermission):
        (WebCore::Geolocation::stop):
        (WebCore::Geolocation::setIsAllowed):
        (WebCore::Geolocation::revokeAuthorizationTokenIfNecessary):
        (WebCore::Geolocation::resetIsAllowed):
        * Modules/geolocation/Geolocation.h:
        * Modules/geolocation/GeolocationClient.h:
        (WebCore::GeolocationClient::revokeAuthorizationToken):
        * Modules/geolocation/GeolocationController.cpp:
        (WebCore::GeolocationController::addObserver):
        (WebCore::GeolocationController::revokeAuthorizationToken):
        (WebCore::GeolocationController::activityStateDidChange):
        * Modules/geolocation/GeolocationController.h:
        * platform/mock/GeolocationClientMock.cpp:
        (WebCore::GeolocationClientMock::permissionTimerFired):
        (WebCore::GeolocationClientMock::startUpdating):
        * platform/mock/GeolocationClientMock.h:

2020-02-07  Alex Christensen  <achristensen@apple.com>

        Remember if we used legacy TLS in the back/forward cache like we remember if we have only secure content
        https://bugs.webkit.org/show_bug.cgi?id=207409
        rdar://problem/59275641

        Reviewed by Chris Dumez.

        Covered by an API test.

        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::setHasInsecureContent):
        * history/CachedFrame.h:
        (WebCore::CachedFrame::usedLegacyTLS const):
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::dispatchDidCommitLoad):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:

2020-02-07  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r256051.

        Broke internal builds.

        Reverted changeset:

        "Move trivial definitions from FeatureDefines.xcconfig to
        PlatformEnableCocoa.h"
        https://bugs.webkit.org/show_bug.cgi?id=207155
        https://trac.webkit.org/changeset/256051

2020-02-07  Eric Carlson  <eric.carlson@apple.com>

        Captions sometimes render at the wrong size when in fullscreen and PiP
        https://bugs.webkit.org/show_bug.cgi?id=207389
        <rdar://problem/58677864>

        Reviewed by Jer Noble.

        The TextTrackRepresentation, used to render captions when in fullscreen and PiP on
        iOS and and in PiP on macOS, frequently rendered captions before layout completed
        immediately after it was created. Fix this by having it not render until a layout
        happens. Additionally, make the code more efficient by hiding the TextTrackRepresentation's
        backing layer when cues are not visible instead of destroying the whole object.
        Drive by: RELEASE_LOG_DISABLED is always defined for PLATFORM(COCOA), so remove it
        from the macOS/iOS media players to make it easier to add logging to VideoFullscreenLayerManagerObjC.
        

        * html/HTMLMediaElement.cpp:
        (WebCore::convertEnumerationToString):
        (WebCore::HTMLMediaElement::configureTextTrackDisplay):
        * html/HTMLMediaElementEnums.h:
        (WTF::LogArgument<WebCore::HTMLMediaElementEnums::TextTrackVisibilityCheckType>::toString):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
        (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationStyle):
        (WebCore::MediaControlTextTrackContainerElement::layoutIfNecessary):
        (WebCore::MediaControlTextTrackContainerElement::updateVideoDisplaySize):
        (WebCore::MediaControlTextTrackContainerElement::updateSizes):
        (WebCore::MediaControlTextTrackContainerElement::updateCueStyles):
        (WebCore::MediaControlTextTrackContainerElement::logger const):
        (WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
        (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Deleted.
        (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Deleted.
        * platform/graphics/TextTrackRepresentation.h:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
        (WebCore::MediaPlayerPrivateAVFoundation::logChannel const):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::mediaPlayerLogger):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::logChannel const):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::logChannel const):
        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.h:
        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
        (WebCore::VideoFullscreenLayerManagerObjC::VideoFullscreenLayerManagerObjC):
        (WebCore::VideoFullscreenLayerManagerObjC::setVideoLayer):
        (WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenLayer):
        (WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenFrame):
        (WebCore::VideoFullscreenLayerManagerObjC::didDestroyVideoLayer):
        (WebCore::VideoFullscreenLayerManagerObjC::syncTextTrackBounds):
        (WebCore::VideoFullscreenLayerManagerObjC::setTextTrackRepresentation):
        (WebCore::VideoFullscreenLayerManagerObjC::logChannel const):
        * platform/graphics/cocoa/TextTrackRepresentationCocoa.h:
        * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
        (-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
        (TextTrackRepresentationCocoa::setHidden const):
        (TextTrackRepresentationCocoa::boundsChanged):
        * rendering/RenderMediaControlElements.cpp:
        (WebCore::RenderTextTrackContainerElement::layout):

2020-02-07  Sam Weinig  <weinig@apple.com>

        Move trivial definitions from FeatureDefines.xcconfig to PlatformEnableCocoa.h
        https://bugs.webkit.org/show_bug.cgi?id=207155

        Reviewed by Tim Horton.

        Move all trivial definitions (just ENABLE_FOO = ENABLE_FOO; or ENABLE_BAR = ;)
        from the FeatureDefines.xcconfigs to PlatformEnableCocoa.h, ensuring each one
        also has a default value in PlatformEnable.h

        To support the move, DerivedSources.make and generate-unified-sources.sh have been 
        updated to generate the list of ENABLE_* features by directly from preprocessing 
        Platform.h, rather than just getting the partial list from the xcconfig file.

        * Configurations/FeatureDefines.xcconfig:
        * Configurations/WebCore.xcconfig:
        * DerivedSources.make:
        * Scripts/generate-unified-sources.sh:

2020-02-07  Nikos Mouchtaris  <nmouchtaris@apple.com>

        [Apple Pay] Provide a redacted billing contact during payment method selection
        https://bugs.webkit.org/show_bug.cgi?id=207169
        <rdar://problem/42737441>

        Reviewed by Andy Estes.

        Added requestBillingAddress option to PaymentOptions, to allow merchants
        to request the user's billing address prior to user authentication to allow
        the calculation of taxes. Added billingAddress member to ApplePayPaymentMethod 
        to return the billing address in the PaymentMethodChanged callback function.

        Test: http/tests/ssl/applepay/ApplePayBillingAddress.html

        * Modules/applepay/ApplePayPaymentMethod.h:
        * Modules/applepay/ApplePayPaymentMethod.idl:
        * Modules/applepay/PaymentCoordinatorClient.cpp:
        (WebCore::PaymentCoordinatorClient::supportsVersion):
        * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
        (WebCore::convert):
        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
        (WebCore::mergePaymentOptions):
        * Modules/paymentrequest/PaymentOptions.h:
        * Modules/paymentrequest/PaymentOptions.idl:

2020-02-07  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Slightly improve performance of Font::getCFStringAttributes()
        https://bugs.webkit.org/show_bug.cgi?id=207374

        Reviewed by Darin Adler.

        Switch from CFDictionaryCreateMutable() to CFDictionaryCreate(). Also, don't construct a CTParagraphStyle each time the function is called.

        No new tests because there is no behavior change.

        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::widthForSimpleText const):
        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
        (WebCore::Font::getCFStringAttributes const):

2020-02-07  youenn fablet  <youenn@apple.com>

        Align getDisplayMedia() with spec
        https://bugs.webkit.org/show_bug.cgi?id=207191
        <rdar://problem/59151017>

        Reviewed by Eric Carlson.

        Update WebIDL as per spec to have the correct default values for getDisplayMedia.
        Covered by updated test.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::getDisplayMedia):
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/MediaDevices.idl:

2020-02-07  youenn fablet  <youenn@apple.com>

        Add release logging for the case of libwebrtc being not available
        https://bugs.webkit.org/show_bug.cgi?id=207383

        Reviewed by Eric Carlson.

        Add logging in case of no libwebrtc dylib, in case we try to create a peer connection or a libwebrtc factory.
        No change of behavior.

        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::createLibWebRTCPeerConnectionBackend):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::LibWebRTCProvider::factory):

2020-02-07  youenn fablet  <youenn@apple.com>

        Filter out TURN/STUN .local URLs from a RTCPeerConnection iceServers list
        https://bugs.webkit.org/show_bug.cgi?id=207332

        Reviewed by Eric Carlson.

        Test: webrtc/stun-server-filtering.html

        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::iceServersFromConfiguration):
        Ignore .local URLs for STUN/TURN servers as they are not used right now
        and could be used to discover local network services.

2020-02-07  Antoine Quint  <graouts@webkit.org>

        REGRESSION (r255953): [ iOS Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events.html is crashing
        https://bugs.webkit.org/show_bug.cgi?id=207342
        <rdar://problem/59227960>

        Reviewed by Youenn Fablet.

        DocumentTimeline::detachFromDocument() may remove the last reference to WebAnimation objects that may, in return, remove the last reference of this
        DocumentTimeline. As such, this method should make a strong reference to itself for the span of this method. However, we should not be calling it
        from the destructor where the only thing matters is removing the weak reference from the Document to the DocumentTimeline.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::~DocumentTimeline):
        (WebCore::DocumentTimeline::detachFromDocument):

2020-02-07  youenn fablet  <youenn@apple.com>

        Mandate UUID version 4 for mDNS ICE candidates
        https://bugs.webkit.org/show_bug.cgi?id=207329

        Reviewed by Alex Christensen.

        Ignore ICE candidates if they are mDNS but not UUID version 4.
        Covered by existing tests relying on mDNS to do the connection.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::shouldIgnoreCandidate):
        (WebCore::PeerConnectionBackend::addIceCandidate):

2020-02-07  Tomoki Imai  <Tomoki.Imai@sony.com>

        [OpenSSL] Implement WebCrypto APIs for AES-CBC, AES-CFB and AES-GCM
        https://bugs.webkit.org/show_bug.cgi?id=207176

        Reviewed by Fujii Hironori.

        Add WebCrypto implementations for the following algorithms with OpenSSL.
        - AES_CBC
        - AES_CFB
        - AES_GCM

        Currently we don't have AES-KW implementation, because EVP API doesn't have AES-KW implementation.

        Enabled WebCrypto LayoutTests for AES-CBC, AES-CFB and AES-GCM.

        * crypto/openssl/CryptoAlgorithmAES_CBCOpenSSL.cpp:
        (WebCore::aesAlgorithm): Added. Helper function to select which AES-CBC algorithm to be used by checking key size.
        (WebCore::cryptEncrypt): Added. Helper function for platformEncrypt.
        (WebCore::cryptDecrypt): Added. Helper function for platformDecrypt.
        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt): Implemented
        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt): Implemented
        * crypto/openssl/CryptoAlgorithmAES_CFBOpenSSL.cpp:
        (WebCore::aesAlgorithm): Added. Helper function to select which AES-CFB algorithm to be used by checking key size.
        (WebCore::cryptEncrypt): Added. Helper function for platformEncrypt.
        (WebCore::cryptDecrypt): Added. Helper function for platformDecrypt.
        (WebCore::CryptoAlgorithmAES_CFB::platformEncrypt): Implemented
        (WebCore::CryptoAlgorithmAES_CFB::platformDecrypt): Implemented
        * crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp:
        (WebCore::aesAlgorithm): Added. Helper function to select which AES-GCM algorithm to be used by checking key size.
        (WebCore::cryptEncrypt): Added. Helper function for platformEncrypt.
        (WebCore::cryptDecrypt): Added. Helper function for platformDecrypt.
        (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt): Implemented
        (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt): Implemented
        * crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp:
        (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Registered CryptoAlgorithmAES_CBC, CryptoAlgorithmAES_CFB,
        and CryptoAlgorithmAES_GCM.
        * crypto/openssl/OpenSSLCryptoUniquePtr.h: Added to make sure that EVP_CIPHER_CTX is freed.
        (WebCore::OpenSSLCryptoPtrDeleter<EVP_CIPHER_CTX>::operator() const):

2020-02-07  Patrick Griffis  <pgriffis@igalia.com>

        [GTK][WPE] Add same-site cookie support
        https://bugs.webkit.org/show_bug.cgi?id=204137

        Reviewed by Carlos Garcia Campos.

        Implements same-site cookie support in the soup backend.

        * platform/network/HTTPParsers.cpp:
        (WebCore::isSafeMethod):
        * platform/network/HTTPParsers.h:
        * platform/network/SameSiteInfo.cpp:
        (WebCore::SameSiteInfo::create):
        * platform/network/SameSiteInfo.h:
        (WebCore::SameSiteInfo::encode const):
        (WebCore::SameSiteInfo::decode):
        * platform/network/soup/CookieSoup.cpp:
        (WebCore::coreSameSitePolicy):
        (WebCore::soupSameSitePolicy):
        (WebCore::Cookie::Cookie):
        (WebCore::Cookie::toSoupCookie const):
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::getRawCookies const):
        (WebCore::cookiesForSession):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::updateSoupMessageMembers const):
        (WebCore::ResourceRequest::updateFromSoupMessage):

2020-02-07  Rob Buis  <rbuis@igalia.com>

        Fix fetch/api/policies/referrer-origin-worker.html
        https://bugs.webkit.org/show_bug.cgi?id=206520

        Reviewed by Youenn Fablet.

        Expose referrer policy as part of the worker global scope [1] through
        the new ScriptExecutionContext::referrerPolicy method.
        Call it as environment settings object when starting a fetch in case
        the FetchRequestInit has no referrerPolicy set [2].

        Test: imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-worker.html

        [1] https://html.spec.whatwg.org/multipage/workers.html#set-up-a-worker-environment-settings-object
        [2] https://fetch.spec.whatwg.org/#ref-for-concept-main-fetch①  (Step 2.5)

        * Modules/fetch/FetchLoader.cpp:
        (WebCore::FetchLoader::start):
        * dom/Document.h:
        (WebCore::Document::referrerPolicy const): Deleted.
        * dom/ScriptExecutionContext.h:
        * workers/DedicatedWorkerGlobalScope.cpp:
        (WebCore::DedicatedWorkerGlobalScope::create):
        (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/DedicatedWorkerThread.cpp:
        (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
        (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
        * workers/DedicatedWorkerThread.h:
        * workers/Worker.cpp:
        (WebCore::Worker::notifyFinished):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
        (WebCore::WorkerGlobalScope::referrerPolicy const):
        * workers/WorkerGlobalScope.h:
        * workers/WorkerGlobalScopeProxy.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * workers/WorkerMessagingProxy.h:
        * workers/WorkerThread.cpp:
        (WebCore::WorkerParameters::isolatedCopy const):
        (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
        (WebCore::WorkerThread::WorkerThread):
        (WebCore::WorkerThread::workerThread):
        * workers/WorkerThread.h:
        * workers/service/ServiceWorkerGlobalScope.cpp:
        (WebCore::ServiceWorkerGlobalScope::create):
        (WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
        * workers/service/ServiceWorkerGlobalScope.h:
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::ServiceWorkerThread):
        (WebCore::ServiceWorkerThread::createWorkerGlobalScope):
        * workers/service/context/ServiceWorkerThread.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::referrerPolicy const):
        * worklets/WorkletGlobalScope.h:

2020-02-07  youenn fablet  <youenn@apple.com>

        [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
        https://bugs.webkit.org/show_bug.cgi?id=206582
        <rdar://problem/58985368>

        Reviewed by Eric Carlson.

        AVAssetWriterDelegate allows to grab recorded data whenever wanted.
        This delegate requires passing compressed samples to AVAssetWriter.
        Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
        These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor.
        They support AAC and H264 so far and should be further improved to support more encoding options.

        Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere.
        The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors.
        It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter.
        The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data.

        Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed.
        Therefore data should not be requested too fast to get adequate video compression.

        Covered by existing tests.

        * Modules/mediarecorder/MediaRecorderProvider.cpp:
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added.
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added.
        (WebCore::AudioSampleBufferCompressor::create):
        (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::initialize):
        (WebCore::AudioSampleBufferCompressor::finish):
        (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
        (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
        (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
        (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
        (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
        (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
        (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::addSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (-[WebAVAssetWriterDelegate initWithWriter:]):
        (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
        (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
        (-[WebAVAssetWriterDelegate close]):
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback):
        (WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback):
        (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::initialize):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::startAssetWriter):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers):
        (WebCore::appendEndsPreviousSampleDurationMarker):
        (WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded):
        (WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::clear):
        (WebCore::copySampleBufferWithCurrentTimeStamp):
        (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
        (WebCore::createAudioFormatDescription):
        (WebCore::createAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        (WebCore::MediaRecorderPrivateWriter::appendData):
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h.
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added.
        (WebCore::VideoSampleBufferCompressor::create):
        (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::initialize):
        (WebCore::VideoSampleBufferCompressor::finish):
        (WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
        (WebCore::VideoSampleBufferCompressor::initCompressionSession):
        (WebCore::VideoSampleBufferCompressor::processSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::addSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

2020-02-07  youenn fablet  <youenn@apple.com>

        Do not process newly gathered ICE candidates if document is suspended
        https://bugs.webkit.org/show_bug.cgi?id=207326
        <rdar://problem/57336453>

        Reviewed by Alex Christensen.

        We should not register MDNS candidates for suspended documents.
        For that reason, enqueue a task when receiving a new candidate.
        If document is not suspended, it will be executed immediately.
        Otherwise, we will wait until document gets unsuspended.

        Add a mock endpoint that delays gathering of candidates until document is suspended.

        Test: webrtc/peerconnection-new-candidate-page-cache.html

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::newICECandidate):
        * testing/MockLibWebRTCPeerConnection.cpp:
        (WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
        (WebCore::MockLibWebRTCPeerConnectionForIceCandidates::MockLibWebRTCPeerConnectionForIceCandidates):
        (WebCore::MockLibWebRTCPeerConnectionForIceCandidates::gotLocalDescription):
        (WebCore::MockLibWebRTCPeerConnectionForIceCandidates::sendCandidates):
        (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):

2020-02-06  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION(r254534): 1-3% regression on PLT
        https://bugs.webkit.org/show_bug.cgi?id=207244

        Can't put null strings into hash maps.

        Reviewed by Wenson Hsieh.

        * platform/text/cocoa/LocaleCocoa.mm:
        (WebCore::LocaleCocoa::canonicalLanguageIdentifierFromString):

2020-02-06  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Rename LocaleMac to LocaleCocoa
        https://bugs.webkit.org/show_bug.cgi?id=207371

        Reviewed by Simon Fraser.

        It's used by all the Cocoa platforms.

        No new tests because there is no behavior change.

        * PlatformMac.cmake:
        * SourcesCocoa.txt:
        * WebCore.order:
        * WebCore.xcodeproj/project.pbxproj:
        * page/cocoa/MemoryReleaseCocoa.mm:
        (WebCore::platformReleaseMemory):
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::applyTransforms const):
        * platform/text/cocoa/LocaleCocoa.h: Renamed from Source/WebCore/platform/text/mac/LocaleMac.h.
        * platform/text/mac/LocaleMac.mm: Removed.

2020-02-06  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Unnecessary I-beam over images in editable areas
        https://bugs.webkit.org/show_bug.cgi?id=207370
        <rdar://problem/59235429>

        Reviewed by Wenson Hsieh.

        * dom/Position.h:

2020-02-06  Doug Kelly  <dougk@apple.com>

        Incorrect TextTrack sorting with invalid BCP47 language
        https://bugs.webkit.org/show_bug.cgi?id=207315

        Reviewed by Jer Noble.

        When comparing TextTracks, this ensures all tracks are compared based on consistent parameters, including tracks with an invalid BCP47
        language attribute.

        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::textTrackCompare):

2020-02-06  James Darpinian  <jdarpinian@chromium.org>

        webgl/1.0.3/conformance/glsl/misc/shader-with-reserved-words.html is timing out on some hardware configurations
        https://bugs.webkit.org/show_bug.cgi?id=205739

        Reviewed by Dean Jackson.

        Optimize disabling ANGLE_texture_rectangle.

        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        (WebCore::GraphicsContextGLOpenGL::compileShader):

2020-02-06  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION(r254534): 1-3% regression on PLT
        https://bugs.webkit.org/show_bug.cgi?id=207244
        <rdar://problem/58821709>

        Reviewed by Simon Fraser.

        Turns out CTFontTransformGlyphsWithLanguage() is 33.7% slower than CTFontTransformGlyphs() on some OSes.
        This patch changes the preprocessor guards to not use the function on those OSes.
        Also, the contract of the function on the more performant OSes requires that the locale name be canonicalized,
        so this patch implements a canonical locale cache inside LocaleMac.mm. It gets cleared when the low memory
        warning is fired.

        Marked existing tests as failing.

        * page/cocoa/MemoryReleaseCocoa.mm:
        (WebCore::platformReleaseMemory):
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::applyTransforms const):
        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
        (WebCore::Font::getCFStringAttributes const):
        * platform/text/mac/LocaleMac.h:
        * platform/text/mac/LocaleMac.mm:
        (WebCore::determineLocale):
        (WebCore::canonicalLocaleMap):
        (WebCore::LocaleMac::canonicalLanguageIdentifierFromString):
        (WebCore::LocaleMac::releaseMemory):

2020-02-06  Devin Rousso  <drousso@apple.com>

        Web Inspector: show JavaScript Worker terminated state as an internal property
        https://bugs.webkit.org/show_bug.cgi?id=207347

        Reviewed by Brian Burg.

        Test: inspector/worker/worker-create-and-terminate.html

        * inspector/WebInjectedScriptHost.cpp:
        (WebCore::WebInjectedScriptHost::getInternalProperties):

        * workers/Worker.h:
        (WebCore::Worker::wasTerminated): Added.

2020-02-06  Christopher Reid  <chris.reid@sony.com>

        [curl] PublicSuffixCurl should skip leading dots
        https://bugs.webkit.org/show_bug.cgi?id=206954

        Reviewed by Fujii Hironori.

        Covered by existing tests.

        Matching PublicSuffixSoup.cpp behavior to skip leading dots.

        * platform/network/curl/PublicSuffixCurl.cpp:

2020-02-06  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::findPlaceForCounter with pseudo element that has display:contents host.
        https://bugs.webkit.org/show_bug.cgi?id=207241

        When the pseudo element's host element does not initiate a renderer
        (e.g. display: contents) we need to look further in the DOM tree 
        for a previous-sibling-or-parent-element candidate.

        Reviewed by Zalan Bujtas.

        Test: fast/css/counters/findPlaceForCounter-pseudo-element-display-content-host-crash.html

        * rendering/RenderCounter.cpp:
        (WebCore::previousSiblingOrParentElement):

2020-02-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r255910, r255970, and r255972.
        https://bugs.webkit.org/show_bug.cgi?id=207345

        Broke internal builds (Requested by ryanhaddad on #webkit).

        Reverted changesets:

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/255910

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/255970

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/255972

2020-02-06  Ali Juma  <ajuma@chromium.org>

        Crash in RenderTableCol::willBeRemovedFromTree()
        https://bugs.webkit.org/show_bug.cgi?id=207031

        Reviewed by Antti Koivisto.

        A RenderTableCol's table() can be null during willBeRemovedFromTree. This can
        happen when the RenderTableCol's table is an ancestor rather than a direct
        parent. If RenderTreeBuilder::destroy is then called on an ancestor of the
        the RenderTableCol's table, RenderTreeBuilder::destroy proceeds down the ancestor
        chain, detaching each node along the way. By the time the RenderTableCol is
        reached, the table (a non-parent ancestor) has already been detached, so
        table() is null and we crash while trying to use it.

        The underlying bug is that RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers
        is getting called on the RenderTableCol's ancestor before its descendants (including
        the RenderTableCol) are destroyed.

        Fix this by changing the order of operations in RenderTreeUpdater::tearDownRenderers
        so that tearDownLeftoverShadowHostChildren happens before destroyAndCleanUpAnonymousWrappers.
        This ensures that the RenderTableCol is destroyed before destroyAndCleanUpAnonymousWrappers is
        called on its ancestor.

        Test: tables/table-col-indent-crash.html

        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::tearDownRenderers):

2020-02-06  Brent Fulgham  <bfulgham@apple.com>

        Prevent navigating top level frames to Data URLs
        https://bugs.webkit.org/show_bug.cgi?id=206962
        <rdar://problem/56770676>

        Reviewed by Youenn Fablet.

        Revise our loading behavior to match Chrome and Firefox by blocking
        top level frame navigations to Data URLs.

        Test: fast/loader/data-url-frame-allowed.html, fast/loader/data-url-load-denied.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::disallowDataRequest const): Added,
        (WebCore::DocumentLoader::continueAfterContentPolicy): Validate whether the load should
        continue if it is a Data URL.
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setAllowsDataURLForMainFrame): Added.
        (WebCore::DocumentLoader::allowsDataURLForMainFrame const): Added.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load): If the main frame loader as triggered by user action, or
        direct call to the client API, allow top-frame navigation to Data URLs.
        (WebCore::FrameLoader::reload): If the original load allowed top-frame navigation to Data
        URLs, continue to do so in the reload.
        * loader/FrameLoader.h:

2020-02-06  Cathie Chen  <cathiechen@igalia.com>

        Add support for scroll behavior relies on ScrollAnimation of the Web process
        https://bugs.webkit.org/show_bug.cgi?id=204882

        Reviewed by Frédéric Wang

        Based on the patch by Frédéric Wang.

        This patch introduces a programmatic smooth scrolling in WebKit from the CSSOM View
        specification [1]. To use this effect, web developers can pass a behavior parameter (auto,
        smooth, or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
        Element.scrollIntoView, Window.scroll, Window.scrollTo or Window.scrollBy [2]. When behavior
        is auto, the instant/smooth characteristic is actually taken from the value of a new CSS
        scroll-behavior property [3]. Both the new CSS and DOM behavior are protected by a runtime
        flag.

        [1] https://drafts.csswg.org/cssom-view
        [2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
        [3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior

        Tests: imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html
        * Sources.txt: Build ScrollAnimationSmooth.cpp on all platforms.
        * SourcesGTK.txt: Remove ScrollAnimationSmooth.cpp since it is built on all platforms now.
        * dom/Element.cpp:
        (WebCore::Element::scrollIntoView): Pass scroll behavior, if any.
        (WebCore::Element::scrollBy):
        (WebCore::Element::scrollTo): Handle the case when scroll behavior is smooth.
        (WebCore::Element::setScrollLeft): Handle the case when scroll behavior is smooth.
        (WebCore::Element::setScrollTop): Handle the case when scroll behavior is smooth.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollBy const):
        (WebCore::DOMWindow::scrollTo const): Handle the case when scroll behavior is smooth.
        The optimization of cancel (0, 0) scrolling is skipped if an animated scroll is in progress.
        Otherwise, the previous scroll won't be stopped by a follow-up scroll.
        * page/FrameView.cpp:
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::scrollToOffsetWithAnimation): Start an animated scroll.
        * page/FrameView.h:
        * platform/ScrollAnimation.h:
        (WebCore::ScrollAnimation::scroll): Function to animate scrolling to a specified position.
        * platform/ScrollAnimationSmooth.cpp: Build this file on all platforms. Add a
        smoothFactorForProgrammaticScroll parameter to slow down the smooth scrolling.
        (WebCore::ScrollAnimationSmooth::scroll):
        (WebCore::ScrollAnimationSmooth::updatePerAxisData): Scale the time parameters of the
        animation so that it looks smoother.
        * platform/ScrollAnimationSmooth.h: Declare the class on all platforms.
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::ScrollAnimator): Initialize animation member for programmatic scrolling.
        (WebCore::ScrollAnimator::scrollToOffset): Animate scrolling to the specified position.
        (WebCore::ScrollAnimator::cancelAnimations): Copy logic from ScrollAnimationSmooth.cpp.
        (WebCore::ScrollAnimator::serviceScrollAnimations): Ditto.
        (WebCore::ScrollAnimator::willEndLiveResize): Ditto.
        (WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
        (WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.
        * platform/ScrollAnimator.h: New animation member for smooth programmatic scrolling.
        (WebCore::ScrollAnimator::ScrollAnimator::cancelAnimations): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::serviceScrollAnimations): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::willEndLiveResize): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::didAddVerticalScrollbar): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::didAddHorizontalScrollbar): Deleted.
        * platform/ScrollTypes.h: Add ScrollBehaviorStatus to indicate the status of scrolling.
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollPosition): Follow the CSSOM View spec: If a scroll is in
        progress, we interrupt it and continue the scroll call (even when we are at the final position).
        * platform/ScrollView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::ScrollableArea):
        (WebCore::ScrollableArea::scrollToOffsetWithAnimation):
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::currentScrollBehaviorStatus const): Maintain currentScrollBehaviorStatus.
        (WebCore::ScrollableArea::setScrollBehaviorStatus):
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::cancelAnimations): Call parent member to handle programmatic scrolling.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setScrollLeft): Add flag to indicate animated or not.
        (WebCore::RenderBox::setScrollTop): Ditto.
        (WebCore::RenderBox::setScrollPosition):
        * rendering/RenderBox.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToXPosition): Ditto.
        (WebCore::RenderLayer::scrollToYPosition): Ditto.
        (WebCore::RenderLayer::scrollToPosition):
        (WebCore::RenderLayer::scrollToOffset): Follow the CSSOM View spec: If a scroll is in
        progress, we interrupt it and continue the scroll call (even when we are at the final
        position). It's ScrollBehaviorType::Instant scroll.
        (WebCore::RenderLayer::scrollToOffsetWithAnimation): Ditto. This is similar to scrollToOffset
        but animates the scroll. It's ScrollBehaviorType::Smooth scroll.
        (WebCore::RenderLayer::scrollTo):
        (WebCore::RenderLayer::scrollRectToVisible): Again don't do an early return if scroll is in
        progress. We call scrollToOffsetWithAnimation instead of scrollToOffset when appropriate.
        Note that this function may not work well for several nested scroll boxes with at least one
        element with smooth behavior. It will handled in bug Follow.
        * rendering/RenderLayer.h: Add scroll behavior to ScrollTectToVisibleOptions.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::setScrollLeft): Add animated flag.
        (WebCore::RenderListBox::setScrollTop): Ditto.
        * rendering/RenderListBox.h:
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::setScrollLeft):
        (WebCore::RenderTextControlSingleLine::setScrollTop):
        * rendering/RenderTextControlSingleLine.h:
        * testing/Internals.cpp:
        (WebCore::Internals::unconstrainedScrollTo):

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

        [Web Animations] Ensure all timelines are detached from their document
        https://bugs.webkit.org/show_bug.cgi?id=207331
        <rdar://problem/59210306>

        Reviewed by Dean Jackson.

        We recently added a WeakHashSet<DocumentTimeline> m_timelines member to Document and added code to ~DocumentTimeline
        to remove themselves from their Document's m_timelines. However, Document::prepareForDestruction() would call
        DocumentTimeline::detachFromDocument() only for the main timeline and neglect to do the same for any additional
        timelines that may have been created with the DocumentTimeline constructor.

        We now cleanly call DocumentTimeline::detachFromDocument() for all items in a Document's m_timelines, which has the
        effect of clearing the Document <> DocumentTimeline relationship since DocumentTimeline::detachFromDocument() now
        calls Document::removeTimeline().

        Finally, we now call DocumentTimeline::detachFromDocument() from the DocumentTimeline destructor to ensure that timelines
        that were created purely in JS but got garbage-collected are no longer referenced from the Document still.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::~DocumentTimeline):
        (WebCore::DocumentTimeline::detachFromDocument):
        (WebCore::DocumentTimeline::cacheCurrentTime):
        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction):

2020-02-06  Adrian Perez de Castro  <aperez@igalia.com>

        [Cairo] Do not use old-style GNU field initializers
        https://bugs.webkit.org/show_bug.cgi?id=207309

        Reviewed by Carlos Garcia Campos.

        No new tests needed.

        * platform/graphics/cairo/GradientCairo.cpp:
        (WebCore::addConicSector): Use the standard named field initializer syntax instead.

2020-02-06  youenn fablet  <youenn@apple.com>

        [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
        https://bugs.webkit.org/show_bug.cgi?id=206582
        <rdar://problem/58985368>

        Reviewed by Eric Carlson.

        AVAssetWriterDelegate allows to grab recorded data whenever wanted.
        This delegate requires passing compressed samples to AVAssetWriter.
        Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
        These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor.
        They support AAC and H264 so far and should be further improved to support more encoding options.

        Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere.
        The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors.
        It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter.
        The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data.

        Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed.
        Therefore data should not be requested too fast to get adequate video compression.

        Covered by existing tests.

        * Modules/mediarecorder/MediaRecorderProvider.cpp:
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added.
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added.
        (WebCore::AudioSampleBufferCompressor::create):
        (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::initialize):
        (WebCore::AudioSampleBufferCompressor::finish):
        (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
        (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
        (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
        (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
        (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
        (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
        (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::addSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (-[WebAVAssetWriterDelegate initWithWriter:]):
        (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
        (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
        (-[WebAVAssetWriterDelegate close]):
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback):
        (WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback):
        (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::initialize):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::startAssetWriter):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers):
        (WebCore::appendEndsPreviousSampleDurationMarker):
        (WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded):
        (WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::clear):
        (WebCore::copySampleBufferWithCurrentTimeStamp):
        (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
        (WebCore::createAudioFormatDescription):
        (WebCore::createAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        (WebCore::MediaRecorderPrivateWriter::appendData):
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h.
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added.
        (WebCore::VideoSampleBufferCompressor::create):
        (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::initialize):
        (WebCore::VideoSampleBufferCompressor::finish):
        (WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
        (WebCore::VideoSampleBufferCompressor::initCompressionSession):
        (WebCore::VideoSampleBufferCompressor::processSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::addSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

2020-02-06  youenn fablet  <youenn@apple.com>

        ServiceWorkerProvider::registerServiceWorkerClients is no longer needed
        https://bugs.webkit.org/show_bug.cgi?id=207193

        Reviewed by Chris Dumez.

        registerServiceWorkerClients is no longer needed since we moved service worker handling to network process.
        We no longer have to optimize creating a sw server connection since we piggy back on the webprocess to network process connection.

        As can be seen from DocumentLoader, we register service worker clients in DocumentLoader::commitData.
        The only documents we do not register are documents for which we exit early due to creatingInitialEmptyDocument check.

        registerServiceWorkerClients was used initially when starting the first service worker process.
        This is obsolete since now we split service workers according sessionID and registrable domains.

        No observable change of behavior if network process does not crash.
        Covered by existing service worker tests crashing network process in the middle of processing.

        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::registerServiceWorkerClients):
        * workers/service/SWClientConnection.h:
        * workers/service/ServiceWorkerProvider.cpp:
        * workers/service/ServiceWorkerProvider.h:

2020-02-05  David Kilzer  <ddkilzer@apple.com>

        Crash when printing at WebCore: WebCore::FrameView::paintContents
        <https://webkit.org/b/207313>
        <rdar://problem/56675778>

        Reviewed by Brent Fulgham.

        * page/PrintContext.cpp:
        (WebCore::PrintContext::spoolPage):
        (WebCore::PrintContext::spoolRect):
        - Add nullptr check for frame.view().  This matches similar
          checks in other methods.

2020-02-05  Don Olmstead  <don.olmstead@sony.com>

        [PlayStation] Miscellaneous build fixes February 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=207312

        Unreviewed build fix.

        * accessibility/AccessibilityObject.h: Add missing definition for !ENABLE(ACCESSIBILITY)
        (WebCore::AccessibilityObject::detachPlatformWrapper):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        * platform/graphics/cairo/ImageBufferCairo.cpp: Add missing include

2020-02-05  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for Windows ports since r255875
        https://bugs.webkit.org/show_bug.cgi?id=207073
        <rdar://problem/59168065>

        WEBCORE_TESTSUPPORT_EXPORT should be used only for WebCoreTestSupport, not for WebCore
        See also Bug 203876.

        * storage/StorageNamespaceProvider.h: Replaced WEBCORE_TESTSUPPORT_EXPORT with WEBCORE_EXPORT.

2020-02-05  Devin Rousso  <drousso@apple.com>

        Web Inspector: ensure that `didClearWindowObjectInWorld` is dispatched for the main world first
        https://bugs.webkit.org/show_bug.cgi?id=207232

        Reviewed by Timothy Hatcher.

        It is necessary to order the `DOMWrapperWorld`s because certain callers expect the main
        world to be the first item in the list, as they use the main world as an indicator of when
        the page is ready to start evaluating JavaScript. For example, Web Inspector waits for the
        main world change to clear any injected scripts and debugger/breakpoint state.

        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::getAllWorlds):

2020-02-05  Andres Gonzalez  <andresg_22@apple.com>

        Check for null return from AXIsolatedTree::nodeForID.
        https://bugs.webkit.org/show_bug.cgi?id=207300

        Reviewed by Chris Fleizach.

        - As the IsolatedTree is updated, AXIsolatedTree::nodeForID may return
        nullptr for objects that have been removed from the tree. Thus,
        IsolatedObjects must check the returned value when updating children
        and any other operations involving cached IDs.
        - Tidying up use of auto on for and if statements.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::detachRemoteParts):
        (WebCore::AXIsolatedObject::children):
        (WebCore::AXIsolatedObject::accessibilityText const):
        (WebCore::AXIsolatedObject::insertMathPairs):
        (WebCore::AXIsolatedObject::objectAttributeValue const):
        (WebCore::AXIsolatedObject::fillChildrenVectorForProperty const):
        (WebCore::AXIsolatedObject::tree const): Deleted, moved inline to the header.
        * accessibility/isolatedtree/AXIsolatedObject.h:

2020-02-05  Jer Noble  <jer.noble@apple.com>

        Adopt MTOverrideShouldPlayHDRVideo()
        https://bugs.webkit.org/show_bug.cgi?id=207275
        <rdar://problem/58837093>

        Reviewed by Eric Carlson.

        * platform/PlatformScreen.h:
        * platform/mac/PlatformScreenMac.mm:
        (WebCore::setShouldOverrideScreenSupportsHighDynamicRange):

2020-02-05  Chris Dumez  <cdumez@apple.com>

        [IPC hardening] Fail IPC decoding of invalid ClientOrigin objects
        https://bugs.webkit.org/show_bug.cgi?id=207305
        <rdar://problem/58797651>

        Reviewed by Brent Fulgham.

        Fail IPC decoding of invalid ClientOrigin objects (empty ClientOrigin or deleted value in a HashMap).

        * page/ClientOrigin.h:
        (WebCore::ClientOrigin::decode):
        * page/SecurityOriginData.h:
        (WebCore::SecurityOriginData::decode):

2020-02-05  Chris Dumez  <cdumez@apple.com>

        Regression(r248734) StorageAreaMap objects are getting leaked
        https://bugs.webkit.org/show_bug.cgi?id=207073
        <rdar://problem/59168065>

        Reviewed by Darin Adler.

        Add test infrastructure for testing this change.

        Test: http/tests/storage/storage-map-leaking.html

        * storage/StorageNamespace.h:
        (WebCore::StorageNamespace::storageAreaMapCountForTesting const):
        * storage/StorageNamespaceProvider.h:
        * testing/Internals.cpp:
        (WebCore::Internals::storageAreaMapCount const):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-02-05  Alex Christensen  <achristensen@webkit.org>

        Make WKWebView._negotiatedLegacyTLS accurate when loading main resouorce from network or cache
        https://bugs.webkit.org/show_bug.cgi?id=207207

        Reviewed by Chris Dumez.

        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::includeCertificateInfo const):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::usedLegacyTLS const):
        (WebCore::ResourceResponseBase::encode const):
        (WebCore::ResourceResponseBase::decode):

2020-02-05  Chris Fleizach  <cfleizach@apple.com>

        AX: replaceTextInRange should handle when called on the WebArea element
        https://bugs.webkit.org/show_bug.cgi?id=207242
        <rdar://problem/59173196>

        Reviewed by Zalan Bujtas.

        Test: accessibility/mac/replace-text-with-range-on-webarea-element.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::replaceTextInRange):

2020-02-05  Michael Catanzaro  <mcatanzaro@gnome.org>

        [GTK] Cannot perform most local loads with sandbox enabled
        https://bugs.webkit.org/show_bug.cgi?id=202071

        Reviewed by Carlos Garcia Campos.

        SecurityOrigin::canDisplay is improperly checking whether the target file URL points to a
        file on the same "volume" (mount point) as the source file. That can't happen here because
        this code is running in the web process, but only the network process has access to the
        unsandboxed filesystem. This code can only check whether the target file exists within the
        sandbox's mount namespace, but that's not what we want to do because we're not going to load
        that file, we're going to ask the network process to load the file with the same path
        outside the mount namespace.

        We can probably live without this check. But if bringing it back is desired, it has to be
        done someplace totally different, in network process code rather than web process code.

        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::canDisplay const):

2020-02-05  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r255818.
        https://bugs.webkit.org/show_bug.cgi?id=207270

        It is breaking some Mac builds (Requested by youenn on
        #webkit).

        Reverted changeset:

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/255818

2020-02-05  youenn fablet  <youenn@apple.com>

        [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
        https://bugs.webkit.org/show_bug.cgi?id=206582
        <rdar://problem/58985368>

        Reviewed by Eric Carlson.

        AVAssetWriterDelegate allows to grab recorded data whenever wanted.
        This delegate requires passing compressed samples to AVAssetWriter.
        Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
        These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor.
        They support AAC and H264 so far and should be further improved to support more encoding options.

        Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere.
        The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors.
        It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter.
        The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data.

        Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed.
        Therefore data should not be requested too fast to get adequate video compression.

        Covered by existing tests.

        * Modules/mediarecorder/MediaRecorderProvider.cpp:
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added.
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added.
        (WebCore::AudioSampleBufferCompressor::create):
        (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::initialize):
        (WebCore::AudioSampleBufferCompressor::finish):
        (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
        (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
        (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
        (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
        (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
        (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
        (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::addSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (-[WebAVAssetWriterDelegate initWithWriter:]):
        (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
        (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
        (-[WebAVAssetWriterDelegate close]):
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback):
        (WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback):
        (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::initialize):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::startAssetWriter):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers):
        (WebCore::appendEndsPreviousSampleDurationMarker):
        (WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded):
        (WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::clear):
        (WebCore::copySampleBufferWithCurrentTimeStamp):
        (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
        (WebCore::createAudioFormatDescription):
        (WebCore::createAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        (WebCore::MediaRecorderPrivateWriter::appendData):
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h.
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added.
        (WebCore::VideoSampleBufferCompressor::create):
        (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::initialize):
        (WebCore::VideoSampleBufferCompressor::finish):
        (WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
        (WebCore::VideoSampleBufferCompressor::initCompressionSession):
        (WebCore::VideoSampleBufferCompressor::processSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::addSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

2020-02-05  Chris Dumez  <cdumez@apple.com>

        Unreviewed iOS build fix.

        * rendering/RenderThemeIOS.h:

2020-02-05  Antoine Quint  <graouts@apple.com>

        [Web Animations] Canceling an accelerated animation before it was committed does not prevent it from playing
        https://bugs.webkit.org/show_bug.cgi?id=207253
        <rdar://problem/59143624>

        Reviewed by Antti Koivisto.

        Test: webanimations/accelerated-animation-canceled-before-commit.html

        Merely checking whether an accelerated animation is running prior to enqueuing an action to cancel it is not sufficient
        since there could be an uncommitted change to start it upon the next animation frame. The same logic would need to apply
        in other situations where the playback state changes for a potentially in-flight animation. 

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::animationDidSeek):
        (WebCore::KeyframeEffect::animationWasCanceled):
        (WebCore::KeyframeEffect::willChangeRenderer):
        (WebCore::KeyframeEffect::animationSuspensionStateDidChange):

2020-02-05  Philippe Normand  <philn@igalia.com>

        [GStreamer] Client-side video rendering doesn't fallback to internal compositing
        https://bugs.webkit.org/show_bug.cgi?id=207208

        Reviewed by Xabier Rodriguez-Calvar and Žan Doberšek.

        Refactor the default video composition code into a self-contained
        closure and invoke it if the video frame holder failed to export
        the EGLImage to a valid DMABuf.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::hasDMABuf const):
        (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):

2020-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>

        [WPE] Add support for rendering menu list buttons
        https://bugs.webkit.org/show_bug.cgi?id=207196

        Reviewed by Žan Doberšek.

        * platform/wpe/RenderThemeWPE.cpp:
        (WebCore::RenderThemeWPE::supportsFocusRing const):
        (WebCore::RenderThemeWPE::adjustTextFieldStyle const):
        (WebCore::RenderThemeWPE::paintTextField):
        (WebCore::RenderThemeWPE::paintTextArea):
        (WebCore::RenderThemeWPE::adjustSearchFieldStyle const):
        (WebCore::RenderThemeWPE::paintSearchField):
        (WebCore::paintFocus):
        (WebCore::paintArrow):
        (WebCore::RenderThemeWPE::popupInternalPaddingBox const):
        * platform/wpe/RenderThemeWPE.h:

2020-02-01  Darin Adler  <darin@apple.com>

        Replace RGBA32 typedef with a class to improve type safety
        https://bugs.webkit.org/show_bug.cgi?id=206862

        Reviewed by Sam Weinig.

        * Headers.cmake: Remove RGBColor.h.
        * Sources.txt: Remove RBGColor.cpp.
        * WebCore.xcodeproj/project.pbxproj: Remove RGBColor.h and RGBColor.cpp.

        * css/CSSPrimitiveValue.cpp: Removed include of RGBColor.h.
        (WebCore::CSSPrimitiveValue::getCounterValue const): Deleted.
        (WebCore::CSSPrimitiveValue::getRectValue const): Deleted.
        (WebCore::CSSPrimitiveValue::getRGBColorValue const): Deleted.
        * css/CSSPrimitiveValue.h: Updated for the above.

        * css/DeprecatedCSSOMPrimitiveValue.cpp:
        (WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue const): Use
        CSSPrimitiveValue::counterValue.
        (WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue const): Use
        CSSPrimitiveValue::rectValue.
        (WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue const): USe
        CSSPrimitiveValue::isRGBColor and CSSPrimitiveValue::color.

        * css/DeprecatedCSSOMRGBColor.h: Store a Color instead of an RGBA32.
        Take a Color argument instead of a RGBColor argument. Refactored to
        use a createWrapper template function member to tighten the code.

        * css/RGBColor.cpp: Removed.
        * css/RGBColor.h: Removed.

        * css/StyleColor.cpp:
        (WebCore::StyleColor::colorFromKeyword): Explicitly convert to SimpleColor
        rather than relying on initializing a Color from an integer ARGB value.

        * editing/cocoa/HTMLConverter.mm: Removed include of RGBColor.h.

        * inspector/InspectorOverlay.cpp:
        (WebCore::drawOutlinedQuadWithClip): Use the Color constructor instead of
        Color::createUnchecked.

        * page/cocoa/ResourceUsageOverlayCocoa.mm:
        (WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo): Use
        explicit SimpleColor rather than relying on initializing a Color from an
        integer ARGB value.

        * platform/graphics/Color.cpp: Use constexpr for constant colors.
        (WebCore::makeRGB): Implement by calling makeRGBA.
        (WebCore::makeRGBA): Use an explicit argument list to call the
        SimpleColor constructor.
        (WebCore::makeRGBA32FromFloats): Implement by calling makeRGBA.
        (WebCore::colorWithOverrideAlpha): Use an explicit argument list to call
        the SimpleColor constructor.
        (WebCore::parseHexColorInternal): Ditto.
        (WebCore::Color::Color): Removed unneeded code to set the color
        to invalid, since that's already the default for a new Color object.
        Also tweak the logic a bit and add explicit argument list for the
        SimpleColor constructor.
        (WebCore::SimpleColor::serializationForHTML const): Added. Factored out of
        the Color::serialized function.
        (WebCore::Color::serialized const): Changed to call serializationForHTML.
        (WebCore::fractionDigitsForFractionalAlphaValue): Renamed slightly shorter.
        (WebCore::SimpleColor::serializationForCSS const): Added. Factored out of
        the Color::cssText function.
        (WebCore::Color::cssText const): Changed to call serializationForCSS.
        (WebCore::RGBA32::serializationForRenderTreeAsText const): Added.
        Factored out of nameForRenderTreeAsText.
        (WebCore::Color::nameForRenderTreeAsText const): Changed to call
        serializationForRenderTreeAsText.
        (WebCore::colorFromPremultipliedARGB): Updated to use the SimpleColor
        member functions instead of the red/green/blue/alphaChannel functions.
        (WebCore::blend): Use Color::transparent for blending where the old
        code used 0 and relied on how that is converted to a Color.

        * platform/graphics/Color.h: Replaced the RGBA32 typedef and the
        RGBA class with a new class named SimpleColor. Deleted the four
        red/green/blue/alphaChannel functions, the Color constructor that
        takes and RGBA, and the Color::createUnchecked function. Changed
        the color constants to all be constexpr. Moved the inline function
        definitions until after everything is delcared.

        * platform/graphics/ImageBackingStore.h:
        (WebCore::ImageBackingStore::setSize): Use uint32_t instead of RGBA32.
        (WebCore::ImageBackingStore::clear): Ditto.
        (WebCore::ImageBackingStore::clearRect): Ditto.
        (WebCore::ImageBackingStore::fillRect): Ditto.
        (WebCore::ImageBackingStore::repeatFirstRow): Ditto.
        (WebCore::ImageBackingStore::pixelAt const): Ditto.
        (WebCore::ImageBackingStore::setPixel): Ditto.
        (WebCore::ImageBackingStore::blendPixel): Ditto. Convert to and from
        SimpleColor so we can use various functions that operate on that type.
        Use the isVisible and red/green/blue/alphaComponent member functions.
        (WebCore::ImageBackingStore::ImageBackingStore): Ditto.
        (WebCore::ImageBackingStore::pixelValue const): Use Color::transparent
        instead of returning a 0 and relying on how that is converted to a Color.

        * platform/graphics/ImageFrame.h: Removed include of ImageBackingStore.h.
        * platform/graphics/ImageSource.h: Added forward delaration of SharedBuffer.

        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::platformTransformColorSpace): Call value() to
        convert RGBA32, which is now a class, to an 32-bit ARGB integer.

        * platform/graphics/cg/ColorCG.cpp:
        (WebCore::cachedCGColor): Use constexpr SimpleColor::value function to
        switch on a SimpleColor.

        * platform/graphics/mac/ColorMac.mm:
        (WebCore::oldAquaFocusRingColor): Use an explicit SimpleColor to turn a
        hex integer into a Color without relying on implicit conversion.

        * platform/graphics/win/ColorDirect2D.cpp:
        (WebCore::Color::operator D2D1_COLOR_F const): Use value() to get the color
        integer, just to keep this working. Probably needs a better implementation
        at some point.

        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::rowAvailable): Don't use makeRGB any more,
        write the expression out here instead. More efficient anyway since these
        are already single bytes.

        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
        (WebCore::defaultDevices):  Use an explicit SimpleColor to turn a
        hex integer into a Color without relying on implicit conversion.
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::drawBoxes): Ditto. Also use a modern
        for loop instead of indexing.
        * platform/mock/ScrollbarThemeMock.cpp:
        (WebCore::ScrollbarThemeMock::paintTrackBackground): Ditto.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::calculateBorderStyleColor): Ditto.
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::systemColor const): Ditto. Also used named colors.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor const): Ditto.

        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject): Added checks against
        Color::transparent instead of converting to an integer and checking
        against 0. Removed unneeded isValid checks, since invalid color's ARGB
        value is Color::transparent.

2020-02-04  Darin Adler  <darin@apple.com>

        Remove NSKeyedArchiverSPI.h now that WebKit only uses API
        https://bugs.webkit.org/show_bug.cgi?id=207203

        Reviewed by Anders Carlsson.

        * editing/cocoa/EditorCocoa.mm:
        (WebCore::archivedDataForAttributedString): Removed NSKeyedArchiverSPI.h header and use
        NSKeyedArchiver methods directly instead of through WebKit functions.
        * loader/archive/cf/LegacyWebArchiveMac.mm:
        (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Ditto.
        (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto.
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::write): Ditto.
        (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto. Also added
        a missing type check when unarchiving a dictionary.
        (WebCore::createItemProviderRegistrationList): Ditto. Also added a missing null check.
        * testing/cocoa/WebArchiveDumpSupport.mm:
        (WebCoreTestSupport::createCFURLResponseFromResponseData): Ditto.

2020-02-04  Alex Christensen  <achristensen@webkit.org>

        Fix internal build after r255709
        https://bugs.webkit.org/show_bug.cgi?id=207231

        * platform/ios/WebItemProviderPasteboard.h:
        Revert part of the original change.

2020-02-04  Adrian Perez de Castro  <aperez@igalia.com>

        Non-unified build fixes early February 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=207227

        Reviewed by Don Olmstead.

        No new tests needed.

        * accessibility/atk/AccessibilityObjectAtk.cpp: Add missing inclusion of WebKitAccessible.h
        * inspector/agents/InspectorAnimationAgent.cpp: Add issing inclusions of JSExecState.h and
        JavaScriptCore/InjectedScriptManager.h
        * style/MatchedDeclarationsCache.cpp: Add missing inclusion of FontCascade.h

2020-02-04  Alex Christensen  <achristensen@webkit.org>

        Fix Mac CMake build
        https://bugs.webkit.org/show_bug.cgi?id=207231

        * PlatformMac.cmake:
        * platform/ios/WebItemProviderPasteboard.h:

2020-02-04  Rob Buis  <rbuis@igalia.com>

        Tighten up stylesheet loading
        https://bugs.webkit.org/show_bug.cgi?id=189913

        Reviewed by Antti Koivisto.

        Content-Type metadata for link stylesheet is determined using MIME
        sniffing[1]. This can result in no Content-Type metadata.
        If there is no Content-Type metadata, but the external resource link
        type has a default type defined, then the user agent must assume that
        the resource is of that type [2]. For link stylesheet the default is
        text/css. This means invalid MIME type will default to text/css and
        load and valid MIME types other than text/css will result in load error.

        [1] https://mimesniff.spec.whatwg.org/
        [2] https://html.spec.whatwg.org/multipage/semantics.html#fetch-and-process-the-linked-resource

        Tests: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events.html
               imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events.https.html
               imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-01.html
               imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-limited-quirks.html
               imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-quirks.html

        * css/StyleSheetContents.cpp:
        (WebCore::StyleSheetContents::parseAuthorStyleSheet):
        * css/StyleSheetContents.h:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::setCSSStyleSheet):
        * loader/cache/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::canUseSheet const):

2020-02-04  youenn fablet  <youenn@apple.com>

        NetworkProcess should be notified by UIProcess when its service worker process connection should be on
        https://bugs.webkit.org/show_bug.cgi?id=207122
        <rdar://problem/59089780>

        Reviewed by Chris Dumez.

        Add a completion handler to the create context connection callback.
        This is called when the context connection should have been created.
        In case there is a context connection, completion handler does nothing.
        Otherwise, SWServer will retry creating a context connection if needed.

        The pending connection map entry is now removed in the completion handler instead of addContextConnection.
        This ensures that only one connection request is sent by network process at a time.

        Add extra logging to monitor creation of a context connection.

        * workers/service/context/SWContextManager.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::addContextConnection):
        (WebCore::SWServer::removeContextConnection):
        (WebCore::SWServer::createContextConnectionFinished):
        * workers/service/server/SWServer.h:

2020-02-04  youenn fablet  <youenn@apple.com>

        Check for callback being null in Notification.requestPermission
        https://bugs.webkit.org/show_bug.cgi?id=207192
        <rdar://problem/59130804>

        Reviewed by Chris Dumez.

        Covered by updated test.

        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::requestPermission):
        Callback can be null if no function is given to requestPermission.
        Check this before calling the callback.

2020-02-04  Pablo Saavedra  <psaavedra@igalia.com>

        Build error with -DENABLE_VIDEO=OFF after r253923
        https://bugs.webkit.org/show_bug.cgi?id=207101

        Reviewed by Youenn Fablet.

        No new tests, only build error fix up

        * page/Page.cpp:
        (WebCore::Page::forEachMediaElement):

2020-02-04  Antti Koivisto  <antti@apple.com>

        CSS Rules with the same selector from several large stylesheets are applied in the wrong order
        https://bugs.webkit.org/show_bug.cgi?id=204687
        <rdar://problem/57522566>

        Reviewed by Zalan Bujtas.

        Original test by Anton Khlynovskiy.

        Test: fast/css/many-rules.html

        * style/RuleData.h:

        We overflow the 18 bit m_position field with > 256k CSS rules, confusing the rule order.
        Since we have unused bits it costs nothing to increase the field size to 22 bits.

        4M rules should be enough for anybody.

2020-02-04  Ross Kirsling  <ross.kirsling@sony.com>

        [CMake] Add Cairo::Cairo target
        https://bugs.webkit.org/show_bug.cgi?id=207159

        Reviewed by Konstantin Tokarev.

        * PlatformWinCairo.cmake:
        * platform/Cairo.cmake:

2020-02-04  youenn fablet  <youenn@apple.com>

        MediaDevices should handle changes of iframe allow attribute value
        https://bugs.webkit.org/show_bug.cgi?id=207112

        Reviewed by Eric Carlson.

        MediaDevices was computing whether it could access camera or microphone at creation time.
        Since the iframe allow attribute can be modified, we cannot do that.
        Instead, we get the feature policy everytime this is needed.

        Refactor code to use the newly added routine to check for feature policy.
        Update logging to give origin and allow attribute value of the frame that fail the feature policy check.

        Test: http/tests/webrtc/enumerateDevicesInFrames.html

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::MediaDevices):
        (WebCore::MediaDevices::refreshDevices):
        (WebCore::MediaDevices::enumerateDevices):
        (WebCore::MediaDevices::listenForDeviceChanges):
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::UserMediaController::logGetUserMediaDenial):
        (WebCore::UserMediaController::logGetDisplayMediaDenial):
        (WebCore::UserMediaController::logEnumerateDevicesDenial):
        * Modules/mediastream/UserMediaController.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::start):
        * html/FeaturePolicy.cpp:
        (WebCore::policyTypeName):
        (WebCore::isFeaturePolicyAllowedByDocumentAndAllOwners):
        * html/FeaturePolicy.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::printErrorMessage const):
        * page/DOMWindow.h:

2020-02-03  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][curl][Clang] error: member access into incomplete type 'WebCore::SynchronousLoaderMessageQueue' in ~CurlRequest
        https://bugs.webkit.org/show_bug.cgi?id=207187

        Unreviewed build fix for clang-cl builds of WinCairo port.

        SynchronousLoaderMessageQueue couldn't be destructed in inlined
        ~CurlRequest because it's a incomplete type. Moved the dtor from
        CurlRequest.h to CurlRequest.cpp.

        * platform/network/curl/CurlRequest.cpp:
        * platform/network/curl/CurlRequest.h:

2020-02-03  Antti Koivisto  <antti@apple.com>

        Accelerated animations freeze on render tree rebuild
        https://bugs.webkit.org/show_bug.cgi?id=201048
        <rdar://problem/54612621>

        Reviewed by Antoine Quint.

        If there is an accelerated animation in progress for a renderer and the render tree is rebuild the animation
        does not continue with the new renderer.

        To fix, make sure that the animation leaves the accelerated state when the renderer is removed. The new renderer
        will then become accelerated automatically.

        Original test case by Tim Guan-tin Chien.

        Test: webanimations/accelerated-animation-renderer-change.html

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::willChangeRendererForElement):
        * animation/AnimationTimeline.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::willChangeRenderer):
        * animation/KeyframeEffect.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::willChangeRenderer):
        * animation/WebAnimation.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::tearDownRenderers):

2020-02-03  Andres Gonzalez  <andresg_22@apple.com>

        [WebAccessibilityObjectWrapper detach] should detach either the wrapped AXObject or the IsolatedObject but not both.
        https://bugs.webkit.org/show_bug.cgi?id=207178

        Reviewed by Chris Fleizach.

        Detach either the AXObject or the IsolatedObject depending on the thread that the method is invoed on.

        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase detachAXObject]):
        (-[WebAccessibilityObjectWrapperBase detachIsolatedObject]):
        (-[WebAccessibilityObjectWrapperBase detach]): Detach one or the other depending on the thread.

2020-02-03  Sihui Liu  <sihui_liu@apple.com>

        Crash in WebCore::IDBServer::IDBServer::createIndex
        https://bugs.webkit.org/show_bug.cgi?id=207137
        <rdar://problem/59096231>

        Reviewed by Darin Adler.

        Export IDBIndexInfo::isolatedCopy so it can be used in WebKitLegacy framework code.

        * Modules/indexeddb/shared/IDBIndexInfo.h:

2020-02-03  Jer Noble  <jer.noble@apple.com>

        Unreviewed iOS build fix; lambdas need an arrow operator between the paramaters and return type.

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

2020-02-03  Antoine Quint  <graouts@apple.com>

        [Web Animations] Accelerated animations don't run until their natural completion
        https://bugs.webkit.org/show_bug.cgi?id=207130
        <rdar://problem/59106047>

        Reviewed by Dean Jackson.

        Tests: webanimations/transform-accelerated-animation-finishes-before-removal.html
               webanimations/transform-accelerated-animation-removed-one-frame-after-finished-promise.html

        Ensure we don't tear down a composited renderer until all of its runnning accelerated animations are completed.
        The accelerated animations will be queued for removal in the next animation frame.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::isRunningAcceleratedAnimationForProperty const):
        * animation/KeyframeEffect.h:
        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::isCurrentlyAffectingProperty const):

2020-02-03  Jer Noble  <jer.noble@apple.com>

        [iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
        https://bugs.webkit.org/show_bug.cgi?id=207058

        Reviewed by Darin Adler.

        The video controls on nhl.com listen for mousedown/mousemove/mouseup events, not
        touchstart/touchmove/touchend events. Until nhl.com can update their site to support touch
        events, add them to the quirks list for simplated mouse events.

        Drive-by fix: There's no need to re-parse the entire URL and walk through all the cases
        every time shouldDispatchSimulatedMouseEvents() is called. Save the results of the initial
        pass so that subsequent checks are just a simple bool check.

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

2020-02-03  Jer Noble  <jer.noble@apple.com>

        Replace the custom allocator in AudioArray::allocate() with fastAlignedMalloc().
        https://bugs.webkit.org/show_bug.cgi?id=206504

        Reviewed by Filip Pizlo.

        AudioArray wants to have its data aligned at 16-byte boundaries, as that's a requirement for
        some of the accelerated math frameworks used by Web Audio. Now that we have fastAlignedMalloc(),
        there's no need to use a custom aligned allocator.

        Drive-by fixes: clean up the constructors a bit to use the modern initialization syntax.

        * platform/audio/AudioArray.h:
        (WebCore::AudioArray::AudioArray):
        (WebCore::AudioArray::~AudioArray):
        (WebCore::AudioArray::allocate):
        (WebCore::AudioArray::data):
        (WebCore::AudioArray::data const):
        (WebCore::AudioArray::alignedAddress): Deleted.

2020-02-03  youenn fablet  <youenn@apple.com>

        [ macOS wk2 ] http/tests/media/media-stream/get-display-media-prompt.html is flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=206958
        <rdar://problem/59003765>

        Reviewed by Eric Carlson.

        We added a rule to only allow one getDisplayMedia call per gesture.
        For that reason, we were storing a pointer to the gesture event and
        resetting in case the current gesture event was equal to the stored pointer.
        Instead, store a WeakPtr which ensures that if the previous event is destroyed,
        the weak pointer will be null and so will not have the same value as the new gesture event.
        Covered by existing tests no longer being flaky.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::computeUserGesturePriviledge):
        * Modules/mediastream/MediaDevices.h:
        * dom/UserGestureIndicator.h:

2020-02-03  Eric Carlson  <eric.carlson@apple.com>

        [macOS] AirPlay sometimes stops after 60 minutes of playback
        https://bugs.webkit.org/show_bug.cgi?id=207056
        <rdar://problem/53649508>

        Reviewed by Jer Noble.

        No new tests, this only reproduces when playing to an AirPlay device.

        AVPlayerItem.tracks is empty during AirPlay. If AirPlay is activated immediately
        after the item is created, as is typically the case when switching from an MSE to
        a url based player, MediaPlayerPrivateAVFoundationObjC doesn't know if the AVPlayerItem
        has audio or video so the state reported to the WebMediaSessionManager is incorrect.
        AirPlay can't actually be active if an item doesn't have audio or video, so always claim
        to have both during AirPlay.

        Converted WebMediaSessionManager logging from debug-only to runtime to make it easier
        to diagnose problems in the future.

        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::mediaProducerStateString):
        (WebCore::WebMediaSessionLogger::create):
        (WebCore::WebMediaSessionLogger::WebMediaSessionLogger):
        (WebCore::WebMediaSessionLogger::log const):
        (WebCore::WebMediaSessionManager::logger):
        (WebCore::WebMediaSessionManager::alwaysOnLoggingAllowed const):
        (WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled):
        (WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState):
        (WebCore::WebMediaSessionManager::mockMediaPlaybackTargetPickerDismissPopup):
        (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
        (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient):
        (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
        (WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
        (WebCore::WebMediaSessionManager::clientStateDidChange):
        (WebCore::WebMediaSessionManager::setPlaybackTarget):
        (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
        (WebCore::WebMediaSessionManager::playbackTargetPickerWasDismissed):
        (WebCore::WebMediaSessionManager::configurePlaybackTargetClients):
        (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring):
        (WebCore::WebMediaSessionManager::configureWatchdogTimer):
        (WebCore::WebMediaSessionManager::watchdogTimerFired):
        (WebCore::ClientState::logAlways const): Deleted.
        * Modules/mediasession/WebMediaSessionManager.h:
        * Modules/mediasession/WebMediaSessionManagerClient.h:
        (WebCore::WebMediaSessionManagerClient::alwaysOnLoggingAllowed):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaState const):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasVideo const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAudio const):

2020-02-03  youenn fablet  <youenn@apple.com>

        Do not copy feature policy in isFeaturePolicyAllowedByDocumentAndAllOwners
        https://bugs.webkit.org/show_bug.cgi?id=207110

        Reviewed by Eric Carlson.

        Use auto& instead of auto to not copy the feature policy object.
        Add some auto* to improve code readability.
        No change of behavior.

        * html/FeaturePolicy.cpp:
        (WebCore::isFeaturePolicyAllowedByDocumentAndAllOwners):

2020-02-03  Zan Dobersek  <zdobersek@igalia.com>

        Use std::hypot() where possible
        https://bugs.webkit.org/show_bug.cgi?id=198483

        Reviewed by Carlos Garcia Campos.

        Use std::hypot() where possible, allowing for a possibly more precise
        calculation of square roots of sums of two or three square values.

        * css/CSSGradientValue.cpp:
        (WebCore::horizontalEllipseRadius):
        * platform/audio/FFTFrame.cpp:
        (WebCore::FFTFrame::print):
        * platform/graphics/FloatPoint.cpp:
        (WebCore::FloatPoint::length const): Deleted.
        * platform/graphics/FloatPoint.h:
        (WebCore::FloatPoint::length const):
        * platform/graphics/FloatPoint3D.h:
        (WebCore::FloatPoint3D::length const):
        * platform/graphics/FloatSize.cpp:
        (WebCore::FloatSize::diagonalLength const): Deleted.
        * platform/graphics/FloatSize.h:
        (WebCore::FloatSize::diagonalLength const):
        * platform/graphics/GeometryUtilities.cpp:
        (WebCore::euclidianDistance):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
        * platform/graphics/PathTraversalState.cpp:
        (WebCore::distanceLine):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::computeLineBoundsAndAntialiasingModeForText):
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::addArcTo):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::roundToDevicePixels):
        * platform/graphics/filters/FETurbulence.cpp:
        (WebCore::FETurbulence::initPaint):
        * platform/graphics/transforms/AffineTransform.cpp:
        (WebCore::AffineTransform::xScale const):
        (WebCore::AffineTransform::yScale const):
        * platform/graphics/transforms/RotateTransformOperation.cpp:
        (WebCore::RotateTransformOperation::blend):
        * platform/graphics/transforms/TransformationMatrix.cpp:
        (WebCore::v3Length):
        (WebCore::decompose2):
        (WebCore::TransformationMatrix::rotate3d):
        * rendering/RenderThemeIOS.mm:
        (WebCore::shortened):
        * rendering/style/BasicShapes.cpp:
        (WebCore::BasicShapeCircle::floatValueForRadiusInBox const):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::calculateDistance):
        * svg/SVGLengthContext.cpp:
        (WebCore::SVGLengthContext::valueForLength):
        (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const):
        (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
        * svg/SVGTransformDistance.cpp:
        (WebCore::SVGTransformDistance::distance const):
        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:

2020-02-03  Jonathan Kingston  <jonathan@jooped.co.uk>

        Crash in WebKitAccessible
        https://bugs.webkit.org/show_bug.cgi?id=207093
        <rdar://problem/59088456>

        Reviewed by Carlos Garcia Campos.

        Fixed a debug crash in WebKitAccessible caused by detatching an accessibility wrapper multiple times.

        * accessibility/atk/AccessibilityObjectAtk.cpp:
        (WebCore::AccessibilityObject::detachPlatformWrapper):

2020-02-03  Pablo Saavedra  <psaavedra@igalia.com>

        Build error with -DENABLE_VIDEO_TRACK=OFF after r255151
        https://bugs.webkit.org/show_bug.cgi?id=207097

        Reviewed by Antti Koivisto.

        No new tests, only build error fix up

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const):

2020-02-02  Antoine Quint  <graouts@apple.com>

        ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) on animations/keyframe-autoclose-brace.html
        https://bugs.webkit.org/show_bug.cgi?id=207071
        <rdar://problem/59076249>

        Reviewed by Dean Jackson.

        We cannot add CSSPropertyInvalid to a HashSet<CSSPropertyID>, because it triggers an ASSERT, and also we shouldn't
        because we wouldn't know how to animate that CSS property.

        * animation/AnimationTimeline.cpp:
        (WebCore::compileTransitionPropertiesInStyle):

2020-02-01  Michael Catanzaro  <mcatanzaro@gnome.org>

        Silence compiler warnings
        https://bugs.webkit.org/show_bug.cgi?id=207015

        Reviewed by Darin Adler.

        * accessibility/AXObjectCache.cpp:
        (WebCore::characterForCharacterOffset): Use IGNORE_CLANG_WARNINGS macros to avoid
        warnings when using GCC. GCC freaks out when it doesn't recognize a warning passed to
        IGNORE_WARNINGS_BEGIN().
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::buildObjectForCanvas): Fix -Wredundant-move
        * platform/PasteboardItemInfo.h: Fix -Wredundant-move
        (WebCore::PresentationSize::decode):
        (WebCore::PasteboardItemInfo::decode):

2020-02-01  Devin Rousso  <drousso@apple.com>

        Web Inspector: move the items in the toolbar into the tab bar to save vertical space
        https://bugs.webkit.org/show_bug.cgi?id=204627

        Reviewed by Timothy Hatcher.

        Now that there is no toolbar area, there is nothing obstructing the ability for the window
        to be moved around when dragging via the title bar area. As such, we can remove the unused
        `InspectorFrontendHost` APIs.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::startWindowDrag): Deleted.
        (WebCore::InspectorFrontendHost::moveWindowBy const): Deleted.

        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::moveWindowBy): Deleted.

2020-01-31  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add support for specifying background colors when setting marked text
        https://bugs.webkit.org/show_bug.cgi?id=207065
        <rdar://problem/57876140>

        Reviewed by Tim Horton.

        Add support for rendering custom highlights (background colors) behind marked text in WebCore. To do this, we
        plumb a Vector of CompositionHighlights alongside the Vector of CompositionUnderlines to Editor. At paint time,
        we then consult this highlight data to determine which ranges of text in the composition should paint using
        custom background colors.

        Note that in the future, we should consider refactoring both composition underlines and highlights to use the
        MarkedText mechanism for decorating ranges of text instead.

        Test: editing/input/composition-highlights.html

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/CompositionHighlight.h: Added.
        (WebCore::CompositionHighlight::CompositionHighlight):
        (WebCore::CompositionHighlight::encode const):
        (WebCore::CompositionHighlight::decode):

        Add CompositionHighlight, which represents a range in the composition that should be highlighted with a given
        background color.

        * editing/Editor.cpp:
        (WebCore::Editor::clear):
        (WebCore::Editor::setComposition):

        Add logic for clearing and updating m_customCompositionHighlights.

        * editing/Editor.h:
        (WebCore::Editor::compositionUsesCustomHighlights const):
        (WebCore::Editor::customCompositionHighlights const):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintCompositionBackground):

        If custom composition highlights are given, use those when painting the composition background; otherwise,
        default to painting the entire composition range using `Color::compositionFill`.

2020-01-31  Justin Fan  <justin_fan@apple.com>

        [WebGL] Revert logging added to investigate 205757
        https://bugs.webkit.org/show_bug.cgi?id=207076

        Unreviewed.
        
        Revert https://trac.webkit.org/changeset/255468.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::bindTexture):
        (WebCore::WebGLRenderingContextBase::createTexture):
        (WebCore::WebGLRenderingContextBase::getError):
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::texImage2D):
        * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
        (WebCore::GraphicsContextGLOpenGL::texImage2D):
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::bindTexture):
        (WebCore::GraphicsContextGLOpenGL::getError):
        (WebCore::GraphicsContextGLOpenGL::texSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::createTexture):

2020-01-31  Antoine Quint  <graouts@apple.com>

        [Web Animations] [WK1] REGRESSION: opacity doesn't animate
        https://bugs.webkit.org/show_bug.cgi?id=207044
        <rdar://problem/59061225>

        Reviewed by Simon Fraser.

        Test: webanimations/opacity-animation.html

        We failed to animate opacity in WK1 because we made the assumption that just because an animation targets only accelerated properties it would be accelerated
        and wouldn't need to be updated as it runs in WebAnimation::timeToNextTick(). This is incorrect, an animation may fail to start or may fail to get a composited
        layer, the latter being the case on WK1 because usesCompositing() is false in RenderLayerCompositor::requiresCompositingForAnimation().

        We now check that an animation is both only animating accelerated properties and running accelerated to determine that an animation won't need to be updated
        until it completes.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::timeToNextTick const):

2020-01-31  Cathie Chen  <cathiechen@igalia.com>

        Asynchronous scrolling of overflow element can enter a recursive loop
        https://bugs.webkit.org/show_bug.cgi?id=206884

        Reviewed by Frédéric Wang.

        After implementing RenderLayer::requestScrollPositionUpdate, there's a recursive loop
        while performing asynchronous programmatic scrolling for overflow elements. In order to break
        the loop call notifyScrollPositionChanged in updateScrollPositionAfterAsyncScroll instead.

        Test: fast/scrolling/ios/programmatic-scroll-element-crash.html

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::requestScrollPositionUpdate):
        (WebCore::RenderLayer::scrollToOffset):
        * rendering/RenderLayer.h:

2020-01-31  Antti Koivisto  <antti@apple.com>

        REGRESSION (r240250): Pages using smoothscroll.js can't be scrolled with trackpad
        https://bugs.webkit.org/show_bug.cgi?id=207040
        <rdar://problem/52712513>

        Reviewed by Simon Fraser.

        Add a quirk that makes the wheel event listener used by smoothscroll.js passive so it can't prevent scrolling.

        This uses the same logic as the Chromium intervention in
        https://chromium.googlesource.com/chromium/src/+/b6b13c9cfe64d52a4168d9d8d1ad9bb8f0b46a2a%5E%21/

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::functionName const):
        * bindings/js/JSEventListener.h:
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::addEventListener):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldMakeEventListenerPassive const):

        Also factor the existing code for making some touch event listeners passive here.

        * page/Quirks.h:

2020-01-31  Peng Liu  <peng.liu6@apple.com>

        Media controls of the video player on nfl.com are not visible in fullscreen mode (iPad only)
        https://bugs.webkit.org/show_bug.cgi?id=207020

        Reviewed by Eric Carlson.

        Add a quirk to disable the element fullscreen API support for nfl.com on iPads.

        * dom/DocumentFullscreen.idl:
        * dom/Element.idl:
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDisableElementFullscreenQuirk const):
        * page/Quirks.h:

2020-01-31  Antti Koivisto  <antti@apple.com>

        Regression(r255359): imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml is failing consistently on windows
        https://bugs.webkit.org/show_bug.cgi?id=206991
        <rdar://problem/59030252>

        Reviewed by Antoine Quint.

        The previous approach may have still allowed RenderStyles computed with non-current FontCascade in
        matched properties caches (because some non-font properties were resolved based on obsolete font information).

        This patch takes a more robust approach by simply preventing caching of styles with non-current font.

        * dom/Document.h:
        (WebCore::Document::fontSelector const):
        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::isCurrent const):
        * platform/graphics/FontCascade.h:
        * style/MatchedDeclarationsCache.cpp:
        (WebCore::Style::MatchedDeclarationsCache::isCacheable):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::updateFont):

2020-01-30  Antoine Quint  <graouts@apple.com>

        [Web Animations] DocumentTimeline shouldn't suspend itself if hiddenPageCSSAnimationSuspensionEnabled is disabled
        https://bugs.webkit.org/show_bug.cgi?id=207014
        <rdar://problem/58815952>

        Reviewed by Antti Koivisto.

        We suspend a timeline upon consutrction if we know that the page is not visible because, unlike CSSAnimationController, the DocumentTimeline is not guaranteed
        to be created by the time the Page sets the initial visibility state. This is because DocumentTimeline is created as needed when there are CSS Animations or CSS
        Transitions created for the page, or if the content uses any of the Web Animations APIs.

        However, the Page::setIsVisibleInternal() function that would call DocumentTimeline::resumeAnimations() at a later time checks whether the hiddenPageCSSAnimationSuspensionEnabled
        setting is enabled. So we must respect that setting also when suspending animations in the first place or we risk ending up in a state where we suspend animations
        because the page is not visible upon timeline creation, but never resuming animations later due to the hiddenPageCSSAnimationSuspensionEnabled setting being false.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::DocumentTimeline):

2020-01-31  Jiewen Tan  <jiewen_tan@apple.com>

        REGRESSION: [iOS release] http/tests/security/window-named-proto.html is a flaky timing out
        https://bugs.webkit.org/show_bug.cgi?id=206672
        <rdar://problem/58838583>

        Reviewed by Chris Dumez.

        This is a speculative fix to increase the priority of the DataURLDecoder's WorkQueue such that
        it is less likely to be preempted.

        Covered by existing tests.

        * platform/network/DataURLDecoder.cpp:
        (WebCore::DataURLDecoder::decodeQueue):

2020-01-30  Said Abou-Hallawa  <said@apple.com>

        [iOS] Page throttling reasons are not initialized with the device low power mode
        https://bugs.webkit.org/show_bug.cgi?id=206860

        Reviewed by Simon Fraser.

        Initialize m_throttlingReasons with the device current low power mode in
        the constructor of Page.

        Add m_throttlingReasonsOverridenForTesting to Page and use it to control
        overriding the ThrottlingReasons of m_throttlingReasons.

        * page/Page.cpp:
        (WebCore::m_deviceOrientationUpdateProvider):
        (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
        (WebCore::Page::handleLowModePowerChange):
        (WebCore::Page::isLowPowerModeEnabled const): Deleted.
        * page/Page.h:
        (WebCore::Page::isLowPowerModeEnabled const):
        (WebCore::Page::canUpdateThrottlingReason const):

2020-01-30  Doug Kelly  <dougk@apple.com>

        Ensure non-initial values for CSS Font properties
        https://bugs.webkit.org/show_bug.cgi?id=206312

        Reviewed by Antti Koivisto.

        If CSS font properties are currently initial values, set them to a normal value.

        * css/CSSFontFaceSet.cpp:
        (WebCore::computeFontSelectionRequest):

2020-01-30  Doug Kelly  <dougk@apple.com>

        Crash in GraphicsLayerCA::fetchCloneLayers() when setting contents to solid color
        https://bugs.webkit.org/show_bug.cgi?id=205530

        Reviewed by Ryosuke Niwa.

        Change the assertion in fetchCloneLayers() to check for null explicitly to ensure contentsLayer is valid.

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

2020-01-30  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Cairo] Use CAIRO_FILTER_BILINEAR for image tile painting with InterpolationQuality::Default
        https://bugs.webkit.org/show_bug.cgi?id=201326

        Reviewed by Carlos Garcia Campos.

        Mac port is using a better image interpolation method for painting
        a single image than painting tiled images.

        In Cairo port, CAIRO_FILTER_GOOD was used for both cases as
        default. CAIRO_FILTER_GOOD is using separable convolution filter
        for down-scaling (≤ 0.75 and ≠ 0.5), and bi-linear filter
        otherwise. The separable convolution filter is better quality but
        quite slower than bi-linear filter.

        drawSurface of CairoOperations.cpp has the code to choose a filter
        based on InterpolationQuality.
        <https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp?rev=254506#L966>

        This change copied the code to drawPatternToCairoContext, and
        changed it to use CAIRO_FILTER_BILINEAR for
        InterpolationQuality::Default.

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawPattern):
        * platform/graphics/cairo/CairoUtilities.cpp:
        (WebCore::drawPatternToCairoContext): Set a filter by calling
        cairo_pattern_set_filter based on InterpolationQuality.
        * platform/graphics/cairo/CairoUtilities.h: Added a InterpolationQuality argument.

2020-01-30  Ross Kirsling  <ross.kirsling@sony.com>

        [CMake] Add SQLite::SQLite3 target
        https://bugs.webkit.org/show_bug.cgi?id=207005

        Reviewed by Don Olmstead.

        * CMakeLists.txt: Use SQLite3 target.
        * PlatformPlayStation.cmake: Remove redundant entries.

2020-01-30  Tim Horton  <timothy_horton@apple.com>

        Add a quirk to opt Twitter out of the non-overlaid minimized input view
        https://bugs.webkit.org/show_bug.cgi?id=207021
        <rdar://problem/59016252>

        Reviewed by Wenson Hsieh.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
        Twitter has a content breakpoint that sits immediately between the size
        of the Safari content area on a 11" iPad in landscape with the App Banner
        visible and the same minus the height of the minimized input view that
        we display when using a hardware keyboard. This breakpoint removes the
        login field, causing the keyboard to dismiss, the input view to disappear,
        and the page to resize to the larger size. This results in a loop,
        so we must opt Twitter out of the content-avoiding input view mechanism.

2020-01-30  Justin Fan  <justin_fan@apple.com>

        [WebGL] Add logging statements to attempt to catch texture-upload-size.html timeout
        https://bugs.webkit.org/show_bug.cgi?id=207006

        Unreviewed temporary logging additions for flaky timeout investigation.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::bindTexture):
        (WebCore::WebGLRenderingContextBase::createTexture):
        (WebCore::WebGLRenderingContextBase::getError):
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::texImage2D):
        * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
        (WebCore::GraphicsContextGLOpenGL::texImage2D):
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::bindTexture):
        (WebCore::GraphicsContextGLOpenGL::getError):
        (WebCore::GraphicsContextGLOpenGL::texSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::createTexture):

2020-01-30  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Issue mach sandbox extension to the frontboard and icon service when the attachment element is enabled
        https://bugs.webkit.org/show_bug.cgi?id=205443

        Reviewed by Brent Fulgham.

        Get focus ring color in the UI process since getting this color will communicate with the frontboard daemon.

        Test: fast/sandbox/ios/focus-ring-color.html

        * rendering/RenderTheme.h:
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::cachedFocusRingColor):
        (WebCore::RenderThemeIOS::platformFocusRingColor const):
        (WebCore::RenderThemeIOS::setFocusRingColor):
        * testing/Internals.cpp:
        (WebCore::Internals::focusRingColor):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-30  Jonathan Bedard  <jbedard@apple.com>

        PAL: Remove old iOS version macros
        https://bugs.webkit.org/show_bug.cgi?id=206905

        Reviewed by Darin Adler.

        No functional changes, covered by existing tests.

        * loader/archive/cf/LegacyWebArchiveMac.mm: Remove USE(SECURE_ARCHIVER_API).
        * testing/cocoa/WebArchiveDumpSupport.mm: Ditto.

2020-01-30  Doug Kelly  <dougk@apple.com>

        Crash in RenderElement::selectionPseudoStyle with detail element set to display: contents
        https://bugs.webkit.org/show_bug.cgi?id=206705

        Reviewed by Zalan Bujtas.

        Check the element for a valid renderer before calling getUncachedPseudoStyle(), and if the
        element is set to "display: contents", walk up to the parent element until we're at the root
        or the element is not set to "display: contents".

        Test: fast/css/display-contents-detail-selection.html

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::selectionPseudoStyle const):

2020-01-30  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r255424.

        Breaks internal builds.

        Reverted changeset:

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/255424

2020-01-30  Doug Kelly  <dougk@apple.com>

        Crash in RenderBlockFlow::adjustLinePositionForPagination() with complex line without root box
        https://bugs.webkit.org/show_bug.cgi?id=206610

        Reviewed by Zalan Bujtas.

        Add a check for a null pointer when getting firstRootBox() -- if it is null, return early after calling setPaginationStrut().

        Test: fast/text/complex-without-root-box.html

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):

2020-01-30  Chris Dumez  <cdumez@apple.com>

        REGRESSION (r252064): [ Mac iOS ] storage/websql/statement-error-callback.html is timing out flakily
        https://bugs.webkit.org/show_bug.cgi?id=206291
        <rdar://problem/58606666>

        Unreviewed, partial rollout of r252064 which seems to have introduced the regression.

        No new tests, covered by existing test

        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::notifyDatabaseThreadIsShuttingDown):

2020-01-30  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove the build warning since r254991 as below.
        warning: base class ‘class WTF::RefCounted<WebCore::AnimationList>’
        should be explicitly initialized in the copy constructor [-Wextra]

        No new tests, no behavioral changes.

        * platform/animation/AnimationList.cpp:
        (WebCore::AnimationList::AnimationList):

2020-01-30  youenn fablet  <youenn@apple.com>

        [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
        https://bugs.webkit.org/show_bug.cgi?id=206582

        Reviewed by Eric Carlson.

        AVAssetWriterDelegate allows to grab recorded data whenever wanted.
        This delegate requires passing compressed samples to AVAssetWriter.
        Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
        Since AVAssetWriterDelegate is Apple SDK only, keep the existing file based implementation as a fallback.

        Covered by existing tests.

        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h:
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:
        (WebCore::AudioSampleBufferCompressor::create):
        (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::initialize):
        (WebCore::AudioSampleBufferCompressor::finish):
        (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
        (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
        (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
        (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
        (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
        (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
        (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::addSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::initialize):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
        (WebCore::VideoSampleBufferCompressor::create):
        (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::initialize):
        (WebCore::VideoSampleBufferCompressor::finish):
        (WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
        (WebCore::VideoSampleBufferCompressor::initCompressionSession):
        (WebCore::VideoSampleBufferCompressor::processSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::addSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

2020-01-29  Sergio Villar Senin  <svillar@igalia.com>

        [GStreamer] Fix build with ACCELERATED_2D_CANVAS enabled
        https://bugs.webkit.org/show_bug.cgi?id=206976

        Reviewed by Philippe Normand.

        When ACCELERATED_2D_CANVAS is enabled the MediaPlayerPrivate uses both PlatformDisplay and
        GLContext that were undefined. Apart from that all the MediaPlayer::PreLoad::None enums fail
        because cairo-gl.h ends up including X.h which already defines None.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

2020-01-30  Antoine Quint  <graouts@apple.com>

        [Web Animations] Changing the delay of an accelerated animation doesn't seek the animation
        https://bugs.webkit.org/show_bug.cgi?id=206990
        <rdar://problem/58675608>

        Reviewed by Antti Koivisto.

        Test: webanimations/seeking-by-changing-delay-accelerated.html

        In order to seek an accelerated animation, we need to update the animation on the target element's backing GraphicsLayer. We do this by enqueuing an
        AcceleratedAction:Seek command which is done by calling KeyframeEffect::animationDidSeek(), which we would only call from WebAnimation::setCurrentTime().
        However, seeking can be performed by modifying the animation's effect's timing.

        We now call WebAnimation::effectTimingDidChange() with an optional ComputedEffectTiming for call sites that want to provide timing data prior to
        modifying timing properties. This allows WebAnimation::effectTimingDidChange() to compare the previous progress with the new progress to determine if the
        animation was seeked, so KeyframeEffect::animationDidSeek() may be called.

        There are two places where we now call WebAnimation::effectTimingDidChange() with the previous timing data. First, when updateTiming() is called
        through the JavaScript API (AnimationEffect::updateTiming) and when a CSS Animation's timing has been modified by changing some of the animation CSS
        properties (CSSAnimation::syncPropertiesWithBackingAnimation).

        * animation/AnimationEffect.cpp:
        (WebCore::AnimationEffect::updateTiming): Compute the previous timing data and provide it to WebAnimation::effectTimingDidChange().
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation): Compute the previous timing data and provide it to WebAnimation::effectTimingDidChange().
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::computeAcceleratedPropertiesState): Drive-by fix for faulty logic introduced in a recent patch (r255383).
        (WebCore::KeyframeEffect::applyPendingAcceleratedActions): We need to reset the m_isRunningAccelerated flag when an animation was supposed to be stopped but
        couldn't be because the target's layer backing was removed prior to the accelerated action being committed.
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::effectTimingDidChange): If previous timing data was provided, check whether its progress differs from the current timing data and
        call KeyframeEffect::animationDidSeek().
        * animation/WebAnimation.h:

2020-01-30  Noam Rosenthal  <noam@webkit.org>

        REGRESSION (r254406): Gmail.com star/favorite icons are not rendering
        https://bugs.webkit.org/show_bug.cgi?id=206909

        Reviewed by Simon Fraser.

        Make image-set parsing more conservative, for backwards compatibility:
        - Differentiate between image-set and -webkit-image-set when parsing, -webkit-image-set maintains old behavior.
        - Don't allow empty urls when using raw strings, e.g. image-set('' 1x) is invalid.

        Tests updated: fast/css/image-set-parsing.html.

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeImageSet):
        (WebCore::CSSPropertyParserHelpers::consumeImage):

2020-01-29  Fujii Hironori  <Hironori.Fujii@sony.com>

        [MSVC] Add /experimental:newLambdaProcessor switch for better C++ conformance
        https://bugs.webkit.org/show_bug.cgi?id=204443

        Reviewed by Alex Christensen.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess): Reverted MSVC workaround of r252726.

2020-01-29  Eric Carlson  <eric.carlson@apple.com>

        Do not notify other applications when deactivating the audio session
        https://bugs.webkit.org/show_bug.cgi?id=206963

        Reviewed by Jer Noble.

        Tested manually because this change is iOS-only and only reproduces on hardware.

        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::tryToSetActiveInternal): Don't pass the AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation
        flag to -[AVAudioSession setActive:error].

2020-01-29  Tim Horton  <timothy_horton@apple.com>

        REGRESSION (r255322): macCatalyst: Tapping in an input field doesn't change the selection location
        https://bugs.webkit.org/show_bug.cgi?id=206978

        Reviewed by Wenson Hsieh.

        * page/ChromeClient.h:
        (WebCore::ChromeClient::shouldUseMouseEventForSelection):
        (WebCore::ChromeClient::shouldUseMouseEventsForSelection): Deleted.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::canMouseDownStartSelect):
        (WebCore::EventHandler::handleMousePressEvent):
        * page/EventHandler.h:
        Plumb the event through to the ChromeClient so it can use it to make decisions.

2020-01-29  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION: [Mac wk1] imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/underover-parameters-3.html is a flakey failure
        https://bugs.webkit.org/show_bug.cgi?id=205168

        Reviewed by Simon Fraser.

        The flakiness of the test was caused by document.fonts.ready resolving without waiting for the document
        to be loaded if FontFaceSet::FontFaceSet is created after the initial layout had been done.

        r249295 introduced this racy code to address the previous behavior of WebKit, which didn't wait for
        either document to finish loading or the initial layout to happen at all, and the WebKit workaround in
        the offending WPT test was subsequentially removed, resulting in the flaky failure after the test was
        synced up in r249760.

        This patch address the underlying bug by making ready promise wait until Document::implicitClose is called.

        Unfortunately, the specification is extremely vague in terms of when this promise is resolved but new
        behavior of WebKit is more or less with Firefox (Chrome seems to have a similar race condition as WebKit).

        See also: https://github.com/w3c/csswg-drafts/issues/4248.

        Test: fast/css/font-face-set-ready-after-document-load.html

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::fontFaceSetIfExists): Renamed from optionalFontFaceSet for consistency.
        * css/CSSFontSelector.h:
        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::FontFaceSet): Fixed the bug.
        (WebCore::FontFaceSet::documentDidFinishLoading): Renamed from didFirstLayout to reflect the new semantics.
        (WebCore::FontFaceSet::completedLoading):
        * css/FontFaceSet.h:
        * dom/Document.cpp:
        (WebCore::Document::implicitClose): Deployed makeRefPtr to be safe.

2020-01-29  Sunny He  <sunny_he@apple.com>

        Clamp paddingBoxWidth/Height to a minimum of zero
        https://bugs.webkit.org/show_bug.cgi?id=206317
        rdar://57102010

        Reviewed by Zalan Bujtas.

        Test: fast/multicol/crash-negative-paddingBoxWidth.html

        * rendering/RenderBox.h:
        (WebCore::RenderBox::paddingBoxWidth const):
        (WebCore::RenderBox::paddingBoxHeight const):

2020-01-29  Robin Morisset  <rmorisset@apple.com>

        Remove Options::enableSpectreMitigations
        https://bugs.webkit.org/show_bug.cgi?id=193885

        Reviewed by Saam Barati.

        From what I remember we decided to remove the spectre-specific mitigations we had tried (in favor of things like process-per-origin).
        I don't think anyone is using the SpectreGadget we had added for experiments either.
        So this patch removes the following three options, and all the code that depended on them:
        - enableSpectreMitigations (was true, only used in one place)
        - enableSpectreGadgets (was false)
        - zeroStackFrame (was false, and was an experiment about Spectre variant 4 if I remember correctly)

        No new tests as there is no new behaviour added.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/SpectreGadget.cpp: Removed.
        * dom/SpectreGadget.h: Removed.
        * dom/SpectreGadget.idl: Removed.
        * page/RuntimeEnabledFeatures.cpp:
        * page/RuntimeEnabledFeatures.h:

2020-01-29  Sihui Liu  <sihui_liu@apple.com>

        Set QoS of blobUtilityQueue to be Utility
        https://bugs.webkit.org/show_bug.cgi?id=206971

        Reviewed by Chris Dumez.

        * platform/network/BlobRegistryImpl.cpp:
        (WebCore::blobUtilityQueue):

2020-01-29  Devin Rousso  <drousso@apple.com>

        Web Inspector: add instrumentation for showing existing Web Animations
        https://bugs.webkit.org/show_bug.cgi?id=205434
        <rdar://problem/28328087>

        Reviewed by Brian Burg.

        Add types/commands/events for instrumenting the lifecycle of `Animation` objects, as well as
        commands for getting the JavaScript wrapper object and the target DOM node.

        Tests: inspector/animation/effectChanged.html
               inspector/animation/lifecycle-css-animation.html
               inspector/animation/lifecycle-css-transition.html
               inspector/animation/lifecycle-web-animation.html
               inspector/animation/requestEffectTarget.html
               inspector/animation/resolveAnimation.html
               inspector/animation/targetChanged.html

        * animation/WebAnimation.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::instances): Added.
        (WebCore::WebAnimation::instancesMutex): Added.
        (WebCore::WebAnimation::create):
        (WebCore::WebAnimation::WebAnimation):
        (WebCore::WebAnimation::~WebAnimation):
        (WebCore::WebAnimation::effectTimingDidChange):
        (WebCore::WebAnimation::setEffectInternal):
        (WebCore::WebAnimation::effectTargetDidChange):
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::create):
        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::create):

        * animation/KeyframeEffect.h:
        (WebCore::KeyframeEffect::parsedKeyframes const): Added.
        (WebCore::KeyframeEffect::blendingKeyframes const): Added.
        (WebCore::KeyframeEffect::hasBlendingKeyframes const): Deleted.
        Provide a way to access the list of keyframes.

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didSetWebAnimationEffect): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTiming): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTarget): Added.
        (WebCore::InspectorInstrumentation::didCreateWebAnimation): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffect): Deleted.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        (WebCore::InspectorInstrumentation::didSetWebAnimationEffectImpl): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTimingImpl): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTargetImpl): Added.
        (WebCore::InspectorInstrumentation::didCreateWebAnimationImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebAnimationImpl):
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffectImpl): Deleted.

        * inspector/InstrumentingAgents.h:
        (WebCore::InstrumentingAgents::enabledInspectorAnimationAgent const): Added.
        (WebCore::InstrumentingAgents::setEnabledInspectorAnimationAgent): Added.
        * inspector/InstrumentingAgents.cpp:
        (WebCore::InstrumentingAgents::reset):

        * inspector/agents/InspectorAnimationAgent.h:
        * inspector/agents/InspectorAnimationAgent.cpp:
        (WebCore::protocolValueForSeconds): Added.
        (WebCore::protocolValueForPlaybackDirection): Added.
        (WebCore::protocolValueForFillMode): Added.
        (WebCore::buildObjectForKeyframes): Added.
        (WebCore::buildObjectForEffect): Added.
        (WebCore::InspectorAnimationAgent::InspectorAnimationAgent):
        (WebCore::InspectorAnimationAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorAnimationAgent::enable): Added.
        (WebCore::InspectorAnimationAgent::disable): Added.
        (WebCore::InspectorAnimationAgent::requestEffectTarget): Added.
        (WebCore::InspectorAnimationAgent::resolveAnimation): Added.
        (WebCore::InspectorAnimationAgent::didSetWebAnimationEffect): Added.
        (WebCore::InspectorAnimationAgent::didChangeWebAnimationEffectTiming): Added.
        (WebCore::InspectorAnimationAgent::didChangeWebAnimationEffectTarget): Added.
        (WebCore::InspectorAnimationAgent::didCreateWebAnimation): Added.
        (WebCore::InspectorAnimationAgent::willDestroyWebAnimation):
        (WebCore::InspectorAnimationAgent::frameNavigated):
        (WebCore::InspectorAnimationAgent::findAnimationId): Added.
        (WebCore::InspectorAnimationAgent::assertAnimation): Added.
        (WebCore::InspectorAnimationAgent::bindAnimation): Added.
        (WebCore::InspectorAnimationAgent::unbindAnimation): Added.
        (WebCore::InspectorAnimationAgent::animationDestroyedTimerFired): Added.
        (WebCore::InspectorAnimationAgent::reset): Added.
        (WebCore::InspectorAnimationAgent::didChangeWebAnimationEffect): Deleted.

        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::pushNodeToFrontend):
        (WebCore::InspectorDOMAgent::querySelector):
        (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
        (WebCore::InspectorDOMAgent::setNodeName):
        (WebCore::InspectorDOMAgent::setOuterHTML):
        (WebCore::InspectorDOMAgent::moveTo):
        (WebCore::InspectorDOMAgent::requestNode):
        (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
        Add an overload for `pushNodePathToFrontend` that exposes an `ErrorString`.

2020-01-29  Ross Kirsling  <ross.kirsling@sony.com>

        [PlayStation] Fix MIMETypeRegistry
        https://bugs.webkit.org/show_bug.cgi?id=206960

        Reviewed by Don Olmstead.

        * platform/playstation/MIMETypeRegistryPlayStation.cpp:
        (WebCore::platformMediaTypes):
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
        Address redeclarations, then fix key/value order of platform-specific MIME type map and make it a static local.

2020-01-29  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r255338.

        Introduced flakiness in multiple throttling layout tests

        Reverted changeset:

        "REGRESSION (r255158): http/tests/frame-throttling/raf-
        throttle-in-cross-origin-subframe.html is a flaky failure"
        https://bugs.webkit.org/show_bug.cgi?id=206839
        https://trac.webkit.org/changeset/255338

2020-01-28  Antoine Quint  <graouts@apple.com>

        [Web Animations] Animations should run accelerated even if other animations targeting the same element are not accelerated
        https://bugs.webkit.org/show_bug.cgi?id=206890
        <rdar://problem/58961750>

        Reviewed by Simon Fraser.

        Test: webanimations/width-and-opacity-separate-animation-yields-compositing.html

        In the Web Animations implementation, when an element has some animated properties that can be accelerated and some that cannot be, we would never
        run accelerated animations at all. However, in the "legacy" animation engine, we would animate properties that can be acclerated if possible.
        We now attempt to run accelerated animations provided at least one animation is accelerated.

        To do that, we now keep track of whether none, some or all of the animated properties of a given KeyframeEffect are accelerated using the new
        m_acceleratedPropertiesState instance variable. We compute this property when creating the blending keyframes for the effect. 
        
        Then, as time progresses and the effect is resolved, updateAcceleratedActions() is called and we simply use the effect's phase to determine
        whether we need to enqueue actions to start, pause, seek or end accelerated animations. This is an improvement over how this method used to work
        since we would run accelerated animations while in their delay phase, which did not match the "legacy" animation engine's behavior.

        We've also removed the single method that provided the accelerated characteristics of a KeyframeEffect, isAccelerated(), with a few more methods:

            - isRunningAccelerated(): the effect is currently running accelerated animations.
            - isAboutToRunAccelerated(): the effect has pending accelerated actions that should make it run accelerated animations when accelerated actions
            are updated next.
            - isCompletelyAccelerated(): the effect animates only accelerated properties.
            - isCurrentlyAffectingProperty(property, accelerated): the effect is currently animating the given property, with the option to specify whether
            that animation is accelerated.

        We use this information in a few new places. If an effect returns true for either isRunningAccelerated() or isAboutToRunAccelerated() when
        Element::applyKeyframeEffects() is called, we set the AnimationImpact::RequiresRecomposite flag. In RenderLayerCompositor::requiresCompositingForAnimation(),
        if an effect returns true for isCurrentlyAffectingProperty() with the accelerated flag set to true, the method returns true, matching the logic
        used by the "legacy" animation engine.

        All in all, this better aligns the behavior of the "legacy" and Web Animations engines to run accelerated animations in the same circumstances.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty): Use KeyframeEfffect::isRunningAccelerated() instead of KeyframeEffect::isAccelerated().
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::isRunningAcceleratedAnimationOnRenderer const): Use KeyframeEffect::isCurrentlyAffectingProperty() instead of checking both
        isRunningAccelerated() and manually looking at the effect's animated properties.
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::setBlendingKeyframes): Call computeAcceleratedPropertiesState() instead of the now-defunct computeShouldRunAccelerated().
        (WebCore::KeyframeEffect::apply): Keep track of the newly computed phase so that we may use it in the new isCurrentlyAffectingProperty() without having
        to recompute it on each call.
        (WebCore::KeyframeEffect::isCurrentlyAffectingProperty const): Indicates whether a given property is currently animated (active phase) with the option
        to specify whether that animation is accelerated.
        (WebCore::KeyframeEffect::computeAcceleratedPropertiesState): Compute whether none, some or all of the animated properties of the given effect can be accelerated.
        (WebCore::KeyframeEffect::updateAcceleratedActions): Use the phase to determine which accelerated actions to enqueue.
        (WebCore::KeyframeEffect::animationDidSeek): Use the new m_isRunningAccelerated state to determine whether the animation is presently running accelerated.
        (WebCore::KeyframeEffect::animationWasCanceled): Use the new m_isRunningAccelerated state to determine whether the animation is presently running accelerated.
        (WebCore::KeyframeEffect::animationSuspensionStateDidChange): Use the new m_isRunningAccelerated state to determine whether the animation is presently running accelerated.
        (WebCore::KeyframeEffect::applyPendingAcceleratedActions): 
        * animation/KeyframeEffect.h:
        (WebCore::KeyframeEffect::isRunningAccelerated const):
        (WebCore::KeyframeEffect::isAboutToRunAccelerated const):
        (WebCore::KeyframeEffect::isCompletelyAccelerated const):
        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::isCurrentlyAffectingProperty const): Indicates whether any of the effects in the stack animates a given property, with the option
        to specify whether the animation should be accelerated.
        * animation/KeyframeEffectStack.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::effectTargetDidChange): Ensure we schedule an animation update if an effect is no longer animating a given element or newly animating an element,
        to ensure that replaced animations may be removed.
        (WebCore::WebAnimation::isCompletelyAccelerated const): Convenience function to call isCompletelyAccelerated() on the animation's effect.
        (WebCore::WebAnimation::computeRelevance): Check the replaced state when computing relevance.
        (WebCore::WebAnimation::timeToNextTick const): Schedule an immediate update if a given animation is not _completely_ accelerated.
        * animation/WebAnimation.h:
        * dom/Element.cpp:
        (WebCore::Element::keyframeEffectStack const):
        (WebCore::Element::applyKeyframeEffects): Set the AnimationImpact::RequiresRecomposite flag when the animation is either currently running accelerated or expected
        to be in the next accelerated animation update.
        * dom/Element.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const): Use the same logic as for the "legacy" animation engine to determine whether an animation
        requires compositing using the new KeyframeEffect::isCurrentlyAffectingProperty() method.
        (WebCore::RenderLayerCompositor::isRunningTransformAnimation const): Refactor some code to use the new KeyframeEffect::isCurrentlyAffectingProperty() method.

2020-01-29  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed !ENABLE(ACCESSIBILITY) build fix.

        * accessibility/AccessibilityObjectInterface.h:

2020-01-29  Chris Dumez  <cdumez@apple.com>

        [iOS] Make sure unused service worker processes exit promptly on low memory warning
        https://bugs.webkit.org/show_bug.cgi?id=206939
        <rdar://problem/58972717>

        Reviewed by Alex Christensen.

        Make sure unused service worker processes exit promptly on low memory warning. They normally take 10 seconds to exit
        for performance reasons. However, in case of memory pressure, keeping those processes around that long is not the
        right thing to do.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::handleLowMemoryWarning):
        * workers/service/server/SWServer.h:

2020-01-29  Antoine Quint  <graouts@apple.com>

        [Web Animations] `DeclarativeAnimation` for CSS Animation is not always destroyed when class that applies `animation-name` is removed
        https://bugs.webkit.org/show_bug.cgi?id=206899

        Reviewed by Devin Rousso.

        In case after processing the new animation styles we don't have any CSSAnimation objects anymore, we should make sure we remove the entry
        for this element from m_elementToCSSAnimationsCreatedByMarkupMap so as to release ownership of any prior animation.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::updateCSSAnimationsForElement):

2020-01-28  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Give up IC when unknown structure transition happens
        https://bugs.webkit.org/show_bug.cgi?id=206846

        Reviewed by Mark Lam.

        IDL Code Generator should taint PutPropertySlot or taint implemented object to avoid Put IC caching
        when it implements custom ::put operation which has side-effect regardless of Structure. Otherwise, IC can be setup
        and IC can do fast path without consulting the custom ::put operation.

        Test: js/dom/put-override-should-not-use-ic.html

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        * bindings/scripts/test/JS/JSTestPluginInterface.h:

2020-01-29  Andres Gonzalez  <andresg_22@apple.com>

        Crash in AXIsolatedObject destruction.
        https://bugs.webkit.org/show_bug.cgi?id=206828

        Reviewed by Carlos Alberto Lopez Perez.

        Fix for crash on GTK introduced with this IsolatedTree change.

        * accessibility/atk/AccessibilityObjectAtk.cpp:
        (WebCore::AccessibilityObject::detachPlatformWrapper):

2020-01-29  Peng Liu  <peng.liu6@apple.com>

        Always enable some log messages related to audio tracks
        https://bugs.webkit.org/show_bug.cgi?id=206918

        Reviewed by Eric Carlson.

        No new tests needed. Just enable some log messages.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):

2020-01-29  Antti Koivisto  <antti@apple.com>

        REGRESSION: WK1 Accessibility: ASSERTION FAILED: FontCache::singleton().generation() == m_generation
        https://bugs.webkit.org/show_bug.cgi?id=206241
        <rdar://problem/58570085>

        Reviewed by Zalan Bujtas.

        Font cache generation bump empties all font related caches and triggers full style resolution. However it is possible
        for single element computed style resolution (triggeded by <title> element here) to happen before the full resolution.
        In this case a style computed based on parent style with old font generation may get inserted into matched declarations
        cache. A subsequent style resolution may then pick up this style and use it as render style.

        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::updateFont):

        Fix by taking care that the font returned by style resolver is always updated to the current generation.

2020-01-29  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r255345.
        https://bugs.webkit.org/show_bug.cgi?id=206933

        "It breaks some internals builds" (Requested by youenn on
        #webkit).

        Reverted changeset:

        "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
        https://bugs.webkit.org/show_bug.cgi?id=206582
        https://trac.webkit.org/changeset/255345

2020-01-29  youenn fablet  <youenn@apple.com>

        Blob media loading does not work with GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206824
        <rdar://problem/58917596>

        Reviewed by Eric Carlson.

        GPU process is using WebCoreAVFResourceLoader for various loads, including blob loads.
        In GPU process, loads will fail since this loader expects a CachedResource, which only WebProcess can have.
        For that reason, move the CachedResource loader part of WebCoreAVFResourceLoader to a dedicated class CachedResourceMediaLoader.
        If load cannot happen with a CachedResource, use a new class PlatformResourceMediaLoader, which uses a loader from MediaPlayer::createResourceLoader.
        This allows using the loading path in GPUProcess used for HTTP loads, which works for blob loads as well.

        Covered by existing and enabled tests.

        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
        (WebCore::CachedResourceMediaLoader::~CachedResourceMediaLoader):
        (WebCore::CachedResourceMediaLoader::create):
        (WebCore::CachedResourceMediaLoader::CachedResourceMediaLoader):
        (WebCore::CachedResourceMediaLoader::stop):
        (WebCore::CachedResourceMediaLoader::responseReceived):
        (WebCore::CachedResourceMediaLoader::notifyFinished):
        (WebCore::CachedResourceMediaLoader::dataReceived):
        (WebCore::PlatformResourceMediaLoader::~PlatformResourceMediaLoader):
        (WebCore::PlatformResourceMediaLoader::create):
        (WebCore::PlatformResourceMediaLoader::PlatformResourceMediaLoader):
        (WebCore::PlatformResourceMediaLoader::stop):
        (WebCore::PlatformResourceMediaLoader::responseReceived):
        (WebCore::PlatformResourceMediaLoader::loadFailed):
        (WebCore::PlatformResourceMediaLoader::loadFinished):
        (WebCore::PlatformResourceMediaLoader::dataReceived):
        (WebCore::WebCoreAVFResourceLoader::startLoading):
        (WebCore::WebCoreAVFResourceLoader::stopLoading):
        (WebCore::WebCoreAVFResourceLoader::responseReceived):
        (WebCore::WebCoreAVFResourceLoader::loadFailed):
        (WebCore::WebCoreAVFResourceLoader::loadFinished):
        (WebCore::WebCoreAVFResourceLoader::newDataStoredInSharedBuffer):

2020-01-29  youenn fablet  <youenn@apple.com>

        [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
        https://bugs.webkit.org/show_bug.cgi?id=206582

        Reviewed by Eric Carlson.

        AVAssetWriterDelegate allows to grab recorded data whenever wanted.
        This delegate requires passing compressed samples to AVAssetWriter.
        Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
        Since AVAssetWriterDelegate is Apple SDK only, keep the existing file based implementation as a fallback.

        Covered by existing tests.

        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h:
        * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:
        (WebCore::AudioSampleBufferCompressor::create):
        (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
        (WebCore::AudioSampleBufferCompressor::initialize):
        (WebCore::AudioSampleBufferCompressor::finish):
        (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
        (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
        (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
        (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
        (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
        (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
        (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
        (WebCore::AudioSampleBufferCompressor::processSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::addSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::create):
        (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
        (WebCore::MediaRecorderPrivateWriter::initialize):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
        * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
        (WebCore::VideoSampleBufferCompressor::create):
        (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
        (WebCore::VideoSampleBufferCompressor::initialize):
        (WebCore::VideoSampleBufferCompressor::finish):
        (WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
        (WebCore::VideoSampleBufferCompressor::initCompressionSession):
        (WebCore::VideoSampleBufferCompressor::processSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::addSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
        (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

2020-01-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Should use light theme unless website declares support for dark themes in color-schemes property
        https://bugs.webkit.org/show_bug.cgi?id=197947

        Reviewed by Michael Catanzaro.

        * dom/Document.cpp:
        (WebCore::Document::useDarkAppearance const): Remove HAVE(OS_DARK_MODE_SUPPORT) because ENABLE(DARK_MODE_CSS)
        guards should be enough.
        * page/FrameView.cpp:
        (WebCore::FrameView::updateBackgroundRecursively): Revert changes made in r244635.
        * page/Page.cpp:
        (WebCore::Page::effectiveAppearanceDidChange): Use ENABLE(DARK_MODE_CSS) instead of HAVE(OS_DARK_MODE_SUPPORT).
        (WebCore::Page::useDarkAppearance const): Ditto.
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::systemColor const): Revert changes made in r244635.
        * rendering/RenderThemeGtk.h:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::setUseDarkAppearanceInternal): Revert changes made in r244635.

2020-01-29  Sunny He  <sunny_he@apple.com>

        Nullptr crash when setting custom properties on detached style
        https://bugs.webkit.org/show_bug.cgi?id=206724

        Reviewed by Darin Adler.

        Test: fast/dom/StyleSheet/detached-style-set-custom-property.html

        * css/PropertySetCSSStyleDeclaration.cpp:
        (WebCore::PropertySetCSSStyleDeclaration::setProperty):
        (WebCore::StyleRuleCSSStyleDeclaration::clearParentRule):
        (WebCore::InlineCSSStyleDeclaration::clearParentElement):

2020-01-28  Said Abou-Hallawa  <said@apple.com>

        REGRESSION (r255158): http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=206839

        Reviewed by Simon Fraser.

        Logging on EWS has shown that in some cases ThrottlingReason::VisuallyIdle
        was added to the Page::m_throttlingReasons but it was never removed. If
        this happens renderingUpdate and requestAnimationFrame will be throttled
        to 10 seconds which leads to test flakiness and timeout.

        Currently the throttling reasons of Page or ScriptedAnimationController
        can be changed by natural reasons (visibility, layout or device state)
        unless Setting::renderingUpdateThrottlingEnabled is disabled. Low power
        mode also can be overridden by a specific value set by the test.

        To make things clearer, a new OptionSet<ThrottlingReason> will be added 
        to Page. Its name is m_throttlingReasonsOverrideForTestingMask. The
        purpose of adding it is to allow disabling and overriding specific
        ThrottlingReasons. The bits of m_throttlingReasonsOverrideForTestingMask
        are not actually reasons. They prevent changing the corresponding bits in
        Page::m_throttlingReasons by natural reasons. Here are the rules for
        setting the bits of m_throttlingReasonsOverrideForTestingMask and
        m_throttlingReasons:

        -- Settings::renderingUpdateThrottlingEnabled is enabled: All the bits in
           m_throttlingReasonsOverrideForTestingMask will be turned off expect
           the bit of ThrottlingReason::VisuallyIdle. We need to disable it always
           for testing. All the bits in m_throttlingReasons will be cleared.
           ThrottlingReason::LowPowerMode will be added to m_throttlingReasons
           if the device is already in low power mode.

        -- Settings::renderingUpdateThrottlingEnabled is disabled: All the bits 
           in m_throttlingReasonsOverrideForTestingMask will be turned on. All the
           bits in m_throttlingReasons will be cleared.

        -- Low power mode is overridden: ThrottlingReason::LowPowerMode is added
           to m_throttlingReasonsOverrideForTestingMask. The new overriding value
           is set in m_throttlingReasons.

        -- Low power mode is cleared: ThrottlingReason::LowPowerMode is removed
           from m_throttlingReasonsOverrideForTestingMask. If the device is in
           low power mode. ThrottlingReason::LowPowerMode will be added to
           m_throttlingReasons

        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::addThrottlingReason):
        (WebCore::ScriptedAnimationController::removeThrottlingReason):
        Adding and removing ThrottlingReasons to ScriptedAnimationController will
        be controlled by Page::m_throttlingReasonsOverrideForTestingMask. If the
        bits of the corresponding reasons are on, no change will be allowed.

        (WebCore::ScriptedAnimationController::clearThrottlingReasons):
        (WebCore::ScriptedAnimationController::isThrottled const):
        The bits in the m_throttlingReasons of Page and ScriptedAnimationController
        reflect the state of the throttling. No need to check for the Settings.

        (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): Deleted.
        * dom/ScriptedAnimationController.h:
        (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const):
        (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.

        * page/Page.cpp:
        (WebCore::Page::Page):
        Set the initial state of the low power mode throttling.

        (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
        This will override the low power mode state or clear it. If it overrides
        it, no subsequent change will be allowed.

        (WebCore::Page::renderingUpdateThrottlingEnabledChangedForTesting):
        This called through changing the Settings from the tests only.

        (WebCore::Page::setIsVisuallyIdleInternal):
        (WebCore::Page::handleLowModePowerChange):
        Prevent changing m_throttlingReasons if the throttling reasons can't be
        altered.

        (WebCore::Page::isLowPowerModeEnabled const): Deleted.
        (WebCore::Page::renderingUpdateThrottlingEnabled const): Deleted.
        (WebCore::Page::renderingUpdateThrottlingEnabledChanged): Deleted.
        (WebCore::Page::isRenderingUpdateThrottled const): Deleted.
        (WebCore::Page::preferredRenderingUpdateInterval const): Deleted.
        * page/Page.h:
        (WebCore::Page::isLowPowerModeEnabled const):
        (WebCore::Page::canUpdateThrottlingReason const):
        (WebCore::Page::isRenderingUpdateThrottled const):
        (WebCore::Page::preferredRenderingUpdateInterval const):
        * page/Settings.yaml:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::renderingUpdateThrottlingEnabledChangedForTesting):
        (WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged): Deleted.
        * page/SettingsBase.h:

2020-01-28  Simon Fraser  <simon.fraser@apple.com>

        Add logging to detect cause of rare crash at RenderLayer::calculateLayerBounds const
        https://bugs.webkit.org/show_bug.cgi?id=206915
        rdar://problem/55699292

        Reviewed by Tim Horton.
        
        We have reports of a rare crash under RenderLayer::calculateLayerBounds() under RenderLayer::updateLayerPositions(),
        where a RenderLayerBacking's m_owningLayer is null (which should never happen). This appears to reproduce
        by clicking links to CNN or FoxNews articles from Google News on macOS.
        
        Add a bear trap in that offset in the class, and also null-check the m_owningLayer reference
        in release assertions to better understand what's happening.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::~RenderLayerBacking):
        (WebCore::RenderLayerBacking::willBeDestroyed):
        (WebCore::RenderLayerBacking::updateCompositedBounds):
        (WebCore::RenderLayerBacking::updateAfterLayout):
        (WebCore::RenderLayerBacking::updateConfiguration):
        (WebCore::RenderLayerBacking::updateAfterDescendants):
        (WebCore::RenderLayerBacking::paintIntoLayer):
        * rendering/RenderLayerBacking.h:

2020-01-28  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Null deref crash in DOMWindow::scrollBy after evoking updateLayoutIgnorePendingStylesheets()
        https://bugs.webkit.org/show_bug.cgi?id=206099

        Reviewed by Ryosuke Niwa

        Added null pointer check for frame in scrollBy function before usage.

        Test: fast/dom/Window/window-scroll-ignore-null-frame.html

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollBy const):

2020-01-28  Chris Dumez  <cdumez@apple.com>

        REGRESSION (r252064): [ Mac iOS ] storage/websql/statement-error-callback.html is timing out flakily
        https://bugs.webkit.org/show_bug.cgi?id=206291
        <rdar://problem/58606666>

        Reviewed by Maciej Stachowiak.

        I found that extending the lifetime of the SQLTransaction by capturing protectedThis in the event loop
        task was the source of the flaky timeouts & crashes. Queueing this event loop task in
        notifyDatabaseThreadIsShuttingDown() is actually not necessary because calling callErrorCallbackDueToInterruption()
        directly would schedule the event loop task for us. Also, in callErrorCallbackDueToInterruption(),
        the event loop task only keeps the error callback alive, not just the SQLTransaction object.

        No new tests, unskipped existing test.

        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::notifyDatabaseThreadIsShuttingDown):

2020-01-28  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Triple clicking to select a sentence results in an empty selection
        https://bugs.webkit.org/show_bug.cgi?id=206863
        <rdar://problem/58776993>

        Reviewed by Wenson Hsieh.

        * editing/EditingBehavior.h:
        (WebCore::EditingBehavior::shouldSelectOnContextualMenuClick const):
        * page/ChromeClient.h:
        (WebCore::ChromeClient::shouldUseMouseEventsForSelection):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::canMouseDownStartSelect):
        (WebCore::canMouseDownStartSelect): Deleted.
        * page/EventHandler.h:
        Disable WebCore's mouse-event-driven selection mechanisms on macCatalyst,
        where we use a UITextInteraction-driven selection instead. Otherwise,
        they conflict with each other in a chaotic fashion.

2020-01-28  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: speed up index records deletion
        https://bugs.webkit.org/show_bug.cgi?id=206196
        <rdar://problem/53596307>

        Reviewed by Brady Eidson.

        This patch does a few things to accelerate deletion for index records:
        1. make indexID unique in database instead of objectStore
        2. create an index on IndexRecords table
        3. optimize some SQLite statements to take advantage of 1 and 2

        Test: IndexedDB.IDBObjectStoreInfoUpgradeToV2

        Make test PerformanceTests/IndexedDB/basic/index-cursor-delete-2.html 7.5x faster.

        * Modules/indexeddb/IDBDatabase.h:
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::createIndex):
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::createV1ObjectStoreInfoSchema):
        (WebCore::IDBServer::createV2ObjectStoreInfoSchema):
        (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsRecordIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidObjectStoreInfoTable):
        (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteOneIndexRecord): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::buildIndexStatement):
        (WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
        (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
        (WebCore::IDBDatabaseInfo::setMaxIndexID):
        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
        (WebCore::IDBDatabaseInfo::generateNextIndexID):
        (WebCore::IDBDatabaseInfo::encode const):
        (WebCore::IDBDatabaseInfo::decode):
        * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
        (WebCore::IDBObjectStoreInfo::createNewIndex):
        (WebCore::IDBObjectStoreInfo::addExistingIndex):
        (WebCore::IDBObjectStoreInfo::isolatedCopy const):
        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
        (WebCore::IDBObjectStoreInfo::autoIncrement const):
        (WebCore::IDBObjectStoreInfo::encode const):
        (WebCore::IDBObjectStoreInfo::decode):
        (WebCore::IDBObjectStoreInfo::maxIndexID const): Deleted.

2020-01-28  Justin Fan  <justin_fan@apple.com>

        [WebGL2] Implement sub-source texImage2D and texSubImage2D
        https://bugs.webkit.org/show_bug.cgi?id=206782
        <rdar://problem/58886527>

        Reviewed by Dean Jackson.

        Implement sub-source override versions of texImage2D and texSubImage2D. 
        Some refactoring of bufferData and bufferSubData to share code with new implementation.

        Conformance test results updated for:
        webgl/2.0.0/conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html
        webgl/2.0.0/conformance2/misc/views-with-offsets.html
        webgl/2.0.0/conformance2/textures/misc/tex-image-and-sub-image-with-array-buffer-view-sub-source.html

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::arrayBufferViewSliceFactory): Creates sub-resource of appropriate type for ArrayBufferView resources.
        (WebCore::WebGL2RenderingContext::sliceArrayBufferView): Consolidates duplicate logic of buffer/SubData.
        (WebCore::WebGL2RenderingContext::bufferData):
        (WebCore::WebGL2RenderingContext::bufferSubData):
        (WebCore::WebGL2RenderingContext::getBufferSubData): DataView buffers are allowed, and remove unnecessary elementSize helper function.
        (WebCore::WebGL2RenderingContext::texImage2D): Implement sub-source version and improve log messaging for unimplemented overrides.
        (WebCore::WebGL2RenderingContext::sliceTypedArrayBufferView): Creates sub-resource of appropriate type for TypedArray buffer resources.
        (WebCore::WebGL2RenderingContext::texImage3D): Improve log messaging.
        (WebCore::WebGL2RenderingContext::texSubImage2D): Implement sub-source version and improve log messaging for unimplemented overrides.
        (WebCore::WebGL2RenderingContext::texSubImage3D): Improve log messaging.
        (WebCore::WebGL2RenderingContext::compressedTexImage3D): 
        (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
        (WebCore::WebGL2RenderingContext::compressedTexImage2D):
        (WebCore::WebGL2RenderingContext::compressedTexSubImage2D):
        (WebCore::WebGL2RenderingContext::readPixels):
        (WebCore::arrayBufferViewElementSize): Deleted. Unnecessary given utilities in TypedArrayType.h.
        * html/canvas/WebGL2RenderingContext.h:
        * platform/graphics/GraphicsContextGL.h: Remove some extra overrides that aren't actually present in OpenGL ES 3.
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::texImage2D): Deleted.

2020-01-28  Chris Lord  <clord@igalia.com>

        Implement [Transferable] property of OffscreenCanvas
        https://bugs.webkit.org/show_bug.cgi?id=202574

        Reviewed by Antti Koivisto.

        Bug 202574 - Implement [Transferable] property of OffscreenCanvas

        No new tests. Covered by existing tests.

        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::serialize):
        (WebCore::CloneSerializer::CloneSerializer):
        (WebCore::CloneSerializer::dumpOffscreenCanvas):
        (WebCore::CloneSerializer::dumpIfTerminal):
        (WebCore::CloneDeserializer::deserialize):
        (WebCore::CloneDeserializer::CloneDeserializer):
        (WebCore::CloneDeserializer::readOffscreenCanvas):
        (WebCore::CloneDeserializer::readTerminal):
        (WebCore::SerializedScriptValue::SerializedScriptValue):
        (WebCore::SerializedScriptValue::create):
        (WebCore::canOffscreenCanvasesDetach):
        (WebCore::SerializedScriptValue::deserialize):
        * bindings/js/SerializedScriptValue.h:
        (WebCore::SerializedScriptValue::SerializedScriptValue):
        * html/CanvasBase.h:
        (WebCore::CanvasBase::width const):
        (WebCore::CanvasBase::height const):
        * html/OffscreenCanvas.cpp:
        (WebCore::DetachedOffscreenCanvas::DetachedOffscreenCanvas):
        (WebCore::DetachedOffscreenCanvas::takeImageBuffer):
        (WebCore::OffscreenCanvas::create):
        (WebCore::OffscreenCanvas::width const):
        (WebCore::OffscreenCanvas::height const):
        (WebCore::OffscreenCanvas::setWidth):
        (WebCore::OffscreenCanvas::setHeight):
        (WebCore::OffscreenCanvas::getContext):
        (WebCore::OffscreenCanvas::transferToImageBitmap):
        (WebCore::OffscreenCanvas::convertToBlob):
        (WebCore::OffscreenCanvas::canDetach const):
        (WebCore::OffscreenCanvas::detach):
        (WebCore::OffscreenCanvas::takeImageBuffer const):
        * html/OffscreenCanvas.h:
        (WebCore::DetachedOffscreenCanvas::size const):
        (WebCore::DetachedOffscreenCanvas::originClean const):

2020-01-28  Andres Gonzalez  <andresg_22@apple.com>

        Properly clear pending changes during AXIsolatedTree removal and applyPendingChanges.
        https://bugs.webkit.org/show_bug.cgi?id=206879

        Reviewed by Chris Fleizach.

        - After applying pending changes clear the m_pendingAppends and
        m_pendingRemovals, so that they are not applied again.
        - Also clear these variables when the IsolatedTree is being removed in
        the main thread, so that requests in the accessibility thread do not
        cause adding changes to a dead tree.

        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::removeTreeForPageID):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/AXIsolatedTree.h:

2020-01-28  Don Olmstead  <don.olmstead@sony.com>

        [LFC][Integration] Build and enable on Windows
        https://bugs.webkit.org/show_bug.cgi?id=206165

        Reviewed by Darin Adler.

        Fix minor compilation issues in LFC when using MSVC.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::close):

2020-01-28  Brent Fulgham  <bfulgham@apple.com>

        Reset the application bundle identifier between test runs
        https://bugs.webkit.org/show_bug.cgi?id=206858
        <rdar://problem/58844002>

        Reviewed by Per Arne Vollan.

        Clear the application bundle identifier set during testing when resetting the test system
        to a known state in preparation for the next run.

        Tests: fast/sandbox/ios/sandbox-mach-lookup.html, fast/sandbox/ios/sandbox-mach-lookup-mail.html

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::clearApplicationBundleIdentifierTestingOverride): Added.

2020-01-28  Andres Gonzalez  <andresg_22@apple.com>

        Regression: 30+ layout-test crash on Windows
        https://bugs.webkit.org/show_bug.cgi?id=206868

        Reviewed by Chris Fleizach.

        Instead of getting the AXObjectCache to invoke detachWrapper, detach the wrapper directly.

        * accessibility/win/AccessibilityObjectWin.cpp:
        (WebCore::AccessibilityObject::detachPlatformWrapper):

2020-01-28  Don Olmstead  <don.olmstead@sony.com>

        Non-unified build fixes late January 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=206896

        Unreviewed build fix.

        * Modules/cache/DOMCacheEngine.cpp:
        * animation/DocumentTimeline.cpp:
        * layout/inlineformatting/InlineItem.h:

2020-01-28  Antoine Quint  <graouts@apple.com>

        [Web Animations] Separate setting a timeline's current time from updating its animations
        https://bugs.webkit.org/show_bug.cgi?id=206880

        Reviewed by Dean Jackson.

        While we must always update the current time of all timelines if a new animation frame has been requested,
        regardless of the reason (rAF callback, animation servicing, etc.), we should only update timelines' animations
        if at least one timeline has requested an update. We used to decide this at the DocumentTimeline level, but
        this needs to be coordinated at the Document level to consider all timelines at once.

        This is required for an upcoming patch where we make changes to the way we schedule animations to correctly
        support mixed accelerated and non-accelerated properties.

        No new tests since this shouldn't yield any visible behavior change.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::updateCurrentTime):
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        * animation/DocumentTimeline.h:
        * dom/Document.cpp:
        (WebCore::Document::updateAnimationsAndSendEvents):

2020-01-28  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Decouple Display::LineBox and Layout::LineBoxBuilder
        https://bugs.webkit.org/show_bug.cgi?id=206861
        <rdar://problem/58945284>

        Reviewed by Antti Koivisto.

        We should not mix logical and physical coordinates.

        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::Baseline::ascent const):
        (WebCore::Display::LineBox::Baseline::descent const):
        (WebCore::Display::LineBox::rect const):
        (WebCore::Display::LineBox::left const):
        (WebCore::Display::LineBox::right const):
        (WebCore::Display::LineBox::top const):
        (WebCore::Display::LineBox::bottom const):
        (WebCore::Display::LineBox::width const):
        (WebCore::Display::LineBox::height const):
        (WebCore::Display::LineBox::baseline const):
        (WebCore::Display::LineBox::baselineOffset const):
        (WebCore::Display::LineBox::isConsideredEmpty const):
        (WebCore::Display::LineBox::LineBox):
        (WebCore::Display::LineBox::Baseline::Baseline):
        (WebCore::Display::LineBox::logicalRect const): Deleted.
        (WebCore::Display::LineBox::logicalTopLeft const): Deleted.
        (WebCore::Display::LineBox::logicalLeft const): Deleted.
        (WebCore::Display::LineBox::logicalRight const): Deleted.
        (WebCore::Display::LineBox::logicalTop const): Deleted.
        (WebCore::Display::LineBox::logicalBottom const): Deleted.
        (WebCore::Display::LineBox::logicalWidth const): Deleted.
        (WebCore::Display::LineBox::logicalHeight const): Deleted.
        (WebCore::Display::LineBox::resetDescent): Deleted.
        (WebCore::Display::LineBox::setLogicalTopLeft): Deleted.
        (WebCore::Display::LineBox::setLogicalHeight): Deleted.
        (WebCore::Display::LineBox::setLogicalWidth): Deleted.
        (WebCore::Display::LineBox::setScrollableOverflow): Deleted.
        (WebCore::Display::LineBox::setInkOverflow): Deleted.
        (WebCore::Display::LineBox::moveHorizontally): Deleted.
        (WebCore::Display::LineBox::expandHorizontally): Deleted.
        (WebCore::Display::LineBox::shrinkHorizontally): Deleted.
        (WebCore::Display::LineBox::expandVertically): Deleted.
        (WebCore::Display::LineBox::shrinkVertically): Deleted.
        (WebCore::Display::LineBox::setIsConsideredEmpty): Deleted.
        (WebCore::Display::LineBox::setIsConsideredNonEmpty): Deleted.
        (WebCore::Display::LineBox::setLogicalHeightIfGreater): Deleted.
        (WebCore::Display::LineBox::setBaselineOffsetIfGreater): Deleted.
        (WebCore::Display::LineBox::setAscentIfGreater): Deleted.
        (WebCore::Display::LineBox::setDescentIfGreater): Deleted.
        (WebCore::Display::LineBox::resetBaseline): Deleted.
        (WebCore::Display::LineBox::Baseline::setAscent): Deleted.
        (WebCore::Display::LineBox::Baseline::setDescent): Deleted.
        (WebCore::Display::LineBox::Baseline::reset): Deleted.
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLineBox.h: Copied from Source/WebCore/layout/displaytree/DisplayLineBox.h.
        (WebCore::Layout::LineBox::Baseline::height const):
        (WebCore::Layout::LineBox::logicalRect const):
        (WebCore::Layout::LineBox::scrollableOverflow 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::resetDescent):
        (WebCore::Layout::LineBox::setLogicalHeight):
        (WebCore::Layout::LineBox::setLogicalWidth):
        (WebCore::Layout::LineBox::setScrollableOverflow):
        (WebCore::Layout::LineBox::moveHorizontally):
        (WebCore::Layout::LineBox::expandHorizontally):
        (WebCore::Layout::LineBox::shrinkHorizontally):
        (WebCore::Layout::LineBox::expandVertically):
        (WebCore::Layout::LineBox::shrinkVertically):
        (WebCore::Layout::LineBox::isConsideredEmpty const):
        (WebCore::Layout::LineBox::setIsConsideredEmpty):
        (WebCore::Layout::LineBox::setIsConsideredNonEmpty):
        (WebCore::Layout::LineBox::LineBox):
        (WebCore::Layout::LineBox::setLogicalHeightIfGreater):
        (WebCore::Layout::LineBox::baseline const):
        (WebCore::Layout::LineBox::setBaselineOffsetIfGreater):
        (WebCore::Layout::LineBox::setAscentIfGreater):
        (WebCore::Layout::LineBox::setDescentIfGreater):
        (WebCore::Layout::LineBox::baselineOffset const):
        (WebCore::Layout::LineBox::resetBaseline):
        (WebCore::Layout::LineBox::Baseline::Baseline):
        (WebCore::Layout::LineBox::Baseline::setAscent):
        (WebCore::Layout::LineBox::Baseline::setDescent):
        (WebCore::Layout::LineBox::Baseline::reset):
        (WebCore::Layout::LineBox::Baseline::ascent const):
        (WebCore::Layout::LineBox::Baseline::descent const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::halfLeadingMetrics):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::contentLogicalRight const):
        (WebCore::Layout::LineBuilder::lineBox const):
        (WebCore::Layout::LineBuilder::contentLogicalWidth const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        * layout/inlineformatting/LineLayoutContext.h:
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
        (WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
        (WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
        (WebCore::LayoutIntegration::LineLayout::paint):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):

2020-01-28  Jonathan Bedard  <jbedard@apple.com>

        WebCore: Guard uneven corners in rounded rectangles
        https://bugs.webkit.org/show_bug.cgi?id=206838

        Reviewed by Darin Adler.

        No functional changes, covered by existing tests.

        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::platformAddPathForRoundedRect):

2020-01-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r255237.
        https://bugs.webkit.org/show_bug.cgi?id=206889

        it is breaking Win build (Requested by youenn on #webkit).

        Reverted changeset:

        "Blob media loading does not work with GPUProcess"
        https://bugs.webkit.org/show_bug.cgi?id=206824
        https://trac.webkit.org/changeset/255237

2020-01-28  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::findPlaceForCounter with display: contents sibling
        https://bugs.webkit.org/show_bug.cgi?id=206107

        Reviewed by Antti Koivisto.

        Test: fast/css/counters/findPlaceForCounter-display-content-sibling-crash.html

        * rendering/RenderCounter.cpp:
        (WebCore::parentOrPseudoHostElement):
        (WebCore::previousSiblingOrParentElement):
        (WebCore::previousSiblingOrParent):

2020-01-24  Sergio Villar Senin  <svillar@igalia.com>

        Remove WebVR from the tree
        https://bugs.webkit.org/show_bug.cgi?id=206739

        Reviewed by Darin Adler.

        WebVR 1.1 was never completely implemented, it was just included as build option of
        WebKitGTK and WPE, and it was never released by any WebKit port either. There are no plans
        to work on it as it has been replaced by the WebXR specification.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/webvr/DOMWindowWebVR.idl: Removed.
        * Modules/webvr/GamepadWebVR.cpp: Removed.
        * Modules/webvr/GamepadWebVR.h: Removed.
        * Modules/webvr/GamepadWebVR.idl: Removed.
        * Modules/webvr/NavigatorWebVR.cpp: Removed.
        * Modules/webvr/NavigatorWebVR.h: Removed.
        * Modules/webvr/NavigatorWebVR.idl: Removed.
        * Modules/webvr/VRDisplay.cpp: Removed.
        * Modules/webvr/VRDisplay.h: Removed.
        * Modules/webvr/VRDisplay.idl: Removed.
        * Modules/webvr/VRDisplayCapabilities.h: Removed.
        * Modules/webvr/VRDisplayCapabilities.idl: Removed.
        * Modules/webvr/VRDisplayEvent.cpp: Removed.
        * Modules/webvr/VRDisplayEvent.h: Removed.
        * Modules/webvr/VRDisplayEvent.idl: Removed.
        * Modules/webvr/VRDisplayEventReason.h: Removed.
        * Modules/webvr/VRDisplayEventReason.idl: Removed.
        * Modules/webvr/VREye.h: Removed.
        * Modules/webvr/VREye.idl: Removed.
        * Modules/webvr/VREyeParameters.cpp: Removed.
        * Modules/webvr/VREyeParameters.h: Removed.
        * Modules/webvr/VREyeParameters.idl: Removed.
        * Modules/webvr/VRFieldOfView.h: Removed.
        * Modules/webvr/VRFieldOfView.idl: Removed.
        * Modules/webvr/VRFrameData.cpp: Removed.
        * Modules/webvr/VRFrameData.h: Removed.
        * Modules/webvr/VRFrameData.idl: Removed.
        * Modules/webvr/VRLayerInit.h: Removed.
        * Modules/webvr/VRLayerInit.idl: Removed.
        * Modules/webvr/VRPose.cpp: Removed.
        * Modules/webvr/VRPose.h: Removed.
        * Modules/webvr/VRPose.idl: Removed.
        * Modules/webvr/VRStageParameters.cpp: Removed.
        * Modules/webvr/VRStageParameters.h: Removed.
        * Modules/webvr/VRStageParameters.idl: Removed.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/EventNames.in:
        * dom/EventTargetFactory.in:
        * features.json:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setWebVREnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::webVREnabled const): Deleted.
        * platform/vr/VRManager.cpp: Removed.
        * platform/vr/VRManager.h: Removed.
        * platform/vr/VRPlatformDisplay.cpp: Removed.
        * platform/vr/VRPlatformDisplay.h: Removed.
        * platform/vr/VRPlatformDisplayClient.h: Removed.
        * platform/vr/VRPlatformManager.h: Removed.
        * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp: Removed.
        * platform/vr/openvr/VRPlatformDisplayOpenVR.h: Removed.
        * platform/vr/openvr/VRPlatformManagerOpenVR.cpp: Removed.
        * platform/vr/openvr/VRPlatformManagerOpenVR.h: Removed.
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setWebVREnabled): Deleted.
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2020-01-28  youenn fablet  <youenn@apple.com>

        Blob media loading does not work with GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206824
        <rdar://problem/58917596>

        Reviewed by Eric Carlson.

        GPU process is using WebCoreAVFResourceLoader for various loads, including blob loads.
        In GPU process, loads will fail since this loader expects a CachedResource, which only WebProcess can have.
        For that reason, move the CachedResource loader part of WebCoreAVFResourceLoader to a dedicated class CachedResourceMediaLoader.
        If load cannot happen with a CachedResource, use a new class PlatformResourceMediaLoader, which uses a loader from MediaPlayer::createResourceLoader.
        This allows using the loading path in GPUProcess used for HTTP loads, which works for blob loads as well.

        Covered by existing and enabled tests.

        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
        * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
        (WebCore::CachedResourceMediaLoader::~CachedResourceMediaLoader):
        (WebCore::CachedResourceMediaLoader::create):
        (WebCore::CachedResourceMediaLoader::CachedResourceMediaLoader):
        (WebCore::CachedResourceMediaLoader::stop):
        (WebCore::CachedResourceMediaLoader::responseReceived):
        (WebCore::CachedResourceMediaLoader::notifyFinished):
        (WebCore::CachedResourceMediaLoader::dataReceived):
        (WebCore::PlatformResourceMediaLoader::~PlatformResourceMediaLoader):
        (WebCore::PlatformResourceMediaLoader::create):
        (WebCore::PlatformResourceMediaLoader::PlatformResourceMediaLoader):
        (WebCore::PlatformResourceMediaLoader::stop):
        (WebCore::PlatformResourceMediaLoader::responseReceived):
        (WebCore::PlatformResourceMediaLoader::loadFailed):
        (WebCore::PlatformResourceMediaLoader::loadFinished):
        (WebCore::PlatformResourceMediaLoader::dataReceived):
        (WebCore::WebCoreAVFResourceLoader::startLoading):
        (WebCore::WebCoreAVFResourceLoader::stopLoading):
        (WebCore::WebCoreAVFResourceLoader::responseReceived):
        (WebCore::WebCoreAVFResourceLoader::loadFailed):
        (WebCore::WebCoreAVFResourceLoader::loadFinished):
        (WebCore::WebCoreAVFResourceLoader::newDataStoredInSharedBuffer):

2020-01-27  Antoine Quint  <graouts@apple.com>

        [Web Animations] Make Animation.timeline read-write only if a runtime flag is enabled
        https://bugs.webkit.org/show_bug.cgi?id=206173
        <rdar://problem/58527432>

        Reviewed by Dean Jackson.

        Make the timeline property of Animation read-write only if the new WebAnimationsMutableTimelines runtime flag is enabled.

        * animation/WebAnimation.idl: Make the "timeline" property conditionally read-write if WebAnimationsMutableTimelines is enabled.
        * bindings/js/WebCoreBuiltinNames.h: With the new RuntimeConditionallyReadWrite property used in WebAnimation.idl, it is necessary
        to declare the name of the affected property, in this case "timeline", in WebCoreBuiltinNames.
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setWebAnimationsMutableTimelinesEnabled):
        (WebCore::RuntimeEnabledFeatures::webAnimationsMutableTimelinesEnabled const):

2020-01-27  Noam Rosenthal  <noam@webkit.org>

        -webkit-image-set should support resolution units other than 'x'
        https://bugs.webkit.org/show_bug.cgi?id=100120

        Reviewed by Darin Adler.

        Leveraged previous work on image-resolution to enable dpi/dppx/dpcm in CSS image-set.
        Now the second value of every entry in the image-set is parsed like any resolution,
        allowing "x" as a synonim for "dppx.

        This changes computed style behavior for image-set - "x" resolution values will be converted
        to "dppx". This is in line with the spirit of computed values, though it's not spec'ed particularly.

        Tests: fast/hidpi/image-set-units.html

        * css/CSSImageSetValue.cpp:
        (WebCore::CSSImageSetValue::fillImageSet):
        (WebCore::CSSImageSetValue::updateDeviceScaleFactor):
        (WebCore::CSSImageSetValue::customCSSText const):
                Convert values to dppx before sorting them the image set.
                Use given CSS units in computed styles instead of hardcoding "x" 

        * css/CSSPrimitiveValue.cpp:
        (WebCore::isValidCSSUnitTypeForDoubleConversion):
        (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
                Allow conversion of dpi/dppx/dpcm to canonical (dppx).

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeResolution):
        (WebCore::CSSPropertyParserHelpers::consumeImageSet):
        * css/parser/CSSPropertyParserHelpers.h:
                Consume any resolution when parsing image-set.

2020-01-27  Antti Koivisto  <antti@apple.com>

        Correct VTT Cue Style handling to match the specification
        https://bugs.webkit.org/show_bug.cgi?id=201086

        Unreviewed followup based on a review comment.

        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::checkAndStoreStyleSheet):

2020-01-27  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r253634): cricbuzz.com media controls vanish depending on page scale
        https://bugs.webkit.org/show_bug.cgi?id=206788
        rdar://problem/58780584

        Reviewed by Tim Horton.
        
        r253634 changed "delegatesPageScaling"'" to a flag on ScrollView. However, this changed behavior
        for subframes; Settings are propagated down, but only the main ScrollView had delegatesPageScaling
        set on it.
        
        "delegatesPageScaling" is a page-level thing (subframes don't independently zoom), so it
        should live on Page. Move it there.
        
        The bug was triggered by incorrectly taking page scale into account for rects in the compositing
        overlap map (see RenderLayerCompositor::addToOverlapMap()) in subframes, and those rects
        changing on zoom.

        Test: compositing/backing/page-scale-overlap-in-iframe.html

        * page/Frame.cpp:
        (WebCore::Frame::frameScaleFactor const):
        * page/FrameSnapshotting.cpp:
        (WebCore::snapshotFrameRectWithClip):
        * page/FrameView.cpp:
        (WebCore::FrameView::visibleContentScaleFactor const):
        * page/Page.cpp:
        (WebCore::Page::setPageScaleFactor):
        (WebCore::Page::setDelegatesScaling):
        * page/Page.h:
        (WebCore::Page::delegatesScaling const):
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setDelegatesPageScaling): Deleted.
        * platform/ScrollView.h:
        (WebCore::ScrollView::delegatesPageScaling const): Deleted.
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::addToOverlapMap const):

2020-01-27  Sam Weinig  <weinig@apple.com>

        Need a way to mark a DOM attribute as runtime conditionally read-write
        https://bugs.webkit.org/show_bug.cgi?id=206836

        Reviewed by Chris Dumez.

        Adds a new IDL extended attribute, RuntimeConditionallyReadWrite, that works
        like EnableAtRuntime, but instead allows the associated attribute to be
        converted from read-only to read-write based on the value of a RuntimeEnabledFeature.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GeneratePropertiesHashTable): 
        Add check that both runtime enabling and runtime conditional read-write aren't
        both specified. For now, that is not supported.

        (GenerateRuntimeEnableConditionalString):
        Add support for generating the conditional string for RuntimeConditionallyReadWrite.

        (GenerateImplementation):
        Implement the feature by piggy-backing off the existing runtime enabling, which
        deletes the property if the feature is not enabled. For this, if the feature isn't
        enabled, we delete the property, and then add it back readonly. In the future, we
        should move off of this add-then-delete model, but that is tracked via http://webkit.org/b/206837.
        
        * bindings/scripts/IDLAttributes.json:
        Add new extended attribute.

        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjPrototype::finishCreation):
        (WebCore::jsTestObjRuntimeConditionallyReadWriteAttributeGetter):
        (WebCore::jsTestObjRuntimeConditionallyReadWriteAttribute):
        (WebCore::setJSTestObjRuntimeConditionallyReadWriteAttributeSetter):
        (WebCore::setJSTestObjRuntimeConditionallyReadWriteAttribute):
        * bindings/scripts/test/TestObj.idl:
        Add new test with result.

2020-01-27  Devin Rousso  <drousso@apple.com>

        Unreviewed, speculative win build fix after r255191

        * bindings/js/ScriptController.h:
        * testing/Internals.cpp:
        (WebCore::Internals::evaluateInWorldIgnoringException):
        Don't use the `ScriptSourceCode` so we don't have to export its symbol.

2020-01-27  Jonathan Bedard  <jbedard@apple.com>

        WebCore: Remove iOS 11 macros from RenderThemeIOS.mm
        https://bugs.webkit.org/show_bug.cgi?id=206787

        Reviewed by Darin Adler.

        No functional changes, covered by existing tests.

        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::cachedSystemFontDescription const):
        (WebCore::RenderThemeIOS::updateCachedSystemFontDescription const):

2020-01-27  Devin Rousso  <drousso@apple.com>

        Unreviewed, speculative win build fix after r255191

        * inspector/agents/page/PageRuntimeAgent.cpp:
        Add missing include.

2020-01-27  Chris Dumez  <cdumez@apple.com>

        Unreviewed build fix after r255167.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::detachRemoteParts):

2020-01-27  Devin Rousso  <drousso@apple.com>

        Web Inspector: unable to evaluate in the isolated world of content scripts injected by safari app extensions
        https://bugs.webkit.org/show_bug.cgi?id=206110
        <rdar://problem/16945643>

        Reviewed by Timothy Hatcher, Joseph Pecoraro, and Brian Burg.

        In addition to evaluating in subframe execution contexts, add the ability for Web Inspector
        to evaluate in non-normal isolated worlds.

        Test: inspector/runtime/executionContextCreated-isolated-world.html

        * bindings/js/DOMWrapperWorld.h:
        (WebCore::DOMWrapperWorld::create):
        (WebCore::DOMWrapperWorld::type const): Added.
        (WebCore::DOMWrapperWorld::isNormal const):
        (WebCore::DOMWrapperWorld::name const): Added.
        * bindings/js/DOMWrapperWorld.cpp:
        (WebCore::DOMWrapperWorld::DOMWrapperWorld):
        * bindings/js/ScriptController.h:
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::createWorld):
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::initNormalWorld):
        Require that a name is specified when creating an isolated world (except the normal world)
        so that Web Inspector has something to show in the execution context picker.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::didClearWindowObjectInWorld):
        * inspector/agents/page/PageRuntimeAgent.h:
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::didClearWindowObjectInWorld):
        (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
        (WebCore::toProtocol): Added.
        (WebCore::PageRuntimeAgent::notifyContextCreated):
        Allow this instrumentation call to pass through to the agents for non-`Normal` worlds.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::ensureIsolatedWorld):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::plugInImageElementIsolatedWorld):
        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::QuickTimePluginReplacement::isolatedWorld):
        Mark these worlds as `Internal`.

        * testing/Internals.idl:
        * testing/Internals.h:
        * testing/Internals.cpp:
        (WebCore::Internals::evaluateInWorldIgnoringException): Added.

2020-01-27  Peng Liu  <peng.liu6@apple.com>

        Crash in WebCore::HTMLMediaElement::detachMediaSource()
        https://bugs.webkit.org/show_bug.cgi?id=206766

        Reviewed by Jer Noble.

        Use WeakPtr<HTMLMediaElement> in MediaSource instead of a raw pointer.
        In addition, we need to detach a MediaSource from an HTMLMediaElement before the HTMLMediaElement forgets the reference to the MediaSource.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::attachToElement):
        * Modules/mediasource/MediaSource.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource):

2020-01-27  Andres Gonzalez  <andresg_22@apple.com>

        Crash in AXIsolatedObject destruction.
        https://bugs.webkit.org/show_bug.cgi?id=206828

        Reviewed by Chris Fleizach.

        - The previous AXCoreObject::detach method became detachRemoteParts,
        since this method detaches all references to and from other objects.
        - The new AXCoreObject::detach method performs three distinctive
        operations:
        1. Detaches the platform wrapper.
        2. Detaches all remote references to and from other objects.
        3. Sets the object ID to InvalidAXID.
        - The detachPlatformWrapper method allows for platform-specific
        customizations.
        - Added accessibility/isolatedtree/mac/AXIsolatedobject.mm.

        * PlatformMac.cmake:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::~AXObjectCache):
        (WebCore::AXObjectCache::remove):
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::detachRemoteParts):
        (WebCore::AccessibilityNodeObject::detach): Became detachRemoteParts.
        * accessibility/AccessibilityNodeObject.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::detachRemoteParts):
        (WebCore::AccessibilityObject::detach): Became detachRemoteParts.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::detachWrapper):
        (WebCore::AXCoreObject::detach):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::detachRemoteParts):
        (WebCore::AccessibilityRenderObject::detach): Became detachRemoteParts.
        * accessibility/AccessibilityRenderObject.h:
        * accessibility/AccessibilityScrollView.cpp:
        (WebCore::AccessibilityScrollView::detachRemoteParts):
        (WebCore::AccessibilityScrollView::detach): Became detachRemoteParts.
        * accessibility/AccessibilityScrollView.h:
        * accessibility/atk/AccessibilityObjectAtk.cpp:
        (WebCore::AccessibilityObject::detachPlatformWrapper):
        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::detachWrapper): Deleted, no longer used in COCOA platforms.
        * accessibility/ios/AccessibilityObjectIOS.mm:
        (WebCore::AccessibilityObject::detachPlatformWrapper):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::detachRemoteParts):
        (WebCore::AXIsolatedObject::detach): Became detachRemoteParts.
        (WebCore::AXIsolatedObject::disconnect): Replaced with AXCoreObject::detach.
        * accessibility/isolatedtree/AXIsolatedObject.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::removeTreeForPageID):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
        (WebCore::AXIsolatedObject::detachPlatformWrapper):
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::detachWrapper): Deleted, no longer used in COCOA platforms.
        * accessibility/mac/AccessibilityObjectMac.mm:
        (WebCore::AccessibilityObject::detachPlatformWrapper):
        * accessibility/win/AccessibilityObjectWin.cpp:
        (WebCore::AccessibilityObject::detachPlatformWrapper):

2020-01-27  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r255161.

        Broke the watchOS build.

        Reverted changeset:

        "Crash in WebCore::HTMLMediaElement::detachMediaSource()"
        https://bugs.webkit.org/show_bug.cgi?id=206766
        https://trac.webkit.org/changeset/255161

2020-01-27  Jer Noble  <jer.noble@apple.com>

        Support 'allow="fullscreen"' feature policy
        https://bugs.webkit.org/show_bug.cgi?id=206806
        <rdar://problem/55640448>

        Reviewed by Youenn Fablet.

        Test: http/tests/fullscreen/fullscreen-feature-policy.html

        The unprefixed version of the Fullscreen API has deprecated the 'allowfullscreen' iframe
        attribute in favor of the 'allow="fullscreen"' style attribute used by Feature Policy.
        Add support for such, including the specified handling for the legacy 'allowfullscreen'
        attribute.

        Note: this patch will (intentionally) change the default behavior of <iframe>s. Previously
        any <iframe> without the "allowfullscreen" attribute would not be allowed to enter fullscreen
        mode. After this patch, <iframes> without the legacy attribute or an explicit fullscreen
        Feature Policy will be allowed to enter fullscreen so long as their origin is the same as
        the top document (and that all parent iframes are also allowed to enter fullscreen).

        * dom/FullscreenManager.cpp:
        (WebCore::FullscreenManager::requestFullscreenForElement):
        (WebCore::FullscreenManager::isFullscreenEnabled const):
        (WebCore::isAttributeOnAllOwners): Deleted.
        (WebCore::FullscreenManager::fullscreenIsAllowedForElement const): Deleted.
        * dom/FullscreenManager.h:
        * html/FeaturePolicy.cpp:
        (WebCore::isFeaturePolicyAllowedByDocumentAndAllOwners):
        (WebCore::FeaturePolicy::parse):
        (WebCore::FeaturePolicy::allows const):
        * html/FeaturePolicy.h:
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::parseAttribute):
        (WebCore::HTMLIFrameElement::featurePolicy const):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createRequest):
        (WebCore::isSyncXHRAllowedByFeaturePolicy): Deleted.

2020-01-27  Peng Liu  <peng.liu6@apple.com>

        Crash in WebCore::HTMLMediaElement::detachMediaSource()
        https://bugs.webkit.org/show_bug.cgi?id=206766

        Reviewed by Jer Noble.

        Use WeakPtr<HTMLMediaElement> in MediaSource instead of a raw pointer.
        In addition, we need to detach a MediaSource from an HTMLMediaElement before the HTMLMediaElement forgets the reference to the MediaSource.

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::attachToElement):
        * Modules/mediasource/MediaSource.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource):

2020-01-27  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler
        https://bugs.webkit.org/show_bug.cgi?id=204713

        Reviewed by Simon Fraser.

        Test: fast/animation/request-animation-frame-throttling-outside-viewport.html

        requestAnimationFrame is throttled by a timer although its callback are
        serviced by the page RenderingUpdate. This led to excessive rAF firing
        which makes it more than the preferred frame per seconds.

        The solution is to have two throttling types:

        1) Page throttling (or full throttling) which slows down all the steps of
           RenderingUpdate for the main document and all the sub-documents.
        2) Document throttling (or partial throttling) which only slows down the
           rAF of a certain document.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::animationInterval const):
        (WebCore::DocumentTimeline::updateThrottlingState): Deleted.
        * animation/DocumentTimeline.h:
        There is no need to have DocumentTimeline throttling. It is already 
        throttled when the page RenderingUpdate is throttled.

        * dom/Document.cpp:
        (WebCore::Document::requestAnimationFrame):
        (WebCore::Document::updateLastHandledUserGestureTimestamp):
        LowPowerMode throttling is now handled by the page. So remove its handling
        in the Document side.

        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::ScriptedAnimationController):
        (WebCore::ScriptedAnimationController::page const):
        (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const):
        (WebCore::ScriptedAnimationController::interval const):
        (WebCore::ScriptedAnimationController::isThrottled const):
        (WebCore::ScriptedAnimationController::isThrottledRelativeToPage const):
        (WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const):
        (WebCore::ScriptedAnimationController::registerCallback):
        (WebCore::ScriptedAnimationController::cancelCallback):
        (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
        (WebCore::ScriptedAnimationController::scheduleAnimation):
        (WebCore::throttlingReasonToString): Deleted.
        (WebCore::throttlingReasonsToString): Deleted.
        (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::animationTimerFired): Deleted.
        * dom/ScriptedAnimationController.h:
        (WebCore::ScriptedAnimationController::addThrottlingReason):
        (WebCore::ScriptedAnimationController::removeThrottlingReason):
        Get rid of the rAF throttling timer. Service the rAF callback only when
        the period from the current time stamp till the last service time stamp
        is greater than the preferred rAF interval .

        * page/FrameView.cpp:
        (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
        ThrottlingReason is now defined outside ScriptedAnimationController.

        * page/Page.cpp:
        (WebCore::Page::renderingUpdateThrottlingEnabled const):
        (WebCore::Page::renderingUpdateThrottlingEnabledChanged):
        (WebCore::Page::isRenderingUpdateThrottled const):

        (WebCore::Page::preferredRenderingUpdateInterval const):
        Calculate the preferred RenderingUpdate interval from the throttling
        reasons.

        (WebCore::Page::setIsVisuallyIdleInternal):
        (WebCore::Page::handleLowModePowerChange):
        Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or 
        IsVisuallyIdle is toggled.

        (WebCore::updateScriptedAnimationsThrottlingReason): Deleted.
        * page/Page.h:

        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::adjustFramesPerSecond):
        (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
        Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the
        throttling is not aggressive e.g. 10_s. Otherwise use the timer.

        (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
        Call adjustFramesPerSecond() when DisplayRefreshMonitor is created.

        (WebCore::RenderingUpdateScheduler::startTimer):
        * page/RenderingUpdateScheduler.h:

        * page/Settings.yaml:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged):
        * page/SettingsBase.h:
        Add a setting to enable/disable RenderingUpdateThrottling.

        * platform/graphics/AnimationFrameRate.h: Added.
        (WebCore::preferredFrameInterval):
        (WebCore::preferredFramesPerSecond):

        * platform/graphics/DisplayRefreshMonitor.h:
        (WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond):
        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::monitorForClient):
        Rename createMonitorForClient() to monitorForClient() since it may return
        a cached DisplayRefreshMonitor.

        (WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond):
        (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
        (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
        No need to call registerClient(). This function was just ensuring the
        DisplayRefreshMonitor is created. scheduleAnimation() does the same thing.

        (WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted.
        (WebCore::DisplayRefreshMonitorManager::registerClient): Deleted.
        * platform/graphics/DisplayRefreshMonitorManager.h:
        (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted.

        * platform/graphics/GraphicsLayerUpdater.cpp:
        (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
        * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
        (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]):
        Set the preferredFramesPerSecond of the CADisplayLink.

2020-01-27  Antti Koivisto  <antti@apple.com>

        Correct VTT Cue Style handling to match the specification
        https://bugs.webkit.org/show_bug.cgi?id=201086
        <rdar://problem/54658121>

        Reviewed by Brent Fulgham.

        The VTT specification requires that only data-URLs are permitted in STYLE blocks.

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const):

        Fix selectorText for function version of ::cue().

        * css/parser/CSSParserContext.cpp:
        (WebCore::CSSParserContext::completeURL const):

        Don't allow non-data URLs in WebVTT parser mode.

        * css/parser/CSSParserContext.h:
        (WebCore::CSSParserContext::completeURL const): Deleted.
        * css/parser/CSSParserMode.h:
        (WebCore::isStrictParserMode):
        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::collectStyleSheet):
        (WebCore::WebVTTParser::checkAndStoreStyleSheet):

        Instead of simply validating the original stylesheet, build a new sanitized stylesheet text
        from the stylesheet parsed in WebVTT mode. This sanitized stylesheet is then used as the
        input for the style system.

        * html/track/WebVTTParser.h:

2020-01-27  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r255131.

        Caused assertion failures on iOS debug bots.

        Reverted changeset:

        "Throttling requestAnimationFrame should be controlled by
        RenderingUpdateScheduler"
        https://bugs.webkit.org/show_bug.cgi?id=204713
        https://trac.webkit.org/changeset/255131

2020-01-27  Antoine Quint  <graouts@apple.com>

        [Web Animations] Add support for the options parameter to getAnimations()
        https://bugs.webkit.org/show_bug.cgi?id=202191
        <rdar://problem/55697751>

        Reviewed by Antti Koivisto.

        Add support for the GetAnimationsOptions dictionary as a parameter to Animatable.getAnimations(). When it is provided
        and has its sole "subtree" property set to "true", we call Document.getAnimations() and filter out animations that are
        not targeting elements that are either this element, one of its descendants, one of its pseudo-elements or one of its
        descendants' pseudo-elements.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/Animatable.idl:
        * animation/GetAnimationsOptions.h: Added.
        * animation/GetAnimationsOptions.idl: Added.
        * dom/Element.cpp:
        (WebCore::Element::getAnimations):
        * dom/Element.h:

2020-01-27  Jonathan Bedard  <jbedard@apple.com>

        WebCore: Remove iOS 11 macros from NetworkStorageSessionCocoa.mm
        https://bugs.webkit.org/show_bug.cgi?id=206786

        Reviewed by Darin Adler.

        No functional changes, covered by existing tests.

        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::cookiesForURL): 
        (WebCore::setHTTPCookiesForURL):

2020-01-27  Jonathan Bedard  <jbedard@apple.com>

        WebCore: Remove iOS 11 macros from WebItemProviderPasteboard.h
        https://bugs.webkit.org/show_bug.cgi?id=206719

        Reviewed by Tim Horton.

        No functional changes, covered by existing tests.

        * platform/ios/WebItemProviderPasteboard.h:

2020-01-27  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Display::Run has physical geometry only.
        https://bugs.webkit.org/show_bug.cgi?id=206810
        <rdar://problem/58905455>

        Reviewed by Antti Koivisto.

        Since in LFC the Display::Runs are used for painting and hittesting but never for layout,
        the geometry is always physical.

        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::checkForMatchingNonTextRuns):
        (WebCore::Layout::checkForMatchingTextRuns):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::rect const):
        (WebCore::Display::Run::topLeft const):
        (WebCore::Display::Run::left const):
        (WebCore::Display::Run::right const):
        (WebCore::Display::Run::top const):
        (WebCore::Display::Run::bottom const):
        (WebCore::Display::Run::width const):
        (WebCore::Display::Run::height const):
        (WebCore::Display::Run::setWidth):
        (WebCore::Display::Run::setTop):
        (WebCore::Display::Run::setlLeft):
        (WebCore::Display::Run::moveVertically):
        (WebCore::Display::Run::moveHorizontally):
        (WebCore::Display::Run::expandVertically):
        (WebCore::Display::Run::expandHorizontally):
        (WebCore::Display::Run::Run):
        (WebCore::Display::Run::logicalRect const): Deleted.
        (WebCore::Display::Run::logicalTopLeft const): Deleted.
        (WebCore::Display::Run::logicalLeft const): Deleted.
        (WebCore::Display::Run::logicalRight const): Deleted.
        (WebCore::Display::Run::logicalTop const): Deleted.
        (WebCore::Display::Run::logicalBottom const): Deleted.
        (WebCore::Display::Run::logicalWidth const): Deleted.
        (WebCore::Display::Run::logicalHeight const): Deleted.
        (WebCore::Display::Run::setLogicalWidth): Deleted.
        (WebCore::Display::Run::setLogicalTop): Deleted.
        (WebCore::Display::Run::setLogicalLeft): Deleted.
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):
        (WebCore::LayoutIntegration::LineLayout::hitTest):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::writeTextBox):
        * rendering/line/LineLayoutTraversal.h:
        (WebCore::LineLayoutTraversal::Box::logicalRect const): Deleted.
        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::linePosition):
        (WebCore::LineLayoutTraversal::DisplayRunPath::rect const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::logicalRect const): Deleted.

2020-01-26  Antoine Quint  <graouts@apple.com>

        [Web Animations] Update all DocumentTimeline objects when updating animations
        https://bugs.webkit.org/show_bug.cgi?id=206819

        Reviewed by Antti Koivisto.

        Developers can create additional DocumentTimeline objects in JavaScript using that class's constructor, and an animation can be
        assigned to that timeline after its creation. Until now we would only update an timeline created by a Document when that document's
        animations were updated. Now we keep track of all DocumentTimeline objects that are created for a given Document as a vector of weak
        references, and we update all of them when updating a document's animations.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::DocumentTimeline):
        (WebCore::DocumentTimeline::~DocumentTimeline):
        * animation/DocumentTimeline.h:
        * dom/Document.cpp:
        (WebCore::Document::updateAnimationsAndSendEvents):
        (WebCore::Document::addTimeline):
        (WebCore::Document::removeTimeline):
        * dom/Document.h:

2020-01-26  Darin Adler  <darin@apple.com>

        Move DOMCacheEngine::errorToException back out of header and into .cpp file
        https://bugs.webkit.org/show_bug.cgi?id=206815

        Reviewed by Mark Lam.

        This is a follow-up to a recent build fix that moved a function, errorToException,
        out of a .cpp file and into a header file. This reverses that since we don't need
        this function to be inlined.

        * Modules/cache/DOMCacheEngine.cpp:
        (WebCore::DOMCacheEngine::convertToException): Moved this function from the header
        and renamed it from errorToException to match the other function more closely. Also
        use the pattern where the switch statement has no default, so we get a warning if
        we don't cover all the enum values.
        (WebCore::DOMCacheEngine::convertToExceptionAndLog): Updated for new function name.

        * Modules/cache/DOMCacheEngine.h: Removed the definition of errorToException and
        replaced it with the declaration of it under its new name, convertToException.

        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::retrieveCaches): Updated for new function name.

2020-01-26  youenn fablet  <youenn@apple.com>

        Use ObjectIdentifier for remote RealtimeMediaSource
        https://bugs.webkit.org/show_bug.cgi?id=206808
        <rdar://problem/58705405>

        Reviewed by Eric Carlson.

        No change of behavior.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/RealtimeMediaSourceIdentifier.h: Added.

2020-01-26  Said Abou-Hallawa  <said@apple.com>

        Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler
        https://bugs.webkit.org/show_bug.cgi?id=204713

        Reviewed by Simon Fraser.

        Test: fast/animation/request-animation-frame-throttling-outside-viewport.html

        requestAnimationFrame is throttled by a timer although its callback are
        serviced by the page RenderingUpdate. This led to excessive rAF firing
        which makes it more than the preferred frame per seconds.

        The solution is to have two throttling types:

        1) Page throttling (or full throttling) which slows down all the steps of
           RenderingUpdate for the main document and all the sub-documents.
        2) Document throttling (or partial throttling) which only slows down the
           rAF of a certain document.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::animationInterval const):
        (WebCore::DocumentTimeline::updateThrottlingState): Deleted.
        * animation/DocumentTimeline.h:
        There is no need to have DocumentTimeline throttling. It is already 
        throttled when the page RenderingUpdate is throttled.

        * dom/Document.cpp:
        (WebCore::Document::requestAnimationFrame):
        (WebCore::Document::updateLastHandledUserGestureTimestamp):
        LowPowerMode throttling is now handled by the page. So remove its handling
        in the Document side.

        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::ScriptedAnimationController):
        (WebCore::ScriptedAnimationController::page const):
        (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const):
        (WebCore::ScriptedAnimationController::interval const):
        (WebCore::ScriptedAnimationController::isThrottled const):
        (WebCore::ScriptedAnimationController::isThrottledRelativeToPage const):
        (WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const):
        (WebCore::ScriptedAnimationController::registerCallback):
        (WebCore::ScriptedAnimationController::cancelCallback):
        (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
        (WebCore::ScriptedAnimationController::scheduleAnimation):
        (WebCore::throttlingReasonToString): Deleted.
        (WebCore::throttlingReasonsToString): Deleted.
        (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::animationTimerFired): Deleted.
        * dom/ScriptedAnimationController.h:
        (WebCore::ScriptedAnimationController::addThrottlingReason):
        (WebCore::ScriptedAnimationController::removeThrottlingReason):
        Get rid of the rAF throttling timer. Service the rAF callback only when
        the period from the current time stamp till the last service time stamp
        is greater than the preferred rAF interval .

        * page/FrameView.cpp:
        (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
        ThrottlingReason is now defined outside ScriptedAnimationController.

        * page/Page.cpp:
        (WebCore::Page::renderingUpdateThrottlingEnabled const):
        (WebCore::Page::renderingUpdateThrottlingEnabledChanged):
        (WebCore::Page::isRenderingUpdateThrottled const):

        (WebCore::Page::preferredRenderingUpdateInterval const):
        Calculate the preferred RenderingUpdate interval from the throttling
        reasons.

        (WebCore::Page::setIsVisuallyIdleInternal):
        (WebCore::Page::handleLowModePowerChange):
        Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or 
        IsVisuallyIdle is toggled.

        (WebCore::updateScriptedAnimationsThrottlingReason): Deleted.
        * page/Page.h:

        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::adjustFramesPerSecond):
        (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
        Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the
        throttling is not aggressive e.g. 10_s. Otherwise use the timer.

        (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
        Call adjustFramesPerSecond() when DisplayRefreshMonitor is created.

        (WebCore::RenderingUpdateScheduler::startTimer):
        * page/RenderingUpdateScheduler.h:

        * page/Settings.yaml:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged):
        * page/SettingsBase.h:
        Add a setting to enable/disable RenderingUpdateThrottling.

        * platform/graphics/AnimationFrameRate.h: Added.
        (WebCore::preferredFrameInterval):
        (WebCore::preferredFramesPerSecond):

        * platform/graphics/DisplayRefreshMonitor.h:
        (WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond):
        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::monitorForClient):
        Rename createMonitorForClient() to monitorForClient() since it may return
        a cached DisplayRefreshMonitor.

        (WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond):
        (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
        (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
        No need to call registerClient(). This function was just ensuring the
        DisplayRefreshMonitor is created. scheduleAnimation() does the same thing.

        (WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted.
        (WebCore::DisplayRefreshMonitorManager::registerClient): Deleted.
        * platform/graphics/DisplayRefreshMonitorManager.h:
        (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted.

        * platform/graphics/GraphicsLayerUpdater.cpp:
        (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
        * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
        (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]):
        Set the preferredFramesPerSecond of the CADisplayLink.

        * platform/ios/LowPowerModeNotifierIOS.mm:
        (-[WebLowPowerModeObserver initWithNotifier:]):
        Set the initial state of the low power mode.

2020-01-26  Rob Buis  <rbuis@igalia.com>

        Improve compatibility with hyperlink auditing spec
        https://bugs.webkit.org/show_bug.cgi?id=188852

        Reviewed by Youenn Fablet.

        The hyperlink auditing algorithm indicates the fetch should be done
        using no-referrer [1], so remove the code to set the referrer HTTP
        header.

        Tests: http/tests/navigation/ping-attribute/anchor-cross-origin.html
               http/tests/navigation/ping-attribute/area-cross-origin.html

        [1] https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing (Step 3)

        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendPing):

2020-01-25  Darin Adler  <darin@apple.com>

        Tighten up some of the drag state machine logic
        https://bugs.webkit.org/show_bug.cgi?id=206798

        Reviewed by Wenson Hsieh.

        * page/EventHandler.h: Added shouldDispatchEventsToDragSourceElement function and renamed
        the existing dispatchDragSrcEvent function to dispatchEventToDragSourceElement.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::updateDragAndDrop): Call the renamed dispatchEventToDragSourceElement
        unconditionally, since it now has the smarts to only dispatch an event when we are supposed to.
        (WebCore::EventHandler::cancelDragAndDrop): Ditto.
        (WebCore::EventHandler::dragSourceEndedAt): Call the new shouldDispatchEventsToDragSourceElement
        function because of the null check it does for dataTransfer, before calling setDestinationOperation
        on the dataTransfer, since there isn't an obvious ironclad guarantee we might be here without an
        actual drag fully in process and a dataTransfer object allocated. Also call the renamed
        dispatchEventToDragSourceElement by its new name.
        (WebCore::EventHandler::shouldDispatchDragSourceEvents): Added. Checks thre three conditions that
        affect whether we should dispatch events to the drag source. First that there is a drag source.
        Second that there is a dataTransfer object, indicating that we got far enough in the logic to
        actually start a drag. Third that shouldDispatchEvents is true, indicating this is the type of
        drag that should be visible to the website content and so events should be dispatched.
        (WebCore::EventHandler::dispatchEventToDragSourceElement): Call shouldDispatchDragSourceEvents
        before dispatching the event, so that callers don't all have to do that check.

2020-01-25  Mark Lam  <mark.lam@apple.com>

        Introduce a getVTablePointer() utility function.
        https://bugs.webkit.org/show_bug.cgi?id=206804
        <rdar://problem/58872290>

        Reviewed by Yusuke Suzuki and Oliver Hunt.

        Updated CodeGeneratorJS to use getVTablePointer() and rebased test results.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::toJSNewlyCreated):

2020-01-25  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Media mime types map should be created in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=206478

        Reviewed by Darin Adler.

        Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
        This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
        creation parameters.

        API test: WebKit.MimeTypes

        * platform/MIMETypeRegistry.cpp:
        (WebCore::overriddenMimeTypesMap):
        (WebCore::commonMediaTypes):
        (WebCore::commonMimeTypesMap):
        (WebCore::typesForCommonExtension):
        * platform/MIMETypeRegistry.h:
        * testing/Internals.cpp:
        (WebCore::Internals::mediaMIMETypeForExtension):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-25  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Layout logic should be driven by the type of the inline box
        https://bugs.webkit.org/show_bug.cgi?id=206792
        <rdar://problem/58889080>

        Reviewed by Antti Koivisto.

        Use the type of the inline box to decide what layout functions to call and not whether the
        box has children or it establishes a formatting context.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::nextInPreOrder):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):

2020-01-25  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Re-enable line layout integration
        https://bugs.webkit.org/show_bug.cgi?id=206795
        <rdar://problem/58853907>

        Reviewed by Zalan Bujtas.

        * page/RuntimeEnabledFeatures.h:

2020-01-25  youenn fablet  <youenn@apple.com>

        HTMLMediaElement should not remove the media session at DOM suspension time
        https://bugs.webkit.org/show_bug.cgi?id=206661
        <rdar://problem/58800787>

        Reviewed by Eric Carlson.

        https://trac.webkit.org/changeset/233560 made it so that, on HTMLMediaElement suspension,
        its media session is stopped.
        This was done to ensure updateNowPlayingInfo is not called synchronously but asynchronously.
        The issue is that, once the media session is stopped, it is removed from the media session vector.
        On updating the ready state after suspension, and playing, we try to look into the media session vector and do not find the session.
        This triggers the ASSERT.

        Partially revert the behavior by calling the same code as clientWillPausePlayback
        but make sure updateNowPlayingInfo is calling asynchronously when suspending the media element.
        Introduce clientWillBeDOMSuspended for that purpose.

        Update mediaPlayerReadyStateChanged to enqueue a task to do the update if the media element is suspended.

        Covered by test no longer crashing in debug.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
        (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::processClientWillPausePlayback):
        (WebCore::PlatformMediaSession::clientWillPausePlayback):
        (WebCore::PlatformMediaSession::clientWillBeDOMSuspended):
        * platform/audio/PlatformMediaSession.h:
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
        * platform/audio/PlatformMediaSessionManager.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::sessionWillEndPlayback):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::sessionWillEndPlayback):

2020-01-24  Jack Lee  <shihchieh_lee@apple.com>

        Null Ptr Deref READ @ WebCore::RenderMultiColumnFlow::lastMultiColumnSet const
        https://bugs.webkit.org/show_bug.cgi?id=206106

        Reviewed by Ryosuke Niwa.

        Could not write a reproducible fast test case for this.

        * rendering/RenderMultiColumnFlow.cpp:
        (WebCore::RenderMultiColumnFlow::lastMultiColumnSet const):
        * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
        (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):

2020-01-24  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Long pressing text inside a selection should update the selection
        https://bugs.webkit.org/show_bug.cgi?id=206769
        <rdar://problem/58704316>

        Reviewed by Tim Horton.

        Remove `hasSelectionAtPosition`, which is no longer needed.

        * page/Page.cpp:
        (WebCore::Page::hasSelectionAtPosition const): Deleted.
        * page/Page.h:

2020-01-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] (Regression) LayoutTests/fast/text/whitespace/029.html fails
        https://bugs.webkit.org/show_bug.cgi?id=206773
        <rdar://problem/58883388>

        Reviewed by Simon Fraser.

        While line break is an inline box, it does not have inline content so do not try to cast it to Container.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):

2020-01-24  Jer Noble  <jer.noble@apple.com>

        AirPlay placard not visible when AirPlay is entered in fullscreen mode.
        https://bugs.webkit.org/show_bug.cgi?id=206772
        <rdar://problem/57098851>

        Reviewed by Eric Carlson.

        Test: media/modern-media-controls/placard-support/placard-support-airplay-fullscreen-no-controls.html

        The AirPlay and Picture-in-picture placards should always become visible, regardless of
        whether the <video> element uses the native media controls. So "disabling" the PlacardSupport
        object should not remove the listeners for presentation mode and route change events. Instead
        merely remember whether the object is disabled, so that the "error placard" will only be shown
        if controls are enabled, and PiP and AirPlay placards will always be shown.

        * Modules/modern-media-controls/media/placard-support.js:
        (PlacardSupport.prototype.enable):
        (PlacardSupport.prototype.disable):
        (PlacardSupport.prototype._updatePlacard):

2020-01-24  Andres Gonzalez  <andresg_22@apple.com>

        Crash in AXIsolatedObject::tagName.
        https://bugs.webkit.org/show_bug.cgi?id=206765

        Reviewed by Chris Fleizach.

        Fixes crash in AXIsolatedObject::tagName.

        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData): Was missing the isolatedCopy when caching the tagName.

2020-01-24  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r255089.

        Breaks tvOS build.

        Reverted changeset:

        "WebCore: Remove iOS 11 macros from
        WebItemProviderPasteboard.h"
        https://bugs.webkit.org/show_bug.cgi?id=206719
        https://trac.webkit.org/changeset/255089

2020-01-24  Jonathan Bedard  <jbedard@apple.com>

        WebCore: Remove iOS 11 macros from WebItemProviderPasteboard.h
        https://bugs.webkit.org/show_bug.cgi?id=206719

        Reviewed by Tim Horton.

        No functional changes, covered by existing tests.

        * platform/ios/WebItemProviderPasteboard.h:

2020-01-24  youenn fablet  <youenn@apple.com>

        Add support for MediaRecorder.requestData
        https://bugs.webkit.org/show_bug.cgi?id=206731

        Reviewed by Eric Carlson.

        Add support for requestData that fetches any available data.
        Expose MediaRecorder stream.
        Covered by updated tests.

        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::requestData):
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediarecorder/MediaRecorder.idl:

2020-01-24  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr deref in WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation when an element is inserted before legend under multi-column layout.
        https://bugs.webkit.org/show_bug.cgi?id=206109

        Reviewed by Antti Koivisto.

        Test: fast/forms/fieldset/fieldset-crash-insert-before-legend-under-multicol.html

        * rendering/updating/RenderTreeBuilderBlockFlow.cpp:
        (WebCore::RenderTreeBuilder::BlockFlow::attach):

2020-01-24  Per Arne Vollan  <pvollan@apple.com>

        Unreviewed, rolling out r255050.

        Introduced crashes on bots

        Reverted changeset:

        "[Cocoa] Media mime types map should be created in the UI
        process"
        https://bugs.webkit.org/show_bug.cgi?id=206478
        https://trac.webkit.org/changeset/255050

2020-01-24  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of AXIsolatedObject::isStaticText and isLandmark methods.
        https://bugs.webkit.org/show_bug.cgi?id=206745

        Reviewed by Chris Fleizach.

        - isStaticText moved from the AXObject class to the base AXCoreObject so
        that it is used by isolated objects as well.
        - Implemented isLandmark.
        - Ordered alphabetically the setProperty calls for most IsXXX
        properties in initializeAttributeData for easier identification.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::isStaticText const):
        * accessibility/isolatedtree/AXIsolatedObject.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::isLandmark const): Deleted, inline in header file.
        (WebCore::AXIsolatedObject::isStaticText const): Deleted, implemented in AXCoreObject.
        * accessibility/isolatedtree/AXIsolatedObject.h:

2020-01-23  Antoine Quint  <graouts@apple.com>

        [Web Animations] Support multiple CSS Animations with the same name in animation-name
        https://bugs.webkit.org/show_bug.cgi?id=206688

        Reviewed by Dean Jackson.

        AnimationTimeline would keep track of registered CSS Animations by name for a given element in m_elementToCSSAnimationByName which would map one CSSAnimation
        per String (the animation-name) for a given Element. However, within the same animation-name property, the name of a given @keyframes rules may appear more
        than once, and the CSS Animations specification explains how to handle this scenario.

        We now correctly handle this by replacing m_elementToCSSAnimationByName with the new m_elementToCSSAnimationsCreatedByMarkupMap which simply maps an Element
        to a ListHashSet of CSSAnimation objects. Removing the string that appeared in animation-name to create this animation requires us to keep the AnimationList
        used for the last style update for sorting purposes, since having multiple instances of the same string would not allow disambiguation when sorting the
        KeyframeEffectStack.

        So we also replace m_cssAnimationNames, a Vector<String>, with m_cssAnimationList, a RefPtr<const AnimationList>, and use this to compare Animation objects
        stored in the AnimationList against the backing animation of each CSSAnimation.

        Storing the AnimationList on the KeyframeEffectStack also has the benefit of allowing us to use this as the previous state when updating CSS Animations in
        AnimationTimeline::updateCSSAnimationsForElement(). We used to rely on the previous RenderStyle provided to that function, but it's possible that this style
        is null and we would unnecessarily create additional CSSAnimation objects for animations that actually were retained since the last time CSS Animations were
        invalidated. We now use the stored AnimationList on the invalidated element's KeyframeEffectStack and create a new animation list that will replace the old
        list stored in the m_elementToCSSAnimationsCreatedByMarkupMap map for that element. We can also compare the old list with the new list to find out which
        animations are no longer current.

        Finally, we refactor things a bit to have some new aliases AnimationCollection and CSSAnimationCollection instead of using ListHashSet<> in our types.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationWasAddedToElement): Use the new AnimationCollection alias.
        (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement): We no longer need to do any work for CSSAnimation here since the
        m_elementToCSSAnimationByName map is no more and the m_elementToCSSAnimationsCreatedByMarkupMap that replaces it is updated in updateCSSAnimationsForElement()
        and elementWasRemoved().
        (WebCore::AnimationTimeline::animationsForElement const): Since animations are correctly sorted accounting for their composite order in KeyframeEffectStack,
        call KeyframeEffectStack::sortedEffects() when we're called with Ordering::Sorted. 
        (WebCore::AnimationTimeline::removeCSSAnimationCreatedByMarkup): New method called by elementWasRemoved() to ensure that when an element is removed, we remove
        its CSSAnimation objects from the new m_elementToCSSAnimationsCreatedByMarkupMap and also update the AnimationList on the relevant KeyframeEffectStack.
        (WebCore::AnimationTimeline::elementWasRemoved): Call the new removeCSSAnimationCreatedByMarkup() method before canceling a CSSAnimation.
        (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): Call the new removeCSSAnimationCreatedByMarkup() method before canceling a CSSAnimation.
        (WebCore::AnimationTimeline::updateCSSAnimationsForElement): Use the AnimationList recoreded on the relevant KeyframeEffectStack to determine which CSSAnimation
        objects to create, cancel or merely update depending on the AnimationList in the current style. 
        * animation/AnimationTimeline.h:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::getAnimations const): Use compareAnimationsByCompositeOrder() to correctly sort CSS Animations since they are no longer guaranteed
        to be stored in the relevant map in the expected order.
        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::ensureEffectsAreSorted): Use the new m_cssAnimationList instead of the old m_cssAnimationNames when sorting effects.
        (WebCore::KeyframeEffectStack::setCSSAnimationList):
        (WebCore::KeyframeEffectStack::setCSSAnimationNames): Deleted.
        * animation/KeyframeEffectStack.h:
        (WebCore::KeyframeEffectStack::cssAnimationList const):
        (WebCore::KeyframeEffectStack::cssAnimationNames const): Deleted.
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::commitStyles): Use the new KeyframeEffectStack::cssAnimationList() instead of the old KeyframeEffectStack::cssAnimationNames().
        * animation/WebAnimationUtilities.cpp:
        (WebCore::compareAnimationsByCompositeOrder): Update the composite order comparison utility to use an AnimationList rather than a list of animation names.
        * animation/WebAnimationUtilities.h:
        * platform/animation/AnimationList.h:
        (WebCore::AnimationList::copy const):

2020-01-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][Painting] Add Display::Run cleanup to TextPainter::clearGlyphDisplayLists
        https://bugs.webkit.org/show_bug.cgi?id=206744
        <rdar://problem/58867112>

        Reviewed by Antti Koivisto.

        * rendering/TextPainter.cpp:
        (WebCore::TextPainter::clearGlyphDisplayLists):

2020-01-24  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Clear inline item caches on low memory notification
        https://bugs.webkit.org/show_bug.cgi?id=206740
        <rdar://problem/58773905>

        Reviewed by Zalan Bujtas.

        Clear inline item caches on low memory notification.

        * layout/inlineformatting/InlineFormattingState.h:
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::releaseCaches):
        (WebCore::LayoutIntegration::LineLayout::releaseInlineItemCache):
        * layout/integration/LayoutIntegrationLineLayout.h:

        Remove inline capacity. It is rarely optimal and we can afford the heap allocation.

        * page/MemoryRelease.cpp:
        (WebCore::releaseNoncriticalMemory):

2020-01-24  Adrian Perez de Castro  <aperez@igalia.com>

        Fix various non-unified build issues introduced since r254751
        https://bugs.webkit.org/show_bug.cgi?id=206736

        Reviewed by Carlos Garcia Campos.

        No new tests needed.

        * Modules/cache/DOMCacheEngine.cpp: Move errorToException() function out from the file to
        make it usable from DOMCacheStorage.cpp
        * Modules/cache/DOMCacheEngine.h:
        (WebCore::DOMCacheEngine::errorToException): Added.
        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::retrieveCaches): Adapt to use DOMCacheEngine::errorToException().
        * platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp: Add missing RefPtrCairo.h inclusion.

2020-01-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] LineLayout::paint should take advantage of the glyph display list cache
        https://bugs.webkit.org/show_bug.cgi?id=206727
        <rdar://problem/58809696>

        Reviewed by Antti Koivisto.

        * layout/displaytree/DisplayInlineContent.cpp:
        (WebCore::Display::InlineContent::~InlineContent):
        * layout/displaytree/DisplayInlineContent.h:
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):

2020-01-24  Antti Koivisto  <antti@apple.com>

        :matches() doesn't combine correctly with pseudo elements
        https://bugs.webkit.org/show_bug.cgi?id=206654

        Reviewed by Simon Fraser.

        :matches() has been renamed to :is() in the spec (https://www.w3.org/TR/selectors-4/#matches).
        Update the :matches implementation to spec behavior regarding pseudo element handling.

        "Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :is()."

        Selectors like

            ::matches(foo, .parent .child)::first-letter

        should work while

            ::matches(:first-letter)

        shoudn't match anything.

        Test: fast/selectors/matches-with-pseudo-element.html

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively const):
        (WebCore::SelectorChecker::checkOne const):

        Don't provide pseudoId into ::matches subselectors. Pseudo elements are not suppported inside ::matches.
        If one if found, fail that subselector.

        * css/SelectorChecker.h:

2020-01-24  youenn fablet  <youenn@apple.com>

        Make sure fetch tasks go to network if service worker never gets to activated
        https://bugs.webkit.org/show_bug.cgi?id=206648

        Reviewed by Chris Dumez.

        In case worker context process crashes, the SWServerWorker gets set to NotRunning.
        If the SWServerWorker has pending activating completion handlers, they will never be called until the worker is destroyed.
        But the worker may never be destroyed until its registration is destroyed.
        This may trigger service worker fetch task hangs.

        To fix this, make sure to call activating completion handlers whenever the SWServerWorker state is changed to either Terminating or NotRunning.

        Covered by updated test.

        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::~SWServerWorker):
        (WebCore::SWServerWorker::whenActivated):
        (WebCore::SWServerWorker::setState):
        * workers/service/server/SWServerWorker.h:

2020-01-24  youenn fablet  <youenn@apple.com>

        Make sure DOMCacheStorage::retrieveCaches always calls its completionHandler
        https://bugs.webkit.org/show_bug.cgi?id=206647

        Reviewed by Chris Dumez.

        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::retrieveCaches):
        In case of context being stopped, make sure the completion handler is still called.

2020-01-23  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Media mime types map should be created in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=206478

        Reviewed by Darin Adler.

        Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
        This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
        creation parameters.

        API test: WebKit.MimeTypes

        * platform/MIMETypeRegistry.cpp:
        (WebCore::overriddenMimeTypesMap):
        (WebCore::commonMediaTypes):
        (WebCore::commonMimeTypesMap):
        (WebCore::typesForCommonExtension):
        * platform/MIMETypeRegistry.h:
        * testing/Internals.cpp:
        (WebCore::Internals::mediaMIMETypeForExtension):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-22  Darin Adler  <darin@apple.com>

        Remove some unneeded definitions from Platform.h family headers
        https://bugs.webkit.org/show_bug.cgi?id=206642

        Reviewed by Eric Carlson.

        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Removed
        checks of HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) and
        HAVE(AVFOUNDATION_VIDEO_OUTPUT) because both are always 1 on Cocoa platforms,
        and this is Cocoa-only source code.
        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: Ditto.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.

2020-01-23  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: I-Beam is too conservative, doesn't show up in editable areas with no text
        https://bugs.webkit.org/show_bug.cgi?id=206716
        <rdar://problem/58359523>

        Reviewed by Simon Fraser.

        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):
        * editing/VisiblePosition.h:
        Expose the bounds of the possible selection for the line that the given position belongs to.

2020-01-23  Andres Gonzalez  <andresg_22@apple.com>

        Use the same AccessibilityObjectWrapper for associated AXObject and AXIsolatedObject.
        https://bugs.webkit.org/show_bug.cgi?id=206384

        Reviewed by Chris Fleizach.

        Associated AXObject and AXIsolatedObject need to share the same
        AccessibilityObjectWrapper in order for accessibility clients to work
        properly. This change implements Chris Fleizach's original approach to
        have both the AXObject and IsolatedObject in the same wrapper. This
        approach allows the event notification code to remain the same in
        isolated tree mode, and minimizes lock contention between the main and
        AX threads.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::cacheAndInitializeWrapper): Utility method that encapsulates these operations performed in the getOrCreate methods.
        (WebCore::AXObjectCache::getOrCreate):
        (WebCore::AXObjectCache::createIsolatedTreeHierarchy): Attaches to the IsolatedObject the same wrapper as its associated AXObject.
        * accessibility/AXObjectCache.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: Instead of accessing the backing object directly (m_object) or through the macro _axBackingObject, uses self.axBackingObject.
        (AccessibilityUnignoredAncestor):
        (-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
        (-[WebAccessibilityObjectWrapper detach]):
        (-[WebAccessibilityObjectWrapper dealloc]):
        (-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]):
        (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
        (-[WebAccessibilityObjectWrapper enableAttributeCaching]):
        (-[WebAccessibilityObjectWrapper disableAttributeCaching]):
        (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
        (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
        (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
        (-[WebAccessibilityObjectWrapper _accessibilityPath]):
        (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
        (-[WebAccessibilityObjectWrapper accessibilityPopupValue]):
        (-[WebAccessibilityObjectWrapper accessibilityLanguage]):
        (-[WebAccessibilityObjectWrapper accessibilityIsDialog]):
        (-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityArticleAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
        (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
        (-[WebAccessibilityObjectWrapper accessibilityIsWebInteractiveVideo]):
        (-[WebAccessibilityObjectWrapper interactiveVideoDescription]):
        (-[WebAccessibilityObjectWrapper accessibilityIsMediaPlaying]):
        (-[WebAccessibilityObjectWrapper accessibilityIsMediaMuted]):
        (-[WebAccessibilityObjectWrapper accessibilityToggleMuteForMedia]):
        (-[WebAccessibilityObjectWrapper accessibilityVideoEnterFullscreen]):
        (-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]):
        (-[WebAccessibilityObjectWrapper accessibilityTraits]):
        (-[WebAccessibilityObjectWrapper isSVGGroupElement]):
        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
        (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
        (-[WebAccessibilityObjectWrapper _accessibilityHasTouchEventListener]):
        (-[WebAccessibilityObjectWrapper _accessibilityValueIsAutofilled]):
        (-[WebAccessibilityObjectWrapper _accessibilityIsStrongPasswordField]):
        (-[WebAccessibilityObjectWrapper _accessibilityMinValue]):
        (-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
        (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
        (-[WebAccessibilityObjectWrapper accessibilityLabel]):
        (-[WebAccessibilityObjectWrapper tableCellParent]):
        (-[WebAccessibilityObjectWrapper tableParent]):
        (-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
        (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
        (-[WebAccessibilityObjectWrapper accessibilityBlockquoteLevel]):
        (-[WebAccessibilityObjectWrapper accessibilityDatetimeValue]):
        (-[WebAccessibilityObjectWrapper accessibilityPlaceholderValue]):
        (-[WebAccessibilityObjectWrapper accessibilityColorStringValue]):
        (-[WebAccessibilityObjectWrapper accessibilityValue]):
        (-[WebAccessibilityObjectWrapper accessibilityIsAttachmentElement]):
        (-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):
        (-[WebAccessibilityObjectWrapper accessibilityHint]):
        (-[WebAccessibilityObjectWrapper accessibilityURL]):
        (-[WebAccessibilityObjectWrapper _accessibilityScrollToVisible]):
        (-[WebAccessibilityObjectWrapper accessibilityScroll:]):
        (-[WebAccessibilityObjectWrapper _accessibilityRelativeFrame]):
        (-[WebAccessibilityObjectWrapper accessibilityElementRect]):
        (-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
        (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
        (-[WebAccessibilityObjectWrapper accessibilityFrame]):
        (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
        (-[WebAccessibilityObjectWrapper accessibilityContainer]):
        (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
        (-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
        (-[WebAccessibilityObjectWrapper accessibilityCanSetValue]):
        (-[WebAccessibilityObjectWrapper accessibilityLinkRelationshipType]):
        (-[WebAccessibilityObjectWrapper accessibilityRequired]):
        (-[WebAccessibilityObjectWrapper accessibilityFlowToElements]):
        (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
        (-[WebAccessibilityObjectWrapper isAttachment]):
        (-[WebAccessibilityObjectWrapper accessibilityTextualContext]):
        (-[WebAccessibilityObjectWrapper _accessibilityActivate]):
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper _accessibilityScrollPosition]):
        (-[WebAccessibilityObjectWrapper _accessibilityScrollSize]):
        (-[WebAccessibilityObjectWrapper _accessibilityScrollVisibleRect]):
        (-[WebAccessibilityObjectWrapper accessibilityFindMatchingObjects:]):
        (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
        (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
        (-[WebAccessibilityObjectWrapper accessibilityIncrement]):
        (-[WebAccessibilityObjectWrapper accessibilityDecrement]):
        (-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):
        (-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
        (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
        (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
        (-[WebAccessibilityObjectWrapper positionForTextMarker:]):
        (-[WebAccessibilityObjectWrapper textMarkerRange]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
        (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
        (-[WebAccessibilityObjectWrapper stringForRange:]):
        (-[WebAccessibilityObjectWrapper _accessibilitySelectedTextRange]):
        (-[WebAccessibilityObjectWrapper _accessibilitySetSelectedTextRange:]):
        (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper selectedTextMarker]):
        (-[WebAccessibilityObjectWrapper lineEndMarkerForMarker:]):
        (-[WebAccessibilityObjectWrapper lineStartMarkerForMarker:]):
        (-[WebAccessibilityObjectWrapper misspellingTextMarkerRange:forward:]):
        (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
        (-[WebAccessibilityObjectWrapper rangeFromMarkers:withText:]):
        (-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
        (-[WebAccessibilityObjectWrapper nextMarkerForCharacterOffset:]):
        (-[WebAccessibilityObjectWrapper previousMarkerForCharacterOffset:]):
        (-[WebAccessibilityObjectWrapper rangeForTextMarkers:]):
        (-[WebAccessibilityObjectWrapper startOrEndTextMarkerForTextMarkers:isStart:]):
        (-[WebAccessibilityObjectWrapper textMarkersForRange:]):
        (-[WebAccessibilityObjectWrapper accessibilityExpandedTextValue]):
        (-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
        (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
        (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
        (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
        (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
        (-[WebAccessibilityObjectWrapper accessibilityIsPressed]):
        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
        (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
        (-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]):
        (-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]):
        (-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]):
        (-[WebAccessibilityObjectWrapper accessibilitySortDirection]):
        (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
        (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
        (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
        (-[WebAccessibilityObjectWrapper accessibilityMathLineThickness]):
        (-[WebAccessibilityObjectWrapper accessibilityMathType]):
        (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::attachWrapper): Attaches the given IsolatedObject and wrapper.
        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
        (-[WebAccessibilityObjectWrapperBase attachAXObject:]):
        (-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]):
        (-[WebAccessibilityObjectWrapperBase detach]):
        (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
        (-[WebAccessibilityObjectWrapperBase baseAccessibilityTitle]):
        (-[WebAccessibilityObjectWrapperBase axBackingObject]):
        (-[WebAccessibilityObjectWrapperBase baseAccessibilityDescription]):
        (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
        (-[WebAccessibilityObjectWrapperBase baseAccessibilityHelpText]):
        (-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]):
        (-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
        (-[WebAccessibilityObjectWrapperBase baseAccessibilitySetFocus:]):
        (-[WebAccessibilityObjectWrapperBase accessibilityMathPostscriptPairs]):
        (-[WebAccessibilityObjectWrapperBase accessibilityMathPrescriptPairs]):
        (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
        (-[WebAccessibilityObjectWrapperBase accessibilityObject]): Deleted, axBackingObject should be used instead.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Instead of accessing the backing object directly (m_object) or through the macro _axBackingObject, uses self.axBackingObject.
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper screenToContents:]):
        (-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromRange:]):
        (-[WebAccessibilityObjectWrapper startOrEndTextMarkerForRange:isStart:]):
        (-[WebAccessibilityObjectWrapper nextTextMarkerForCharacterOffset:]):
        (-[WebAccessibilityObjectWrapper previousTextMarkerForCharacterOffset:]):
        (-[WebAccessibilityObjectWrapper textMarkerForCharacterOffset:]):
        (-[WebAccessibilityObjectWrapper rangeForTextMarkerRange:]):
        (-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]):
        (-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
        (-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]):
        (-[WebAccessibilityObjectWrapper visiblePositionForTextMarker:]):
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
        (-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
        (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
        (-[WebAccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
        (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
        (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
        (convertToVector):
        (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper path]):
        (-[WebAccessibilityObjectWrapper childrenVectorSize]):
        (-[WebAccessibilityObjectWrapper childrenVectorArray]):
        (-[WebAccessibilityObjectWrapper position]):
        (-[WebAccessibilityObjectWrapper role]):
        (-[WebAccessibilityObjectWrapper subrole]):
        (-[WebAccessibilityObjectWrapper roleDescription]):
        (-[WebAccessibilityObjectWrapper computedRoleString]):
        (-[WebAccessibilityObjectWrapper scrollViewParent]):
        (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
        (-[WebAccessibilityObjectWrapper windowElement:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
        (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
        (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
        (-[WebAccessibilityObjectWrapper _accessibilityPerformIncrementAction]):
        (-[WebAccessibilityObjectWrapper _accessibilityPerformDecrementAction]):
        (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
        (-[WebAccessibilityObjectWrapper _accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper accessibilityScrollToVisible]):
        (-[WebAccessibilityObjectWrapper _accessibilityScrollToMakeVisibleWithSubFocus:]):
        (-[WebAccessibilityObjectWrapper _accessibilityScrollToGlobalPoint:]):
        (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
        (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
        (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
        (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        (-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):

2020-01-23  Jer Noble  <jer.noble@apple.com>

        [EME] Key renewal fails when using AVContentKeyReportGroup
        https://bugs.webkit.org/show_bug.cgi?id=206694
        <rdar://problem/58628345>

        Reviewed by Eric Carlson.

        When a CDMInstanceSession has a AVContentKeyReportGroup, it doesn't have an AVContentKeySession; it has
        to get the session from it's parent CDMInstance to request key renewal.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):

2020-01-23  David Kilzer  <ddkilzer@apple.com>

        Enable -Wconditional-uninitialized in WebCore project
        <https://webkit.org/b/206508>

        Reviewed by Darin Adler.

        * Configurations/Base.xcconfig:
        (WARNING_CFLAGS): Add -Wconditional-uninitialized switch.

        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
        (WebCore::WHLSL::Intrinsics::addFullTexture):
        - Initialize `vectorLength` to zero and add release assert that
          it is in a valid range [1-4] to prevent buffer out-of-bounds
          reads.
        - Change ASSERT() to ASSERT_WITH_SECURITY_IMPLICATION() since
          they all have security implications.

        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseResourceSemantic):
        - Add default case to switch statement with release assert since
          `mode` is not set for all possible character values.

        * accessibility/AXObjectCache.cpp:
        (WebCore::characterForCharacterOffset):
        - Ignore -Wconditional-warning for U16_NEXT() macro. Fix must be
          in compiler or in ICU header.

        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneDeserializer::readRSAKey):
        - Initialize `hash` to CryptoAlgorithmIdentifier::SHA_1.  SHA_1
          was chosen since Optional<CryptoAlgorithmIdentifier>
          parameters use that as a default vaule in
          crypto/keys/CryptoKeyRSA.cpp.

        * contentextensions/DFABytecodeCompiler.cpp:
        (WebCore::ContentExtensions::DFABytecodeCompiler::transitions):
        - Initialize `rangeMin` to 0.

        * css/parser/CSSSupportsParser.cpp:
        (WebCore::CSSSupportsParser::consumeCondition):
        - Initialize `result` to false.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
        - Initialize `inputDividendCopy` to JSC::InvalidGPRReg.

        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv):
        - Initialize `delay` to zero.

        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):
        - Initialize `gradientData` to nullptr.  This false positive is
          tracked by <rdar://problem/58615489>.

2020-01-23  Per Arne Vollan  <pvollan@apple.com>

        [Cocoa] Broker access to the PowerManagement API
        https://bugs.webkit.org/show_bug.cgi?id=206373

        Reviewed by Darin Adler.

        Code to determine if device has battery should be executed in the UI process.

        API test: WebKit.SystemHasBattery

        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/SystemBattery.h: Added.
        * platform/cocoa/SystemBattery.mm: Added.
        (WebCore::setSystemHasBattery):
        (WebCore::systemHasBattery):
        * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
        (WebCore::systemHasBattery): Deleted.
        * testing/Internals.cpp:
        (WebCore::Internals::systemHasBattery const):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-23  Antoine Quint  <graouts@apple.com>

        [Web Animations] Make AnimationList ref-counted
        https://bugs.webkit.org/show_bug.cgi?id=206664

        Reviewed by Antti Koivisto.

        * platform/animation/AnimationList.cpp:
        * platform/animation/AnimationList.h:
        (WebCore::AnimationList::create):
        (WebCore::AnimationList::copy):
        (WebCore::AnimationList::AnimationList): Deleted.
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::ensureAnimations):
        (WebCore::RenderStyle::ensureTransitions):
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        * rendering/style/StyleRareNonInheritedData.h:

2020-01-23  Alex Christensen  <achristensen@webkit.org>

        ContentFilter should access DocumentLoader through an interface
        https://bugs.webkit.org/show_bug.cgi?id=206564

        Reviewed by Andy Estes.

        This will make it easier to move, like to the NetworkProcess where there are no DocumentLoaders.
        Also use WTF::Function instead of std::function and UniqueRef instead of std::unique_ptr.
        No change in behavior.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/ContentFilter.cpp:
        (WebCore::ContentFilter::types):
        (WebCore::ContentFilter::create):
        (WebCore::ContentFilter::ContentFilter):
        (WebCore::ContentFilter::continueAfterWillSendRequest):
        (WebCore::ContentFilter::continueAfterResponseReceived):
        (WebCore::ContentFilter::continueAfterDataReceived):
        (WebCore::ContentFilter::continueAfterNotifyFinished):
        (WebCore::ContentFilter::forEachContentFilterUntilBlocked):
        (WebCore::ContentFilter::didDecide):
        (WebCore::ContentFilter::deliverResourceData):
        (WebCore::ContentFilter::handleProvisionalLoadFailure):
        (): Deleted.
        * loader/ContentFilter.h:
        * loader/ContentFilterClient.h: Added.
        (WebCore::ContentFilterClient::~ContentFilterClient):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::handleProvisionalLoadFailure):
        (WebCore::DocumentLoader::didBlock):
        * loader/DocumentLoader.h:
        * platform/cocoa/NetworkExtensionContentFilter.h:
        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::create):
        * platform/cocoa/ParentalControlsContentFilter.h:
        * platform/cocoa/ParentalControlsContentFilter.mm:
        (WebCore::ParentalControlsContentFilter::create):

2020-01-23  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Do not special case formatting root layout
        https://bugs.webkit.org/show_bug.cgi?id=206641
        <rdar://problem/58823548>

        Reviewed by Antti Koivisto.

        Let's move out all the formatting context layout logic from layoutFormattingContextRoot.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isInlineTableBox const):
        (WebCore::Layout::Box::isInlineLevelBox const):
        * layout/layouttree/LayoutBox.h:

2020-01-23  Antti Koivisto  <antti@apple.com>

        fast/css/first-letter-and-float-crash.html asserts under ComplexLineLayout::createLineBoxes
        https://bugs.webkit.org/show_bug.cgi?id=206651
        <rdar://problem/54889982>

        Reviewed by Anders Carlsson.

        Take care that the first-letter style has the correct styleType set even when getCachedPseudoStyle failed.
        This is used for checking if there is an existing first letter renderer.

        * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
        (WebCore::styleForFirstLetter):

2020-01-23  Takashi Komori  <Takashi.Komori@sony.com>

        KeyedDecoderGeneric crashes when it accesses a data with empty string key.
        https://bugs.webkit.org/show_bug.cgi?id=206572

        Reviewed by Fujii Hironori.

        Changed null string which was used for HasMap key to empty string.

        Test: TestWebKitAPI/Tests/WebCore/KeyedCoding.cpp

        * platform/generic/KeyedDecoderGeneric.cpp:
        (WebCore::readString):

2020-01-23  Yusuke Suzuki  <ysuzuki@apple.com>

        nomodule scripts are fetched in some cases (with empty cache or in new tab)
        https://bugs.webkit.org/show_bug.cgi?id=194337
        <rdar://problem/49700924>

        Reviewed by Ryosuke Niwa.

        The preloader attempt to preload "src" of script tags. However, script tag attributed with "nomodule"
        will never be executed by WebKit since it already supports modules. Avoid loading this content in
        the preloader.

        Test: http/wpt/preload/classic-script-with-nomodule.html

        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
        (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):

2020-01-22  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo] Some of combining family glyphs are replaced by space glyphs
        https://bugs.webkit.org/show_bug.cgi?id=205485

        Reviewed by Myles C. Maxfield.

        Although ComplexTextControllerUniscribe requires
        glyph-to-character mapping (stringIndices), Uniscribe returns
        character-to-glyph mapping (clusters). So, we are converting it.
        And, this is not simple task due to the following reasons.

        1. ComplexTextControllerUniscribe replaces glyphs, which are
        corresponding to space characters, with space glyphs.

        For example, 👨‍👦 (man+boy, U+1F468 ZWJ U+1F466) consists of a 5
        length UTF-16 string.

        Uniscribe returns:

        glyphs: [6368 6318] (father and boy glyphs)
        clusters:  [0 0 1 1 1]

        This means U+1F468 is mapping to the father glyph, and ZWJ U+1F466
        are mapping to the boy glyph. If one simply converts this to
        glyph-to-character mapping, it would be [0 2]. This means the
        father glyph is mapping to U+1F468, and the boy glyph is mapping
        to ZWJ. As the result, ComplexTextControllerUniscribe replaces the
        boy glyph with a space glyph because it is mapped to ZWJ. So, by
        somehow skipping space characters, we need to convert the clusters
        to a glyph-to-character mapping [0 3].

        2. Uniscribe returns the rightmost glyphs for combining glyphs in
        RTL text even though it returns the leftmost one for LTR.

        For example, if a string "abc" are generating combining glyphs "AB",
        Uniscribe returns clusters [0 0] for LTR text, but [1 1] for RTL text.

        Test: fast/text/emoji-single-parent-family-3.html

        * platform/graphics/win/ComplexTextControllerUniscribe.cpp:
        (WebCore::BidiRange::BidiRange): Added.
        (WebCore::BidiRange::Iterator::Iterator):
        (WebCore::BidiRange::Iterator::operator++):
        (WebCore::BidiRange::Iterator::operator*):
        (WebCore::BidiRange::Iterator::operator==):
        (WebCore::BidiRange::Iterator::operator!=):
        (WebCore::BidiRange::Iterator::index):
        (WebCore::BidiRange::begin const):
        (WebCore::BidiRange::end const):
        (WebCore::stringIndicesFromClusters): Added.
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

2020-01-22  Jon Lee  <jonlee@apple.com>

        [Media in GPU process] Pipe more MediaPlayerPrivate and client methods
        https://bugs.webkit.org/show_bug.cgi?id=206468

        Reviewed by Eric Carlson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
        * html/HTMLMediaElement.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
        * platform/graphics/MediaPlayer.h: Add resourceNotSupported() to call up to the client.
        (WebCore::MediaPlayerClient::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::playbackTargetIsWirelessChanged):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):

2020-01-22  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Use "inline box" or "atomic inline level box" instead of inline container
        https://bugs.webkit.org/show_bug.cgi?id=206592
        <rdar://problem/58799970>

        Reviewed by Antti Koivisto.

        Inline container is not a spec term.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isInlineBox const):
        (WebCore::Layout::Box::isAtomicInlineLevelBox const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isContainer const):
        (WebCore::Layout::Box::isBlockContainer const): Deleted.
        (WebCore::Layout::Box::isInlineContainer const): Deleted.
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputLayoutBox):

2020-01-22  Don Olmstead  <don.olmstead@sony.com>

        [OpenSSL] Add stubs and build for Web Crypto
        https://bugs.webkit.org/show_bug.cgi?id=206449

        Reviewed by Jiewen Tan.

        Add stubs for an OpenSSL implementation of Web Crypto. Add the associated CMake
        files for OpenSSL platforms and reference them on the platforms using OpenSSL.

        Tests will be enabled as functionality lands.

        * PlatformFTW.cmake:
        * PlatformPlayStation.cmake:
        * PlatformWinCairo.cmake:
        * crypto/keys/CryptoKeyEC.h:
        * crypto/keys/CryptoKeyRSA.h:
        * crypto/openssl/CryptoAlgorithmAES_CBCOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
        * crypto/openssl/CryptoAlgorithmAES_CFBOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):
        * crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):
        * crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
        * crypto/openssl/CryptoAlgorithmAES_KWOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
        (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):
        * crypto/openssl/CryptoAlgorithmECDHOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmECDH::platformDeriveBits):
        * crypto/openssl/CryptoAlgorithmECDSAOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmECDSA::platformSign):
        (WebCore::CryptoAlgorithmECDSA::platformVerify):
        * crypto/openssl/CryptoAlgorithmHKDFOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmHKDF::platformDeriveBits):
        * crypto/openssl/CryptoAlgorithmHMACOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmHMAC::platformSign):
        (WebCore::CryptoAlgorithmHMAC::platformVerify):
        * crypto/openssl/CryptoAlgorithmPBKDF2OpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):
        * crypto/openssl/CryptoAlgorithmRSAES_PKCS1_v1_5OpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
        (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
        * crypto/openssl/CryptoAlgorithmRSASSA_PKCS1_v1_5OpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
        (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
        * crypto/openssl/CryptoAlgorithmRSA_OAEPOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
        (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
        * crypto/openssl/CryptoAlgorithmRSA_PSSOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmRSA_PSS::platformSign):
        (WebCore::CryptoAlgorithmRSA_PSS::platformVerify):
        * crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp: Added.
        (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
        * crypto/openssl/CryptoKeyECOpenSSL.cpp: Added.
        (WebCore::CryptoKeyEC::keySizeInBits const):
        (WebCore::CryptoKeyEC::platformSupportedCurve):
        (WebCore::CryptoKeyEC::platformGeneratePair):
        (WebCore::CryptoKeyEC::platformImportRaw):
        (WebCore::CryptoKeyEC::platformImportJWKPublic):
        (WebCore::CryptoKeyEC::platformImportJWKPrivate):
        (WebCore::CryptoKeyEC::platformImportSpki):
        (WebCore::CryptoKeyEC::platformImportPkcs8):
        (WebCore::CryptoKeyEC::platformExportRaw const):
        (WebCore::CryptoKeyEC::platformAddFieldElements const):
        (WebCore::CryptoKeyEC::platformExportSpki const):
        (WebCore::CryptoKeyEC::platformExportPkcs8 const):
        * crypto/openssl/CryptoKeyRSAOpenSSL.cpp: Added.
        (WebCore::CryptoKeyRSA::create):
        (WebCore::CryptoKeyRSA::isRestrictedToHash const):
        (WebCore::CryptoKeyRSA::keySizeInBits const):
        (WebCore::CryptoKeyRSA::generatePair):
        (WebCore::CryptoKeyRSA::importSpki):
        (WebCore::CryptoKeyRSA::importPkcs8):
        (WebCore::CryptoKeyRSA::exportSpki const):
        (WebCore::CryptoKeyRSA::exportPkcs8 const):
        (WebCore::CryptoKeyRSA::exportData const):
        * crypto/openssl/SerializedCryptoKeyWrapOpenSSL.cpp: Added.
        (WebCore::getDefaultWebCryptoMasterKey):
        (WebCore::wrapSerializedCryptoKey):
        (WebCore::unwrapSerializedCryptoKey):
        * platform/OpenSSL.cmake: Added.

2020-01-22  Fujii Hironori  <Hironori.Fujii@sony.com>

        preprocess-idls.pl: CygwinPathIfNeeded should use Cygwin::win_to_posix_path instead of invoking cygpath
        https://bugs.webkit.org/show_bug.cgi?id=206407

        Reviewed by Chris Dumez.

        preprocess-idls.pl was invoking cygpath command for all input IDL
        files. Use Cygwin::win_to_posix_path function instead.

        * bindings/scripts/preprocess-idls.pl: Changed the way to load idlFilesList as well as generate-bindings-all.pl does.
        (CygwinPathIfNeeded): Copied from CygwinPathIfNeeded of generate-bindings-all.pl.

2020-01-21  Ryosuke Niwa  <rniwa@webkit.org>

        Make a Ref to WindowEventLoop when the timer to run tasks fires
        https://bugs.webkit.org/show_bug.cgi?id=206568

        Reviewed by Antti Koivisto.

        Keep WindowEventLoop alive explicitly while invoking EventLoop::run.

        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::WindowEventLoop):
        (WebCore::WindowEventLoop::didReachTimeToRun):
        * dom/WindowEventLoop.h:

2020-01-22  Brady Eidson  <beidson@apple.com>

        REGRESSION (r253519): [WKWebView evaluateJavaScript:completionHandler:] gives a non-nil, non-Error result even when JavaScript cannot be evaluated
        <rdar://problem/58544942> and https://bugs.webkit.org/show_bug.cgi?id=206608

        Reviewed by Alex Christensen.

        Covered by new API test.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeScriptInWorld): Address a FIXME added in 253519 which had predicted this problem.

2020-01-22  Chris Dumez  <cdumez@apple.com>

        Unreviewed, fix build with recent SDKs.

        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::externalOutputDeviceAvailable):
        (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
        (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

2020-01-22  Nikos Mouchtaris  <nmouchtaris@apple.com>

        Automatic link replacement via "Smart links" should emit "insertLink" input events
        https://bugs.webkit.org/show_bug.cgi?id=191306
        <rdar://problem/58491514>

        Reviewed by Wenson Hsieh.

        Added support for outputting "insertLink" for input type and the url for the 
        data of the input event when smart link is used.

        Test: fast/events/input-event-insert-link.html

        * editing/CreateLinkCommand.h:
        * editing/EditCommand.cpp:
        (WebCore::inputTypeNameForEditingAction):

2020-01-22  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove ImageBuffer::sizeForDestinationSize()
        https://bugs.webkit.org/show_bug.cgi?id=206541

        Reviewed by Tim Horton.

        -- Remove ImageBuffer::sizeForDestinationSize() since it is currently
           doing nothing. For CG and D2D ports, it scales a rect by the ratio
           backingStoreSize / internalSize which is always 1. The constructor
           ImageBuffer::ImageBuffer() sets m_size and m_data.backingStoreSize
           to the same value always.

        -- Remove ImageBuffer::isCompatibleWithContext() since it is not used.

        -- Remove ImageBuffer::fastCopyImageMode() since it returns 
           DontCopyBackingStore on all ports.

        * html/CustomPaintCanvas.cpp:
        (WebCore::CustomPaintCanvas::copiedImage const):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::texImage2D):
        (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::sizeForDestinationSize const): Deleted.
        (WebCore::ImageBuffer::isCompatibleWithContext const): Deleted.
        * platform/graphics/ImageBuffer.h:
        (WebCore::ImageBuffer::logicalSize const):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::fastCopyImageMode): Deleted.
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::clipToImageBuffer):
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        (WebCore::createBitmapImageAfterScalingIfNeeded):
        (WebCore::ImageBuffer::copyImage const):
        (WebCore::ImageBuffer::sinkIntoImage):
        (WebCore::ImageBuffer::toCFData const):
        (WebCore::scaleSizeToUserSpace): Deleted.
        (WebCore::ImageBuffer::sizeForDestinationSize const): Deleted.
        (WebCore::ImageBuffer::fastCopyImageMode): Deleted.
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::scaleSizeToUserSpace): Deleted.
        (WebCore::ImageBuffer::sizeForDestinationSize const): Deleted.
        (WebCore::ImageBuffer::fastCopyImageMode): Deleted.

2020-01-22  Zalan Bujtas  <zalan@apple.com>

        [LFC] Do not create a FormattingContext to compute intrinsic width unless there's some content.
        https://bugs.webkit.org/show_bug.cgi?id=206581
        <rdar://problem/58798593>

        Reviewed by Antti Koivisto.

        We should only construct a formatting context when it has some content.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::FormattingContext):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):

2020-01-22  Chris Dumez  <cdumez@apple.com>

        Frequent NetworkConnectionToWebProcess::CookiesEnabled sync IPC when browsing reddit.com
        https://bugs.webkit.org/show_bug.cgi?id=206450

        Reviewed by Darin Adler.

        Move HTTPCookieAcceptPolicy.h header from WebKit to WebCore so that the HTTPCookieAcceptPolicy enum
        can be used in NetworkStorageSession. Replace NetworkStorageSession::cookiesEnabled() with a more
        detailed NetworkStorageSession::cookieAcceptPolicy() method.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookiesEnabled const):
        * platform/network/HTTPCookieAcceptPolicy.h: Renamed from Source/WebKit/Shared/HTTPCookieAcceptPolicy.h.
        * platform/network/NetworkStorageSession.cpp:
        * platform/network/NetworkStorageSession.h:
        * platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
        (WebCore::NetworkStorageSession::cookieAcceptPolicy const):
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::cookieAcceptPolicy const):
        * platform/network/curl/NetworkStorageSessionCurl.cpp:
        (WebCore::NetworkStorageSession::cookieAcceptPolicy const):
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::cookieAcceptPolicy const):

2020-01-22  Chris Dumez  <cdumez@apple.com>

        Stop doing synchronous DecidePolicyForNavigationActionSync IPCs for initially empty document loads
        https://bugs.webkit.org/show_bug.cgi?id=206458

        Reviewed by Alex Christensen.

        Stop doing synchronous DecidePolicyForNavigationActionSync IPCs for initially empty document loads. Instead, we
        now do regular asynchronous DecidePolicyForNavigationAction IPCs for such loads and we ignore the response from
        the client, allowing WebCore to proceed with the load synchronously.

        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::checkNavigationPolicy):

2020-01-22  Zalan Bujtas  <zalan@apple.com>

        [LFC] Do not create a FormattingContext unless there's content to layout.
        https://bugs.webkit.org/show_bug.cgi?id=206570
        <rdar://problem/58785735>

        Reviewed by Antti Koivisto.

        We still construct "no-op" FormattingContexts through the computeIntrinsicWidth* codepath (see webkit.org/b/206581).

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::FormattingContext):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):

2020-01-22  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Disable integration to see performance impact
        https://bugs.webkit.org/show_bug.cgi?id=206576
        <rdar://problem/58562185>

        Reviewed by Zalan Bujtas.

        Disable by default for now to get a clearer picture of the performance impact.

        * page/RuntimeEnabledFeatures.h:

2020-01-22  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] No need to special case formatting context root layout
        https://bugs.webkit.org/show_bug.cgi?id=206569
        <rdar://problem/58784767>

        Reviewed by Antti Koivisto.

        Let's move out all the formatting context layout logic from layoutFormattingContextRoot.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:

2020-01-22  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Move float avoider special available width handling to BlockFormattingContext::computeWidthAndMargin
        https://bugs.webkit.org/show_bug.cgi?id=206567
        <rdar://problem/58783979>

        Reviewed by Antti Koivisto.

        Now we can move the compute* functions from layoutFormattingContextRoot to the main loop in layoutInFlowContent.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:

2020-01-22  youenn fablet  <youenn@apple.com>

        Add logging of the source of a response used to respond a fetch event
        https://bugs.webkit.org/show_bug.cgi?id=206426

        Reviewed by Darin Adler.

        Add a DOMCache response source value.
        This is set on responses created by DOMCache.
        Update code that checks the source to handle this new value similary to ApplicationCache.
        No change of behavior.

        Add an internal test to verify a fetch response grabbed from DOM cache has the right source.

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::updateRecords):
        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::responseSource):
        * loader/ResourceLoader.cpp:
        (WebCore::logResourceResponseSource):
        * platform/network/ResourceResponseBase.h:
        * testing/Internals.cpp:
        (WebCore::responseSourceToString):
        * workers/service/context/ServiceWorkerFetch.cpp:
        (WebCore::ServiceWorkerFetch::processResponse):
        Remove setting of the source to service worker, this is done in NetworkProcess
        just before sending the response to the WebProcess.

2020-01-22  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r254893): Apple Win 10 Debug build failure

        Introduced by:
            Make RenderingMode and AlphaPremultiplication enum classes and move them to separate headers
            https://bugs.webkit.org/show_bug.cgi?id=206516

        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::ImageBuffer): Use RenderingMode::Unaccelerated.

2020-01-21  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Move ImageBuffer utilities function to separate files
        https://bugs.webkit.org/show_bug.cgi?id=206519

        Reviewed by Tim Horton.

        These utilities function are merely related to the ImageData.

        * SourcesGTK.txt:
        * html/HTMLCanvasElement.cpp:
        * platform/SourcesCairo.txt:
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::toData const):
        (WebCore::writeFunction): Deleted.
        (WebCore::encodeImage): Deleted.
        * platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp: Added.
        (WebCore::writeFunction):
        (WebCore::encodeImage):
        (WebCore::data):
        * platform/graphics/cairo/ImageBufferUtilitiesCairo.h: Added.
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::jpegUTI): Deleted.
        (WebCore::utiFromImageBufferMIMEType): Deleted.
        (WebCore::encodeImage): Deleted.
        (WebCore::dataURL): Deleted.
        (WebCore::dataVector): Deleted.
        (WebCore::cfData): Deleted.
        (WebCore::data): Deleted.
        * platform/graphics/cg/ImageBufferDataCG.h:
        * platform/graphics/cg/ImageBufferUtilitiesCG.cpp:
        (WebCore::jpegUTI):
        (WebCore::utiFromImageBufferMIMEType):
        (WebCore::encodeImage):
        (WebCore::cfData):
        (WebCore::dataURL):
        (WebCore::dataVector):
        (WebCore::data):
        * platform/graphics/cg/ImageBufferUtilitiesCG.h:
        * platform/graphics/gtk/ImageBufferGtk.cpp: Removed.

2020-01-21  Fujii Hironori  <Hironori.Fujii@sony.com>

        A partially selected RTL text is placed at a wrong vertical position if it has a vertical initial advance
        https://bugs.webkit.org/show_bug.cgi?id=205990

        Reviewed by Darin Adler.

        FontCascade::getGlyphsAndAdvancesForComplexText returned only X
        position of the first glyph, but Y position.

        Because GlyphBuffer is using glyph advances instead glyph
        positions, it's not simple to get the first glyph position of the
        part of a RTL texts.
        FontCascade::getGlyphsAndAdvancesForComplexText is calculating the
        X position of it by subtracting right side part width from the
        total width. It should do same for Y position.

        macOS and iOS ports don't use the code to draw selected texts.

        Test: fast/text/initial-advance-selected-text.html

        * platform/graphics/ComplexTextController.cpp:
        (WebCore::ComplexTextController::offsetForPosition):
        (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
        * platform/graphics/ComplexTextController.h: Replaced m_totalWidth with m_totalAdvance.
        (WebCore::ComplexTextController::totalWidth const): Removed.
        (WebCore::ComplexTextController::totalAdvance const): Added.
        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::glyphBufferForTextRun const): Changed the return type from float to FloatSize.
        (WebCore::FontCascade::drawText const):
        (WebCore::FontCascade::displayListForTextRun const):
        (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText const): Changed the return type from float to FloatSize.
        (WebCore::FontCascade::drawGlyphBuffer const):
        (WebCore::FontCascade::floatWidthForComplexText const):
        (WebCore::FontCascade::adjustSelectionRectForComplexText const):
        (WebCore::FontCascade::drawEmphasisMarksForComplexText const):
        (WebCore::FontCascade::dashesForIntersectionsWithRect const):
        * platform/graphics/FontCascade.h:
        * platform/graphics/GlyphBuffer.h:
        (WebCore::toFloatSize): Added.

2020-01-21  Jer Noble  <jer.noble@apple.com>

        [EME] Only emit an array of persistent-usage-records when we discover > 1
        https://bugs.webkit.org/show_bug.cgi?id=206205
        <rdar://problem/58691769>

        Reviewed by Eric Carlson.

        The persistent-usage-record cache should never have more than one record per sessionId, but
        that assumption is not enforced in the file format. To not break clients that aren't
        expecting a serialized plist array, only emit an array when more than one matching data item
        is found.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):

2020-01-21  Alex Christensen  <achristensen@webkit.org>

        Add missing NS_NOESCAPE to CFNetwork SPI
        https://bugs.webkit.org/show_bug.cgi?id=206561
        <rdar://problem/58774422>

        Reviewed by Joe Pecoraro.

        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:

2020-01-21  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Make RenderingMode and AlphaPremultiplication enum classes and move them to separate headers
        https://bugs.webkit.org/show_bug.cgi?id=206516

        Reviewed by Tim Horton.

        RenderingMode and AlphaPremultiplication need to be encoded and decoded
        when they are sent from the WebProcess to the GPUProcess.

        * Headers.cmake:
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded):
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneDeserializer::readImageBitmap):
        * css/CSSFilterImageValue.cpp:
        (WebCore::CSSFilterImageValue::image):
        * html/CustomPaintCanvas.cpp:
        (WebCore::CustomPaintCanvas::copiedImage const):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createImageBuffer const):
        * html/ImageBitmap.cpp:
        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::transferToImageBitmap):
        (WebCore::OffscreenCanvas::createImageBuffer const):
        (WebCore::OffscreenCanvas::takeImageBuffer const):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::createCompositingBuffer):
        (WebCore::CanvasRenderingContext2DBase::createPattern):
        * html/canvas/ImageBitmapRenderingContext.cpp:
        (WebCore::ImageBitmapRenderingContext::isAccelerated const):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
        * page/FrameSnapshotting.cpp:
        (WebCore::snapshotFrameRectWithClip):
        * platform/graphics/AlphaPremultiplication.h: Added.
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation):
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContext::renderingMode const):
        * platform/graphics/GraphicsTypes.cpp:
        * platform/graphics/GraphicsTypes.h:
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/RenderingMode.h: Added.
        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ScratchBuffer::getScratchBuffer):
        (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
        (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
        (WebCore::ShadowBlur::drawRectShadowWithTiling):
        (WebCore::ShadowBlur::drawInsetShadowWithTiling):
        (WebCore::ShadowBlur::drawShadowLayer):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBufferData::~ImageBufferData):
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/cg/ImageBufferDataCG.h:
        * platform/graphics/filters/Filter.h:
        * platform/graphics/texmap/BitmapTexture.cpp:
        (WebCore::BitmapTexture::updateContents):
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::imageBuffer const):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/shapes/Shape.cpp:
        (WebCore::Shape::createRasterShape):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
        * rendering/svg/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::applyResource):
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::applyResource):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::nativeImageForCurrentFrame):

2020-01-22  Simon Fraser  <simon.fraser@apple.com>

        Fixed elements no longer stay fixed with elastic overscroll
        https://bugs.webkit.org/show_bug.cgi?id=206227
        rdar://problem/58707084

        Reviewed by Antti Koivisto.
        
        Intended behavior on iOS and macOS is for position:fixed and sticky elements to maintain
        their position relative to the view bounds when rubber-banding ("overscrolling"). This broke
        some time back. This change restores the correct behavior with the call to layoutViewportRespectingRubberBanding()
        in ScrollingTreeFixedNode::applyLayerPositions() and ScrollingTreeStickyNode::computeLayerPosition().
        layoutViewportRespectingRubberBanding() computes a layout viewport without clamping.

        The rest of the changes are to support testing. internals.unconstrainedScrollTo()
        didn't work for main frame scrolling because of scroll position clamping in various places,
        so propagate ScrollClamping in more places (and replace the redundant ScrollPositionClamp with ScrollClamping).

        "requested scroll position" updates now carry along both clamping and "is programmatic" data, wrapped in a struct
        which is passed around the scrolling tree. This allows us to not clamp the scroll position (for testing) in more places.
        
        Internals::unconstrainedScrollTo() needs one weird hack to trigger a layout (and thus a scrolling tree commit),
        because the layout is normally triggered by a layout viewport change, but when rubber-banding we clamp the layoutViewport
        used for layout, so those layouts are never triggered.

        Tests: tiled-drawing/scrolling/fixed/fixed-during-rubberband.html
               tiled-drawing/scrolling/sticky/sticky-during-rubberband.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Element.cpp:
        (WebCore::Element::scrollTo):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollTo const):
        * page/FrameView.cpp:
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::requestScrollPositionUpdate):
        * page/FrameView.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
        (WebCore::ScrollingStateScrollingNode::setRequestedScrollData):
        (WebCore::ScrollingStateScrollingNode::dumpProperties const):
        (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition): Deleted.
        * page/scrolling/ScrollingStateScrollingNode.h:
        (WebCore::RequestedScrollData::operator== const):
        (WebCore::ScrollingStateScrollingNode::requestedScrollData const):
        (WebCore::ScrollingStateScrollingNode::requestedScrollPosition const): Deleted.
        (WebCore::ScrollingStateScrollingNode::requestedScrollPositionRepresentsProgrammaticScroll const): Deleted.
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::scrollingTreeNodeRequestsScroll):
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition const):
        (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportRespectingRubberBanding const):
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
        (WebCore::ScrollingTreeScrollingNode::adjustedScrollPosition const):
        (WebCore::ScrollingTreeScrollingNode::scrollBy):
        (WebCore::ScrollingTreeScrollingNode::scrollTo):
        (WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::adjustedScrollPosition const):
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::adjustedScrollPosition const):
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints):
        * platform/ScrollTypes.cpp: Added.
        (WebCore::operator<<):
        * platform/ScrollTypes.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setContentsScrollPosition):
        (WebCore::ScrollView::setScrollPosition):
        * platform/ScrollView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::requestScrollPositionUpdate):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToOffset):
        * testing/Internals.cpp:
        (WebCore::Internals::unconstrainedScrollTo):

2020-01-21  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254807 and r254849.
        https://bugs.webkit.org/show_bug.cgi?id=206559

        Broke page up/page down on macOS (Requested by smfr on
        #webkit).

        Reverted changesets:

        "Add support for scroll behavior relies on ScrollAnimation of
        the Web process"
        https://bugs.webkit.org/show_bug.cgi?id=204882
        https://trac.webkit.org/changeset/254807

        "Add support for scroll behavior relies on ScrollAnimation of
        the Web process"
        https://bugs.webkit.org/show_bug.cgi?id=204882
        https://trac.webkit.org/changeset/254849

2020-01-21  Alex Christensen  <achristensen@webkit.org>

        Build fix.

        * rendering/updating/RenderTreeBuilderInline.cpp:
        Add missing include.

2020-01-21  Daniel Bates  <dabates@apple.com>

        Add Legacy WebKit SPI and WebKit IPI to show and hide placeholder
        https://bugs.webkit.org/show_bug.cgi?id=206459
        <rdar://problem/58700534>

        Reviewed by Wenson Hsieh.

        Adds setter and getter to update whether the placeholder can be shown.

        Test: fast/forms/placeholder-show-and-hide-via-setCanShowPlaceholder.html

        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): Initialize state. Default to can show
        the placeholder to keep the behavior we have currently.
        (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible const): Modified to account for m_canShowPlaceholder.
        (WebCore::HTMLTextFormControlElement::setCanShowPlaceholder): Added. Update state and invalidate style.
        * html/HTMLTextFormControlElement.h:
        (WebCore::HTMLTextFormControlElement::canShowPlaceholder const): Added.
        * testing/Internals.cpp:
        (WebCore::Internals::setCanShowPlaceholder): Added. For testing purposes.
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-21  Rob Buis  <rbuis@igalia.com>

        Add build flag for stale-while-revalidate
        https://bugs.webkit.org/show_bug.cgi?id=204169

        Reviewed by Youenn Fablet.

        * Configurations/FeatureDefines.xcconfig:

2020-01-21  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF] AtomStringTable should be small
        https://bugs.webkit.org/show_bug.cgi?id=206400

        Reviewed by Sam Weinig.

        * dom/GCReachableRef.h:
        (WebCore::GCReachableRef::GCReachableRef):
        * dom/QualifiedName.h:
        (WebCore::QualifiedName::hashTableDeletedValue):

2020-01-21  Jer Noble  <jer.noble@apple.com>

        [iPad] YouTube does not automatically AirPlay when a route is selected from Control Center
        https://bugs.webkit.org/show_bug.cgi?id=206539

        Reviewed by Eric Carlson.

        No new tests; change affects an interaction with two platform features (local AirPlay
        route picking and actual remote playback over AirPlay routes) that is not testable in
        an automated fashion.

        The underlying source of the bug is the difference in how the platform communitcates that an
        AirPlay route was picked between iOS and macOS. On iOS, route changes are global and are
        generally pushed up from AVPlayer notifications. On macOS, route changes are local to the
        app and are pushed down from the UIProcess. But when MSE playback was enabled on iPadOS,
        there was now a limbo where media playback was no longer using an AVPlayer, but at the same
        time, route changes could be initiated globally. The end result is that MSE-based media
        elements are never notified that they "should play to playback target", and no remote
        playback events are ever fired.

        To re-create the same macOS behavior when MSE-backed media elements are used on iPadOS,
        re-use the existing route change detection logic in MediaSessionManageriOS to query whether
        the newly established route supports AirPlay Video, and if so, send a message to the "now
        playing" media element that it should begin AirPlaying, which will fail, but will trigger
        the YouTube player to switch to a HLS-backed media element.

        This requires renaming MediaPlaybackTargetMac -> MediaPlaybackTargetCocoa.

        * SourcesCocoa.txt:
        * PlatformMac.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
        (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
        * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.h.
        (WebCore::MediaPlaybackTargetCocoa::outputContext const):
        * platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.mm.
        (WebCore::MediaPlaybackTargetCocoa::create):
        (WebCore::MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa):
        (WebCore::MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa):
        (WebCore::MediaPlaybackTargetCocoa::targetContext const):
        (WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const):
        (WebCore::MediaPlaybackTargetCocoa::deviceName const):
        (WebCore::toMediaPlaybackTargetCocoa):
        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):

2020-01-21  Antti Koivisto  <antti@apple.com>

        [LFC] Typed accessors for formatting states
        https://bugs.webkit.org/show_bug.cgi?id=206538

        Reviewed by Zalan Bujtas.

        Almost all clients know what sort of formatting state they want and immediately cast it.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::createFormattingContext):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::formattingStateForBox const):
        (WebCore::Layout::LayoutState::establishedFormattingState const):
        (WebCore::Layout::LayoutState::establishedInlineFormattingState const):
        (WebCore::Layout::LayoutState::establishedBlockFormattingState const):
        (WebCore::Layout::LayoutState::establishedTableFormattingState const):

        Typed function for getting established states.

        (WebCore::Layout::LayoutState::ensureFormattingState):
        (WebCore::Layout::LayoutState::ensureInlineFormattingState):

        Also add a fast path for integrated layout.

        (WebCore::Layout::LayoutState::ensureBlockFormattingState):
        (WebCore::Layout::LayoutState::ensureTableFormattingState):

        Typed function for creating states.

        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded): Deleted.
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::hasInlineFormattingState const):
        (WebCore::Layout::LayoutState::hasFormattingState const): Deleted.
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintSubtree):
        (WebCore::Display::Painter::paintInlineFlow):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::LineLayout):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):

2020-01-21  Justin Fan  <justin_fan@apple.com>

        [WebGL2] Sampler objects
        https://bugs.webkit.org/show_bug.cgi?id=126941
        <rdar://problem/15002402>

        Implement enough of Samplers to pass the "samplers" conformance tests with ANGLE enabled.

        Reviewed by Dean Jackson.

        Covered by webgl/2.0.0/conformance2/samplers directory of tests.

        * bindings/js/JSDOMConvertWebGL.cpp:
        (WebCore::convertToJSValue):
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
        (WebCore::WebGL2RenderingContext::initializeSamplerCache):
        (WebCore::WebGL2RenderingContext::createSampler):
        (WebCore::WebGL2RenderingContext::deleteSampler):
        (WebCore::WebGL2RenderingContext::isSampler):
        (WebCore::WebGL2RenderingContext::bindSampler):
        (WebCore::WebGL2RenderingContext::samplerParameteri):
        (WebCore::WebGL2RenderingContext::samplerParameterf):
        (WebCore::WebGL2RenderingContext::getSamplerParameter):
        (WebCore::WebGL2RenderingContext::bindTransformFeedback):
        (WebCore::WebGL2RenderingContext::getParameter):
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGLAny.h:
        * html/canvas/WebGLSampler.cpp:
        (WebCore::WebGLSampler::WebGLSampler):
        (WebCore::WebGLSampler::deleteObjectImpl):
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        (WebCore::GraphicsContextGLOpenGL::createSampler):
        (WebCore::GraphicsContextGLOpenGL::deleteSampler):
        (WebCore::GraphicsContextGLOpenGL::isSampler):
        (WebCore::GraphicsContextGLOpenGL::bindSampler):
        (WebCore::GraphicsContextGLOpenGL::samplerParameteri):
        (WebCore::GraphicsContextGLOpenGL::samplerParameterf):
        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterfv):
        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteriv):

2020-01-21  Sunny He  <sunny_he@apple.com>

        Disallow setting SVGElement currentScale to non-finite values
        https://bugs.webkit.org/show_bug.cgi?id=206019

        Align SVGElement currentScale definition to SVG2 section 5.14.2
        (https://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSVGElement)

        Reviewed by Darin Adler.

        Test: svg/dom/set-currentScale-nonfinite.html

        * svg/SVGSVGElement.idl:

2020-01-21  Noam Rosenthal  <noam@webkit.org>

        -webkit-image-set should support all the image functions WebKit supports, not just url()
        https://bugs.webkit.org/show_bug.cgi?id=81941

        Reviewed by Darin Adler.

        Separate StyleCachedImage to 4 classes:
        - StyleCachedImage: for single images only
        - StyleMultiImage: for values that can contain multiple images: like cursor/image-set
        - StyleImageSet
        - StyleCursorImage

        The new classes only deal with their own value type. Before, ImageSet and cursor were resolved
        as a StyleCachedImage, which is no longer a valid assumption if image-set can contain generated images.
        Though cursors still can only contain cached images, it was cleaner to refactor it out as well.

        Refactored best-fit image selection from loading. Now StyleCachedImage is in charge of loading
        the actual image, and StyleImageSet/StyleCursorImage perform the source selection.

        Also, added the necessary logic in the CSS parser to consume generated images inside image-sets, excluding
        when the image-set is a cursor value.

        Tests: fast/css/image-set-parsing-generated.html
               fast/hidpi/image-set-cross-fade.html
               fast/hidpi/image-set-gradient-multi.html
               fast/hidpi/image-set-gradient-single.html
               fast/hidpi/image-set-gradient.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
                Added new files

        * css/CSSCursorImageValue.cpp:
        (WebCore::CSSCursorImageValue::selectBestFitImage):
        (WebCore::CSSCursorImageValue::loadImage): Deleted.
        * css/CSSCursorImageValue.h:
                Instead of cursor loading the image, it selects an image CSS value

        * css/CSSImageSetValue.cpp:
        (WebCore::CSSImageSetValue::CSSImageSetValue):
        (WebCore::CSSImageSetValue::fillImageSet):
        (WebCore::CSSImageSetValue::cachedImage const):
        (WebCore::CSSImageSetValue::selectBestFitImage):
        (WebCore::CSSImageSetValue::updateDeviceScaleFactor):
        (WebCore::CSSImageSetValue::imageSetWithStylesResolved):
        (WebCore::CSSImageSetValue::traverseSubresources const):
        (WebCore::CSSImageSetValue::loadBestFitImage): Deleted.
        * css/CSSImageSetValue.h:
                Refactor CSSImageSetValue to include non-cachedImage images

        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeCursor):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeImageSet):
        (WebCore::CSSPropertyParserHelpers::consumeImage):
        (WebCore::CSSPropertyParserHelpers::consumeUrlOrStringAsStringView): Deleted.
        * css/parser/CSSPropertyParserHelpers.h:
                
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc):
                When blending two images, get the selected images in case it is an image-set

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderImageResourceStyleImage.cpp:
        (WebCore::RenderImageResourceStyleImage::initialize):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::canDirectlyCompositeBackgroundBackgroundImage):
        * rendering/style/ShapeValue.cpp:
        (WebCore::ShapeValue::isImageValid const):
                Use hasCachedImage() instead of isCachedImage() as a StyleImageSet is no longer an isCachedImage()

        * rendering/style/StyleCachedImage.cpp:
        (WebCore::StyleCachedImage::StyleCachedImage):
        (WebCore::StyleCachedImage::imageURL):
        (WebCore::StyleCachedImage::load):
        * rendering/style/StyleCachedImage.h:
        * rendering/style/StyleCursorImage.h:
        * rendering/style/StyleCursorImage.cpp:
        * rendering/style/StyleMultiImage.h:
        * rendering/style/StyleMultiImage.cpp:
        * rendering/style/StyleImageSet.h:
        * rendering/style/StyleImageSet.cpp:
        * rendering/style/StyleImage.h:
        (WebCore::StyleImage::selectedImage):
        (WebCore::StyleImage::selectedImage const):
        (WebCore::StyleImage::isCursorImage const):
        (WebCore::StyleImage::isImageSet const):
        (WebCore::StyleImage::hasCachedImage const):
        (WebCore::StyleImage::StyleImage):
                Separate cursor/image-set related stuff away from StyleCachedImage.

        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyValueContent):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::resolveImageStyles):
        (WebCore::Style::BuilderState::createStyleImage):
        * style/StyleBuilderState.h:
                Match the CSS values with the correct Style class. Also, ensure image-sets resolve their 
                images' styles as they may contain gradients and other context-aware values.

2020-01-21  Chris Dumez  <cdumez@apple.com>

        Minor improvements to StorageAreaMap
        https://bugs.webkit.org/show_bug.cgi?id=206433

        Reviewed by Darin Adler.

        Use inline initialization for some of StorageMap's data member.
        Also specify uint8_t as underlying type of StorageType enum class for better packing.

        * inspector/InspectorInstrumentation.h:
        * storage/StorageArea.h:
        * storage/StorageMap.cpp:
        (WebCore::StorageMap::StorageMap):
        * storage/StorageMap.h:
        * storage/StorageType.h:

2020-01-21  Chris Dumez  <cdumez@apple.com>

        Unreviewed, add comment to make it clearer that the code restored in r254857 is not dead

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::prewarmLocalStorageIfNecessary):

2020-01-21  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r254753.

        It turns out this is not dead code

        Reverted changeset:

        "Drop dead code related to local storage prewarming"
        https://bugs.webkit.org/show_bug.cgi?id=206418
        https://trac.webkit.org/changeset/254753

2020-01-21  Sihui Liu  <sihui_liu@apple.com>

        Disable WebSQL everywhere by default except in tests
        https://bugs.webkit.org/show_bug.cgi?id=204907

        Reviewed by Ryosuke Niwa.

        No new tests. All WebSQL tests are enabled for now.

        * page/RuntimeEnabledFeatures.h:

2020-01-21  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Use InlineFormattingContext directly
        https://bugs.webkit.org/show_bug.cgi?id=206526

        Reviewed by Zalan Bujtas.

        Stop using LayoutContext (which is more of a full tree layout thing) and use InlineFormattingContext directly instead.
        This has a side benefit of not needing to setup a root display box.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::LineLayout):
        (WebCore::LayoutIntegration::LineLayout::layout):
        (WebCore::LayoutIntegration::LineLayout::displayInlineContent const):
        (WebCore::LayoutIntegration::LineLayout::prepareRootGeometryForLayout): Deleted.
        * layout/integration/LayoutIntegrationLineLayout.h:
        * layout/tableformatting/TableFormattingContext.h:

2020-01-21  Cathie Chen  <cathiechen@igalia.com>

        Add support for scroll behavior relies on ScrollAnimation of the Web process
        https://bugs.webkit.org/show_bug.cgi?id=204882

        Reviewed by Frédéric Wang

        Based on the patch by Frédéric Wang.

        This patch introduces a programmatic smooth scrolling in WebKit from the CSSOM View
        specification [1]. To use this effect, web developers can pass a behavior parameter (auto,
        smooth, or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
        Element.scrollIntoView, Window.scroll, Window.scrollTo or Window.scrollBy [2]. When behavior
        is auto, the instant/smooth characteristic is actually taken from the value of a new CSS
        scroll-behavior property [3]. Both the new CSS and DOM behavior are protected by a runtime
        flag.

        [1] https://drafts.csswg.org/cssom-view
        [2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
        [3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior

        Tests: imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html
        * Sources.txt: Build ScrollAnimationSmooth.cpp on all platforms.
        * SourcesGTK.txt: Remove ScrollAnimationSmooth.cpp since it is built on all platforms now.
        * dom/Element.cpp:
        (WebCore::Element::scrollIntoView): Pass scroll behavior, if any.
        (WebCore::Element::scrollBy):
        (WebCore::Element::scrollTo): Handle the case when scroll behavior is smooth.
        (WebCore::Element::setScrollLeft): Handle the case when scroll behavior is smooth.
        (WebCore::Element::setScrollTop): Handle the case when scroll behavior is smooth.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollBy const):
        (WebCore::DOMWindow::scrollTo const): Handle the case when scroll behavior is smooth.
        The optimization of cancel (0, 0) scrolling is skipped if an animated scroll is in progress.
        Otherwise, the previous scroll won't be stopped by a follow-up scroll.
        * page/FrameView.cpp:
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::scrollToOffsetWithAnimation): Start an animated scroll.
        * page/FrameView.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        * platform/ScrollAnimation.h:
        (WebCore::ScrollAnimation::scroll): Function to animate scrolling to a specified position.
        * platform/ScrollAnimationSmooth.cpp: Build this file on all platforms. Add a
        smoothFactorForProgrammaticScroll parameter to slow down the smooth scrolling.
        (WebCore::ScrollAnimationSmooth::scroll):
        (WebCore::ScrollAnimationSmooth::updatePerAxisData): Scale the time parameters of the
        animation so that it looks smoother.
        * platform/ScrollAnimationSmooth.h: Declare the class on all platforms.
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::ScrollAnimator): Initialize animation member for programmatic scrolling.
        (WebCore::ScrollAnimator::scrollToOffset): Animate scrolling to the specified position.
        (WebCore::ScrollAnimator::cancelAnimations): Copy logic from ScrollAnimationSmooth.cpp.
        (WebCore::ScrollAnimator::serviceScrollAnimations): Ditto.
        (WebCore::ScrollAnimator::willEndLiveResize): Ditto.
        (WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
        (WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.
        * platform/ScrollAnimator.h: New animation member for smooth programmatic scrolling.
        (WebCore::ScrollAnimator::ScrollAnimator::cancelAnimations): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::serviceScrollAnimations): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::willEndLiveResize): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::didAddVerticalScrollbar): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::didAddHorizontalScrollbar): Deleted.
        * platform/ScrollTypes.h: Add ScrollBehaviorStatus to indicate the status of scrolling.
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollPosition): Follow the CSSOM View spec: If a scroll is in
        progress, we interrupt it and continue the scroll call (even when we are at the final position).
        * platform/ScrollView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::scrollToOffsetWithAnimation):
        (WebCore::ScrollableArea::setScrollOffsetFromInternals):
        (WebCore::ScrollableArea::setScrollOffsetFromAnimation): To avoid iterate calling,
        move the requestScrollPositionUpdate(position) checking out of setScrollOffsetFromAnimation().
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::currentScrollBehaviorStatus const): Maintain currentScrollBehaviorStatus.
        (WebCore::ScrollableArea::setScrollBehaviorStatus):
        * platform/generic/ScrollAnimatorGeneric.cpp:
        (WebCore::ScrollAnimatorGeneric::updatePosition):
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::cancelAnimations): Call parent member to handle programmatic scrolling.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setScrollLeft): Add flag to indicate animated or not.
        (WebCore::RenderBox::setScrollTop): Ditto.
        (WebCore::RenderBox::setScrollPosition):
        * rendering/RenderBox.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToXPosition): Ditto.
        (WebCore::RenderLayer::scrollToYPosition): Ditto.
        (WebCore::RenderLayer::scrollToPosition):
        (WebCore::RenderLayer::scrollToOffset): Follow the CSSOM View spec: If a scroll is in
        progress, we interrupt it and continue the scroll call (even when we are at the final
        position). It's ScrollBehaviorType::Instant scroll.
        (WebCore::RenderLayer::requestScrollPositionUpdate):
        (WebCore::RenderLayer::scrollToOffsetWithAnimation): Ditto. This is similar to scrollToOffset
        but animates the scroll. It's ScrollBehaviorType::Smooth scroll.
        (WebCore::RenderLayer::scrollTo):
        (WebCore::RenderLayer::scrollRectToVisible): Again don't do an early return if scroll is in
        progress. We call scrollToOffsetWithAnimation instead of scrollToOffset when appropriate.
        Note that this function may not work well for several nested scroll boxes with at least one
        element with smooth behavior. It will handled in bug Follow.
        * rendering/RenderLayer.h: Add scroll behavior to ScrollTectToVisibleOptions.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::setScrollLeft): Add animated flag.
        (WebCore::RenderListBox::setScrollTop): Ditto.
        * rendering/RenderListBox.h:
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::setScrollLeft):
        (WebCore::RenderTextControlSingleLine::setScrollTop):
        * rendering/RenderTextControlSingleLine.h:
        * testing/Internals.cpp:
        (WebCore::Internals::unconstrainedScrollTo):

2020-01-20  Said Abou-Hallawa  <sabouhallawa@apple.com>

        EXIF orientation is ignored for some CSS images
        https://bugs.webkit.org/show_bug.cgi?id=203355

        Reviewed by Simon Fraser.

        Unlike GraphicsContext::drawNativeImage(), GraphicsContext::drawPattern()
        can't change the coordinates system before drawing the image to respect
        the EXIF orientation. Drawing a pattern tries to fill the destination
        rectangle with the image according to the GraphicsContext origin and the
        direction of its axes. So we need to create temporary NativeImage with
        respecting the EXIF orientation and then use it to draw the pattern.

        Tests: fast/images/exif-orientation-background-image-no-repeat.html
               fast/images/exif-orientation-background-image-repeat.html
               fast/images/exif-orientation-border-image.html

        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::nativeImageForCurrentFrameRespectingOrientation):
        (WebCore::BitmapImage::drawPattern):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/Image.h:
        (WebCore::Image::nativeImage):
        (WebCore::Image::nativeImageForCurrentFrameRespectingOrientation):
        (WebCore::Image::nativeImageOfSize):
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawPattern):
        * platform/graphics/cg/NativeImageCG.cpp:
        (WebCore::drawNativeImage):
        * rendering/style/NinePieceImage.cpp:
        (WebCore::NinePieceImage::paint const):

2020-01-20  Maciej Stachowiak  <mjs@apple.com>

        Update status of Resize Observer to "Supported In Preview"
        https://bugs.webkit.org/show_bug.cgi?id=206513

        Reviewed by Darin Adler.

        No new tests. Just updating status.

        * features.json: Update Resize Observer to "Supported In Preview"

2020-01-20  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed, rolling out r254807.

        Breaks Apple internal builds.

        Reverted changeset:

        "Add support for scroll behavior relies on ScrollAnimation of
        the Web process"
        https://bugs.webkit.org/show_bug.cgi?id=204882
        https://trac.webkit.org/changeset/254807

2020-01-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] InlineFormattingContext::lineLayout should take a InlineItem range
        https://bugs.webkit.org/show_bug.cgi?id=206507
        <rdar://problem/58742468>

        Reviewed by Antti Koivisto.

        This is in preparation for being able to run inline layout on partial IFC content.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::nextWrapOpportunity):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-20  David Kilzer  <ddkilzer@apple.com>

        Fix missing header guards and clean up empty files in WebCore, WebKitLegacy, WebKit, Tools
        <https://webkit.org/b/206505>

        Reviewed by Eric Carlson.

        * bindings/js/StructuredClone.h:
        * bridge/npruntime_internal.h:
        * editing/cocoa/AutofillElements.h:
        * platform/graphics/FormatConverter.h:
        * platform/graphics/ImageBufferData.h:
        * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
        * platform/ios/wak/WebCoreThreadSystemInterface.h:
        * platform/network/mac/WebCoreURLResponse.h:
        - Add #pragma once statement.

        * platform/cocoa/SystemVersion.h:
        * platform/mac/WebNSAttributedStringExtras.h:
        - Add @class declarations as hint that this header is only used
          by Objective-C[++] source files.

        * platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.cpp: Remove.
        * platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.h: Remove.
        * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: Remove.
        * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h: Remove.
        - Remove unused, empty files.

        * platform/network/HTTPStatusCodes.h: Remove.
        - Remove unused header.

2020-01-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for the rare case of revert
        https://bugs.webkit.org/show_bug.cgi?id=206486
        <rdar://problem/58720638>

        Reviewed by Antti Koivisto.

        This patch re-introduces the support for revert when a previous wrap position turns out to be the line end position.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::clearContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::rebuildLineForRevert):
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-20  Adrian Perez de Castro  <aperez@igalia.com>

        Invalid usage of ENABLE() before it's defined in WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
        https://bugs.webkit.org/show_bug.cgi?id=206500

        Reviewed by Žan Doberšek.

        No new tests needed.

        * layout/integration/LayoutIntegrationBoxTree.cpp: Include "config.h"
        before using the ENABLE() macro, to make sure that it gets defined.

2020-01-20  youenn fablet  <youenn@apple.com>

        REGRESSION: ( r254256 ) [ Mojave wk2 ] http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=206437
        <rdar://problem/58692880>

        Reviewed by Eric Carlson.

        Hypothesis from flakiness is that, in GPUProcess, the call to stopRecording is not synchronously followed by a call to fetchData.
        If too much time happened between the two calls, stopRecording will trigger setting m_isStopped and m_hasStartedWriting to false.
        Any further call to fetchData will then fail.

        To circumvent this issue, we add a flag m_isStopping.
        If we are stopping, the completionHandler to fetchData call is delayed until stopRecording is fully finished.
        When stopping will be finished, the completionHandler will send back the data.
        This also allows to read the file in a background thread.

        No new tests, this should unflake the flaky test.

        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        (WebCore::MediaRecorderPrivateWriter::fetchData):

2020-01-20  Rob Buis  <rbuis@igalia.com>

        Implement "create a potential-CORS request"
        https://bugs.webkit.org/show_bug.cgi?id=205326

        Reviewed by Youenn Fablet.

        The storedCredentialsPolicy should be calculated using a same origin
        check when credentials are computed as same-origin.

        Test: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network.html

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::createPotentialAccessControlRequest):

2020-01-20  Rob Buis  <rbuis@igalia.com>

        Make isValidUserAgentHeaderValue GLib only
        https://bugs.webkit.org/show_bug.cgi?id=206475

        Reviewed by Youenn Fablet.

        The function isValidUserAgentHeaderValue is only used
        by code that requires GLib, so move it behind USE(GLIB).

        * platform/network/HTTPParsers.cpp:
        * platform/network/HTTPParsers.h:

2020-01-20  youenn fablet  <youenn@apple.com>

        Add support for MediaStream video track rendering in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206286

        Reviewed by Eric Carlson.

        Add a way for WebKit layer to create its own specific SampleBufferDisplayLayer.
        WebKit layer can set a function pointer that will be used to create SampleBufferDisplayLayer.
        If none is provided, LocalSampleBufferDisplayLayer is used.

        Update MediaPlayerPrivateMediaStreamAVFObjC to monitor itself its root layer bounds change.
        Conversely, LocalSampleBufferDisplayLayer no longer monitors its root layer bounds change.
        This removes the need for SampleBufferDisplayLayer::Client to be notified of bounds change.
        We add an API to update the root layer bounds of a LocalSampleBufferDisplayLayer as well,
        this API being used by GPUProcess to mirror changes done to WebProcess root layer.

        WebRTC incoming video tracks do not have presentation timestamps so we mark them as kCMSampleAttachmentKey_DisplayImmediately.
        This is currently lost when doing IPC from WebProcess to NetworkProcess. Add this information for every enqueued sample in LocalSampleBufferDisplayLayer.
        We might want in the future to serialize all attachments of the sample.

        Manually tested.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp: Added.
        (WebCore::SampleBufferDisplayLayer::setCreator):
        (WebCore::SampleBufferDisplayLayer::create):
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
        (-[WebAVSampleBufferStatusChangeListener invalidate]):
        (-[WebAVSampleBufferStatusChangeListener start]):
        (-[WebAVSampleBufferStatusChangeListener stop]):
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
        (WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (-[WebRootSampleBufferBoundsChangeListener initWithParent:]):
        (-[WebRootSampleBufferBoundsChangeListener dealloc]):
        (-[WebRootSampleBufferBoundsChangeListener invalidate]):
        (-[WebRootSampleBufferBoundsChangeListener start]):
        (-[WebRootSampleBufferBoundsChangeListener stop]):
        (-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        Unified build fix.

2020-01-20  youenn fablet  <youenn@apple.com>

        Video sound sometimes keeps playing in page cache
        https://bugs.webkit.org/show_bug.cgi?id=206408
        <rdar://problem/58654047>

        Reviewed by Eric Carlson.

        In r253375, we made sure to enqueue calls that would trigger state changes, to ensure we would not start playing while in page cache.
        But this delayed the order to pause the video when entering page cache.
        Fix this by synchronously updating playing state when being suspended for page cache.

        Test: http/tests/navigation/page-cache-video.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::pauseAndUpdatePlayStateImmediately):
        (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
        * html/HTMLMediaElement.h:

2020-01-20  youenn fablet  <youenn@apple.com>

        Introduce an abstract SampleBufferDisplayLayer
        https://bugs.webkit.org/show_bug.cgi?id=206066

        Reviewed by Eric Carlson.

        Move use of display layers in MediaPlayerPrivateMediaStreamAVFObjC to a new class LocalSampleBufferDisplayLayer
        that implements an interface named SampleBufferDisplayLayer.
        A future patch will implement this interface by IPCing to GPUProcess.
        We move both layers and handling of the sample queue to LocalSampleBufferDisplayLayer.

        Contrary to previously, we do not call again enqueueVideoSample in case we enqueued a sample for later use in the display layer.
        Instead, we directly render it, which should not change much since this is a realtime track and in the future the buffer will be in GPUProcess anyway.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.h: Added.
        (WebCore::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: Added.
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: Added.
        (-[WebAVSampleBufferStatusChangeListener initWithParent:]):
        (-[WebAVSampleBufferStatusChangeListener dealloc]):
        (-[WebAVSampleBufferStatusChangeListener invalidate]):
        (-[WebAVSampleBufferStatusChangeListener beginObservingLayers]):
        (-[WebAVSampleBufferStatusChangeListener stopObservingLayers]):
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::runWithoutAnimations):
        (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::layerStatusDidChange):
        (WebCore::LocalSampleBufferDisplayLayer::layerErrorDidChange):
        (WebCore::LocalSampleBufferDisplayLayer::rootLayerBoundsDidChange):
        (WebCore::LocalSampleBufferDisplayLayer::displayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::rootLayer):
        (WebCore::LocalSampleBufferDisplayLayer::didFail const):
        (WebCore::LocalSampleBufferDisplayLayer::updateDisplayMode):
        (WebCore::LocalSampleBufferDisplayLayer::bounds const):
        (WebCore::LocalSampleBufferDisplayLayer::updateAffineTransform):
        (WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
        (WebCore::LocalSampleBufferDisplayLayer::ensureLayers):
        (WebCore::LocalSampleBufferDisplayLayer::flush):
        (WebCore::LocalSampleBufferDisplayLayer::flushAndRemoveImage):
        (WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
        (WebCore::LocalSampleBufferDisplayLayer::removeOldSamplesFromPendingQueue):
        (WebCore::LocalSampleBufferDisplayLayer::addSampleToPendingQueue):
        (WebCore::LocalSampleBufferDisplayLayer::clearEnqueuedSamples):
        (WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerStatusDidChange):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::displayLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerBoundsDidChange):

2020-01-20  youenn fablet  <youenn@apple.com>

        ASSERT in case a service worker cannot be terminated in a timely manner
        https://bugs.webkit.org/show_bug.cgi?id=206413

        Reviewed by Alexey Proskuryakov.

        No change of behavior, the process will still exit if it does not succeed in stopping a service worker.
        In Debug, a crash log will be collected which will allow to help identifying other crashes.

        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::serviceWorkerFailedToTerminate):

2020-01-20  Takashi Komori  <Takashi.Komori@sony.com>

        KeyedDecoderGeneric crashes when it accesses data with non-existing key
        https://bugs.webkit.org/show_bug.cgi?id=205902

        Reviewed by Fujii Hironori.

        Add null check function for KeyedDecoderGeneric.

        Test: TestWebKitAPI/Tests/WebCore/KeyedCodingGeneric.cpp

        * platform/generic/KeyedDecoderGeneric.cpp:
        (WebCore::KeyedDecoderGeneric::Dictionary::get):
        (WebCore::KeyedDecoderGeneric::getPointerFromDictionaryStack):
        (WebCore::KeyedDecoderGeneric::decodeSimpleValue):
        (WebCore::KeyedDecoderGeneric::decodeBytes):
        (WebCore::KeyedDecoderGeneric::decodeBool):
        (WebCore::KeyedDecoderGeneric::decodeUInt32):
        (WebCore::KeyedDecoderGeneric::decodeUInt64):
        (WebCore::KeyedDecoderGeneric::decodeInt32):
        (WebCore::KeyedDecoderGeneric::decodeInt64):
        (WebCore::KeyedDecoderGeneric::decodeFloat):
        (WebCore::KeyedDecoderGeneric::decodeDouble):
        (WebCore::KeyedDecoderGeneric::decodeString):
        (WebCore::KeyedDecoderGeneric::beginObject):
        (WebCore::KeyedDecoderGeneric::beginArray):
        * platform/generic/KeyedDecoderGeneric.h:

2020-01-19  Antti Koivisto  <antti@apple.com>

        [LFC] Devirtualize FormattingState
        https://bugs.webkit.org/show_bug.cgi?id=206485

        Reviewed by Zalan Bujtas.

        The only reason it is virtual is the destructor.

        * layout/FormattingState.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
        * layout/LayoutState.h:
        * layout/blockformatting/BlockFormattingState.h:
        * layout/inlineformatting/InlineFormattingState.h:
        * layout/tableformatting/TableFormattingState.h:

2020-01-19  Cathie Chen  <cathiechen@igalia.com>

        Add support for scroll behavior relies on ScrollAnimation of the Web process
        https://bugs.webkit.org/show_bug.cgi?id=204882

        Reviewed by Frédéric Wang

        Based on the patch by Frédéric Wang.

        This patch introduces a programmatic smooth scrolling in WebKit from the CSSOM View
        specification [1]. To use this effect, web developers can pass a behavior parameter (auto,
        smooth, or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
        Element.scrollIntoView, Window.scroll, Window.scrollTo or Window.scrollBy [2]. When behavior
        is auto, the instant/smooth characteristic is actually taken from the value of a new CSS
        scroll-behavior property [3]. Both the new CSS and DOM behavior are protected by a runtime
        flag.

        [1] https://drafts.csswg.org/cssom-view
        [2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
        [3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior

        Tests: imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-default-css.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-element.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-root.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-main-frame-window.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-scrollintoview-nested.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth-positions.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-root.html
               imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-subframe-window.html
        * Sources.txt: Build ScrollAnimationSmooth.cpp on all platforms.
        * SourcesGTK.txt: Remove ScrollAnimationSmooth.cpp since it is built on all platforms now.
        * dom/Element.cpp:
        (WebCore::Element::scrollIntoView): Pass scroll behavior, if any.
        (WebCore::Element::scrollBy):
        (WebCore::Element::scrollTo): Handle the case when scroll behavior is smooth.
        (WebCore::Element::setScrollLeft): Handle the case when scroll behavior is smooth.
        (WebCore::Element::setScrollTop): Handle the case when scroll behavior is smooth.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::scrollBy const):
        (WebCore::DOMWindow::scrollTo const): Handle the case when scroll behavior is smooth.
        The optimization of cancel (0, 0) scrolling is skipped if an animated scroll is in progress.
        Otherwise, the previous scroll won't be stopped by a follow-up scroll.
        * page/FrameView.cpp:
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::scrollToOffsetWithAnimation): Start an animated scroll.
        * page/FrameView.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        * platform/ScrollAnimation.h:
        (WebCore::ScrollAnimation::scroll): Function to animate scrolling to a specified position.
        * platform/ScrollAnimationSmooth.cpp: Build this file on all platforms. Add a
        smoothFactorForProgrammaticScroll parameter to slow down the smooth scrolling.
        (WebCore::ScrollAnimationSmooth::scroll):
        (WebCore::ScrollAnimationSmooth::updatePerAxisData): Scale the time parameters of the
        animation so that it looks smoother.
        * platform/ScrollAnimationSmooth.h: Declare the class on all platforms.
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::ScrollAnimator): Initialize animation member for programmatic scrolling.
        (WebCore::ScrollAnimator::scrollToOffset): Animate scrolling to the specified position.
        (WebCore::ScrollAnimator::cancelAnimations): Copy logic from ScrollAnimationSmooth.cpp.
        (WebCore::ScrollAnimator::serviceScrollAnimations): Ditto.
        (WebCore::ScrollAnimator::willEndLiveResize): Ditto.
        (WebCore::ScrollAnimator::didAddVerticalScrollbar): Ditto.
        (WebCore::ScrollAnimator::didAddHorizontalScrollbar): Ditto.
        * platform/ScrollAnimator.h: New animation member for smooth programmatic scrolling.
        (WebCore::ScrollAnimator::ScrollAnimator::cancelAnimations): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::serviceScrollAnimations): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::willEndLiveResize): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::didAddVerticalScrollbar): Deleted.
        (WebCore::ScrollAnimator::ScrollAnimator::didAddHorizontalScrollbar): Deleted.
        * platform/ScrollTypes.h: Add ScrollBehaviorStatus to indicate the status of scrolling.
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollPosition): Follow the CSSOM View spec: If a scroll is in
        progress, we interrupt it and continue the scroll call (even when we are at the final position).
        * platform/ScrollView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::scrollToOffsetWithAnimation):
        (WebCore::ScrollableArea::setScrollOffsetFromInternals):
        (WebCore::ScrollableArea::setScrollOffsetFromAnimation): To avoid iterate calling,
        move the requestScrollPositionUpdate(position) checking out of setScrollOffsetFromAnimation().
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::currentScrollBehaviorStatus const): Maintain currentScrollBehaviorStatus.
        (WebCore::ScrollableArea::setScrollBehaviorStatus):
        * platform/generic/ScrollAnimatorGeneric.cpp:
        (WebCore::ScrollAnimatorGeneric::updatePosition):
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::cancelAnimations): Call parent member to handle programmatic scrolling.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setScrollLeft): Add flag to indicate animated or not.
        (WebCore::RenderBox::setScrollTop): Ditto.
        (WebCore::RenderBox::setScrollPosition):
        * rendering/RenderBox.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToXPosition): Ditto.
        (WebCore::RenderLayer::scrollToYPosition): Ditto.
        (WebCore::RenderLayer::scrollToPosition):
        (WebCore::RenderLayer::scrollToOffset): Follow the CSSOM View spec: If a scroll is in
        progress, we interrupt it and continue the scroll call (even when we are at the final
        position). It's ScrollBehaviorType::Instant scroll.
        (WebCore::RenderLayer::requestScrollPositionUpdate):
        (WebCore::RenderLayer::scrollToOffsetWithAnimation): Ditto. This is similar to scrollToOffset
        but animates the scroll. It's ScrollBehaviorType::Smooth scroll.
        (WebCore::RenderLayer::scrollTo):
        (WebCore::RenderLayer::scrollRectToVisible): Again don't do an early return if scroll is in
        progress. We call scrollToOffsetWithAnimation instead of scrollToOffset when appropriate.
        Note that this function may not work well for several nested scroll boxes with at least one
        element with smooth behavior. It will handled in bug Follow.
        * rendering/RenderLayer.h: Add scroll behavior to ScrollTectToVisibleOptions.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::setScrollLeft): Add animated flag.
        (WebCore::RenderListBox::setScrollTop): Ditto.
        * rendering/RenderListBox.h:
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::setScrollLeft):
        (WebCore::RenderTextControlSingleLine::setScrollTop):
        * rendering/RenderTextControlSingleLine.h:
        * testing/Internals.cpp:
        (WebCore::Internals::unconstrainedScrollTo):

2020-01-19  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Use integration specific layout tree builder and data structures
        https://bugs.webkit.org/show_bug.cgi?id=206483

        Reviewed by Zalan Bujtas.

        The generic tree builder and the LayoutTreeContent class are not optimal for integrated layout.

        This patch adds LayoutIntegration::BoxTree type for building and owning Layout::Boxes for a single flow.
        It also devirtualizes Layout::Box for faster destruction (the only virtual function was the destructor).

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/integration/LayoutIntegrationBoxTree.cpp: Added.
        (WebCore::LayoutIntegration::BoxTree::BoxTree):
        (WebCore::LayoutIntegration::BoxTree::buildTree):

        Only handle supported content.

        (WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer const):
        (WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox const):

        For small content just traverse the vector. Construct lookup maps lazily for larger content.

        * layout/integration/LayoutIntegrationBoxTree.h: Copied from Source/WebCore/layout/layouttree/LayoutContainer.h.
        (WebCore::LayoutIntegration::BoxTree::rootLayoutBox const):
        (WebCore::LayoutIntegration::BoxTree::rootLayoutBox):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::LineLayout):
        (WebCore::LayoutIntegration::LineLayout::layout):
        (WebCore::LayoutIntegration::LineLayout::textBoxesFor const):
        (WebCore::LayoutIntegration::LineLayout::elementBoxFor const):
        (WebCore::LayoutIntegration::LineLayout::rootLayoutBox const):
        (WebCore::LayoutIntegration::LineLayout::rootLayoutBox):
        (WebCore::LayoutIntegration::LineLayout::hitTest):
        * layout/integration/LayoutIntegrationLineLayout.h:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::~Box):
        * layout/layouttree/LayoutBox.h:

        Devirtualize.

        * layout/layouttree/LayoutContainer.cpp:
        (WebCore::Layout::Container::appendChild):
        * layout/layouttree/LayoutContainer.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createBox):
        (WebCore::Layout::TreeBuilder::createTextBox):
        (WebCore::Layout::TreeBuilder::createContainer):
        (WebCore::Layout::TreeBuilder::createLayoutBox):

        Factor ownership handling to these create functions.

        (WebCore::Layout::TreeBuilder::buildTableStructure):
        (WebCore::Layout::TreeBuilder::buildSubTree):
        * layout/layouttree/LayoutTreeBuilder.h:
        (WebCore::Layout::LayoutTreeContent::addBox):
        (WebCore::Layout::LayoutTreeContent::addContainer):

        Put Boxes and Containers to different maps for correct destruction.

2020-01-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move away from placing individual InlineItems on the line
        https://bugs.webkit.org/show_bug.cgi?id=206479
        <rdar://problem/58716223>

        Reviewed by Antti Koivisto.

        <div> text content and  more    </div>
        [ ][text][ ][content][ ][and][  ]more[   ]

        Instead of placing all these ^^ inline items on the line (LineBuilder::InlineItemRun) and merge them at InlineBuilder::close(),
        let's expand existing runs(LineBuilder::Run) when possible ([text content and ][more]).
        This helps performance and memory consumption when the line ends up having many inline itmes (e.g. white-space: nowrap).

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::expand):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::justifyRuns):
        (WebCore::Layout::LineBuilder::alignHorizontally):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::visuallyCollapsePreWrapOverflowContent):
        (WebCore::Layout::LineBuilder::collectHangingContent):
        (WebCore::Layout::LineBuilder::append):
        (WebCore::Layout::LineBuilder::appendNonBreakableSpace):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::TrimmableTrailingContent):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::addFullyTrimmableContent):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::addPartiallyTrimmableContent):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::remove):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::removePartiallyTrimmableContent):
        (WebCore::Layout::LineBuilder::Run::Run):
        (WebCore::Layout::m_textContext):
        (WebCore::Layout::LineBuilder::Run::expand):
        (WebCore::Layout::LineBuilder::Run::hasTrailingLetterSpacing const):
        (WebCore::Layout::LineBuilder::Run::trailingLetterSpacing const):
        (WebCore::Layout::LineBuilder::Run::removeTrailingLetterSpacing):
        (WebCore::Layout::LineBuilder::Run::removeTrailingWhitespace):
        (WebCore::Layout::LineBuilder::Run::visuallyCollapseTrailingWhitespace):
        (WebCore::Layout::LineBuilder::Run::adjustExpansionBehavior):
        (WebCore::Layout::LineBuilder::Run::expansionBehavior const):
        (WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
        (WebCore::Layout::LineBuilder::ContinuousContent::canInlineItemRunBeExpanded): Deleted.
        (WebCore::Layout::LineBuilder::ContinuousContent::ContinuousContent): Deleted.
        (WebCore::Layout::LineBuilder::ContinuousContent::isEligible const): Deleted.
        (WebCore::Layout::LineBuilder::ContinuousContent::append): Deleted.
        (WebCore::Layout::LineBuilder::ContinuousContent::close): Deleted.
        (WebCore::Layout::m_isCollapsedToVisuallyEmpty): Deleted.
        (WebCore::Layout::shouldPreserveLeadingContent): Deleted.
        (WebCore::Layout::LineBuilder::revert): Deleted.
        (WebCore::Layout::LineBuilder::justifyRuns const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::append): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::removeTrailingRun): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::hasTrailingLetterSpacing const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::hasEmptyTextContent const): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::logicalWidth const):
        (WebCore::Layout::LineBuilder::Run::shrinkHorizontally):
        (WebCore::Layout::LineBuilder::Run::adjustLogicalTop):
        (WebCore::Layout::LineBuilder::Run::hasTrailingWhitespace const):
        (WebCore::Layout::LineBuilder::Run::hasCollapsibleTrailingWhitespace const):
        (WebCore::Layout::LineBuilder::Run::hasCollapsedTrailingWhitespace const):
        (WebCore::Layout::LineBuilder::Run::trailingWhitespaceWidth const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::width const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunPartiallyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::reset):
        (WebCore::Layout::LineBuilder::Run::trailingWhitespaceType const):
        (WebCore::Layout::LineBuilder::Run::isCollapsedToVisuallyEmpty const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::layoutBox const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::style const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalLeft const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalWidth const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::textContext const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isText const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isBox const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isContainerStart const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isContainerEnd const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isLineBreak const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::type const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsed const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::adjustLogicalWidth): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsedToZeroAdvanceWidth const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsible const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isWhitespace const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::hasExpansionOpportunity const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::operator== const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::operator!= const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::firstRunIndex): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):

2020-01-18  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r254790): Update DerivedSources-{input,output}.xcfilelist to fix build

        Add support for scroll behavior parsing
        <https://bugs.webkit.org/show_bug.cgi?id=205009>

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        - Update after commit r254790.

2020-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>

        Make pasteboard markup sanitization more robust
        https://bugs.webkit.org/show_bug.cgi?id=206379
        <rdar://problem/58660859>

        Reviewed by Ryosuke Niwa.

        Makes markup sanitization when copying and pasting more robust in some circumstances (see the bug for additional
        details).

        * editing/markup.cpp:
        (WebCore::createPageForSanitizingWebContent):

        Adopt the new setting when creating the temporary web page used to sanitize markup coming from the pasteboard.

        * html/parser/HTMLParserOptions.cpp:
        (WebCore::HTMLParserOptions::HTMLParserOptions):
        * html/parser/HTMLParserOptions.h:

        Rename `scriptEnabled` to `scriptingFlag`, since parsing script elements may now be allowed even when JavaScript
        execution is disabled. The term "scripting flag" also closely matches the wording of the HTML parsing
        specification.

        * html/parser/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::updateStateFor):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
        (WebCore::HTMLTreeBuilder::processStartTagForInHead):
        * page/Settings.yaml:

        Add a new setting to determine whether to consider the scripting flag on when parsing HTML. By default, we will
        only turn the scripting flag on if script execution is enabled; however, this may be set such that we may
        consider the scripting flag set, even though script execution is disabled.

        * page/SettingsBase.h:

2020-01-18  Antti Koivisto  <antti@apple.com>

        [LFC] LayoutState constructor shouldn't take LayoutTreeContent
        https://bugs.webkit.org/show_bug.cgi?id=206471

        Reviewed by Zalan Bujtas.

        It just needs the root container.

        This is preparation for more performant layout box construction and ownership model in the integration code.

        * layout/LayoutContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::LayoutState):

        Take Document (to compute quirks mode) and the root box only.

        (WebCore::Layout::LayoutState::displayBoxForRootLayoutBox):
        (WebCore::Layout::LayoutState::setViewportSize):
        (WebCore::Layout::LayoutState::viewportSize const):
        (WebCore::Layout::LayoutState::setIsIntegratedRootBoxFirstChild):
        (WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const): Deleted.

        Make this a bit set by the integration code.

        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::root const):
        (WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const):
        (WebCore::Layout::LayoutState::rootRenderer const): Deleted.
        * layout/Verification.cpp:
        (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::layout):

        Also allocate LayoutState directly from LineLayout using Optional.

        * layout/integration/LayoutIntegrationLineLayout.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
        * rendering/updating/RenderTreeUpdater.cpp:

2020-01-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Rename trailing collapsible content to trailing trimmable
        https://bugs.webkit.org/show_bug.cgi?id=206447
        <rdar://problem/58697414>

        Reviewed by Antti Koivisto.

        Trimming is the spec term for removing trailing inline content (also this helps to not confuse
        trailing trimming and whitespace collapsing.)

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::revert):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::visuallyCollapsePreWrapOverflowContent):
        (WebCore::Layout::LineBuilder::collectHangingContent):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::TrimmableTrailingContent):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::append):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::remove):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::removeTrailingRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const):
        (WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::CollapsibleContent): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::append): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::collapse): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::collapseTrailingRun): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsibleWhitespace const): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::trimmableTrailingWidth const):
        (WebCore::Layout::LineBuilder::isTrailingRunFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::isTrailingRunPartiallyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableTrailingContent::reset):
        (WebCore::Layout::LineBuilder::trailingCollapsibleWidth const): Deleted.
        (WebCore::Layout::LineBuilder::isTrailingRunFullyCollapsible const): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::width const): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::firstRunIndex): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::isEmpty const): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::isTrailingRunFullyCollapsible const): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::isTrailingRunPartiallyCollapsible const): Deleted.
        (WebCore::Layout::LineBuilder::CollapsibleContent::reset): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):

2020-01-18  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254780.
        https://bugs.webkit.org/show_bug.cgi?id=206472

        fast/css/content/content-none.html asserts in
        LineBuilder::CollapsibleContent::collapse() (Requested by
        zalan on #webkit).

        Reverted changeset:

        "[LFC][IFC] Do not construct a dedicated run for the trailing
        (fully) collapsed whitespace."
        https://bugs.webkit.org/show_bug.cgi?id=206428
        https://trac.webkit.org/changeset/254780

2020-01-17  Cathie Chen  <cathiechen@igalia.com>

        Add support for scroll behavior parsing
        https://bugs.webkit.org/show_bug.cgi?id=205009

        Reviewed by Frédéric Wang.

        Based on the patch by Frédéric Wang.

        Add support for parsing scroll-behavior css property and ScrollOptions.

        Tests: LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/inheritance.html
               LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-computed.html
               LayoutTests/web-platform-tests/css/cssom-view/parsing/scroll-behavior-valid.html

        * CMakeLists.txt: Add IDL files for ScrollOptions and ScrollBehavior.
        * DerivedSources.make:
        * Headers.cmake: Add headers for ScrollBehavor and ScrollOptions.
        * Sources.txt: Add ScrollBehavor and ScrollOptions implementation.
        * WebCore.xcodeproj/project.pbxproj: Add files to the build system.
        * css/CSSComputedStyleDeclaration.cpp: Handle scroll-behavior.
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSProperties.json: Add scroll-behavior.
        * css/CSSValueKeywords.in: Add keywords for scroll-behavior.
        * css/parser/CSSParserContext.cpp: Add runtime config for scroll-behavior.
        (WebCore::CSSParserContext::CSSParserContext):
        (WebCore::operator==):
        * css/parser/CSSParserContext.h: Ditto.
        (WebCore::CSSParserContextHash::hash):
        * css/parser/CSSParserFastPaths.cpp: Remove scroll-behavior templates. It is handled in the slow path since property can be disabled.
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeScrollBehavior):
        (WebCore::CSSPropertyParser::parseSingleValue): Parse scroll-behavior (only if enabled).
        * page/ScrollBehavior.cpp: Added.
        (WebCore::useSmoothScrolling): Helper funciton to determine the scroll behavior to apply to an element from the CSS and DOM behavior.
        * page/ScrollBehavior.h: Added.
        * page/ScrollBehavior.idl: Added.
        * page/ScrollIntoViewOptions.h: Make this class inherits from ScrollOption. Also remove unnecessary forward declaration.
        * page/ScrollIntoViewOptions.idl: Make this class inherits from ScrollOption.
        * page/ScrollOptions.h: Added.
        * page/ScrollOptions.idl: Added.
        * page/ScrollToOptions.h: Make this struct inherits from ScrollOptions.
        (WebCore::ScrollToOptions::ScrollToOptions):
        (WebCore::normalizeNonFiniteCoordinatesOrFallBackTo): Copy the current ScrollToOptions so that the scroll behavior is preserved.
        * page/ScrollToOptions.idl: Make this class inherit from ScrollOptions.
        * page/Settings.yaml: New setting for CSSOM View smooth scrolling.
        * rendering/style/RenderStyle.h: Handle 'smooth scrolling' boolean data.
        (WebCore::RenderStyle::useSmoothScrolling const):
        (WebCore::RenderStyle::setUseSmoothScrolling):
        (WebCore::RenderStyle::initialUseSmoothScrolling):
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator== const):
        * rendering/style/StyleRareNonInheritedData.h:
        * style/StyleBuilderConverter.h:
        (WebCore::Style::BuilderConverter::convertSmoothScrolling):

2020-01-17  Ryosuke Niwa  <rniwa@webkit.org>

        iOS: Prepare deploying Ref/RefPtr in touch event code
        https://bugs.webkit.org/show_bug.cgi?id=206466

        Reviewed by Wenson Hsieh.

        Introduce a new variant of dispatchTouchEvent, which takes EventTargetTouchArrayMap that uses
        Ref<EventTarget> as keys instead of raw pointers to EventTarget as is the case in EventTargetTouchMap.

        * page/EventHandler.h:
        (WebCore::EventHandler::EventTargetTouchArrayMap): Added.
        (WebCore::EventHandler::dispatchTouchEvent): Added the declaration for new variant.

2020-01-17  Megan Gardner  <megan_gardner@apple.com>

        Use Visible Position to calculate Positions for highlights
        https://bugs.webkit.org/show_bug.cgi?id=206314

        Reviewed by Ryosuke Niwa.

        When after layout is complete create a VisibleSelection from and highlight StaticRanges which
        don't have position data yet. This will make sure that the information is availble when 
        rendering, as Visible Positions and Visible Selections cannot be made while rendering.
        Also, add the ability to make a VisibleSelection from a Static Range to simplify the code.

        Updated Test:
        * LayoutTests/http/wpt/css/css-highlight-api/highlight-text-across-elements.html:
        * LayoutTests/http/wpt/css/css-highlight-api/highlight-text-cascade.html:
        * LayoutTests/http/wpt/css/css-highlight-api/highlight-text-replace.html:
        * LayoutTests/http/wpt/css/css-highlight-api/highlight-text.html:

        * Modules/highlight/HighlightRangeGroup.cpp:
        (WebCore::HighlightRangeGroup::HighlightRangeGroup):
        (WebCore::HighlightRangeGroup::create):
        (WebCore::HighlightRangeGroup::initializeSetLike):
        (WebCore::HighlightRangeGroup::removeFromSetLike):
        (WebCore::HighlightRangeGroup::clearFromSetLike):
        (WebCore::HighlightRangeGroup::addToSetLike):
        * Modules/highlight/HighlightRangeGroup.h:
        (WebCore::HighlightRangeData::create):
        (WebCore::HighlightRangeData::HighlightRangeData):
        (WebCore::HighlightRangeGroup::rangesData const):
        (WebCore::HighlightRangeGroup::ranges const): Deleted.
        * Modules/highlight/HighlightRangeGroup.idl:
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::create):
        * editing/VisibleSelection.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):
        * rendering/SelectionRangeData.cpp:
        (WebCore::SelectionRangeData::selectionStateForRenderer):

2020-01-17  Canhai Chen  <canhai_chen@apple.com>

        AX: Unable to use AccessibilityObject::replaceTextInRange to insert text at first time when the text fields are empty
        https://bugs.webkit.org/show_bug.cgi?id=206093
        <rdar://problem/58491448>

        Reviewed by Chris Fleizach.

        When we are trying to insert text in an empty text field with (0, 0) range, the frame selection will create a 
        new VisibleSelection in FrameSelection::setSelectedRange, and the container node that this new VisibleSelection 
        returns is the parent node of the text field element, which could be a HTMLDivElement or HTMLBodyElement. 
        Because the container node is not editable, it failed to insert text in Editor::replaceSelectionWithText later.

        Return nullptr if the range is (0, 0) and the text length is 0 in AccessibilityObject::rangeForPlainTextRange, 
        so that when the frame selection is trying to setSelectedRange before replacing text, instead of creating an 
        uneditable VisibleSelection, it will just return and later in Editor::replaceSelectionWithText, it will use 
        the default VisibleSelection, of which the container node is an editable TextControlInnerTextElement.

        This change does not affect the existing behaviors of text replacement. Add a new test for text replacement 
        with empty range in editable div, text input, and textarea.

        Test: accessibility/mac/replace-text-with-empty-range.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::rangeForPlainTextRange const):

2020-01-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Do not construct a dedicated run for the trailing (fully) collapsed whitespace.
        https://bugs.webkit.org/show_bug.cgi?id=206428
        <rdar://problem/58687058>

        Reviewed by Antti Koivisto.

        This patch reduces the final run count on a line from 2 to 1 in the common cases where the line ends in a collapsed trailing whitespace. 
        ~3% progression on PerformanceTests/Layout/line-layout-simple.html.

        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinuousContent::isEligible const):
        (WebCore::Layout::LineBuilder::ContinuousContent::expand):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::CollapsibleContent::collapse):
        (WebCore::Layout::LineBuilder::ContinuousContent::append): Deleted.

2020-01-17  Matt Lewis  <jlewis3@apple.com>

        Unreviewed, rolling out r254564.

        This caused internal test crashes.

        Reverted changeset:

        "Introduce an abstract SampleBufferDisplayLayer"
        https://bugs.webkit.org/show_bug.cgi?id=206066
        https://trac.webkit.org/changeset/254564

2020-01-17  Matt Lewis  <jlewis3@apple.com>

        Unreviewed, rolling out r254688.

        This caused internal test crashes.

        Reverted changeset:

        "Add support for MediaStream video track rendering in
        GPUProcess"
        https://bugs.webkit.org/show_bug.cgi?id=206286
        https://trac.webkit.org/changeset/254688

2020-01-17  Alex Christensen  <achristensen@webkit.org>

        Don't call CFURLRequestSetShouldStartSynchronously from Catalyst WebKit
        https://bugs.webkit.org/show_bug.cgi?id=206446
        <rdar://problem/57382980>

        Reviewed by Tim Horton.

        We call it sometimes on iOS but Catalyst WebKit uses macOS CFNetwork, which doesn't like starting synchronously.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::createNSURLConnection):

2020-01-17  Eric Carlson  <eric.carlson@apple.com>

        REGRESSION (r254483): media/track/track-cues-sorted-before-dispatch.html became very flaky
        https://bugs.webkit.org/show_bug.cgi?id=206225
        <rdar://problem/58634315>

        Reviewed by Jer Noble.

        The list of text track cues that are to fire events are sorted before events are
        fired. Cue were being sorted by track, then by start time, and then by end time. 
        This meant that the sort order of two cues in the same track with identical start 
        and end times was not stable, causing this test to be flaky. The spec says to sort
        by a cue's position in the track cue list when start and end times are identical,
        so do that.

        No new tests, this fixes a flaky test.

        * html/track/TextTrackCue.cpp:
        (WebCore::TextTrackCue::cueIndex const):
        (WebCore::TextTrackCue::isOrderedBefore const):
        * html/track/TextTrackCue.h:
        * html/track/TextTrackCueList.cpp:
        (WebCore::cueSortsBefore):
        (WebCore::TextTrackCueList::cueIndex const):
        (WebCore::TextTrackCueList::add):
        (WebCore::TextTrackCueList::updateCueIndex):
        (WebCore::compareCues): Deleted.
        * html/track/TextTrackCueList.h:

2020-01-17  Andres Gonzalez  <andresg_22@apple.com>

        Rename AXIsolatedTreeNode.cpp/h to match AXIsolatedObject class name.
        https://bugs.webkit.org/show_bug.cgi?id=206434

        Reviewed by Chris Fleizach.

        File renaming to match AXIsolatedObject class name.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AXObjectCache.cpp:
        * accessibility/isolatedtree/AXIsolatedObject.cpp: Renamed from Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.cpp.
        * accessibility/isolatedtree/AXIsolatedObject.h: Renamed from Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h.
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/mac/AXObjectCacheMac.mm:

2020-01-17  Jer Noble  <jer.noble@apple.com>

        [MSE] Decode glitches when watching videos on CNN.com
        https://bugs.webkit.org/show_bug.cgi?id=206412
        <rdar://problem/55685630>

        Reviewed by Xabier Rodriguez-Calvar.

        Test: media/media-source/media-source-samples-out-of-order.html

        The "Coded frame processing" algorithm has a known shortcoming <https://github.com/w3c/media-source/issues/187>
        when dealing appends of with "SAP Type 2" content, or in general terms, appending data where the resulting samples
        have presentation times that do not increase monotonically. When this occurs, the ordering of samples in presentation
        time will be different from the ordering of samples in decode time. The decoder requires samples to be enqueued in
        decode time order, but the MSE specification only checks for overlapping samples in presentation time order. During
        appends of out-of-order samples, this can lead to new samples being inserted between a previously appended sample and
        the sample on which that sample depends.

        To resolve this, add a new step in the implementation of the "coded frame processing" algorithm in 
        SourceBuffer::sourceBufferPrivateDidReceiveSample(). When the incoming frame is a sync sample, search forward
        in the TrackBuffer for all previous samples in between the new sync sample, and the next sync sample. All the
        samples found in this step would fail to decode correctly if enqueued after the new (possibly different resolution)
        sync sample, so they are removed in this step.

        * Modules/mediasource/SampleMap.cpp:
        (WebCore::DecodeOrderSampleMap::findSampleAfterDecodeKey):
        * Modules/mediasource/SampleMap.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

2020-01-17  Antti Koivisto  <antti@apple.com>

        [LFC][IFC] Use Optional for partialLeading/TrailingTextItem
        https://bugs.webkit.org/show_bug.cgi?id=206423

        Reviewed by Zalan Bujtas.

        Remove the remaining InlineItem heap allocation.

        * layout/inlineformatting/InlineItem.h:
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::left const): Deleted.
        (WebCore::Layout::InlineTextItem::right const): Deleted.
        * layout/inlineformatting/InlineTextItem.h:

        Constructor can now be private.

        (WebCore::Layout::InlineTextItem::left const):
        (WebCore::Layout::InlineTextItem::right const):
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-17  Chris Dumez  <cdumez@apple.com>

        Drop dead code related to local storage prewarming
        https://bugs.webkit.org/show_bug.cgi?id=206418

        Reviewed by Sam Weinig.

        Drop dead code related to local storage prewarming. Sihui neutered it in <https://trac.webkit.org/changeset/248734>
        but did not remove the code.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::commitData):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::prewarmLocalStorageIfNecessary): Deleted.
        * page/DOMWindow.h:
        * page/Frame.cpp:
        (WebCore::Frame::didPrewarmLocalStorage): Deleted.
        (WebCore::Frame::mayPrewarmLocalStorage const): Deleted.
        * page/Frame.h:

2020-01-17  Adrian Perez de Castro  <aperez@igalia.com>

        Fix various non-unified build issues introduced since r254327
        https://bugs.webkit.org/show_bug.cgi?id=206356

        Reviewed by Chris Dumez.

        No new tests needed.

        * html/LinkRelAttribute.h: Add missing inclusion of wtf/Markable.h

2020-01-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Optimize LineBuilder::appendTextContent for the most common inline content
        https://bugs.webkit.org/show_bug.cgi?id=206397
        <rdar://problem/58671338>

        Reviewed by Antti Koivisto.

        ~2% progression on PerformanceTests/Layout/line-layout-simple.html.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::shouldPreserveLeadingContent):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::setIsCollapsed): Deleted.
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::isCollapsible const):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::shouldPreserveTrailingWhitespace): Deleted.
        * layout/inlineformatting/text/TextUtil.h:
        (WebCore::Layout::TextUtil::shouldPreserveTrailingWhitespace):

2020-01-17  Antti Koivisto  <antti@apple.com>

        [LFC][IFC] Allocate InlineItems in a vector
        https://bugs.webkit.org/show_bug.cgi?id=206411

        Reviewed by Zalan Bujtas.

        Even the largest InlineItem (InlineTextItem) is small (fits to 24 bytes), and they are allocated
        in large numbers (one per word and per whitespace typically). Reduce heap allocations by turning
        InlineItem into a fixed size type.

        The InlineItem vector is immutable during layout so pointer to items can still be safely used.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::addInlineItem):
        * layout/inlineformatting/InlineItem.cpp:
        (WebCore::Layout::InlineItem::InlineItem): Deleted.
        * layout/inlineformatting/InlineItem.h:
        (WebCore::Layout::InlineItem::layoutBox const):
        (WebCore::Layout::InlineItem::style const):
        (WebCore::Layout::InlineItem::InlineItem):

        Gather members from the subclasses as protected fields.

        * layout/inlineformatting/InlineSoftLineBreakItem.h:

        Move the field to the base class.

        (WebCore::Layout::InlineSoftLineBreakItem::position const):
        (WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem):
        (WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem):
        (): Deleted.
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createWhitespaceItem): Deleted.
        (WebCore::Layout::InlineTextItem::createNonWhitespaceItem): Deleted.
        (WebCore::Layout::InlineTextItem::createEmptyItem): Deleted.
        (WebCore::Layout::InlineTextItem::InlineTextItem): Deleted.
        * layout/inlineformatting/InlineTextItem.h:

        Move the fields to the base class.

        (WebCore::Layout::InlineTextItem::start const):
        (WebCore::Layout::InlineTextItem::width const):

        Place width optional into a separate bit and a value as this allows better packing of members.

        (WebCore::Layout::InlineTextItem::createWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createEmptyItem):
        (WebCore::Layout::InlineTextItem::InlineTextItem):

        Inline construction functions.

        (): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::nextWrapOpportunity):
        (WebCore::Layout::LineCandidateContent::appendFloat):

        Use a raw pointer instead of a WeakPtr. InlineItems are immuttable during layout.

        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Optimize nextWrapOpportunity/isAtSoftWrapOpportunity for the most common inline content
        https://bugs.webkit.org/show_bug.cgi?id=206395
        <rdar://problem/58670070>

        Reviewed by Antti Koivisto.

        ~2% progression on PerformanceTests/Layout/line-layout-simple.html.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::nextWrapOpportunity):

2020-01-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] Turn off antialiasing when rendering with Ahem (v2)
        https://bugs.webkit.org/show_bug.cgi?id=204671

        Reviewed by Carlos Garcia Campos.

        Fix leak caused by r254567 where a RefPtr its created from a FcPattern without adoptRef().
        Meanwhile at it, also change defaultFontconfigOptions() to return a RefPtr,
        because after r254567 we always modify the pattern.
        Change also the FontPlatformData() constructor to take an rvalue reference,
        and some of its callers to move the RefPtr, avoiding extra not needed
        reference increments/decrements.

        Covered by existing tests.

        * platform/graphics/FontPlatformData.h:
        * platform/graphics/freetype/FontCacheFreeType.cpp:
        (WebCore::FontCache::systemFallbackForCharacters):
        (WebCore::FontCache::createFontPlatformData):
        * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
        (WebCore::defaultFontconfigOptions):
        (WebCore::FontCustomPlatformData::fontPlatformData):
        * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
        (WebCore::FontPlatformData::FontPlatformData):

2020-01-16  Yusuke Suzuki  <ysuzuki@apple.com>

        Compact sizeof(HTMLAnchorElement) and sizeof(HTMLLinkElement)
        https://bugs.webkit.org/show_bug.cgi?id=206343

        Reviewed by Ryosuke Niwa.

        Data from Membuster is saying that HTMLAnchorElement is relatively frequently allocated
        element (1252 elements are kept) while sizeof(HTMLAnchorElement) is not optimized well.
        We also found that HTMLLinkElement is too large while it has so many paddings and opportunities
        to optimize it. This patch shrinks them.

        We also found that SharedStringHashHash's upper 32bit is always zero, and nobody is using this
        effectively. We make it 32bit.

        No behavior change.

        * html/HTMLAnchorElement.h:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::HTMLLinkElement):
        (WebCore::HTMLLinkElement::process):
        * html/HTMLLinkElement.h:
        * html/LinkIconCollector.h:
        * html/LinkIconType.h:
        * html/LinkRelAttribute.cpp:
        (WebCore::LinkRelAttribute::LinkRelAttribute):
        * html/LinkRelAttribute.h:
        (): Deleted.
        * page/Page.h:
        * page/VisitedLinkStore.h:
        * platform/SharedStringHash.h:
        (WebCore::SharedStringHashHash::avoidDeletedValue): Deleted.

2020-01-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Optimize LineLayoutContext::tryAddingInlineItems for the most common inline content
        https://bugs.webkit.org/show_bug.cgi?id=206372
        <rdar://problem/58657525>

        Reviewed by Simon Fraser.

        ~4% progression on PerformanceTests/Layout/line-layout-simple.html.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::nextWrapOpportunity):
        (WebCore::Layout::LineCandidateContent::appendInlineContent):
        (WebCore::Layout::LineCandidateContent::reset):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
        (WebCore::Layout::LineLayoutContext::commitPartialContent):
        (WebCore::Layout::LineLayoutContext::commitContent): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed removing a stale FIXME comment
        https://bugs.webkit.org/show_bug.cgi?id=204884

        Follows-up for r254323.

        * platform/graphics/win/ComplexTextControllerUniscribe.cpp:
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
        Removed a stale FIXME comment. This comment was added by r23154. r23199
        fixed the issue.

2020-01-16  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (r251110): Crash on https://developer.apple.com/tutorials/swiftui/creating-and-combining-views
        https://bugs.webkit.org/show_bug.cgi?id=206337

        Reviewed by Geoffrey Garen.

        The crash was caused by RadioButtonGroups::hasCheckedButton getting called by RadioInputType's
        matchesIndeterminatePseudoClass during a style update which happens before the input element had a chance
        to register itself with RadioButtonGroups in HTMLInputElement::didFinishInsertingNode.

        This happens, in particular, when didFinishInsertingNode of other nodes that appear before the input element
        executes arbitrary author scripts or otherwise update the style.

        Test: fast/forms/match-pseudo-on-radio-before-finalizing-tree-insertion-crash.html

        * dom/RadioButtonGroups.cpp:
        (WebCore::RadioButtonGroups::hasCheckedButton const):

2020-01-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Optimize LineCandidateContent for the most common type of content
        https://bugs.webkit.org/show_bug.cgi?id=206371
        <rdar://problem/58656853>

        Reviewed by Antti Koivisto.

        Optimize LineCandidateContent and the caller for the most common type of content (text) and also reduce the RunList vector initial size.
        We normally pass one or 2 inline items to the LineBreaker in there.

        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineCandidateContent::appendLineBreak):
        (WebCore::Layout::LineCandidateContent::appendFloat):
        (WebCore::Layout::LineCandidateContent::appendInlineContent):
        (WebCore::Layout::LineLayoutContext::inlineItemWidth const):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
        (WebCore::Layout::LineCandidateContent::append): Deleted.
        (WebCore::Layout::inlineItemWidth): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed, rolling out r254678.

        API tests failures for Mac port

        Reverted changeset:

        "KeyedDecoderGeneric crashes when it accesses data with non-
        existing key"
        https://bugs.webkit.org/show_bug.cgi?id=205902
        https://trac.webkit.org/changeset/254678

2020-01-16  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] User Verification (UV) option present on a CTAP2 authenticatorMakeCredential while the authenticator has not advertised support for it
        https://bugs.webkit.org/show_bug.cgi?id=204111
        <rdar://problem/57019604>

        Reviewed by Brent Fulgham.

        Covered by API tests.

        * Modules/webauthn/fido/DeviceRequestConverter.cpp:
        (fido::encodeMakeCredenitalRequestAsCBOR):
        (fido::encodeGetAssertionRequestAsCBOR):
        Only set UV if RP requires it.

2020-01-16  Brady Eidson  <beidson@apple.com>

        Make the callAsyncJavaScriptFunction function actually be async (so await works).
        <rdar://problem/58571682> and https://bugs.webkit.org/show_bug.cgi?id=206364

        Reviewed by Geoffrey Garen.

        Covered by API tests.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::callInWorld):

2020-01-16  Don Olmstead  <don.olmstead@sony.com>

        Non-unified build fixes mid January 2020 edition
        https://bugs.webkit.org/show_bug.cgi?id=206363

        Unreviewed build fix.

        * Headers.cmake:
        * css/CSSFontVariationValue.cpp:
        * css/CSSValuePool.cpp:
        * css/TransformFunctions.cpp:
        * css/TransformFunctions.h:
        * platform/graphics/ExtendedColor.cpp:
        * rendering/svg/SVGRenderSupport.cpp:
        * style/StyleResolver.cpp:
        * svg/SVGPathByteStreamBuilder.cpp:
        * svg/SVGPathByteStreamSource.cpp:
        * svg/SVGPathSegListBuilder.cpp:
        * svg/SVGPathSegListSource.cpp:
        * svg/SVGPreserveAspectRatioValue.cpp:
        * svg/SVGZoomAndPan.cpp:
        * svg/SVGZoomEvent.cpp:

2020-01-16  Ryosuke Niwa  <rniwa@webkit.org>

        WK1: arbitrary JS execution while tearing down renderers in Element::addShadowRoot
        https://bugs.webkit.org/show_bug.cgi?id=206335

        Reviewed by Antti Koivisto.

        Delay the widget hierarchy updates until we're done attaching a shadow root.
        Otherwise, WK1 would retry to update the focus synchronously.

        * dom/Element.cpp:
        (WebCore::Element::addShadowRoot):

2020-01-16  Chris Lord  <clord@igalia.com>

        REGRESSION (r254291): [ Catalina wk2 Debug ] Flaky ASSERT on fast/images/animated-image-loop-count.html
        https://bugs.webkit.org/show_bug.cgi?id=206068
        <rdar://problem/58480028>

        Reviewed by Chris Dumez.

        No new tests, covered by existing tests.

        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::startAsyncDecodingQueue):

2020-01-16  youenn fablet  <youenn@apple.com>

        Add support for MediaStream video track rendering in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206286

        Reviewed by Eric Carlson.

        Add a way for WebKit layer to create its own specific SampleBufferDisplayLayer.
        WebKit layer can set a function pointer that will be used to create SampleBufferDisplayLayer.
        If none is provided, LocalSampleBufferDisplayLayer is used.

        Update MediaPlayerPrivateMediaStreamAVFObjC to monitor itself its root layer bounds change.
        Conversely, LocalSampleBufferDisplayLayer no longer monitors its root layer bounds change.
        This removes the need for SampleBufferDisplayLayer::Client to be notified of bounds change.
        We add an API to update the root layer bounds of a LocalSampleBufferDisplayLayer as well,
        this API being used by GPUProcess to mirror changes done to WebProcess root layer.

        WebRTC incoming video tracks do not have presentation timestamps so we mark them as kCMSampleAttachmentKey_DisplayImmediately.
        This is currently lost when doing IPC from WebProcess to NetworkProcess. Add this information for every enqueued sample in LocalSampleBufferDisplayLayer.
        We might want in the future to serialize all attachments of the sample.

        Manually tested.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp: Added.
        (WebCore::SampleBufferDisplayLayer::setCreator):
        (WebCore::SampleBufferDisplayLayer::create):
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
        (-[WebAVSampleBufferStatusChangeListener invalidate]):
        (-[WebAVSampleBufferStatusChangeListener start]):
        (-[WebAVSampleBufferStatusChangeListener stop]):
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
        (WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (-[WebRootSampleBufferBoundsChangeListener initWithParent:]):
        (-[WebRootSampleBufferBoundsChangeListener dealloc]):
        (-[WebRootSampleBufferBoundsChangeListener invalidate]):
        (-[WebRootSampleBufferBoundsChangeListener start]):
        (-[WebRootSampleBufferBoundsChangeListener stop]):
        (-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        Unified build fix.

2020-01-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        [Texmap] Remove unused private variable
        https://bugs.webkit.org/show_bug.cgi?id=206230

        Reviewed by David Kilzer.

        Remove m_textureID, an unused private variable.

        No functional changes.

        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

2020-01-16  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer] Several buffering fixes
        https://bugs.webkit.org/show_bug.cgi?id=206234

        Reviewed by Xabier Rodriguez-Calvar.

        No new tests as this is already tested.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::durationChanged): Minor typo fix
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Query buffering on the pipeline not the source
            otherwise GstBaseSrc returns some useless values before `downloadbuffer` actually gives us the
            info about DOWNLOAD buffering status.
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
            - Detect when DOWNLOAD is done by using the `downloadbuffer` `GstCacheDownloadComplete`
              element message which is what is supposed to be used for that purpose.
            - Fix the way we detect that buffering is done (mostly when using a `downloadbuffer`) by relying on a
              buffering query to check if it is still buffering.
        (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus): Ensure that we properly pause the pipeline when
            restarting buffering. There were cases when not using `downloadbuffer` where we didn't pause the pipeline
            leading to pretty bad user experience.
        (WebCore::MediaPlayerPrivateGStreamer::updateStates): Buffering should happen only on **non live** pipelines.

2020-01-16  Philippe Normand  <philn@igalia.com>

        [GStreamer][WPE] Client-side video rendering support
        https://bugs.webkit.org/show_bug.cgi?id=206289

        Reviewed by Xabier Rodriguez-Calvar.

        With the WPE_VIDEO_PLANE_DISPLAY_DMABUF option enabled the player
        will render a transparent placeholder for videos, using the
        HolePunch code path. Then it is up to the UIProcess to listen to
        the incoming video dmabufs and render them. This allows the
        browser to use Wayland protocols related with Protection (HDCP,
        for instance).

        * PlatformWPE.cmake:
        * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
        (WTF::adoptGRef):
        (WTF::refGPtr<GstEGLImage>):
        (WTF::derefGPtr<GstEGLImage>):
        * platform/graphics/gstreamer/GRefPtrGStreamer.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::handoffVideoDmaBuf):
        (WebCore::GstVideoFrameHolder::waitForCPUSync):
        (WebCore::GstVideoFrameHolder::updateTexture):
        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
        (WebCore::GStreamerDMABufHolePunchClient::GStreamerDMABufHolePunchClient):
        (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

2020-01-16  Per Arne Vollan  <pvollan@apple.com>

        [Win] Fix AppleWin build
        https://bugs.webkit.org/show_bug.cgi?id=206299

        Reviewed by Brent Fulgham.

        Include required targets. Build internal builds with VS2019.

        * CMakeLists.txt:
        * WebCore.vcxproj/WebCore.proj:

2020-01-16  Tomoki Imai  <Tomoki.Imai@sony.com>

        Do not detect the stopped animations in Nicosia::Animation to avoid flashback
        https://bugs.webkit.org/show_bug.cgi?id=206280

        Reviewed by Carlos Garcia Campos.

        This fixes the animation flashback issue found in https://webkit.org/blog-files/3d-transforms/morphing-cubes.html.
        The flashback was caused by using the old layer transform matrix saved when the animation has been started.

        The root cause is an inconsistency of animation state in Nicosia::Animation and CoordinatedGraphicsLayer.
        For Nicosia::Animation, ThreadedCompositor increases MonitonicTime for animation every frame, and calls Nicosia::Animation::apply.
        For CoordinatedGraphicsLayer, CSSAnimationController updates animations list and if the animation has been finished it updates CSS value.
        There is a chance to use old layer state while the Nicosia::Animation stopped, but CoordinatedGraphicsLayer still obtains old CSS value and animations.

        In this patch, all the Nicosia::Animation is considered to have "AnimationFillMode::Forwards" or "AnimationFillMode::Both",
        which means they are active and use the last position when the animation is stopped.
        Stopping and removing animations should be only done by CSSAnimationController and CoordinatedGraphicsScene
        as they can remove the animation from the list and update the CSS value at the same time.

        Mac implementation GraphicsLayerCA has a similar logic, it replaces AnimationFillMode with Forwards or Both.
        https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=254502#L3248

        Tested manually with https://webkit.org/blog-files/3d-transforms/morphing-cubes.html

        * platform/graphics/nicosia/NicosiaAnimation.cpp:
        (Nicosia::Animation::apply): Return the last value for stopped animations to avoid flickering
        (Nicosia::Animation::isActive const): Removed. It should always return true because
        all the animations are considered as fillsForwards in Nicosia::Animation to avoid flashback.
        (Nicosia::Animations::hasActiveAnimationsOfType const): Remove isActive check.
        (Nicosia::Animations::getActiveAnimations() const): Removed. It returns whole animations list because all the animations are active.
        * platform/graphics/nicosia/NicosiaAnimation.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

2020-01-16  Antti Koivisto  <antti@apple.com>

        [LFC][IFC] TextUtil::width should use StringView for substrings
        https://bugs.webkit.org/show_bug.cgi?id=206346

        Reviewed by Zalan Bujtas.

        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):

2020-01-16  Takashi Komori  <Takashi.Komori@sony.com>

        KeyedDecoderGeneric crashes when it accesses data with non-existing key
        https://bugs.webkit.org/show_bug.cgi?id=205902

        Reviewed by Fujii Hironori.

        Add null check function for KeyedDecoderGeneric.

        Test: TestWebKitAPI/Tests/WebCore/KeyedCodingGeneric.cpp

        * platform/generic/KeyedDecoderGeneric.cpp:
        (WebCore::KeyedDecoderGeneric::Dictionary::get):
        (WebCore::KeyedDecoderGeneric::getPointerFromDictionaryStack):
        (WebCore::KeyedDecoderGeneric::decodeSimpleValue):
        (WebCore::KeyedDecoderGeneric::decodeBytes):
        (WebCore::KeyedDecoderGeneric::decodeBool):
        (WebCore::KeyedDecoderGeneric::decodeUInt32):
        (WebCore::KeyedDecoderGeneric::decodeUInt64):
        (WebCore::KeyedDecoderGeneric::decodeInt32):
        (WebCore::KeyedDecoderGeneric::decodeInt64):
        (WebCore::KeyedDecoderGeneric::decodeFloat):
        (WebCore::KeyedDecoderGeneric::decodeDouble):
        (WebCore::KeyedDecoderGeneric::decodeString):
        (WebCore::KeyedDecoderGeneric::beginObject):
        (WebCore::KeyedDecoderGeneric::beginArray):
        * platform/generic/KeyedDecoderGeneric.h:

2020-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Password field doesn't get input method
        https://bugs.webkit.org/show_bug.cgi?id=34285

        Reviewed by Žan Doberšek.

        Allow input methods in password fields for GTK and WPE ports, since the input methods are notified that the
        active editable element is a password field.

        * html/PasswordInputType.cpp:
        (WebCore::PasswordInputType::shouldUseInputMethod const):

2020-01-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for curl.
        https://bugs.webkit.org/show_bug.cgi?id=206261

        ResourceHandleCurl.cpp(157): error C2664: cannot convert argument 6 from 'WTF::RefPtr<WebCore::SynchronousLoaderMessageQueue,WTF::DumbPtrTraits<T>>' to 'WTF::RefPtr<WebCore::SynchronousLoaderMessageQueue,WTF::DumbPtrTraits<T>> &&'

        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::createCurlRequest):

2020-01-16  Rob Buis  <rbuis@igalia.com>

        Fetch: URL parser not always using UTF-8
        https://bugs.webkit.org/show_bug.cgi?id=178008

        Reviewed by Youenn Fablet.

        Make sure fetch requests run the URL parser with a UTF-8 decoder.

        Test: web-platform-tests/fetch/api/request/url-encoding.html

        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::initializeWith):
        * dom/Document.cpp:
        (WebCore::Document::completeURL const):
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::completeURL const):
        * workers/WorkerGlobalScope.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::completeURL const):
        * worklets/WorkletGlobalScope.h:

2020-01-16  Alicia Boya García  <aboya@igalia.com>

        [MSE] Don't enqueue samples that start at a big discontinuity
        https://bugs.webkit.org/show_bug.cgi?id=201323

        With the old logic SourceBuffer was enqueueing the first frame to be
        appended in any circumstances. This was a bug because the user could
        append first [5, 10) and then [0, 5). With the old behavior [5, 10)
        would be enqueued first despite being clearly ahead of the initial
        playback time (zero). By the time [0, 5) is enqueued it can't be
        enqueued anymore because the decodeQueue is already ahead.

        This patch fixes that logic to work when the first segments are
        appended unordered. The test media-source-first-append-not-starting-at-zero.html
        validates it.

        The test media-source-append-presentation-durations.html checks the
        new logic does not break in presence of presentation duration !=
        decode duration.

        As part of the same logic block, the lastEnqueuedPresentationTime was
        used to decide when it's necessary to perform reenqueue after an
        .erase() (it is necessary if any enqueued frames are replaced). Using
        lastEnqueuedPresentationTime was not entirely accurate in presence of
        B-frames, as you could erase a frame that has a presentation time
        higher than the last enqueued one. That logic is replaced with a
        monotonicly increasing highestEnqueuedPresentationTime and is tested
        by media-source-remove-b-frame.html.

        Reviewed by Xabier Rodriguez-Calvar.

        Tests: media/media-source/media-source-append-presentation-durations.html
               media/media-source/media-source-first-append-not-starting-at-zero.html
               media/media-source/media-source-remove-b-frame.html

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
        (WebCore::SourceBuffer::removeCodedFrames):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
        (WebCore::SourceBuffer::provideMediaData):
        (WebCore::SourceBuffer::reenqueueMediaForTime):
        (WebCore::SourceBuffer::TrackBuffer::lastEnqueuedDecodeDuration): Deleted.

2020-01-16  Cathie Chen  <cathiechen@igalia.com>

        Mapping HTML attributes width/height to the default aspect ratio of <img>
        https://bugs.webkit.org/show_bug.cgi?id=201641

        Reviewed by Frédéric Wang

        According to [1], if HTML width and height attributes have valid values, not a percentage, and non-zero,
        the value width/height is the default intrinsic aspect ratio for an <img> element. This will help to calculate
        img element's layout size before loading. The value will be overridden if img is loaded. Also see [2].
        This is currently limited in <img> element. Other elements like <canvas>, <video> and <input type=image>,
        currently their aspect-ratio won't be affected.[3] While <picture> is still under discuss.[4]

        [1]: https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
        [2]: https://github.com/WICG/intrinsicsize-attribute/issues/16
        [3]: https://github.com/whatwg/html/issues/4961
        [4]: https://github.com/whatwg/html/issues/4968

        Tests: imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html
               imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html
               imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html
               imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/content-aspect-ratio.html

        * page/Settings.yaml:
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::computeIntrinsicRatioInformation const):

2020-01-15  Don Olmstead  <don.olmstead@sony.com>

        [LFC] Fix CMake Build
        https://bugs.webkit.org/show_bug.cgi?id=206334

        Reviewed by Zalan Bujtas.

        No new tests. No change in behavior.

        Adds in the required CMake values to get LFC to compile. Fixes all issues with
        the non-unified build in the layout directory.

        * CMakeLists.txt:
        * Headers.cmake:
        * layout/FormattingContextGeometry.cpp:
        * layout/FormattingContextQuirks.cpp:
        * layout/FormattingState.cpp:
        * layout/LayoutContext.h:
        * layout/LayoutPhase.cpp:
        * layout/LayoutPhase.h:
        * layout/LayoutState.cpp:
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineTextItem.cpp:
        * layout/inlineformatting/LineLayoutContext.cpp:
        * layout/inlineformatting/text/TextUtil.cpp:
        * layout/inlineformatting/text/TextUtil.h:
        * layout/layouttree/LayoutBox.cpp:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        * layout/layouttree/LayoutTreeBuilder.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        * layout/tableformatting/TableFormattingContextGeometry.cpp:

2020-01-15  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Nullptr crash in DocumentLoader::clearMainResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=206204

        Reviewed by Ryosuke Niwa.

        Test: loader/change-src-during-iframe-load-crash.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::frameLoader const):
        (WebCore::DocumentLoader::clearMainResourceLoader):

2020-01-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBreaker::shouldWrapInlineContent should take the candidate content width
        https://bugs.webkit.org/show_bug.cgi?id=206305
        <rdar://problem/58613977>

        Reviewed by Antti Koivisto.

        We already have the width information of the candidate runs. Let's not loop through the runs just to re-collect the logical width.
        ~3% progression on PerformanceTests/Layout/line-layout-simple.html.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
        (WebCore::Layout::ContinuousContent::ContinuousContent):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineCandidateContent::inlineContentLogicalWidth const):
        (WebCore::Layout::LineCandidateContent::append):
        (WebCore::Layout::LineCandidateContent::reset):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):

2020-01-15  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254565.
        https://bugs.webkit.org/show_bug.cgi?id=206331

        It caused many timeouts for the layout tests of the GTK port
        (Requested by clopez on #webkit).

        Reverted changeset:

        "[GStreamer] Several buffering fixes"
        https://bugs.webkit.org/show_bug.cgi?id=206234
        https://trac.webkit.org/changeset/254565

2020-01-15  Alex Christensen  <achristensen@webkit.org>

        Keep RefPtr instead of raw pointer to message queue on WebCoreResourceHandleAsOperationQueueDelegate
        https://bugs.webkit.org/show_bug.cgi?id=206261
        <rdar://problem/57562592>

        Reviewed by David Kilzer.

        There's no reason to keep a raw pointer when we can keep a smart pointer.
        This will make this more robust against someone forgetting to clear this pointer value.

        * platform/network/ResourceHandle.h:
        * platform/network/SynchronousLoaderClient.cpp:
        (WebCore::SynchronousLoaderClient::SynchronousLoaderClient):
        (WebCore::SynchronousLoaderClient::didFinishLoading):
        (WebCore::SynchronousLoaderClient::didFail):
        * platform/network/SynchronousLoaderClient.h:
        (WebCore::SynchronousLoaderMessageQueue::create):
        (WebCore::SynchronousLoaderMessageQueue::append):
        (WebCore::SynchronousLoaderMessageQueue::kill):
        (WebCore::SynchronousLoaderMessageQueue::killed const):
        (WebCore::SynchronousLoaderMessageQueue::waitForMessage):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::makeDelegate):
        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
        (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
        (-[WebCoreResourceHandleAsOperationQueueDelegate initWithHandle:messageQueue:]):
        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):

2020-01-15  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2]: Implement support for the 'pathLength' attribute
        https://bugs.webkit.org/show_bug.cgi?id=72401

        Reviewed by Simon Fraser.

        The spec link is:
            https://svgwg.org/svg2-draft/paths.html#PathLengthAttribute

        The 'pathLength' attribute affects the calculations for text on a path,
        stroke dash offset and stroke dash array. 'pathLength' has no effect on
        percentage lengths.

        Tests: svg/custom/stroke-dash-array-pathLength.svg

        * rendering/svg/RenderSVGTextPath.cpp:
        (WebCore::RenderSVGTextPath::targetElement const):
        A helper function which returns the target element. Notice target element 
        can't be used in this context unless it is a SVGGeometryElement. See
        pathFromGraphicsElement().

        (WebCore::RenderSVGTextPath::layoutPath const):
        Use the new function targetElement().

        (WebCore::RenderSVGTextPath::startOffset const):
        In SVGTextLayoutEngine::beginTextPathLayout(), we used to check whether
        startOffset is in the range [0, 1] to treat it as a percentage or not.
        This is of course wrong especially when using with 'pathLength'. So we
        need to return the SVGLengthValue to make the decision correctly.

        * rendering/svg/RenderSVGTextPath.h:

        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
        Apply 'pathLength' to the shape 'stroke-dashoffset' and 'stroke-dasharray'
        properties.

        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::writeStyle):
        Add the 'pathLength' property to the shape stroke property.

        * rendering/svg/SVGTextLayoutEngine.cpp:
        (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
        Apply 'pathLength' to the text path 'start-offset' property.

2020-01-15  Chris Dumez  <cdumez@apple.com>

        Regression(r253213) Load hang and high CPU usage when trying to load myuhc.com
        https://bugs.webkit.org/show_bug.cgi?id=206315
        <rdar://problem/58139842>

        Reviewed by Geoffrey Garen.

        Starting in r253213, we now throw when trying to do a sync XHR during unload. Unfortunately, this is confusing the script
        on myuhc.com and it ends up retrying the sync XHR in a tight loop. To address the issue, I am putting in a safety net which
        ignores calls to XMLHttpRequest.send() instead of throwing, once we've reached 5 sync XHR failures during unload.

        Throwing is useful because this gives a change for Web authors to fall back to using Beacon API or Fetch KeepAlive if the
        sync XHR fails. There is already code out there doing just that. You could imagine content doing more than one sync XHR
        during unload, each one with a good beacon API fallback. For this reason, I put in a limit of 5 sync failures before
        we stop throwing. Having a limit is important to break bad loops when the content simply retries the same sync XHR load
        when the sync XHR send() call throws.

        Tests: fast/xmlhttprequest/xmlhttprequest-multiple-sync-xhr-during-unload.html
               fast/xmlhttprequest/xmlhttprequest-sync-xhr-failure-loop-during-unload.html

        * dom/Document.cpp:
        (WebCore::Document::didRejectSyncXHRDuringPageDismissal):
        (WebCore::Document::shouldIgnoreSyncXHRs const):
        * dom/Document.h:
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::prepareToSend):

2020-01-15  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed build fix for ENABLE_ACCESSIBILITY=OFF following r254566.

        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::wrapper const):
        (WebCore::AXCoreObject::setWrapper):
        Remove invalid override specifiers.

2020-01-15  Simon Fraser  <simon.fraser@apple.com>

        Unreviewed cleanup.

        TextStream is used outside #if ENABLE(KINETIC_SCROLLING) lower down, so remove
        these guards.

        * platform/PlatformWheelEvent.h:

2020-01-15  Antti Koivisto  <antti@apple.com>

        [LFC] Cache display box for the first LayoutState to Layout::Box
        https://bugs.webkit.org/show_bug.cgi?id=206288

        Reviewed by Zalan Bujtas.

        Add a single item cache for the common case to avoid using the hash.

        * layout/FormattingState.cpp:
        (WebCore::Layout::FormattingState::displayBox):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::displayBoxForRootLayoutBox):
        (WebCore::Layout::LayoutState::ensureDisplayBoxForLayoutBoxSlow):
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox): Deleted.
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox const): Deleted.
        * layout/LayoutState.h:
        (WebCore::Layout::Box::cachedDisplayBoxForLayoutState const):
        (WebCore::Layout::LayoutState::hasDisplayBox const):
        (WebCore::Layout::LayoutState::ensureDisplayBoxForLayoutBox):
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::setCachedDisplayBoxForLayoutState const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::hasCachedDisplayBox const):
        * layout/layouttree/LayoutTreeBuilder.h:

2020-01-15  Simon Fraser  <simon.fraser@apple.com>

        Add more mousewheel-scrolling logging and improve the latching code
        https://bugs.webkit.org/show_bug.cgi?id=206298

        Reviewed by Tim Horton.

        Make PlatformWheelEvent TextStream-loggable, and add more Scrolling logging in some places
        related to mouseWheel scrolling and latching.

        Make the ownership of Elements and Nodes given to ScrollLatchingState more explicit by passing in
        RefPtr<>&&.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/EventHandler.cpp:
        (WebCore::handleWheelEventInAppropriateEnclosingBox):
        (WebCore::EventHandler::defaultWheelEventHandler):
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents):
        (WebCore::EventHandler::platformCompleteWheelEvent):
        * page/scrolling/ScrollLatchingState.cpp:
        (WebCore::ScrollLatchingState::setWheelEventElement):
        (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement):
        (WebCore::ScrollLatchingState::setScrollableContainer):
        * page/scrolling/ScrollLatchingState.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
        * platform/PlatformWheelEvent.cpp: Copied from Source/WebCore/page/scrolling/ScrollLatchingState.cpp.
        (WebCore::operator<<):
        * platform/PlatformWheelEvent.h:

2020-01-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineLayoutContext::nextContentForLine should take LineCandidateContent&
        https://bugs.webkit.org/show_bug.cgi?id=206300
        <rdar://problem/58612197>

        Reviewed by Antti Koivisto.

        ~5% progression on PerformanceTests/Layout/line-layout-simple.html.
        LineLayoutContext::nextContentForLine is hot and LineCandidateContent has Vector members (too heavy).

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineCandidateContent::reset):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        * layout/inlineformatting/LineLayoutContext.h:

2020-01-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] ContinuousContent should not need a copy of RunList
        https://bugs.webkit.org/show_bug.cgi?id=206293
        <rdar://problem/58607446>

        Reviewed by Antti Koivisto.

        ~4% progression on PerformanceTests/Layout/line-layout-simple.html.

        * layout/inlineformatting/InlineLineBreaker.cpp:

2020-01-15  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254576.
        https://bugs.webkit.org/show_bug.cgi?id=206306

        Introduced failing test loader/change-src-during-iframe-load-
        crash.html (Requested by aakashja_ on #webkit).

        Reverted changeset:

        "Null Ptr Deref @
        WebCore::DocumentLoader::clearMainResourceLoader"
        https://bugs.webkit.org/show_bug.cgi?id=206204
        https://trac.webkit.org/changeset/254576

2020-01-15  Pinki Gyanchandani  <pgyanchandani@apple.com>

        Null Ptr Deref @ WebCore::DocumentLoader::clearMainResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=206204

        Reviewed by Alex Christensen.

        Test: loader/change-src-during-iframe-load-crash.html

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::frameLoader const):
        (WebCore::DocumentLoader::clearMainResourceLoader):

2020-01-15  Jer Noble  <jer.noble@apple.com>

        Revert fullscreen CSS quirk for reddit.com; add width and height style to fullscreen.css.
        https://bugs.webkit.org/show_bug.cgi?id=206206

        Reviewed by Eric Carlson.

        Test: fullscreen/fullscreen-user-agent-style.html

        Add the "width:100%;height:100%;" from the modern Fullscreen API spec to our own
        fullscreen stylesheet, and revert the quirk for reddit.com.

        * css/fullscreen.css:
        (:-webkit-full-screen):
        * page/Quirks.cpp:
        (WebCore::Quirks::needsFullWidthHeightFullscreenStyleQuirk const): Deleted.
        * page/Quirks.h:
        * style/UserAgentStyle.cpp:
        (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):

2020-01-15  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Call SimpleLineLayout::canUseFor only once
        https://bugs.webkit.org/show_bug.cgi?id=206281

        Reviewed by Sam Weinig.

        It can be somewhat costly.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::canUseFor):
        * layout/integration/LayoutIntegrationLineLayout.h:
        (WebCore::LayoutIntegration::LineLayout::canUseFor):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutInlineChildren):

2020-01-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [GTK] Turn off antialiasing when rendering with Ahem
        https://bugs.webkit.org/show_bug.cgi?id=204671

        Reviewed by Carlos Garcia Campos.

        Many CSS related tests use the "Ahem" font to compare its special
        squared glyphs with the positioned elements of the test. But if
        we enable antialiasing for this font, then the antialiasing of
        the glyphs causes small pixel differences with the reference test.

        So, this patch disables antialiasing for the Ahem font in GTK and WPE
        ports. This commit its pretty much like r252701 for the Mac/iOS ports.

        Covered by existing tests.

        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::drawGlyphs):
        * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData):
        * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
        (WebCore::Font::platformInit):

2020-01-15  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of AXIsolatedObject::press().
        https://bugs.webkit.org/show_bug.cgi?id=206177

        Reviewed by Chris Fleizach.

        - Implemented AXIsolatedObject::press().
        - For link objects, press causes the destruction and re-creation of the
        isolated tree. Thus also added AXIsolatedTree:removeTreeForPageID.
        - AXIsolatedTree::applyPendingChanges now also properly detaches isolated
        objects that have been removed.
        - Moved set and get wrapper to AXCoreObject so that it can be used for
        both isolated and live objects.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::~AXObjectCache):
        (WebCore::AXObjectCache::remove):
        (WebCore::AXObjectCache::createIsolatedTreeHierarchy):
        * accessibility/AXObjectCache.h:
        (WebCore::AXObjectCache::detachWrapper):
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::wrapper const):
        (WebCore::AXCoreObject::setWrapper):
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::AXObjectCache::detachWrapper):
        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::detachWrapper):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::removeTreeForPageID):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::detach):
        (WebCore::AXIsolatedObject::detachFromParent):
        (WebCore::AXIsolatedObject::children):
        (WebCore::AXIsolatedObject::isDetachedFromParent):
        (WebCore::AXIsolatedObject::performFunctionOnMainThread):
        (WebCore::AXIsolatedObject::findTextRanges const):
        (WebCore::AXIsolatedObject::performTextOperation):
        (WebCore::AXIsolatedObject::press):
        (WebCore::AXIsolatedObject::widget const):
        (WebCore::AXIsolatedObject::page const):
        (WebCore::AXIsolatedObject::document const):
        (WebCore::AXIsolatedObject::documentFrameView const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::detachWrapper):
        * accessibility/win/AXObjectCacheWin.cpp:
        (WebCore::AXObjectCache::detachWrapper):

2020-01-15  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer] Several buffering fixes
        https://bugs.webkit.org/show_bug.cgi?id=206234

        Reviewed by Xabier Rodriguez-Calvar.

        No new tests as this is already tested.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::durationChanged): Minor typo fix
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Query buffering on the pipeline not the source
            otherwise GstBaseSrc returns some useless values before `downloadbuffer` actually gives us the
            info about DOWNLOAD buffering status. Also ignores response if they are not in DOWNLOAD mode as those
            will end up screwing our buffering management algorithm.
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
            - Detect when DOWNLOAD is done by using the `downloadbuffer` `GstCacheDownloadComplete`
              element message which is what is supposed to be used for that purpose.
            - Fix the way we detect that buffering is done (mostly when using a `downloadbuffer`) by relying on a
              buffering query to check if it is still buffering.
        (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus): Ensure that we properly pause the pipeline when
            restarting buffering. There were cases when not using `downloadbuffer` where we didn't pause the pipeline
            leading to pretty bad user experience.
        (WebCore::MediaPlayerPrivateGStreamer::updateStates): Buffering should happen only on **non live** pipelines.

2020-01-15  youenn fablet  <youenn@apple.com>

        Introduce an abstract SampleBufferDisplayLayer
        https://bugs.webkit.org/show_bug.cgi?id=206066

        Reviewed by Eric Carlson.

        Move use of display layers in MediaPlayerPrivateMediaStreamAVFObjC to a new class LocalSampleBufferDisplayLayer
        that implements an interface named SampleBufferDisplayLayer.
        A future patch will implement this interface by IPCing to GPUProcess.
        We move both layers and handling of the sample queue to LocalSampleBufferDisplayLayer.

        Contrary to previously, we do not call again enqueueVideoSample in case we enqueued a sample for later use in the display layer.
        Instead, we directly render it, which should not change much since this is a realtime track and in the future the buffer will be in GPUProcess anyway.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/SampleBufferDisplayLayer.h: Added.
        (WebCore::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: Added.
        * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: Added.
        (-[WebAVSampleBufferStatusChangeListener initWithParent:]):
        (-[WebAVSampleBufferStatusChangeListener dealloc]):
        (-[WebAVSampleBufferStatusChangeListener invalidate]):
        (-[WebAVSampleBufferStatusChangeListener beginObservingLayers]):
        (-[WebAVSampleBufferStatusChangeListener stopObservingLayers]):
        (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
        (WebCore::runWithoutAnimations):
        (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::layerStatusDidChange):
        (WebCore::LocalSampleBufferDisplayLayer::layerErrorDidChange):
        (WebCore::LocalSampleBufferDisplayLayer::rootLayerBoundsDidChange):
        (WebCore::LocalSampleBufferDisplayLayer::displayLayer):
        (WebCore::LocalSampleBufferDisplayLayer::rootLayer):
        (WebCore::LocalSampleBufferDisplayLayer::didFail const):
        (WebCore::LocalSampleBufferDisplayLayer::updateDisplayMode):
        (WebCore::LocalSampleBufferDisplayLayer::bounds const):
        (WebCore::LocalSampleBufferDisplayLayer::updateAffineTransform):
        (WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition):
        (WebCore::LocalSampleBufferDisplayLayer::ensureLayers):
        (WebCore::LocalSampleBufferDisplayLayer::flush):
        (WebCore::LocalSampleBufferDisplayLayer::flushAndRemoveImage):
        (WebCore::LocalSampleBufferDisplayLayer::enqueueSample):
        (WebCore::LocalSampleBufferDisplayLayer::removeOldSamplesFromPendingQueue):
        (WebCore::LocalSampleBufferDisplayLayer::addSampleToPendingQueue):
        (WebCore::LocalSampleBufferDisplayLayer::clearEnqueuedSamples):
        (WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerStatusDidChange):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::displayLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerBoundsDidChange):

2020-01-15  youenn fablet  <youenn@apple.com>

        Add support for MediaStream audio track rendering in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206175

        Reviewed by Eric Carlson.

        Simplify model to use start/stop instead of setPaused.
        Simplify and fix issue in computation of the muted state of the renderer.
        Covered by existing tests run with GPU process enabled and manual testing

        * platform/mediastream/AudioMediaStreamTrackRenderer.h:
        * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
        (WebCore::AudioTrackPrivateMediaStream::playInternal):
        (WebCore::AudioTrackPrivateMediaStream::pause):
        (WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
        (WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):
        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
        (WebCore::AudioMediaStreamTrackRendererCocoa::start):
        (WebCore::AudioMediaStreamTrackRendererCocoa::stop):
        (WebCore::AudioMediaStreamTrackRendererCocoa::clear):
        (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
        (WebCore::AudioMediaStreamTrackRendererCocoa::render):
        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h:

2020-01-15  Oriol Brufau  <obrufau@igalia.com>

        [css-grid] Exclude implicit grid tracks from the resolved value
        https://bugs.webkit.org/show_bug.cgi?id=204588

        Reviewed by Manuel Rego Casasnovas.

        https://github.com/w3c/csswg-drafts/issues/4475 resolved to try to stop
        including implicit tracks in the resolved value of grid-template-columns
        and grid-template-rows.

        This implies that the resolved values will have less information now,
        which affects lots of tests. I have edited them depending on the case:
         - When the size of the track was irrelevant (e.g. just checking whether
           some value was syntactically valid), I have just updated the expected
           value.
         - When the size of the track was relevant, but it wasn't important for
           the tracks to be implicit, I have made them explicit in order to get
           the same value.
         - When the test was about the sizes of implicit tracks, I have added
           new checks for the size and position of the grid items.

        Tests: fast/css-grid-layout/grid-auto-columns-rows-get-set.html
               fast/css-grid-layout/grid-columns-rows-get-set.html
               fast/css-grid-layout/grid-template-shorthand-get-set.html
               fast/css-grid-layout/mark-as-infinitely-growable.html
               fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
               fast/css-grid-layout/negative-growth-share-as-infinity-crash.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-repeat-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-flexible-lengths-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-grid-template-columns-rows-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-named-grid-lines-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001.html
               imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-021.html
               imported/w3c/web-platform-tests/css/css-grid/grid-layout-properties.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForGridTrackList):
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::trackSizesForComputedStyle const):

2020-01-14  Zalan Bujtas  <zalan@apple.com>

        Long continuation chain could lead to stack exhaustion
        https://bugs.webkit.org/show_bug.cgi?id=206271
        <rdar://problem/41189798>

        Reviewed by Simon Fraser.

        This patch replaces the recursive approach with an iterative one
        to collect absolute quads across continuation.

        Test: fast/inline/long-continuation-crash.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::absoluteQuads const):
        (WebCore::RenderBlock::absoluteQuadsIgnoringContinuation const):
        * rendering/RenderBlock.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::collectAbsoluteQuadsForContinuation const):
        * rendering/RenderBoxModelObject.h:
        (WebCore::RenderBoxModelObject::absoluteQuadsIgnoringContinuation const):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::absoluteQuads const):
        (WebCore::RenderInline::absoluteQuadsIgnoringContinuation const):
        * rendering/RenderInline.h:

2020-01-14  Ryosuke Niwa  <rniwa@webkit.org>

        Enable the offset assertion in HTMLTextFormControlElement::indexForPosition
        https://bugs.webkit.org/show_bug.cgi?id=205706

        Reviewed by Darin Adler.

        This patch fixes the erroneously disabled debug assertion in HTMLTextFormControlElement::indexForPosition.

        It also fixes the bug that it was asserting even when VisiblePosition was null, and computed a wrong offset
        when the entire input element is not visible (e.g. becaue height is 0px).

        TextIterator::rangeLength and TextIterator::rangeFromLocationAndLength now takes an OptionSet of
        newly added enum class TextIteratorLengthOption instead of a boolean indicating whether a space should be
        generated for a replaced element. Most code changes are due to this refactoring.

        No new tests since existing tests exercise this code.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::rangeMatchesTextNearRange):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::indexForVisiblePosition const):
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (getSelectionOffsetsForObject):
        * accessibility/atk/WebKitAccessibleUtil.cpp:
        (objectFocusedAndCaretOffsetUnignored):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs):
        * editing/Editing.cpp:
        (WebCore::indexForVisiblePosition):
        (WebCore::visiblePositionForIndex):
        * editing/Editing.h:
        (WebCore::indexForVisiblePosition):
        * editing/TextIterator.cpp:
        (WebCore::behaviorFromLegnthOptions): Added.
        (WebCore::TextIterator::rangeLength):
        (WebCore::TextIterator::rangeFromLocationAndLength):
        * editing/TextIterator.h:
        (WebCore::TextIterator::rangeLength):
        (WebCore::TextIterator::rangeFromLocationAndLength):
        * editing/TextIteratorBehavior.h:
        * editing/ios/DictationCommandIOS.cpp:
        (WebCore::DictationCommandIOS::doApply):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::indexForPosition const): Enabled the assertion when VisiblePosition
        is not null, and fixed the bug that the offset computed from VisiblePosition were always 0 when the input
        element is not visible (e.g. has 0px size or has visibility: hidden).
        * page/EventHandler.cpp:
        (WebCore::textDistance):

2020-01-14  Chris Dumez  <cdumez@apple.com>

        document.cookie should not do a sync IPC to the network process for iframes that do not have storage access
        https://bugs.webkit.org/show_bug.cgi?id=206108

        Reviewed by Geoff Garen and John Wilander.

        When ITP is enabled and ThirdPartyCookieBlockingMode::All mode is used (default in Safari), we can now detect
        that a third-party iframe does not have cookie access completely on the WebContent process side, instead of
        doing the check on the Network process side. The benefit is that this avoids doing a synchronous IPC every
        time a third-party iframe which does not have storage access tries to access document.cookie in JavaScript.
        Given that this should apply to a lot of iframes, this change is very beneficial to performance.

        No new tests, covered by existing tests that are still passing.

        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookies const):
        (WebCore::CookieJar::setCookies):
        (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
        (WebCore::CookieJar::getRawCookies const):
        * platform/network/CacheValidation.cpp:
        (WebCore::cookieRequestHeaderFieldValue):
        * platform/network/NetworkStorageSession.h:
        * platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        (WebCore::NetworkStorageSession::getRawCookies const):
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::cookiesForURL):
        (WebCore::cookiesForSession):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::getRawCookies const):
        * platform/network/curl/NetworkStorageSessionCurl.cpp:
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::getRawCookies const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::getRawCookies const):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):

2020-01-14  Peng Liu  <peng.liu6@apple.com>

        [Media in GPU process] Implement the remote video layer support
        https://bugs.webkit.org/show_bug.cgi?id=206043

        Reviewed by Youenn Fablet.

        No new tests, covered by existing tests.

        This patch adds function LayerHostingContext::createPlatformLayerForHostingContext() which is
        a wrapper of [CALayer _web_renderLayerWithContextID:] to create WebVideoHostingLayer in the Web process.

        It also moves LayerHostingContext.[h|mm] to from folder "mac" to "cocoa" because LayerHostingContext
        is not only used on the Mac version.
        Some issues related to unified build are also fixed.

        * platform/graphics/ColorSpace.h:
        * platform/graphics/LayoutRect.h:
        (WebCore::LayoutRect::encode const):
        (WebCore::LayoutRect::decode):
        * platform/graphics/cocoa/WebCoreCALayerExtras.mm:
        (+[CALayer _web_renderLayerWithContextID:]):
        * platform/graphics/cv/ImageTransferSessionVT.mm:

2020-01-14  Dean Jackson  <dino@apple.com>

        Build ANGLE as a dynamic library
        https://bugs.webkit.org/show_bug.cgi?id=204708
        rdar://57349384

        Rolling this out for the 2nd time.

        * Configurations/WebCore.xcconfig:
        * Configurations/WebCoreTestSupport.xcconfig:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/ANGLEWebKitBridge.cpp:
        (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
        (WebCore::ANGLEWebKitBridge::compileShaderSource):
        (WebCore::ANGLEWebKitBridge::angleAvailable): Deleted.
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

2020-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Supported mime types for encoding should be supported mime types for loading
        https://bugs.webkit.org/show_bug.cgi?id=206239

        Reviewed by Simon Fraser.

        Consult isSupportedImageType() for the system supported UTI before
        considering its mime type is allowed for the image DataURL encoding.

        Test: fast/canvas/toDataURL-unsupportedTypes.html

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData):

2020-01-14  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254533 and r254535.
        https://bugs.webkit.org/show_bug.cgi?id=206263

        Breaks iOS and macOS builds (Requested by ryanhaddad on
        #webkit).

        Reverted changesets:

        "[WebAuthn] Implement SPI to tell UI clients to select
        assertion responses"
        https://bugs.webkit.org/show_bug.cgi?id=206112
        https://trac.webkit.org/changeset/254533

        "Unreviewed, a build fix after r254533"
        https://trac.webkit.org/changeset/254535

2020-01-14  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Glyph lookup should be language-sensitive (specifically between Yiddish and Hebrew)
        https://bugs.webkit.org/show_bug.cgi?id=77568
        <rdar://problem/14649193>

        Reviewed by Simon Fraser.

        Switch from CTFontTransformGlyphs() to CTFontTransformGlyphsWithLanguage().

        CTFontTransformGlyphsWithLanguage() accepts a callback when it needs to insert
        glyphs and the glyph buffer isn't big enough. This patch hooks up this callback to
        a "makeHole()" function which reallocs the glyph buffer so the hole can be filled in
        by shaping.

        We cache the CFDictionaries of the CFAttributedString we pass into CoreText using a
        HashMap stored in Font.

        Tests: fast/text/locale-shaping-complex.html
               fast/text/locale-shaping.html

        * platform/graphics/Font.cpp:
        (WebCore::Font::applyTransforms const):
        * platform/graphics/Font.h:
        (WebCore::Font::CFStringAttributesKey::CFStringAttributesKey):
        (WebCore::Font::CFStringAttributesKey::operator== const):
        (WebCore::Font::CFStringAttributesKey::operator!= const):
        (WebCore::Font::CFStringAttributesKey::isHashTableDeletedValue const):
        (WebCore::Font::CFStringAttributesKey::computeHash const):
        (WebCore::Font::CFStringAttributesKeyHash::hash):
        (WebCore::Font::CFStringAttributesKeyHash::equal):
        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::widthForSimpleText const):
        * platform/graphics/GlyphBuffer.h:
        (WebCore::GlyphBuffer::isEmpty const):
        (WebCore::GlyphBuffer::size const):
        (WebCore::GlyphBuffer::clear):
        (WebCore::GlyphBuffer::advances const):
        (WebCore::GlyphBuffer::fontAt const):
        (WebCore::GlyphBuffer::add):
        (WebCore::GlyphBuffer::remove):
        (WebCore::GlyphBuffer::makeHole):
        (WebCore::GlyphBuffer::shrink):
        (WebCore::GlyphBuffer::swap):
        (WebCore::GlyphBuffer::advancesCount const): Deleted.
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::applyFontTransforms):
        * platform/graphics/WidthIterator.h:
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::Font::applyTransforms const):
        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
        (WebCore::Font::getCFStringAttributes const):

2020-01-14  Ross Kirsling  <ross.kirsling@sony.com>

        [PlayStation] Add standardUserAgentForURL stub
        https://bugs.webkit.org/show_bug.cgi?id=206247

        Reviewed by Don Olmstead.

        * platform/playstation/UserAgentPlayStation.cpp:
        (WebCore::standardUserAgentForURL):

2020-01-14  Kenneth Russell  <kbr@chromium.org>

        Need workaround for crash in Intel OpenGL driver related to texture copying feedback loops
        https://bugs.webkit.org/show_bug.cgi?id=205843

        Work around bug in Intel OpenGL driver related to
        glCopyTex{Sub}Image/glDeleteTextures by flushing before texture
        deletion, if a copy to a texture has been performed recently.

        Tested with a forthcoming WebGL conformance test.

        Reviewed by Dean Jackson.

        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::finish):
        (WebCore::GraphicsContextGLOpenGL::flush):
        (WebCore::GraphicsContextGLOpenGL::deleteTexture):

2020-01-14  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r254505.

        Breaks watchOS/tvOS/Catalyst builds.

        Reverted changeset:

        "Add support for MediaStream audio track rendering in
        GPUProcess"
        https://bugs.webkit.org/show_bug.cgi?id=206175
        https://trac.webkit.org/changeset/254505

2020-01-13  Darin Adler  <darin@apple.com>

        Use even more "shortest form" formatting, and less "fixed precision" and "fixed width"
        https://bugs.webkit.org/show_bug.cgi?id=198918

        Reviewed by Sam Weinig.

        The places left untouched are the ones where changing behavior has some kind of unwanted
        observable effect for one of two reasons. Otherwise, switched almost all call sites.

        1) Substantial number of test results that depend on the current behavior.

        2) Poor rounding resulting in conversion from float to double and back (or similar) that
           results in values with tiny fractional residue like "6.000001".

        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::changeValueByStep): Use shortest instead of fixed.
        (WebCore::AccessibilityNodeObject::changeValueByPercent): Ditto.
        * css/CSSAspectRatioValue.cpp:
        (WebCore::CSSAspectRatioValue::customCSSText const): Ditto.
        * css/CSSFontVariationValue.cpp:
        (WebCore::CSSFontVariationValue::customCSSText const): Ditto. Also use makeString instead of
        StringBuilder for better efficiency.
        * css/CSSGradientValue.cpp:
        (WebCore::appendGradientStops): Ditto.
        * css/CSSKeyframeRule.cpp:
        (WebCore::StyleRuleKeyframe::keyText const): Ditto.
        * css/CSSTimingFunctionValue.cpp:
        (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText const): Ditto.
        * css/MediaQueryEvaluator.cpp:
        (WebCore::aspectRatioValueAsString): Ditto.

        * css/TransformFunctions.h: Removed unnneeded forward declarations.

        * css/parser/CSSParserToken.cpp:
        (WebCore::CSSParserToken::serialize const): Use shortest instead of fixed.
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::completeURLsInAttributeValue const): Ditto.

        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::applyCSSProperties): Use shortest instead of fixed.
        Also wrote a FIXME abot this strange code that uses "calc()" to do math on two numbers,
        math that could instead be done by the code converting the numbers to a style string.

        * inspector/InspectorOverlay.cpp:
        (WebCore::InspectorOverlay::drawRulers): Use shortest instead of fixed.
        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const): Ditto.
        * page/scrolling/AxisScrollSnapOffsets.cpp:
        (WebCore::snapOffsetsToString): Ditto.
        (WebCore::snapOffsetRangesToString): Ditto.
        (WebCore::snapPortOrAreaToString): Ditto.

        * platform/graphics/Color.cpp:
        (WebCore::decimalDigit): Added.
        (WebCore::serializedFractionDigitsForFractionalAlphaValue): Added.
        (WebCore::Color::cssText const): Rewrote to generate the same results using
        makeString rather than StringBuilder, and integer math rather than converting from
        integer to floating point and then doing floating point math.

        * platform/graphics/ExtendedColor.cpp:
        (WebCore::ExtendedColor::cssText const): Use shortest instead of fixed.
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::logLayerInfo): Ditto.
        * svg/SVGAngleValue.cpp:
        (WebCore::SVGAngleValue::valueAsString const): Ditto.

        * svg/SVGLengthList.h: Added now-needed include of StringBuilder.h.

        * svg/SVGLengthValue.cpp:
        (WebCore::SVGLengthValue::valueAsString const): Use shortest instead of fixed.
        * svg/SVGNumberList.h: Ditto.

        * svg/SVGPathStringBuilder.cpp:
        (WebCore::appendFlag): Use multiple-argument append for better efficiency.
        (WebCore::appendNumber): Added a comment about why we can't yet convert this to use
        shortest instead of fixed: code that parses floats but then creates a CG path
        that stores things as double and does math as double then converts back to float
        results in float values that didn't round trip well and have fractions. This is
        smoothed away (hidden) by using fixed precision to conver them to strings.
        (WebCore::appendPoint): Call appendNumber to cut down on repeated code.

        * svg/SVGPointList.h: Use shortest instead of fixed.

        * svg/SVGTransformValue.h:
        (WebCore::SVGTransformValue::prefixForTransfromType): Return a string literal
        instead of a WTF::String to avoid creating and destroying an object each time.
        (WebCore::SVGTransformValue::appendFixedPrecisionNumbers): Added a comment explaining
        why we need to continue to use fixed precision here. Same issue with CGAffineTransform
        using double as we have with CGPath above.

        * svg/properties/SVGPropertyTraits.h:
        (WebCore::SVGPropertyTraits<float>::toString): Use shortest instead of fixed.
        (WebCore::SVGPropertyTraits<FloatPoint>::toString): Ditto.
        (WebCore::SVGPropertyTraits<FloatRect>::toString): Ditto.

        * testing/Internals.cpp:
        (WebCore::Internals::dumpMarkerRects): Added a comment explaining why we have to use
        fixed precision here. There are many test results that we would need to update.
        (WebCore::Internals::configurationForViewport): Ditto.
        (WebCore::Internals::getCurrentCursorInfo): Use shortest instead of fixed.
        * xml/XPathValue.cpp:
        (WebCore::XPath::Value::toString const): Ditto.

2020-01-14  Peng Liu  <peng.liu6@apple.com>

        A video element cannot enter fullscreen from PiP mode
        https://bugs.webkit.org/show_bug.cgi?id=204468

        Reviewed by Eric Carlson.

        This patch fixes two issues:
        - Make sure the message exchanges between WebContent and UI process can complete in the scenario that switching to fullscreen from PiP.
        - Do not send fullscreenModeChanged event with mode = 3 (both fullscreen and Picture-in-Picture) to WebContent process.

        We need to use API tests to verify the fix.
        No new tests are added because of webkit.org/b/203724.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (VideoFullscreenInterfaceAVKit::didStopPictureInPicture):
        (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
        (VideoFullscreenInterfaceAVKit::setMode):

2020-01-14  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Unreviewed build warning fix after r254503

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (CachedResourceStreamingClient::dataReceived):

2020-01-14  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] improve video rendering stats
        https://bugs.webkit.org/show_bug.cgi?id=143827

        Reviewed by Xabier Rodriguez-Calvar.

        Enable fpsdisplaysink unconditionally for statistics retrieval. If
        GStreamer 1.18 (current git master is 1.17) is detected at runtime
        we can simply use the new basesink `stats` property, so proxy it
        in our custom GL sink. The ENABLE(MEDIA_STATISTICS) feature seems
        to have been deprecated in favor of the
        HTMLVideoElement.getVideoPlaybackQuality() interface so remove the
        unused corresponding MediaPlayerPrivate method overrides.

        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        (webKitGLVideoSinkGetProperty):
        (webkit_gl_video_sink_class_init):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
        (WebCore::MediaPlayerPrivateGStreamer::videoPlaybackQualityMetrics):
        (WebCore::MediaPlayerPrivateGStreamer::decodedFrameCount const): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::droppedFrameCount const): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::audioDecodedByteCount const): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::videoDecodedByteCount const): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

2020-01-14  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        [Freetype] Support for the -webkit-font-smoothing CSS property
        https://bugs.webkit.org/show_bug.cgi?id=54763

        Reviewed by Simon Fraser.

        Pass the smoothing preference defined on the CSS style, so its
        taken into account when drawing the font. If the CSS doesn't
        specify any preference then it behaves like before this patch
        (it tries to automatically antialias the font, if supported).

        This patch sets the antialiasing value at drawing time without
        affecting the font, like the Mac/iOS ports do. This approach is
        maybe less efficient than taking into account the antialiasing
        value when the font platform data its created, but its a better
        fit for the current cross-platform code.
        I did some benchmarks (see the bug above if you are curious) and
        I was unable to prove this method is less efficient than setting
        the antialising value when the font platform data is created.

        Test: platform/gtk/fonts/webkit-font-smoothing.html

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawGlyphsToContext):
        (WebCore::Cairo::drawGlyphsShadow):
        (WebCore::Cairo::drawGlyphs):
        * platform/graphics/cairo/CairoOperations.h:
        * platform/graphics/cairo/CairoUtilities.cpp:
        * platform/graphics/cairo/CairoUtilities.h:
        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::FontCascade::drawGlyphs):
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::drawGlyphs):
        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
        (Nicosia::CairoOperationRecorder::drawGlyphs):

2020-01-14  youenn fablet  <youenn@apple.com>

        Add support for MediaStream audio track rendering in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206175

        Reviewed by Eric Carlson.

        Simplify model to use start/stop instead of setPaused.
        Simplify and fix issue in computation of the muted state of the renderer.
        Covered by existing tests run with GPU process enabled and manual testing

        * platform/mediastream/AudioMediaStreamTrackRenderer.h:
        * platform/mediastream/AudioTrackPrivateMediaStream.cpp:
        (WebCore::AudioTrackPrivateMediaStream::playInternal):
        (WebCore::AudioTrackPrivateMediaStream::pause):
        (WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
        (WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):
        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
        (WebCore::AudioMediaStreamTrackRendererCocoa::start):
        (WebCore::AudioMediaStreamTrackRendererCocoa::stop):
        (WebCore::AudioMediaStreamTrackRendererCocoa::clear):
        (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
        (WebCore::AudioMediaStreamTrackRendererCocoa::render):
        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h:

2020-01-14  Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [GStreamer] Rework WebKitWebSrc to improve robustness
        https://bugs.webkit.org/show_bug.cgi?id=206003

        Reviewed by Philippe Normand.

        Reworked how the web source deals with data. It's more eager now
        in pushing data downstream.  We don't use the GstAdapter methods
        marked as fast anymore because sometimes it was slower. The reason
        why this was slower is that we can be waiting for more "fast"
        (that could be retrieved with the _fast API) buffers to be
        available even in cases where the queue is not empty. These other
        buffers can be retrieved with the "non _fast" API.

        The streaming thread locks now when it has no data to push
        downstream and restarts the download if needed.

        In this patch we also fixed the possible race condition of
        receiving a flush during the streaming thread wait.

        No new tests, just a rework.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::updateStates): Added FALLTHROUGH.
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (restartLoaderIfNeeded):
        (stopLoaderIfNeeded): Refactored.
        (webKitWebSrcCreate): Avoid adapter methods marked as fast,
        otherwise we might be waiting for data we already have. Streaming
        thread is now going to lock waiting for data and is more eager in
        pushing data downstream.
        (webKitWebSrcStop): No more queueSize.
        (webKitWebSrcDoSeek):
        (webKitWebSrcUnLock):
        (webKitWebSrcChangeState): Notify streaming thread.
        (CachedResourceStreamingClient::checkUpdateBlocksize): Blocksize
        adjustment improved. With former values blocksize grew too fast
        and couldn't be reduced so easily. I think now it adjusts more
        quickly to the real network values.
        (CachedResourceStreamingClient::dataReceived): Added rudimentary
        bandwith calculation and use stopLoaderIfNeeded.

2020-01-14  Tomoki Imai  <Tomoki.Imai@sony.com>

        Always Use CAIRO_OPERATOR_SOURCE to copyRectFromOneSurfaceToAnother
        https://bugs.webkit.org/show_bug.cgi?id=206215

        Reviewed by Žan Doberšek.

        Most of copyRectFromOneSurfaceToAnother callers passed CAIRO_OPERATOR_SOURCE not to blend.
        BackingStoreBackendCairoImpl::scroll had copyRectFromOneSurfaceToAnother with the default cairoOperator CAIRO_OPERATOR_OVER,
        but scrolling should use CAIRO_OPERATOR_SOURCE because there is no need to blend and it can have a performance benefit.

        No new tests, covered by the existing tests.

        * platform/graphics/cairo/CairoUtilities.cpp:
        (WebCore::copyRectFromOneSurfaceToAnother): Use CAIRO_OPERATOR_SOURCE to copy rect.
        * platform/graphics/cairo/CairoUtilities.h: Remove cairoOperator parameter from copyRectFromOneSurfaceToAnother.
        * platform/graphics/cairo/GraphicsContextGLCairo.cpp:
        (WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::getImageData):
        (WebCore::ImageBuffer::putByteArray):

2020-01-14  Eric Carlson  <eric.carlson@apple.com>

        Expose video tracks for media files in the GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206209
        <rdar://problem/58553026>

        Reviewed by Jer Noble.

        No new tests, un-skipped existing tests that pass because of this change.

        * platform/graphics/VideoTrackPrivate.h:

2020-01-13  Alexey Shvayka  <shvaikalesh@gmail.com>

        <iframe> attributes should be processed on "srcdoc" attribute removal
        https://bugs.webkit.org/show_bug.cgi?id=205995

        Reviewed by Darin Adler.

        Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes.html

        Per spec, "srcdoc" attribute of an <iframe> takes precedence over "src" [1].
        Before this change, "srcdoc" handling in HTMLFrameElementBase::parseAttribute didn't check whether
        the attribute was set or removed. As a result, removal of "srcdoc" attribute navigated the <iframe>
        to "about:srcdoc" instead of URL in value of "src" attribute.

        With this change, <iframe> attributes processing matches Chrome and Firefox.

        [1] https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes

        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::parseAttribute):

2020-01-13  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
        https://bugs.webkit.org/show_bug.cgi?id=202687

        Reviewed by Tim Horton.

        Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
        candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
        a scrollable frame to not scroll. This affected ads and twitch.tv.

        Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.

        Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html

        * page/mac/EventHandlerMac.mm:
        (WebCore::scrolledToEdgeInDominantDirection):
        * platform/ScrollView.h:
        (WebCore::ScrollView::canHaveScrollbars const): Deleted.
        * platform/ScrollableArea.h:
        (WebCore::ScrollableArea::canHaveScrollbars const):

2020-01-13  Simon Fraser  <simon.fraser@apple.com>

        Scrollbar hiding on iOS via ::-webkit-scrollbar { display: none } doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=206197

        Reviewed by Tim Horton.

        The logic added in r251369 was reversed, causing scrollbar hiding to not work correctly.
        
        Tested by fast/scrolling/ios/scrollbar-hiding.html

        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::isHiddenByStyle const):

2020-01-13  Jer Noble  <jer.noble@apple.com>

        [WK1][iOS] VideoFullscreenControllerContext uses UIKit on the WebThread
        https://bugs.webkit.org/show_bug.cgi?id=206203
        <rdar://problem/48742782>

        Reviewed by Simon Fraser.

        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (VideoFullscreenControllerContext::setVideoLayerFrame):

2020-01-13  Zalan Bujtas  <zalan@apple.com>

        RenderTreeBuilder::Block::attachIgnoringContinuation should handle inline-block anonymous containers.
        https://bugs.webkit.org/show_bug.cgi?id=202913
        <rdar://problem/56233694>

        Reviewed by Simon Fraser.

        When the before child happens to be a block level box wrapped in an anonymous inline-block (e.g. ruby),
        let's attach this new child before the anonymous inline-block wrapper instead.

        Test: fast/ruby/before-child-is-block-after.html

        * rendering/updating/RenderTreeBuilderBlock.cpp:
        (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):

2019-12-14  Darin Adler  <darin@apple.com>

        Remove the "needsFullOrderingComparisons" feature from PODRedBlackTree
        https://bugs.webkit.org/show_bug.cgi?id=205238

        Reviewed by Sam Weinig.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Simplified code and
        eliminate uses of the createInterval function to construct PODInterval objects.
        (WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
        (WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.

        * html/HTMLMediaElement.h: Removed unnecessary include of PODInterval.h.

        * html/shadow/MediaControlElements.cpp: Added include of PODInterval.h.

        * platform/PODInterval.h: Changed operator< to compare low, high, and user
        data, not just low and high so it's consistent with operator== and we
        can use it to search a tree. Added a partial specialization for WeakPtr
        since a WeakPtr's value can change (to null) so it can't be used for
        ordering and equality checks; luckily the clients don't need to use it
        that way; they build an interval tree but never search for anything or
        remove anything from the tree.

        * platform/PODIntervalTree.h: Make the search adapter used to find overlaps
        a member class instead of a top level class template and simplified it a bit.
        Removed the unneeded createInterval function. Stopped passing true for
        "needsFullOrderingComparisons" since it's not needed any more due to the
        changes to PODInterval.

        * platform/PODRedBlackTree.h: Removed the "needsFullOrderingComparisons"
        template argument for the PODRedBlackTree class template.
        (WebCore::PODRedBlackTree::Node::moveDataFrom): Take a reference (why not,
        since this always requires a non-null pointer).
        (WebCore::PODRedBlackTree::updateNode): Ditto.
        (WebCore::PODRedBlackTree::treeSearch const): Merged the three search
        functions into a single one since we don't need the peculiar
        "full comparisons" mode.
        (WebCore::PODRedBlackTree::propagateUpdates): Simplified logic to remove
        the boolean local variable.
        (WebCore::PODRedBlackTree::dumpSubtree const): Renamed from dumpFromNode
        since the comment said "dumps the subtree". Also removed the comment now
        that the function name says what it said.

        * rendering/FloatingObjects.h: Removed unnecessary include of PODInterval.h.

2020-01-13  Justin Fan  <justin_fan@apple.com>

        [WebGL 2] Implement transform feedback and pass transform feedback conformance tests
        https://bugs.webkit.org/show_bug.cgi?id=205823

        Reviewed by Dean Jackson.

        Covered by webgl/2.0.0/conformance2/transform_feedback conformance tests.

        * bindings/js/JSDOMConvertWebGL.cpp:
        (WebCore::convertToJSValue):
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
        (WebCore::WebGL2RenderingContext::~WebGL2RenderingContext):
        (WebCore::WebGL2RenderingContext::initializeTransformFeedbackBufferCache):
        (WebCore::WebGL2RenderingContext::getBufferSubData): ANGLE validation in mapBufferRange may fail; prevent copying from a nullptr. 
        (WebCore::WebGL2RenderingContext::vertexAttribIPointer):

        Bare minimum stubs to get WebGLQuery passing transform_feedback tests:
        (WebCore::WebGL2RenderingContext::createQuery):
        (WebCore::WebGL2RenderingContext::beginQuery):
        (WebCore::WebGL2RenderingContext::endQuery):
        (WebCore::WebGL2RenderingContext::getQueryParameter):
        (WebCore::WebGLQuery::WebGLQuery):
        * html/canvas/WebGLQuery.h:

        Transform feedback functions:
        (WebCore::WebGL2RenderingContext::createTransformFeedback):
        (WebCore::WebGL2RenderingContext::deleteTransformFeedback):
        (WebCore::WebGL2RenderingContext::isTransformFeedback):
        (WebCore::WebGL2RenderingContext::bindTransformFeedback):
        (WebCore::WebGL2RenderingContext::beginTransformFeedback):
        (WebCore::WebGL2RenderingContext::endTransformFeedback):
        (WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
        (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
        * html/canvas/WebGLTransformFeedback.cpp:
        (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
        (WebCore::WebGLTransformFeedback::deleteObjectImpl):

        Misc functions that needed added functionality:
        (WebCore::WebGL2RenderingContext::bindBufferBase):
        (WebCore::WebGL2RenderingContext::getIndexedParameter):
        (WebCore::WebGL2RenderingContext::getParameter):

        Helper functions to track WebGL2 state/objects:
        (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer):
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGLAny.h:
        * html/canvas/WebGLBuffer.cpp:
        (WebCore::WebGLBuffer::setTarget):
        * html/canvas/WebGLBuffer.h:
        * html/canvas/WebGLQuery.cpp:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding):
        (WebCore::WebGLRenderingContextBase::bindBuffer):
        (WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer):
        (WebCore::WebGLRenderingContextBase::deleteBuffer):
        (WebCore::WebGLRenderingContextBase::getProgramParameter):
        * html/canvas/WebGLRenderingContextBase.h:

        Pipe new GraphicsContextGL methods to ANGLE:
        * platform/graphics/GraphicsContextGL.h:
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
        (WebCore::GraphicsContextGLOpenGL::createQuery):
        (WebCore::GraphicsContextGLOpenGL::beginQuery):
        (WebCore::GraphicsContextGLOpenGL::endQuery):
        (WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
        (WebCore::GraphicsContextGLOpenGL::bindBufferBase):

        Add missing unrelated GraphicsContextGL stubs for ANGLE builds:
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
        (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
        (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
        (WebCore::GraphicsContextGLOpenGL::createQuery):
        (WebCore::GraphicsContextGLOpenGL::beginQuery):
        (WebCore::GraphicsContextGLOpenGL::endQuery):
        (WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
        (WebCore::GraphicsContextGLOpenGL::bindBufferBase):
        (WebCore::GraphicsContextGLOpenGL::bufferData):
        (WebCore::GraphicsContextGLOpenGL::bufferSubData):
        (WebCore::GraphicsContextGLOpenGL::getBufferSubData):
        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
        (WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::readBuffer):
        (WebCore::GraphicsContextGLOpenGL::texImage3D):
        (WebCore::GraphicsContextGLOpenGL::texSubImage3D):
        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
        (WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
        (WebCore::GraphicsContextGLOpenGL::uniform1ui):
        (WebCore::GraphicsContextGLOpenGL::uniform2ui):
        (WebCore::GraphicsContextGLOpenGL::uniform3ui):
        (WebCore::GraphicsContextGLOpenGL::uniform4ui):
        (WebCore::GraphicsContextGLOpenGL::uniform1uiv):
        (WebCore::GraphicsContextGLOpenGL::uniform2uiv):
        (WebCore::GraphicsContextGLOpenGL::uniform3uiv):
        (WebCore::GraphicsContextGLOpenGL::uniform4uiv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
        (WebCore::GraphicsContextGLOpenGL::drawRangeElements):
        (WebCore::GraphicsContextGLOpenGL::drawBuffers):
        (WebCore::GraphicsContextGLOpenGL::clearBufferiv):
        (WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
        (WebCore::GraphicsContextGLOpenGL::clearBufferfv):
        (WebCore::GraphicsContextGLOpenGL::clearBufferfi):
        (WebCore::GraphicsContextGLOpenGL::deleteQuery):
        (WebCore::GraphicsContextGLOpenGL::isQuery):
        (WebCore::GraphicsContextGLOpenGL::getQuery):
        (WebCore::GraphicsContextGLOpenGL::createSampler):
        (WebCore::GraphicsContextGLOpenGL::deleteSampler):
        (WebCore::GraphicsContextGLOpenGL::isSampler):
        (WebCore::GraphicsContextGLOpenGL::bindSampler):
        (WebCore::GraphicsContextGLOpenGL::samplerParameteri):
        (WebCore::GraphicsContextGLOpenGL::samplerParameterf):
        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterfv):
        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteriv):
        (WebCore::GraphicsContextGLOpenGL::fenceSync):
        (WebCore::GraphicsContextGLOpenGL::isSync):
        (WebCore::GraphicsContextGLOpenGL::deleteSync):
        (WebCore::GraphicsContextGLOpenGL::clientWaitSync):
        (WebCore::GraphicsContextGLOpenGL::waitSync):
        (WebCore::GraphicsContextGLOpenGL::getSynciv):
        (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::bindBufferRange):
        (WebCore::GraphicsContextGLOpenGL::getUniformIndices):
        (WebCore::GraphicsContextGLOpenGL::texImage2D):
        (WebCore::GraphicsContextGLOpenGL::texSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::uniform1fv):
        (WebCore::GraphicsContextGLOpenGL::uniform2fv):
        (WebCore::GraphicsContextGLOpenGL::uniform3fv):
        (WebCore::GraphicsContextGLOpenGL::uniform4fv):
        (WebCore::GraphicsContextGLOpenGL::uniform1iv):
        (WebCore::GraphicsContextGLOpenGL::uniform2iv):
        (WebCore::GraphicsContextGLOpenGL::uniform3iv):
        (WebCore::GraphicsContextGLOpenGL::uniform4iv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
        (WebCore::GraphicsContextGLOpenGL::readPixels):

        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
        (WebCore::GraphicsContextGLOpenGL::glGetQueryObjectuiv): Deleted.

2020-01-13  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed build fix for PlayStation and clang-cl.

        clang for Windows (< v10.0.0) cannot destructure a const class. See also r249524.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

2020-01-13  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r254463.

        Broke all Mac and iOS Builds.

        Reverted changeset:

        "Unreviewed build fix for PlayStation and clang-cl."
        https://trac.webkit.org/changeset/254463

2020-01-13  youenn fablet  <youenn@apple.com>

        Clean-up MediaPlayerPrivateMediaStreamAVFObjC.h/.mm
        https://bugs.webkit.org/show_bug.cgi?id=206060

        Reviewed by Eric Carlson.

        No change of behavior.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

2020-01-13  Mark Lam  <mark.lam@apple.com>

        Replace uses of Box<Identifier> with a new CacheableIdentifier class.
        https://bugs.webkit.org/show_bug.cgi?id=205544
        <rdar://problem/58041800>

        Reviewed by Saam Barati.

        * bindings/js/CommonVM.cpp:
        (WebCore::addImpureProperty):

2020-01-13  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed build fix for PlayStation and clang-cl.

        clang for Windows (< v10.0.0) cannot destructure a const class. See also r249524.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

2020-01-13  Sunny He  <sunny_he@apple.com>

        Fix computeFloatVisibleRectInContainer to handle non-SVG object parent
        https://bugs.webkit.org/show_bug.cgi?id=205282
        <rdar://problem/57975185>

        Reviewed by Darin Adler.

        Test: svg/dom/replaceChild-document-crash.html

        * rendering/svg/SVGRenderSupport.cpp:
        (WebCore::SVGRenderSupport::computeFloatVisibleRectInContainer):

2020-01-13  Eric Carlson  <eric.carlson@apple.com>

        Expose audio tracks for media files in the GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=206152
        <rdar://problem/58513227>

        Reviewed by youenn fablet.

        No new tests, un-skipped existing tests that pass because of this change.

        * platform/graphics/AudioTrackPrivate.h:
        * platform/graphics/TrackPrivateBase.h:

2020-01-13  youenn fablet  <youenn@apple.com>

        Split AudioTrackPrivateMediaStreamCocoa to implement remote audio rendering
        https://bugs.webkit.org/show_bug.cgi?id=206172

        Reviewed by Eric Carlson.

        Refactor code to allow in the future rendering of media stream audio tracks in a remote process.
        For that purpose, split AudioTrackPrivateMediaStreamCocoa functionality in two parts.
        The first part is moved back to AudioTrackPrivateMediaStream.
        The second part is platform specific and is defined in terms of an interface AudioMediaStreamTrackRenderer
        and an in process implementation named AudioMediaStreamTrackRendererCocoa.

        Make TrackPrivateBase and MediaStreamTrackPrivate public LoggerHelper.
        This allows making AudioMediaStreamTrackRenderer and AudioSampleDataSource to take a LoggerHelper instead of a derived instance.

        No change of behavior.

        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/mac/AudioSampleDataSource.h:
        * platform/audio/mac/AudioSampleDataSource.mm:
        (WebCore::AudioSampleDataSource::create):
        (WebCore::AudioSampleDataSource::AudioSampleDataSource):
        * platform/graphics/TrackPrivateBase.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
        * platform/mediastream/AudioMediaStreamTrackRenderer.h: Added.
        (WebCore::AudioMediaStreamTrackRenderer::setMuted):
        (WebCore::AudioMediaStreamTrackRenderer::setVolume):
        (WebCore::AudioMediaStreamTrackRenderer::volume const):
        (WebCore::AudioMediaStreamTrackRenderer::isMuted const):
        * platform/mediastream/AudioTrackPrivateMediaStream.cpp: Added.
        (WebCore::AudioTrackPrivateMediaStream::setLogger):
        (WebCore::AudioTrackPrivateMediaStream::AudioTrackPrivateMediaStream):
        (WebCore::AudioTrackPrivateMediaStream::~AudioTrackPrivateMediaStream):
        (WebCore::AudioTrackPrivateMediaStream::clear):
        (WebCore::AudioTrackPrivateMediaStream::playInternal):
        (WebCore::AudioTrackPrivateMediaStream::play):
        (WebCore::AudioTrackPrivateMediaStream::pause):
        (WebCore::AudioTrackPrivateMediaStream::setVolume):
        (WebCore::AudioTrackPrivateMediaStream::volume const):
        (WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
        (WebCore::AudioTrackPrivateMediaStream::trackMutedChanged):
        (WebCore::AudioTrackPrivateMediaStream::trackEnabledChanged):
        (WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):
        (WebCore::AudioTrackPrivateMediaStream::trackEnded):
        * platform/mediastream/AudioTrackPrivateMediaStream.h:
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: Added.
        (WebCore::AudioMediaStreamTrackRendererCocoa::stop):
        (WebCore::AudioMediaStreamTrackRendererCocoa::clear):
        (WebCore::AudioMediaStreamTrackRendererCocoa::setPaused):
        (WebCore::AudioMediaStreamTrackRendererCocoa::createAudioUnit):
        (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
        (WebCore::AudioMediaStreamTrackRendererCocoa::render):
        (WebCore::AudioMediaStreamTrackRendererCocoa::inputProc):
        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: Added.
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h: Removed.

2020-01-06  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Support CTAP Client Pin
        https://bugs.webkit.org/show_bug.cgi?id=191516
        <rdar://problem/56558558>

        Reviewed by Brent Fulgham.

        Covered by API tests.

        * Modules/webauthn/fido/DeviceRequestConverter.cpp:
        (fido::encodeMakeCredenitalRequestAsCBOR):
        (fido::encodeGetAssertionRequestAsCBOR):
        * Modules/webauthn/fido/Pin.cpp:
        (fido::pin::RetriesResponse::parse):
        (fido::pin::TokenResponse::parse):
        (fido::pin::TokenRequest::tryCreate):
        (fido::pin::encodeAsCBOR):
        * Modules/webauthn/fido/Pin.h:
        * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
        * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:
        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
        * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
        (WebCore::transformAES_CBC):
        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
        * testing/MockWebAuthenticationConfiguration.h:
        (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl:

2020-01-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Turn off trailing letter-space trimming for the LineBreaker content
        https://bugs.webkit.org/show_bug.cgi?id=206181
        <rdar://problem/58532931>

        Reviewed by Antti Koivisto.

        Do not mark trailing letter-spacing as trimmable in the "continuous content" we feed in to line breaking.
        This causes different and unexpected line breaking behavior as we don't try to fit the letter-spacing after the last character.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::ContinuousContent::ContinuousContent):

2020-01-13  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] editing/text-iterator/findString.html fails on iOS
        https://bugs.webkit.org/show_bug.cgi?id=206164

        Reviewed by Zalan Bujtas.

        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):

        The test here was reversed.

2020-01-13  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Enable LFC integration
        https://bugs.webkit.org/show_bug.cgi?id=206128

        Reviewed by Zalan Bujtas.

        Enable the new line layout path.

        * page/RuntimeEnabledFeatures.h:

2020-01-13  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] imported/blink/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html crashes on iOS
        https://bugs.webkit.org/show_bug.cgi?id=206151

        Reviewed by Zalan Bujtas.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

        LFC doesn't expect line break boxes with float set (other layout systems just ignore it).

2020-01-13  Antti Koivisto  <antti@apple.com>

        [LFC][IFC] fast/text/fast-run-width-vs-slow-run-width.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=206143

        Reviewed by Zalan Bujtas.

        The test is constructed so that the preferred width computation produces float value that maps exactly to LayoutUnit
        (usually it gets ceiled up). This get converted back to float and the same input widths are substracted from
        the total during inline layout. Due to nature of floating point arithmetic this ends up producing slightly
        different result and the last word doesn't fit.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):

        When using floats, do an additional equality comparison that accepts values within scaled float epsilon as equal.

2020-01-12  Zalan Bujtas  <zalan@apple.com>

        Text-indent with percentage value should resolve against the available width
        https://bugs.webkit.org/show_bug.cgi?id=206155
        <rdar://problem/58514882>

        Reviewed by Antti Koivisto.

        https://www.w3.org/TR/css-text-3/#text-indent-property
        "<percentage> Gives the amount of the indent as a percentage of the block container’s own logical width"

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::textIndentOffset const):

2020-01-12  Yusuke Suzuki  <ysuzuki@apple.com>

        [WebCore] Reorganize JSType in WebCore to offer more bits to JSC
        https://bugs.webkit.org/show_bug.cgi?id=206141

        Reviewed by Keith Miller.

        This patch reorganize JSType a bit to offer more bits to JSC. Then JSC can use JSType for types easily.

        * bindings/js/JSDOMWrapper.h:
        * bindings/js/JSElementCustom.h:
        (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSElement>::inherits):
        * domjit/DOMJITHelpers.h:
        (WebCore::DOMJIT::branchIfElement):
        (WebCore::DOMJIT::branchIfNotElement):

2019-12-20  Darin Adler  <darin@apple.com>

        Remove unneeded MemoryIDBBackingStore::create
        https://bugs.webkit.org/show_bug.cgi?id=205512

        Reviewed by Youenn Fablet.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore): Call makeUnique
        instead of MemoryIDBBackingStore::create.

        * Modules/indexeddb/server/MemoryCursor.cpp: Removed unneeded include
        of MemoryIDBBackingStore.h.

        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Fixed a comment
        and replaced a global variable with a constant.
        (WebCore::IDBServer::MemoryIDBBackingStore::create): Deleted.

        * Modules/indexeddb/server/MemoryIDBBackingStore.h: Made the class
        final, made more of the member functions private, and moved a couple
        function members out from in between the data members.

2020-01-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce the concept of independent formatting context
        https://bugs.webkit.org/show_bug.cgi?id=206137
        <rdar://problem/58508015>

        Reviewed by Sam Weinig.

        At this point it is just about absolute positioned block level boxes since we don't support the "contain" property.
        https://www.w3.org/TR/css-display-3/#independent-formatting-context

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesFormattingContext const):
        (WebCore::Layout::Box::establishesIndependentFormattingContext const):
        * layout/layouttree/LayoutBox.h:

2020-01-11  Alex Christensen  <achristensen@webkit.org>

        Expose frame information on _WKResourceLoadInfo
        https://bugs.webkit.org/show_bug.cgi?id=206104
        <rdar://problem/57132290>

        Reviewed by Dean Jackson.

        Covered by API tests.

        * page/FrameIdentifier.h:
        (WebCore::frameIdentifierFromID): Deleted.

2020-01-10  Yusuke Suzuki  <ysuzuki@apple.com>

        [WebCore] Fix crash in module loader due to change in fragment reservation
        https://bugs.webkit.org/show_bug.cgi?id=206125

        Reviewed by Dean Jackson.

        At some point, CachedResource::url() starts returning URL without fragment.
        However, this was invariant in ScriptModuleLoader, so one of WPT test is crashing.

        We save source URL so that we preserve fragment information.
        Still we need to have fragment information after the redirect to fix a bug filed in [1].

        [1]: https://bugs.webkit.org/show_bug.cgi?id=205294

        * bindings/js/CachedModuleScriptLoader.cpp:
        (WebCore::CachedModuleScriptLoader::load):
        * bindings/js/CachedModuleScriptLoader.h:
        * bindings/js/ScriptModuleLoader.cpp:
        (WebCore::ScriptModuleLoader::notifyFinished):

2020-01-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] isOkToAccessDisplayBox should return false on formatting context root access.
        https://bugs.webkit.org/show_bug.cgi?id=206123
        <rdar://problem/58500267>

        Reviewed by Antti Koivisto.

        From now on any geometry access outside of the formatting context without a valid reason is considered an escape.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):

2020-01-11  Noam Rosenthal  <noam@webkit.org>

        Support image-set() standard syntax
        https://bugs.webkit.org/show_bug.cgi?id=160934
        <rdar://problem/27891501>

        Reviewed by Simon Fraser.

        Inside image-set, image URLs can use regular quotes, not necessarily with url().
        See https://drafts.csswg.org/css-images-4/#image-set-notation

        Test: fast/hidpi/image-set-as-background-quotes.html

        * css/parser/CSSPropertyParserHelpers.cpp:
                Update CSS parser to allow raw strings as URLs inside image-set.

        (WebCore::CSSPropertyParserHelpers::consumeUrlOrStringAsStringView):
        (WebCore::CSSPropertyParserHelpers::consumeImageSet):

2020-01-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] BlockFormattingContext::verticalPositionWithMargin should take VerticalConstraints
        https://bugs.webkit.org/show_bug.cgi?id=206122
        <rdar://problem/58500207>

        Reviewed by Antti Koivisto.

        This prevents verticalPositionWithMargin from reading geometry outside of the formatting context.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
        * layout/blockformatting/BlockFormattingContext.h:

2020-01-11  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] BlockFormattingContext::computeEstimatedVerticalPositionForAncestors should take ConstraintsPair<HorizontalConstraints>
        https://bugs.webkit.org/show_bug.cgi?id=206121
        <rdar://problem/58499492>

        Reviewed by Antti Koivisto.

        This prevents computeEstimatedVerticalPositionForAncestors from reading geometry outside of the formatting context.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
        * layout/blockformatting/BlockFormattingContext.h:

2020-01-11  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce BlockFormattingContext::ConstraintsPair
        https://bugs.webkit.org/show_bug.cgi?id=206119
        <rdar://problem/58498745>

        Reviewed by Antti Koivisto.

        This is in preparation for passing rootHorizontalConstraints all the way to BlockFormattingContext::computeEstimatedVerticalPosition().

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::ConstraintsPair<T>::ConstraintsPair):
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        (WebCore::Layout::BlockFormattingContext::ConstraintsPair::operator* const):
        (WebCore::Layout::BlockFormattingContext::ConstraintsPair::root const):

2020-01-11  Zalan Butjtas  <zalan@apple.com>

        [LFC][IFC] Visually collapse hanging pre-wrap content.
        https://bugs.webkit.org/show_bug.cgi?id=206133
        <rdar://problem/58505750>

        Reviewed by Antti Koivisto.

        This change is to comply with other rendering engines when it comes to visually collapsing hanging pre-wrap content.

        https://www.w3.org/TR/css-text-3/#white-space-phase-2
        "If white-space is set to pre-wrap, the UA must (unconditionally) hang this sequence, unless the sequence
        is followed by a forced line break, in which case it must conditionally hang the sequence is instead.
        It ___may___ also visually collapse the character advance widths of any that would otherwise overflow."

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::visuallyCollapsePreWrapOverflowContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::adjustLogicalWidth):

2020-01-10  Dean Jackson  <dino@apple.com>

        [WebGL] Clarify USE_OPENGL_ES_3
        https://bugs.webkit.org/show_bug.cgi?id=206081
        <rdar://problem/58486798>

        Reviewed by Simon Fraser.

        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
        and that the availability of OpenGL ES 3 is a separate query.

        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

2020-01-10  Zalan Bujtas  <zalan@apple.com>

        [LFC] TableFormattingContext::layoutTableCellBox should take HorizontalConstraints
        https://bugs.webkit.org/show_bug.cgi?id=206075
        <rdar://problem/58483791>

        Reviewed by Antti Koivisto.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        * layout/tableformatting/TableFormattingContext.h:

2020-01-10  Simon Fraser  <simon.fraser@apple.com>

        Introduce ENABLE_META_VIEWPORT and use it in some WK2 code
        https://bugs.webkit.org/show_bug.cgi?id=206091

        Reviewed by Tim Horton.

        didDispatchViewportPropertiesChanged() is used for a Coordinated Graphics assertion, so
        should be #if ASSERT_ENABLED rather than #ifndef NDEBUG.

        * dom/Document.cpp:
        (WebCore::Document::updateViewportArguments):
        (WebCore::Document::suspend):
        * dom/Document.h:

2020-01-10  Zalan Bujtas  <zalan@apple.com>

        [LFC] Add missing escape reason to BlockFormattingContext::Quirks::stretchedInFlowHeight
        https://bugs.webkit.org/show_bug.cgi?id=206076
        <rdar://problem/58483919>

        Reviewed by Antti Koivisto.

        This is also a valid formatting context escape.

        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):

2020-01-10  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Update style for layout boxes
        https://bugs.webkit.org/show_bug.cgi?id=206074

        Reviewed by Zalan Bujtas.

        Test: fast/css/simple-color-change.html

        For simple style changes we may keep the existing layout boxes. In this case we need to update the style.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::updateStyle):

        Update style in layout boxes.

        (WebCore::LayoutIntegration::LineLayout::rootLayoutBox):
        * layout/integration/LayoutIntegrationLineLayout.h:

        Make root non-const.

        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::nextSibling):
        * layout/layouttree/LayoutContainer.h:

        Expose non-const accessors.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::styleDidChange):

        Invoke LineLayout::updateStyle

2020-01-10  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Align WebCore::NetworkStorageSession's m_thirdPartyCookieBlockingMode init value with r254239
        https://bugs.webkit.org/show_bug.cgi?id=206082
        <rdar://problem/58487498>

        Unreviewed minor, follow-up fix.

        * platform/network/NetworkStorageSession.h:
            The init value of m_thirdPartyCookieBlockingMode was changed to
            ThirdPartyCookieBlockingMode::All to align it with r254239.

2020-01-09  Per Arne Vollan  <pvollan@apple.com>

        Map CSS value ID to system color in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=204314

        Reviewed by Dean Jackson.

        Currently, RenderThemeIOS is mapping CSS value IDs to system colors in the WebContent process. This mapping leads to
        invoking selectors on UITraitCollection and UIColor, which will send messages to the runningboard daemon. Since we
        will be blocking access to this daemon in the WebContent process, this mapping should be moved to the UI process.
        The UI process will create a mapping between CSS value IDs and system colors, and pass it to the WebContent process.

        Test: fast/css/ios/system-color-for-css-value.html

        * WebCore.xcodeproj/project.pbxproj:
        * css/StyleColor.h:
        * css/parser/CSSPropertyParser.h:
        * rendering/CSSValueKey.h: Added.
        (WebCore::operator==):
        (WebCore::CSSValueKey::encode const):
        (WebCore::CSSValueKey::decode):
        (WebCore::CSSValueKey::hash const):
        (WTF::CSSValueKeyHash::hash):
        (WTF::CSSValueKeyHash::equal):
        (WTF::HashTraits<WebCore::CSSValueKey>::emptyValue):
        (WTF::HashTraits<WebCore::CSSValueKey>::constructDeletedValue):
        (WTF::HashTraits<WebCore::CSSValueKey>::isDeletedValue):
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::cssValueIDSelectorList):
        (WebCore::systemColorFromCSSValueID):
        (WebCore::globalCSSValueToSystemColorMap):
        (WebCore::RenderThemeIOS::getOrCreateCSSValueToSystemColorMap):
        (WebCore::RenderThemeIOS::setCSSValueToSystemColorMap):
        (WebCore::RenderThemeIOS::systemColor const):
        * testing/Internals.cpp:
        (WebCore::Internals::systemColorForCSSValue):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-10  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Fix accessibility/deleting-iframe-destroys-axcache.html and accessibility/div-within-anchors-causes-crash.html
        https://bugs.webkit.org/show_bug.cgi?id=206072

        Reviewed by Zalan Bujtas.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::lineCount const):

        We may have a line layout with 0 runs but 1 line. In these cases line count must return 0
        to match other systems.

2020-01-10  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Support authenticatorGetNextAssertion
        https://bugs.webkit.org/show_bug.cgi?id=203346
        <rdar://problem/56558488>

        Reviewed by Brent Fulgham.

        Covered by new tests within existing test files.

        * Modules/webauthn/AuthenticatorAssertionResponse.h:
        (WebCore::AuthenticatorAssertionResponse::setName):
        (WebCore::AuthenticatorAssertionResponse::name const):
        (WebCore::AuthenticatorAssertionResponse::setDisplayName):
        (WebCore::AuthenticatorAssertionResponse::displayName const):
        (WebCore::AuthenticatorAssertionResponse::setNumberOfCredentials):
        (WebCore::AuthenticatorAssertionResponse::numberOfCredentials const):
        Adds new members to store new fields of the response from the authenticator. Field "icon"
        is omitted given it could be used to track users according to https://github.com/w3c/webauthn/issues/1285.
        * Modules/webauthn/fido/DeviceResponseConverter.cpp:
        (fido::readCTAPGetAssertionResponse):
        Adds new logic to parse above fields from an authenticator response.

2020-01-10  Dean Jackson  <dino@apple.com>

        [WebGL] Add all remaining WebGL2 implementation functions to GraphicsContextGL
        https://bugs.webkit.org/show_bug.cgi?id=206038
        <rdar://problem/58459051>

        Reviewed by Simon Fraser.

        Add stubs for all the GraphicsContextGL methods that will be
        necessary to implement WebGL2.

        While here, rearrange the header file to mirror the way
        WebGL2RenderingContext orders the methods, and mark all the
        GraphicsContextGLOpenGL methods as final (rather than override).

        * platform/graphics/GraphicsContextGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::bufferData):
        (WebCore::GraphicsContextGLOpenGL::bufferSubData):
        (WebCore::GraphicsContextGLOpenGL::copyBufferSubData):
        (WebCore::GraphicsContextGLOpenGL::getBufferSubData):
        (WebCore::GraphicsContextGLOpenGL::mapBufferRange):
        (WebCore::GraphicsContextGLOpenGL::unmapBuffer):
        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
        (WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
        (WebCore::GraphicsContextGLOpenGL::readBuffer):
        (WebCore::GraphicsContextGLOpenGL::getInternalformativ):
        (WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample):
        (WebCore::GraphicsContextGLOpenGL::texStorage2D):
        (WebCore::GraphicsContextGLOpenGL::texStorage3D):
        (WebCore::GraphicsContextGLOpenGL::texImage3D):
        (WebCore::GraphicsContextGLOpenGL::texSubImage3D):
        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
        (WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
        (WebCore::GraphicsContextGLOpenGL::uniform1ui):
        (WebCore::GraphicsContextGLOpenGL::uniform2ui):
        (WebCore::GraphicsContextGLOpenGL::uniform3ui):
        (WebCore::GraphicsContextGLOpenGL::uniform4ui):
        (WebCore::GraphicsContextGLOpenGL::uniform1uiv):
        (WebCore::GraphicsContextGLOpenGL::uniform2uiv):
        (WebCore::GraphicsContextGLOpenGL::uniform3uiv):
        (WebCore::GraphicsContextGLOpenGL::uniform4uiv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
        (WebCore::GraphicsContextGLOpenGL::drawRangeElements):
        (WebCore::GraphicsContextGLOpenGL::drawBuffers):
        (WebCore::GraphicsContextGLOpenGL::clearBufferiv):
        (WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
        (WebCore::GraphicsContextGLOpenGL::clearBufferfv):
        (WebCore::GraphicsContextGLOpenGL::clearBufferfi):
        (WebCore::GraphicsContextGLOpenGL::createQuery):
        (WebCore::GraphicsContextGLOpenGL::deleteQuery):
        (WebCore::GraphicsContextGLOpenGL::isQuery):
        (WebCore::GraphicsContextGLOpenGL::beginQuery):
        (WebCore::GraphicsContextGLOpenGL::endQuery):
        (WebCore::GraphicsContextGLOpenGL::getQuery):
        (WebCore::GraphicsContextGLOpenGL::glGetQueryObjectuiv):
        (WebCore::GraphicsContextGLOpenGL::createSampler):
        (WebCore::GraphicsContextGLOpenGL::deleteSampler):
        (WebCore::GraphicsContextGLOpenGL::isSampler):
        (WebCore::GraphicsContextGLOpenGL::bindSampler):
        (WebCore::GraphicsContextGLOpenGL::samplerParameteri):
        (WebCore::GraphicsContextGLOpenGL::samplerParameterf):
        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterfv):
        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteriv):
        (WebCore::GraphicsContextGLOpenGL::fenceSync):
        (WebCore::GraphicsContextGLOpenGL::isSync):
        (WebCore::GraphicsContextGLOpenGL::deleteSync):
        (WebCore::GraphicsContextGLOpenGL::clientWaitSync):
        (WebCore::GraphicsContextGLOpenGL::waitSync):
        (WebCore::GraphicsContextGLOpenGL::getSynciv):
        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
        (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
        (WebCore::GraphicsContextGLOpenGL::bindBufferBase):
        (WebCore::GraphicsContextGLOpenGL::bindBufferRange):
        (WebCore::GraphicsContextGLOpenGL::getUniformIndices):
        (WebCore::GraphicsContextGLOpenGL::getActiveUniforms):
        (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
        (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
        (WebCore::GraphicsContextGLOpenGL::texImage2D):
        (WebCore::GraphicsContextGLOpenGL::texSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
        (WebCore::GraphicsContextGLOpenGL::uniform1fv):
        (WebCore::GraphicsContextGLOpenGL::uniform2fv):
        (WebCore::GraphicsContextGLOpenGL::uniform3fv):
        (WebCore::GraphicsContextGLOpenGL::uniform4fv):
        (WebCore::GraphicsContextGLOpenGL::uniform1iv):
        (WebCore::GraphicsContextGLOpenGL::uniform2iv):
        (WebCore::GraphicsContextGLOpenGL::uniform3iv):
        (WebCore::GraphicsContextGLOpenGL::uniform4iv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
        (WebCore::GraphicsContextGLOpenGL::readPixels):

2020-01-10  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Fix accessibility/scroll-to-make-visible-iframe-offscreen.html
        https://bugs.webkit.org/show_bug.cgi?id=206063

        Reviewed by Zalan Bujtas.

        This is failing due to missing LFC implementation for RenderText::absoluteQuad.

        * rendering/RenderText.cpp:
        (WebCore::collectAbsoluteQuadsForNonComplexPaths):

        Implement generic version for collecting absolute quads. It doesn't cover everything that is needed for
        the complex path so that still calls into layout system specific code.

        (WebCore::RenderText::absoluteQuadsClippedToEllipsis const):
        (WebCore::RenderText::absoluteQuads const):
        (WebCore::RenderText::layoutFormattingContextLineLayout const):
        (WebCore::RenderText::usesComplexLineLayoutPath const):
        * rendering/RenderText.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::collectAbsoluteQuads): Deleted.

        Not needed anymore.

        * rendering/SimpleLineLayoutFunctions.h:

2020-01-10  Zalan Bujtas  <zalan@apple.com>

        [LFC] Replace FormattingContext::EscapeTypes with EscapeReasons
        https://bugs.webkit.org/show_bug.cgi?id=206050
        <rdar://problem/58466862>

        Reviewed by Antti Koivisto.

        EscapeReason is more explicit about why certain formatting context escapes are allowed.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
        (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):

2020-01-10  Charlie Turner  <mail@charles.plus>

        [EME][ClearKey] Refactor CDMInstanceClearKey::updateLicense()
        https://bugs.webkit.org/show_bug.cgi?id=205999

        Reviewed by Xabier Rodriguez-Calvar.

        Covered by existing tests.

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::toHexString const): Helper utility to view
        a shared buffer's contents as a hex string.
        * platform/SharedBuffer.h:
        * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
        (WebCore::CDMInstanceClearKey::Key::keyIDAsString const): Uses the
        new utility to return a hex string of the key ID for debugging.
        (WebCore::CDMInstanceClearKey::Key::keyValueAsString const):
        Ditto, but for the key data.
        (WebCore::operator==): Added comparison operations to
        CDMInstanceClearKey::Key to cleanup code in updateLicense.
        (WebCore::operator<):
        (WebCore::CDMInstanceSessionClearKey::updateLicense): Refactored
        to use operators associated with the key class, so as to avoid
        open-coded memcmp's in the middle of conditionals and other
        techniques that made the code harder to read that necessary.
        * platform/encryptedmedia/clearkey/CDMClearKey.h:

2020-01-10  Adrian Perez de Castro  <aperez@igalia.com>

        Fix various non-unified build issues introduced since r253538
        https://bugs.webkit.org/show_bug.cgi?id=205996

        Reviewed by Youenn Fablet.

        No new tests needed.

        * dom/UserGestureIndicator.cpp: Add missing inclusion of DOMWindow.h
        * html/HTMLDialogElement.cpp:
        (WebCore::HTMLDialogElement::parseAttribute): Add missing namespace prefix to HTMLNames::openAttr.
        (WebCore::HTMLDialogElement::toggleOpen): Ditto.
        * page/Page.cpp: Add missing inclusion of MediaRecorderProvider.h
        * page/PageConfiguration.h: Add missing inclusion of wtf/Forward.h and wtf/Vector.h

2020-01-09  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Win] Use ComplexTextController instead of UniscribeController
        https://bugs.webkit.org/show_bug.cgi?id=204884

        Reviewed by Brent Fulgham.

        UniscribeController doesn't support surrogate pairs and has
        rendering glitches of partially selected a combining character.

        Remove UniscribeController, and use ComplexTextController by
        implementing `collectComplexTextRunsForCharacters` with Uniscribe.

        Covered by existing tests.

        * PlatformWin.cmake:
        * platform/graphics/ComplexTextController.cpp:
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Deleted.
        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::widthOfTextRange const):
        (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText const):
        (WebCore::FontCascade::drawGlyphBuffer const):
        (WebCore::FontCascade::floatWidthForComplexText const):
        (WebCore::FontCascade::adjustSelectionRectForComplexText const):
        (WebCore::FontCascade::offsetForPositionForComplexText const):
        * platform/graphics/win/ComplexTextControllerUniscribe.cpp: Added.
        (WebCore::shapeByUniscribe):
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
        * platform/graphics/win/FontCGWin.cpp:
        * platform/graphics/win/FontCascadeDirect2D.cpp:
        * platform/graphics/win/FontWin.cpp:
        (WebCore::FontCascade::adjustSelectionRectForComplexText const): Deleted.
        (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText const): Deleted.
        (WebCore::FontCascade::floatWidthForComplexText const): Deleted.
        (WebCore::FontCascade::offsetForPositionForComplexText const): Deleted.
        * platform/graphics/win/UniscribeController.cpp: Removed.
        * platform/graphics/win/UniscribeController.h: Removed.

2020-01-09  Chris Dumez  <cdumez@apple.com>

        Block cross-site top-frame navigations from untrusted iframes
        https://bugs.webkit.org/show_bug.cgi?id=206027
        <rdar://problem/58320516>

        Reviewed by Geoffrey Garen.

        Block cross-site top-frame navigations from untrusted iframes, unless they have a user gesture.
        We already consider third-party iframes as untrusted, we now also treat first-party iframes
        as untrusted if they are loaded both third-party scripts & iframes.

        Test: http/tests/security/block-top-level-navigations-by-untrusted-first-party-iframes.html

        * dom/Document.cpp:
        (WebCore::Document::canNavigate):
        (WebCore::Document::willLoadScriptElement):
        (WebCore::Document::willLoadFrameElement):
        (WebCore::Document::isNavigationBlockedByThirdPartyIFrameRedirectBlocking):
        * dom/Document.h:
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::requestClassicScript):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::openURL):

2020-01-09  Andres Gonzalez  <andresg_22@apple.com>

        Disable accessibility isolated tree for LayoutTests.
        https://bugs.webkit.org/show_bug.cgi?id=206048
        <rdar://problem/58459580>

        Reviewed by Chris Fleizach.

        Fix for numerous LayoutTests failing when using accessibility isolated tree.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::clientSupportsIsolatedTree):

2020-01-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Text manipulation controller should not observe changes in new replacement elements
        https://bugs.webkit.org/show_bug.cgi?id=206015
        <rdar://problem/58353667>

        Reviewed by Tim Horton.

        TextManipulationController may insert elements in the process of completing text replacement operations. When
        renderers are created for these elements (after the next layout pass), the controller is notified via
        TextManipulationController::didCreateRendererForElement, which causes it to begin observing the newly inserted
        elements. For certain clients, this may lead to an unending cycle of text manipulation updates as the new
        text manipulation items' tokens will be replaced with new tokens, and we never reach a stable state.

        To mitigate this, we avoid adding newly visible elements to m_mutatedElements in the case where the newly
        visible elements were recently inserted by text replacement. See below for more details.

        Test: TextManipulation.CompleteTextManipulationDoesNotCreateMoreTextManipulationItems

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::didCreateRendererForElement):

        Avoid considering an element that has a new renderer, if it is an element we had just inserted using text
        manipulation APIs.

        (WebCore::TextManipulationController::replace):

        As we iterate over and apply each text replacement, remember the elements we've inserted using a WeakHashSet;
        this set is cleared in a queued async task, after which layout should be up to date.

        * editing/TextManipulationController.h:

2020-01-09  Brent Fulgham  <bfulgham@apple.com>

        REGRESSION (r253662): Large Data URLs are not being handled properly
        https://bugs.webkit.org/show_bug.cgi?id=205979
        <rdar://problem/58346124>

        Reviewed by Youenn Fablet.

        The URL size limitation added in r253662 was too low. We should bump it to handle
        reasonable data URI sizes.

        Test: fast/url/data-url-large.html.

        * page/SecurityOrigin.cpp:

2020-01-09  Eamon Sisk  <esisk@apple.com>

        Update status for Web SQL Database
        https://bugs.webkit.org/show_bug.cgi?id=205304

        Reviewed by Darin Adler.

        The status for Web SQL Database is out of date.

        * features.json:

2020-01-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Implement encoders and decoders for more font-related entities
        https://bugs.webkit.org/show_bug.cgi?id=205952

        Reviewed by Dean Jackson.

        Implement encode/decode template methods for more font-rendering-related objects in WebCore.

        * platform/graphics/FontDescription.h:
        (WebCore::FontDescription::encode const):
        (WebCore::FontDescription::decode):
        * platform/graphics/FontSelectionAlgorithm.h:
        (WebCore::FontSelectionValue::encode const):
        (WebCore::FontSelectionValue::decode):
        (WebCore::FontSelectionRange::encode const):
        (WebCore::FontSelectionRange::decode):
        (WebCore::FontSelectionSpecifiedCapabilities::encode const):
        (WebCore::FontSelectionSpecifiedCapabilities::decode):
        * platform/graphics/FontTaggedSettings.h:
        (WebCore::FontTaggedSetting<T>::encode const):
        (WebCore::FontTaggedSetting<T>::decode):

        We cast from `uint8_t` to `char` and back when encoding and decoding because IPC encoders are currently only
        able to encode `uint8_t`s, rather than `char`s. We could alternately address this in a future patch by adding
        encode/decode functions for `char` to `Encoder.h`.

        (WebCore::FontTaggedSettings<T>::encode const):
        (WebCore::FontTaggedSettings<T>::decode):

2020-01-09  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Flip experimental website data removal setting from an enable to a disable
        https://bugs.webkit.org/show_bug.cgi?id=205966
        <rdar://problem/58425000>

        Reviewed by Brent Fulgham.

        To get default on behavior, experimental features in the network process need to be
        turned from enable flags to disable flags. This patch does that for the experimental
        website data removal flag.

        No new tests. This change just reverses the interpretation of a flag.

        * page/Settings.yaml:

2020-01-09  Chris Lord  <clord@igalia.com>

        ImageBitmap can't be created in workers in some cases due to main-thread assert in ImageSource
        https://bugs.webkit.org/show_bug.cgi?id=205850

        Reviewed by Dean Jackson.

        Assert that we're destroyed on the creation thread, rather than on the
        main thread. This is required for ImageBitmap creation in workers in
        debug builds.

        Test: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-in-worker-transfer.html

        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::ImageSource):
        (WebCore::ImageSource::~ImageSource):
        (WebCore::ImageSource::startAsyncDecodingQueue):
        * platform/graphics/ImageSource.h:

2020-01-09  Jer Noble  <jer.noble@apple.com>

        [Cocoa] persistent-usage-record message fails first time; succeeds subsequent times
        https://bugs.webkit.org/show_bug.cgi?id=205970
        <rdar://problem/57785647>

        Reviewed by Eric Carlson.

        The AVContentKeySession is created too early; before the CDM has a chance to provide the storage path
        for persistent usage records. Delay creation of the AVCKS until it's actually needed during the first
        license request.

        Drive-by fix: fix the exceptional case where a PUR session is closed but PUR data isn't available; send
        a null message rather than an empty array.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::contentKeySession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC): Deleted.
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::ensureSession): Deleted.

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        Fix iOS build.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] Rename UsedHorizontal(Vertical)Values to OverrideHorizontal(Vertical)values
        https://bugs.webkit.org/show_bug.cgi?id=206008
        <rdar://problem/58443375>

        Reviewed by Antti Koivisto.

        These structure are a mixture of specified and used values.
        What these specified/used values mean in this context is that they override the default input
        values for the "compute geometry" functions (e.g. computing the width of a floating box follows
        the same set of steps as computing the width of an inline replaced box. So whenever we need to
        compute the width of a floating box, we could just call the computeInlineReplacedWidth() function.
        However their horizontal margin computations are different and since width and horizontal margins are being computed together,
        we need to make sure that inlineReplacedWidthAndMargin() takes a set of pre-computed margin values
        and uses them while computing the width value. Same applies to min/max-width/heigh computations.)

        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] Add missing HorizontalConstraints/VerticalConstraints
        https://bugs.webkit.org/show_bug.cgi?id=205987
        <rdar://problem/58432728>

        Reviewed by Antti Koivisto.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/inlineformatting/InlineFormattingContext.h:

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] Decouple UsedHorizontal(Vertical)Values and Horizontal(Vertical)Constraints
        https://bugs.webkit.org/show_bug.cgi?id=205985
        <rdar://problem/58431985>

        Reviewed by Antti Koivisto.

        Some geometry functions need only the constraint values and some need both the constraint and the used values.

        Inflow:
          horizontal:
            width and margin: needs horizontal constraint (containing block width) and the used values (min/max width).
            position: needs horizontal constraint (containing block's content box left).
          vertical:
            height and margin: needs horizontal constraint to resolve margin values and the used values (min/max height).
            position: needs vertical constraint (containing block's content box top).

        Out-of-flow:
          horizontal geometry: horizontal constraint and the used value.
          vertical geometry: horizontal and vertical constraint and the vertical used value.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/LayoutUnits.h:
        (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues): Deleted.
        (WebCore::Layout::UsedVerticalValues::UsedVerticalValues): Deleted.
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] Use Horizontal/VerticalConstraints wherever possible
        https://bugs.webkit.org/show_bug.cgi?id=205973
        <rdar://problem/58426772>

        Reviewed by Antti Koivisto.

        Let's pass in Horizontal/VerticalConstraints struct instead of the UsedHorizontal/VerticalValues
        to the "compute geometry" functions when only the constraint values are needed/available.
        This is also in preparation for decoupling used and constraint values.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] Move Constraints struct out of UsedHorizontal(Vertical)values.
        https://bugs.webkit.org/show_bug.cgi?id=205944
        <rdar://problem/58415893>

        Reviewed by Antti Koivisto.

        This is in preparation for decoupling used values and constraints.
        Certain "compute geometry" functions only need the constraints while others only need the used values. 

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::horizontalConstraintsForOutOfFlow):
        (WebCore::Layout::FormattingContext::Geometry::verticalConstraintsForOutOfFlow):
        (WebCore::Layout::FormattingContext::Geometry::horizontalConstraintsForInFlow):
        (WebCore::Layout::FormattingContext::Geometry::verticalConstraintsForInFlow):
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/LayoutUnits.h:
        (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
        (WebCore::Layout::UsedVerticalValues::UsedVerticalValues):
        (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints): Deleted.
        (WebCore::Layout::UsedVerticalValues::Constraints::Constraints): Deleted.
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::computedTextIndent const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        * layout/tableformatting/TableFormattingContext.h:

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::layoutInFlowContent should take UsedVerticalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=205937
        <rdar://problem/58412170>

        Reviewed by Antti Koivisto.

        This is in preparation for not needing to query the containing block for constraint information.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        * layout/tableformatting/TableFormattingContext.h:

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Start passing in vertical constraints to compute* functions
        https://bugs.webkit.org/show_bug.cgi?id=205934
        <rdar://problem/58411387>

        Reviewed by Antti Koivisto.

        This is in preparation for not needing to query the containing block for constraint information.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::verticalConstraintsForInFlow):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:

2020-01-09  Keith Rollin  <krollin@apple.com>

        Reformat FrameView logging
        https://bugs.webkit.org/show_bug.cgi?id=205984
        <rdar://problem/58431722>

        Reviewed by Brent Fulgham.

        Update the format used by FrameView in its RELEASE_LOG logging. Use
        the format used by WebPageProxy and NetworkResourceLoader, which is
        generally of the form:

            <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

        So, for example:

            0x4a1cf8010 - FrameView::fireLayoutRelatedMilestonesIfNeeded() - firing first visually non-empty layout milestone on the main frame

        becomes:

            0x561be8010 - [frame=0x55d47e000, main=1] FrameView::fireLayoutRelatedMilestonesIfNeeded: Firing first visually non-empty layout milestone on the main frame

        No new tests -- no new or changed functionality.

        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents):
        (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] computeHeightAndMargin/placeInFlowPositionedChildren should take UsedHorizontalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=205904
        <rdar://problem/58398413>

        Reviewed by Antti Koivisto.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::move):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] BlockFormattingContext::layoutFormattingContextRoot should take the horizontal constraints
        https://bugs.webkit.org/show_bug.cgi?id=205894
        <rdar://problem/58391798>

        Reviewed by Antti Koivisto.

        layoutFormattingContextRoot should not need to read the containing block's geometry for constraints information.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        * layout/blockformatting/BlockFormattingContext.h:

2020-01-09  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: stop cursor prefetching when size of cached records reaches limit
        https://bugs.webkit.org/show_bug.cgi?id=205909

        Reviewed by Alex Christensen.

        SQLiteIDBCursor was allowed to prefetch 8 cursor records at most. This patch introduces a new rule for better
        flexibility. Prefetch will stop if either of the following conditions is true:
        1. number of prefetched records is not less than 128
        2. size of prefeteched records is not less than 8MB

        * Modules/indexeddb/IDBKeyData.cpp:
        (WebCore::IDBKeyData::size const):
        * Modules/indexeddb/IDBKeyData.h:
        * Modules/indexeddb/IDBValue.cpp:
        (WebCore::IDBValue::size const):
        * Modules/indexeddb/IDBValue.h:
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
        (WebCore::IDBServer::SQLiteIDBCursor::prefetch):
        (WebCore::IDBServer::SQLiteIDBCursor::advance):
        (WebCore::IDBServer::SQLiteIDBCursor::fetch):
        * Modules/indexeddb/server/SQLiteIDBCursor.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::prefetchCursor):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/shared/IDBCursorRecord.h:
        (WebCore::IDBCursorRecord::size const):

2020-01-09  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::layoutOutOfFlowContent should take horizontal and vertical constraints.
        https://bugs.webkit.org/show_bug.cgi?id=205892
        <rdar://problem/58389802>

        Reviewed by Antti Koivisto.

        The caller should provide the horizontal/vertical constraints for the the out-of-flow boxes. It helps to make sure that we don't access geometry information
        in the parent formatting context.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::horizontalConstraintsForOutOfFlow):
        (WebCore::Layout::FormattingContext::Geometry::verticalConstraintsForOutOfFlow):
        (WebCore::Layout::FormattingContext::Geometry::horizontalConstraintsForInFlow):
        (WebCore::Layout::FormattingContext::Geometry::verticalConstraintsForInFlow):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalConstraints): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalConstraints): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::inFlowHorizontalConstraints): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::inFlowVerticalConstraints): Deleted.
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):

2020-01-09  youenn fablet  <youenn@apple.com>

        REGRESSION: [ Mac wk2 ] fast/mediastream/captureInGPUProcess.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=205873
        <rdar://problem/58380638>

        Reviewed by Eric Carlson.

        Beef up reporting of error cases when device is not found for a getUserMedia call.
        Covered by unflaked test.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::create):
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioCaptureSource::create):
        * platform/mediastream/mac/MockAudioSharedUnit.mm:
        (WebCore::MockRealtimeAudioSource::create):
        * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
        (WebCore::MockRealtimeVideoSource::create):
        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::create):
        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::create):

2020-01-09  youenn fablet  <youenn@apple.com>

        RemoteVideoSample should be able to support canvas video samples
        https://bugs.webkit.org/show_bug.cgi?id=205922

        Reviewed by Eric Carlson.

        Canvas capture is producing video samples that are not IOSurface backed.
        This makes it impossible to send them through IPC via RemoteVideoSample.
        We beef up RemoteVideoSample to create an IOSurface for RGBA video samples.

        Test: http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html

        * platform/graphics/RemoteVideoSample.cpp:
        (WebCore::transferBGRAPixelBufferToIOSurface):
        (WebCore::RemoteVideoSample::create):

2020-01-08  Keith Miller  <keith_miller@apple.com>

        [JSC] Introduce JSArrayIterator
        https://bugs.webkit.org/show_bug.cgi?id=204043

        Reviewed by Yusuke Suzuki.

        JSDOMIterator should just use the JSC IterationKind enum. Also,
        update other files for the enum member name changes.

        * bindings/js/JSDOMIterator.h:
        (WebCore::IteratorTraits>::asJS):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::serialize):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateIterableDefinition):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::jsTestInterfacePrototypeFunctionEntriesCaller):
        (WebCore::jsTestInterfacePrototypeFunctionKeysCaller):
        (WebCore::jsTestInterfacePrototypeFunctionValuesCaller):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::jsTestIterablePrototypeFunctionEntriesCaller):
        (WebCore::jsTestIterablePrototypeFunctionKeysCaller):
        (WebCore::jsTestIterablePrototypeFunctionValuesCaller):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::jsTestNodePrototypeFunctionEntriesCaller):
        (WebCore::jsTestNodePrototypeFunctionKeysCaller):
        (WebCore::jsTestNodePrototypeFunctionValuesCaller):

2020-01-08  Yusuke Suzuki  <ysuzuki@apple.com>

        Reduce binary size by purging C++ type information in Objective-C fields and parameters
        https://bugs.webkit.org/show_bug.cgi?id=205905

        Reviewed by Saam Barati.

        No behavior change.

        * page/mac/WebCoreFrameView.h:
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer initWithGraphicsContextGL:]):
        * platform/ios/WebVideoFullscreenControllerAVKit.h:
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (-[WebVideoFullscreenController videoElement]):
        (-[WebVideoFullscreenController setVideoElement:]):
        * platform/mac/ScrollAnimatorMac.mm:
        (-[WebScrollAnimationHelperDelegate initWithScrollAnimator:]):
        (-[WebScrollAnimationHelperDelegate invalidate]):
        (-[WebScrollerImpDelegate scrollAnimator]):

2020-01-08  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Flip experimental cookie blocking setting from an enable to a disable
        https://bugs.webkit.org/show_bug.cgi?id=205963
        <rdar://problem/58424136>

        Reviewed by Brent Fulgham.

        To get default on behavior, experimental features in the network process need to be
        turned from enable flags to disable flags. This patch does that for the experimental
        cookie blocking flag.

        No new tests. This change just reverses the interpretation of a flag.

        * page/Settings.yaml:

2020-01-08  Devin Rousso  <drousso@apple.com>

        Move logic for parsing image-orientation to CSSParserFastPaths
        https://bugs.webkit.org/show_bug.cgi?id=205962

        Reviewed by Simon Fraser.

        Covered by exiting tests. No change in functionality.

        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        (WebCore::CSSParserFastPaths::isKeywordPropertyID):

        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        (WebCore::consumeImageOrientation): Deleted.

2020-01-08  Noam Rosenthal  <noam@webkit.org>

        <img>.naturalWidth should return the density-corrected intrinsic width
        https://bugs.webkit.org/show_bug.cgi?id=150443

        Reviewed by Simon Fraser.

        Take image's density into account when requesting naturalWidth/naturalHeight, not in SVG.

        This now complies with the standard (https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-naturalwidth)
        It also matches the behavior on Chrome and on Firefox.

        Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/basic.html
                Updaded expected results

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::effectiveImageDevicePixelRatio const):
        (WebCore::HTMLImageElement::naturalWidth const):
        (WebCore::HTMLImageElement::naturalHeight const):
        * html/HTMLImageElement.h:
                Use effective image devicePixelRatio for naturalWidth/height calculation

        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::unclampedImageSizeForRenderer const):
        (WebCore::CachedImage::imageSizeForRenderer const):
        * loader/cache/CachedImage.h:
                Don't clamp to 1 when calculating naturalWidth/naturalHeight, as this has
                nothing to do with zoomed images. Zoomed images behavior remains the same.

2020-01-08  Devin Rousso  <drousso@apple.com>

        REGRESSION: (r254186) [ Mac ] inspector/css/add-rule.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=205938
        <rdar://problem/58413597>

        Reviewed by Brian Burg.

        Covered by existing tests.

        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyleSheet::originalStyleSheetText const):
        (WebCore::InspectorStyleSheet::resourceStyleSheetText const):
        (WebCore::InspectorStyleSheet::inlineStyleSheetText const):
        (WebCore::InspectorStyleSheet::extensionStyleSheetText const):
        The Inspector Style Sheet is an inline style sheet, so it goes through `inlineStyleSheetText`
        instead of `resourceStyleSheetText`. Style sheets are only be sourced from one place anyways
        so there's no reason to gate each function based on the `origin`.

2020-01-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Suppress "unused parameter" when including libWebRTC headers in LibWebRTCProviderCocoa.cpp
        https://bugs.webkit.org/show_bug.cgi?id=205951

        Reviewed by Eric Carlson.

        Suppress the "unused parameter" warning that results from including `video_encoder.h`, which contains the
        following line of code (where `reason` is unused):

        ```
        virtual void OnDroppedFrame(DropReason reason) {}
        ```

        This matches other places in WebCore where we attempt to `#include <webrtc/sdk/WebKit/WebKitUtilities.h>`.

        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

2020-01-08  Brady Eidson  <beidson@apple.com>

        Make _callAsyncFunction:withArguments: work with promises.
        https://bugs.webkit.org/show_bug.cgi?id=205654

        Reviewed by Saam Barati.

        Covered by API tests.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld):

2020-01-08  Myles C. Maxfield  <mmaxfield@apple.com>

        Fix specification violation in Font Loading API
        https://bugs.webkit.org/show_bug.cgi?id=205901
        <rdar://problem/58083743>

        Reviewed by Brent Fulgham.

        Our Font Loading API does not comply with the spec:

        > If the parsed value is a CSS-wide keyword, return a syntax error.

        Rather than crashing, we should return a syntax error.

        Test: fast/text/font-loading-global-keyword.html

        * css/CSSFontFaceSet.cpp:
        (WebCore::computeFontSelectionRequest):
        (WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts):

2020-01-08  Dean Jackson  <dino@apple.com>

        [WebGL] More GraphicsContext3D to GraphicsContextGL renaming
        https://bugs.webkit.org/show_bug.cgi?id=205949
        <rdar://problem/58416989>

        Reviewed by Antoine Quint.

        Rename the GC3D-prefixed types.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLVideoElement.cpp:
        * html/HTMLVideoElement.h:
        * html/OffscreenCanvas.cpp:
        * html/canvas/ANGLEInstancedArrays.cpp:
        * html/canvas/ANGLEInstancedArrays.h:
        * html/canvas/OESVertexArrayObject.cpp:
        * html/canvas/OESVertexArrayObject.h:
        * html/canvas/WebGL2RenderingContext.cpp:
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGLActiveInfo.h:
        * html/canvas/WebGLBuffer.cpp:
        * html/canvas/WebGLBuffer.h:
        * html/canvas/WebGLDrawBuffers.cpp:
        * html/canvas/WebGLDrawBuffers.h:
        * html/canvas/WebGLFramebuffer.cpp:
        * html/canvas/WebGLFramebuffer.h:
        * html/canvas/WebGLObject.cpp:
        * html/canvas/WebGLObject.h:
        * html/canvas/WebGLProgram.cpp:
        * html/canvas/WebGLProgram.h:
        * html/canvas/WebGLQuery.cpp:
        * html/canvas/WebGLQuery.h:
        * html/canvas/WebGLRenderbuffer.cpp:
        * html/canvas/WebGLRenderbuffer.h:
        * html/canvas/WebGLRenderingContext.cpp:
        * html/canvas/WebGLRenderingContext.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        * html/canvas/WebGLRenderingContextBase.h:
        * html/canvas/WebGLSampler.cpp:
        * html/canvas/WebGLSampler.h:
        * html/canvas/WebGLShader.cpp:
        * html/canvas/WebGLShader.h:
        * html/canvas/WebGLShaderPrecisionFormat.cpp:
        * html/canvas/WebGLShaderPrecisionFormat.h:
        * html/canvas/WebGLSync.cpp:
        * html/canvas/WebGLSync.h:
        * html/canvas/WebGLTexture.cpp:
        * html/canvas/WebGLTexture.h:
        * html/canvas/WebGLTransformFeedback.cpp:
        * html/canvas/WebGLTransformFeedback.h:
        * html/canvas/WebGLUniformLocation.cpp:
        * html/canvas/WebGLUniformLocation.h:
        * html/canvas/WebGLVertexArrayObject.cpp:
        * html/canvas/WebGLVertexArrayObject.h:
        * html/canvas/WebGLVertexArrayObjectBase.cpp:
        * html/canvas/WebGLVertexArrayObjectBase.h:
        * html/canvas/WebGLVertexArrayObjectOES.cpp:
        * html/canvas/WebGLVertexArrayObjectOES.h:
        * platform/graphics/ExtensionsGL.h:
        * platform/graphics/GraphicsContextGL.cpp:
        * platform/graphics/GraphicsContextGL.h:
        * platform/graphics/GraphicsTypesGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsTypes3D.h.
        * platform/graphics/ImageBuffer.cpp:
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/MediaPlayer.cpp:
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        * platform/graphics/angle/ExtensionsGLANGLE.cpp:
        * platform/graphics/angle/ExtensionsGLANGLE.h:
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        * platform/graphics/angle/TemporaryANGLESetting.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
        * platform/graphics/cocoa/WebGLLayer.mm:
        * platform/graphics/cv/TextureCacheCV.h:
        * platform/graphics/cv/TextureCacheCV.mm:
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        * platform/graphics/cv/VideoTextureCopierCV.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/opengl/ExtensionsGLOpenGL.cpp:
        * platform/graphics/opengl/ExtensionsGLOpenGL.h:
        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:
        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:
        * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
        * platform/graphics/opengl/ExtensionsGLOpenGLES.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:
        * platform/graphics/opengl/TemporaryOpenGLSetting.h:
        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
        * platform/graphics/texmap/TextureMapperGL.cpp:

2020-01-08  Peng Liu  <peng.liu6@apple.com>

        After playing a video and making it full screen, the video exits full screen and stops but the audio continues to play
        https://bugs.webkit.org/show_bug.cgi?id=205896

        Reviewed by Jer Noble.

        AVKit calls playerViewController:shouldExitFullScreenWithReason in the scenario that the exit fullscreen request
        is from the web process (e.g., through Javascript API videoElement.webkitExitFullscreen()).
        We have to ignore the callback in that case.

        No new tests, covered by existing tests.

        * platform/ios/VideoFullscreenInterfaceAVKit.h:
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (VideoFullscreenInterfaceAVKit::exitFullscreen):
        (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
        (VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler):
        (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):

2020-01-08  Andres Gonzalez  <andresg_22@apple.com>

        Fix for parameterized attribute TextMarkerRangeForUIElement which should run ion main thread.
        https://bugs.webkit.org/show_bug.cgi?id=205920

        Reviewed by Chris Fleizach.

        Parameterized attribute TextMarkerRangeForUIElement must run on main
        thread since it invokes DOM Range methods.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2020-01-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add encoding/decoding support for data structures in TextFlags.h
        https://bugs.webkit.org/show_bug.cgi?id=205903

        Reviewed by Tim Horton.

        Adds encoders and decoders for the enum classes and structs in TextFlags.h, with the eventual goal of being able
        to send font creation parameters when sending font data to the GPU process. No change in behavior.

        * platform/text/TextFlags.h:
        (WebCore::FontVariantSettings::encode const):
        (WebCore::FontVariantSettings::decode):
        (WebCore::FontVariantLigaturesValues::encode const):
        (WebCore::FontVariantLigaturesValues::decode):
        (WebCore::FontVariantNumericValues::encode const):
        (WebCore::FontVariantNumericValues::decode):
        (WebCore::FontVariantEastAsianValues::encode const):
        (WebCore::FontVariantEastAsianValues::decode):

2020-01-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add support for encoding WebCore::Font over IPC for DisplayList::DrawGlyphs
        https://bugs.webkit.org/show_bug.cgi?id=205830
        <rdar://problem/57347719>

        Reviewed by Dean Jackson.

        Add support for encoding Fonts. In the case where the Font is installed, we use platform encoders to send across
        the font descriptor, and reconstruct the font using this descriptor on the receiving end (see the existing
        implementations of encodeFontInternal and decodeFontInternal). In the case where the Font is not installed, we
        instead send the font face data over (plumbed across from the CachedFont), and reconstruct the platform font
        data from the raw font data on the receiving end.

        This allows us to render web fonts in the GPU process through the `DrawGlyphs` display list item.

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::font):
        * css/CSSFontFaceSource.h:
        * platform/graphics/Font.cpp:
        (WebCore::Font::setFontFaceData):

        Add a way to set font face data used to create the Font. This data comes from a CachedFont's data buffer, and is
        used to serialize FontHandles when building display list items.

        (WebCore::FontHandle::FontHandle):

        Add a serializable wrapper class that contains a nullable Font. The encoder/decoders for FontHandle are
        implemented in WebKit2.

        * platform/graphics/Font.h:
        (WebCore::Font::fontFaceData const):
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::DrawGlyphs::DrawGlyphs):

        Finish implementing the encode/decode methods for DrawGlyphs, by sending the Font data over via FontHandle.

        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawGlyphs::create):
        (WebCore::DisplayList::DrawGlyphs::encode const):
        (WebCore::DisplayList::DrawGlyphs::decode):

        When decoding `DrawGlyphs`, avoid having to rebuild the glyph Vector by adding (and using) new DrawGlyphs
        constructors that take `Vector&&`s.

2020-01-08  Antoine Quint  <graouts@apple.com>

        [Web Animations] Stop creating CSS Animations for <noscript> elements
        https://bugs.webkit.org/show_bug.cgi?id=205925
        <rdar://problem/58158479>

        Reviewed by Antti Koivisto.

        Test: webanimations/no-css-animation-on-noscript.html

        It makes no sense to create CSS Animations for a <noscript> element and it has the side effect of potential crashes.
        Indeed, AnimationTimeline::updateCSSAnimationsForElement() may be called without a currentStyle and so we never have
        a list of previously-applied animations to compare to the list of animations in afterChangeStyle. So on each call we
        end up creating a new CSSAnimation and the previous animation for the same name is never explicitly removed from the
        effect stack and is eventually destroyed and the WeakPtr for it in the stack ends up being null, which would cause a
        crash under KeyframeEffectStack::ensureEffectsAreSorted().

        We now prevent elements such as <noscript> from being considered for CSS Animations in TreeResolver::resolveElement().

        * dom/Element.cpp:
        (WebCore::Element::rendererIsNeeded):
        * dom/Element.h:
        (WebCore::Element::rendererIsEverNeeded):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::rendererIsEverNeeded):
        (WebCore::HTMLElement::rendererIsNeeded): Deleted.
        * html/HTMLElement.h:
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement):

2020-01-08  Alicia Boya García  <aboya@igalia.com>

        [WTF] Allow MediaTime static constants
        https://bugs.webkit.org/show_bug.cgi?id=205723

        Reviewed by Darin Adler.

        Since MediaTime no longer has a non-trivial destructor, declaring
        MediaTime variables no longer has potential side effects as far as the
        compiler is concerned and it can therefore print "unused variable"
        errors where that is the case.

        This patch marks one of such variable as intentionally unused, since
        it's only used in Debug and would otherwise break the Release build.
        Actually unused variables are also removed.

        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
        (WebCore::WebCoreDecompressionSession::imageForTime):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removeCodedFrames):

2020-01-08  Diego Pino Garcia  <dpino@igalia.com>

        REGRESSION(r253939): [GTK] Broke build with !USE(WPE_RENDERER) 
        https://bugs.webkit.org/show_bug.cgi?id=205648

        Reviewed by Carlos Alberto Lopez Perez.

        * platform/graphics/GraphicsContextGL.h: Rename enum None to
        DOMSourceNone to avoid name collission.

2020-01-08  youenn fablet  <youenn@apple.com>

        Implement MediaRecorder backend in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=205802

        Reviewed by Eric Carlson.

        Add a page provider to create MediaRecorderPrivate implementations.
        This is used by WebKit layer to implement this in GPUProcess.

        Update MediaRecorderPrivate by adding an error callback that is used to surface errors as MediaRecorder error events.

        Covered by existing tests as MediaRecorder implementation in WebKitTestRunner will use GPUProcess.

        * Headers.cmake:
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::create):
        (WebCore::MediaRecorder::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediarecorder/MediaRecorderProvider.cpp: Added.
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorderProvider.h: Added.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/Page.h:
        (WebCore::Page::mediaRecorderProvider):
        * page/PageConfiguration.cpp:
        (WebCore::PageConfiguration::PageConfiguration):
        * page/PageConfiguration.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::create):
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setUseGPUProcessForWebRTC):

2020-01-08  Fujii Hironori  <Hironori.Fujii@sony.com>

        [HarfBuzz][GTK] fast/text/complex-first-glyph-with-initial-advance.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=118221

        Reviewed by Carlos Garcia Campos.

        Arabic diacritics made glyphs vertically unaligned if the first
        glyph had a vertical offset.

        The initial advance should be same with the first glyph origin for
        HarfBuzz. See the diagram in ComplexTextController.h for details.
        <https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ComplexTextController.h?rev=224007#L109>

        drawGlyphs of Cairo port was assuming upward y-axis for glyph
        advances even though those of Mac and AppleWin port are assuming
        downward y-axis. This is a problem for Windows ports because
        AppleWin and WinCairo port are sharing the code calculating
        advances.

        Covered by existing tests.

        * platform/graphics/cairo/FontCairo.cpp:
        (WebCore::FontCascade::drawGlyphs):
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::drawGlyphs):
        Sum up the height of advances into yOffset instead of subtraction.

        * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
        (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
        Don't negate offsetY. Set m_initialAdvance as the first item of
        m_glyphOrigins.

2020-01-07  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Implement css3-images image-orientation
        https://bugs.webkit.org/show_bug.cgi?id=89052

        Reviewed by Simon Fraser.

        Implement the CSS image-orientation property for content images. The valid
        values are "from-image" or "none". The default value is "from-image".

        Specification: https://drafts.csswg.org/css-images-3/#the-image-orientation
        GitHub issue: https://github.com/w3c/csswg-drafts/issues/4164

        Tests: fast/images/image-orientation-dynamic-from-image.html
               fast/images/image-orientation-dynamic-none.html
               fast/images/image-orientation-none.html

        * Configurations/FeatureDefines.xcconfig:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::operator ImageOrientation const): Deleted.
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeImageOrientation):
        (WebCore::CSSPropertyParser::parseSingleValue):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::imageOrientation const):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::styleDidChange):
        * rendering/style/RenderStyle.cpp:
        (WebCore::rareInheritedDataChangeRequiresLayout):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::setImageOrientation):
        (WebCore::RenderStyle::initialImageOrientation):
        (WebCore::RenderStyle::imageOrientation const):
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:
        * style/StyleBuilderConverter.h:
        (WebCore::Style::BuilderConverter::convertImageOrientation):

2020-01-07  Devin Rousso  <drousso@apple.com>

        Web Inspector: unable to edit or view the source of style sheets injected by safari app extensions
        https://bugs.webkit.org/show_bug.cgi?id=205900
        <rdar://problem/57898773>

        Reviewed by Timothy Hatcher.

        Remove the restrictions around `CSS.StyleSheetOrigin.User` style sheets, thereby allowing
        Web Inspector to get the source information that is necessary to show the "resource" in the
        Sources Tab.

        * dom/ExtensionStyleSheets.h:
        * dom/ExtensionStyleSheets.cpp:
        (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const):
        (WebCore::ExtensionStyleSheets::contentForInjectedStyleSheet const): Added.
        Save a copy of the string source of any injected style sheet and provide a way to get it for
        any given `CSSStyleSheet`.

        * style/StyleScope.cpp:
        (WebCore::Style::Scope::activeStyleSheetsForInspector):
        * style/InspectorCSSOMWrappers.cpp:
        (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
        Include all types of extension style sheets when collecting active rules and style sheets
        for Web Inspector to instrument.

        * inspector/InspectorStyleSheet.cpp:
        * inspector/InspectorStyleSheet.h:
        (WebCore::InspectorStyleSheet::buildObjectForRule):
        (WebCore::InspectorStyleSheet::originalStyleSheetText const):
        (WebCore::InspectorStyleSheet::resourceStyleSheetText const):
        (WebCore::InspectorStyleSheet::inlineStyleSheetText const):
        (WebCore::InspectorStyleSheet::extensionStyleSheetText const): Added.

2020-01-07  Alex Christensen  <achristensen@webkit.org>

        Introduce _WKResourceLoadDelegate
        https://bugs.webkit.org/show_bug.cgi?id=205887

        Reviewed by Dean Jackson.

        * page/Page.h:
        (WebCore::Page::setHasResourceLoadClient):
        (WebCore::Page::hasResourceLoadClient const):

2020-01-07  Chris Dumez  <cdumez@apple.com>

        Remove document.origin
        https://bugs.webkit.org/show_bug.cgi?id=205681

        Reviewed by Geoffrey Garen.

        Remove document.origin, which was replaced by self.origin as per:
        - https://github.com/whatwg/dom/pull/815
        - https://github.com/whatwg/dom/issues/410

        Gecko has never supported this and Blink has already dropped support for it.

        No new tests, updated existing tests.

        * dom/Document.cpp:
        (WebCore::Document::origin const): Deleted.
        * dom/Document.h:
        * dom/Document.idl:
        * dom/ScriptExecutionContext.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::printAccessDeniedMessage const):
        * workers/WorkerGlobalScope.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::origin const): Deleted.
        * worklets/WorkletGlobalScope.h:

2020-01-07  Keith Rollin  <krollin@apple.com>

        Reformat FrameLoader logging
        https://bugs.webkit.org/show_bug.cgi?id=205884
        <rdar://problem/58387123>

        Reviewed by Brent Fulgham.

        Update the format used by FrameLoader in its RELEASE_LOG logging. Use
        the format used by WebPageProxy and NetworkResourceLoader, which is
        generally of the form:

            <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

        So, for example:

            0x4aa2df000 - FrameLoader::allAllLoaders: Clearing provisional document loader (frame = 0x4a8ad3550, main = 0 m_provisionalDocumentLoader=0x0)

        becomes:

            0x465fb61a0 - [frame=0x465c98a20, main=0] FrameLoader::stopAllLoaders: Clearing provisional document loader (m_provisionalDocumentLoader=0x0)

        No new tests -- no new or changed functionality.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::finishedParsing):
        (WebCore::FrameLoader::loadURLIntoChildFrame):
        (WebCore::FrameLoader::loadArchive):
        (WebCore::FrameLoader::loadInSameDocument):
        (WebCore::FrameLoader::prepareForLoadStart):
        (WebCore::FrameLoader::setupForReplace):
        (WebCore::FrameLoader::loadFrameRequest):
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::loadWithNavigationAction):
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::clearProvisionalLoadForPolicyCheck):
        (WebCore::FrameLoader::reloadWithOverrideEncoding):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::stopAllLoaders):
        (WebCore::FrameLoader::stopForBackForwardCache):
        (WebCore::FrameLoader::setProvisionalDocumentLoader):
        (WebCore::FrameLoader::setState):
        (WebCore::FrameLoader::clearProvisionalLoad):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameLoader::loadPostRequest):
        (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):

2020-01-07  Chris Dumez  <cdumez@apple.com>

        Using Web Share API preceded by an AJAX call
        https://bugs.webkit.org/show_bug.cgi?id=197779
        <rdar://problem/50708309>

        Reviewed by Dean Jackson.

        As per the Web Share specification, navigator.share() is supposed to reject the promise with a
        "NotAllowedError" DOMException if the relevant global object of this does not have transient
        activation [1]. However, our implementation was stricter and would reject the promise if we
        are not currently processing a user-gesture. This behavior did not match Chrome and does not
        appear to be Web compatible.

        To address the issue, this patch introduces the concept of transient activation [2] in WebKit
        and uses it in navigator.share() to match the specification more closely. Note that we are
        still a bit stricter than the specification because calling navigator.share() will currently
        "consume the activation" [3] to prevent the JS from presenting the share sheet more than once
        based on a single activation. However, our new behavior is still more permissive and more aligned
        with Chrome.

        [1] https://w3c.github.io/web-share/#dom-navigator-share
        [2] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation
        [3] https://html.spec.whatwg.org/multipage/interaction.html#consume-user-activation

        Tests: fast/web-share/share-transient-activation-expired.html
               fast/web-share/share-transient-activation.html

        * dom/UserGestureIndicator.cpp:
        * dom/UserGestureIndicator.h:
        (WebCore::UserGestureToken::startTime const):
        * page/DOMWindow.cpp:
        (WebCore::transientActivationDurationOverrideForTesting):
        (WebCore::transientActivationDuration):
        (WebCore::DOMWindow::origin const):
        (WebCore::DOMWindow::securityOrigin const):
        (WebCore::DOMWindow::overrideTransientActivationDurationForTesting):
        (WebCore::DOMWindow::hasTransientActivation const):
        (WebCore::DOMWindow::consumeTransientActivation):
        (WebCore::DOMWindow::notifyActivated):
        * page/DOMWindow.h:
        * page/Navigator.cpp:
        (WebCore::Navigator::share):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setTransientActivationDuration):
        * testing/Internals.h:
        * testing/Internals.idl:

2020-01-07  Simon Fraser  <simon.fraser@apple.com>

        Add some more Animations logging
        https://bugs.webkit.org/show_bug.cgi?id=205890

        Reviewed by Dean Jackson.

        Add Animations logging to various WebAnimations entry points.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::getAnimatedStyle):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::silentlySetCurrentTime):
        (WebCore::WebAnimation::setCurrentTime):
        (WebCore::WebAnimation::cancel):
        (WebCore::WebAnimation::finish):
        (WebCore::WebAnimation::play):
        (WebCore::WebAnimation::runPendingPlayTask):
        (WebCore::WebAnimation::pause):
        (WebCore::WebAnimation::reverse):
        (WebCore::WebAnimation::runPendingPauseTask):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::seekAnimation):

2020-01-07  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed restabilization of non-unified build.

        * html/HTMLDialogElement.cpp:
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        * style/StyleAdjuster.h:
        * style/UserAgentStyle.cpp:
        * workers/service/SWClientConnection.cpp:
        * workers/service/context/ServiceWorkerThread.h:
        * workers/service/context/ServiceWorkerThreadProxy.cpp:

2020-01-07  Megan Gardner  <megan_gardner@apple.com>

        Rename start/endPosition to start/endOffset in SelectionRangeData for clarity
        https://bugs.webkit.org/show_bug.cgi?id=205838

        Reviewed by Megan Gardner.

        Offset is a more correct term for this variable, as it is just an unsigned.

        No behavior change.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::verifySelectionState const):
        (WebCore::InlineTextBox::selectionStartEnd const):
        (WebCore::InlineTextBox::highlightStartEnd const):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::isSelected const):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::collectSelectionRectsForLineBoxes):
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::setSelectionState):
        * rendering/SelectionRangeData.cpp:
        (WebCore::rendererAfterOffset):
        (WebCore::collect):
        (WebCore::SelectionRangeData::selectionStateForRenderer):
        (WebCore::SelectionRangeData::repaint const):
        (WebCore::SelectionRangeData::collectBounds const):
        (WebCore::SelectionRangeData::apply):
        (WebCore::rendererAfterPosition): Deleted.
        * rendering/SelectionRangeData.h:
        (WebCore::SelectionRangeData::Context::Context):
        (WebCore::SelectionRangeData::Context::startOffset const):
        (WebCore::SelectionRangeData::Context::endOffset const):
        (WebCore::SelectionRangeData::Context::operator== const):
        (WebCore::SelectionRangeData::startOffset const):
        (WebCore::SelectionRangeData::endOffset const):
        (WebCore::SelectionRangeData::Context::startPosition const): Deleted.
        (WebCore::SelectionRangeData::Context::endPosition const): Deleted.
        (WebCore::SelectionRangeData::startPosition const): Deleted.
        (WebCore::SelectionRangeData::endPosition const): Deleted.

2020-01-07  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for lists (l, ul, ol, dl).
        https://bugs.webkit.org/show_bug.cgi?id=205874

        Reviewed by Chris Fleizach.

        - AXIsolatedObject implementation of isUnordered/Ordered/descriptionList.
        - Client code doesn't downcast to AccessibilityList any longer,
        but instead uses these methods that are exposed through AXCoreObject.

        * accessibility/AccessibilityList.h:
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/AccessibilityObjectMac.mm:
        (WebCore::AccessibilityObject::rolePlatformDescription const):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper subrole]):

2020-01-07  Sihui Liu  <sihui_liu@apple.com>

        Add a move constructor to IDBResultData
        https://bugs.webkit.org/show_bug.cgi?id=205833
        <rdar://problem/58146233>

        Reviewed by Youenn Fablet.

        * Modules/indexeddb/shared/IDBResultData.h:

2020-01-07  Daniel Bates  <dabates@apple.com>

        Fix failing tests following r254091
        <rdar://problem/58383099>

        Use LayoutUnit for the logical width instead of "auto" as the original code did before r254091
        to fix layout test failures, e.g. editing/selection/ios/fixed-selection-after-scroll.html
        This avoids accidental integer truncation that can occur if "snappedSelectionRect.maxX() > logicalRight"
        evaluates to true.

        * rendering/InlineTextBox.cpp:
        (WebCore::snappedSelectionRect):

2020-01-07  Simon Fraser  <simon.fraser@apple.com>

        WebKit rejects changes between similar unprefixed & prefixed gradient syntax
        https://bugs.webkit.org/show_bug.cgi?id=171015

        Reviewed by Dean Jackson.
        
        equals() needs to test m_gradientType.

        Test: fast/css/gradient-prefixed-unprefixed-toggle.html

        * css/CSSGradientValue.cpp:
        (WebCore::CSSLinearGradientValue::equals const):
        (WebCore::CSSRadialGradientValue::equals const):

2020-01-07  Daniel Bates  <dabates@apple.com>

        First character in each word-wrapped line has incorrect character rect when requested range spans multiple lines
        https://bugs.webkit.org/show_bug.cgi?id=205842
        <rdar://problem/56884325>

        Reviewed by Zalan Bujtas.

        Adds a new BoundingRectBehavior enumarator, IgnoreEmptyTextSelections, to ignore line boxes
        that are not selected by the specified range when computing the bounding box for it via Range::absoluteBoundingBox().

        A line box is said to be selected if there is at least one character in the specified character
        range. So, a range whose start position coincides with the edge of a line box does not select the
        box. However such ranges are considered to select such boxes when passed to web-exposed APIs
        {Element, Range}.getClientRects() and {Element, Range}.getBoundingClientRect(). These ranges
        produce empty client rectangles and these empty rectangles effect the computation of the bounding
        client rect. This is all speced behavior.

        When computing the glpyh bounding box for a document context request, these empty rectangles are
        not meaningful and cause weird results: the empty rect is unioned with the rect for the next selected
        character producing a rectangle that overlaps two lines. Ignoring them makes things behave more like
        NSLayoutManager.

        * dom/Range.cpp:
        (WebCore::Range::absoluteBoundingBox const):
        (WebCore::Range::absoluteRectsForRangeInText const):
        (WebCore::Range::absoluteTextQuads const):
        * dom/Range.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::absoluteQuadsForRange const):
        * rendering/RenderText.h:
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::absoluteQuadsForRange const):
        Pass an option to ignore empty text selections through. By default Range::absoluteBoundingBox() takes
        an empty set of BoundingRectBehavior enumerators to keep its current behavior.

        (WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Added a boolean as to whether to
        ignore empty selections. If enabled, skip all boxes that are not selected by the specified
        character range.
        * rendering/RenderTextLineBoxes.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Ditto.
        * rendering/SimpleLineLayoutFunctions.h:

2020-01-07  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r254144.

        Broke the iOS build.

        Reverted changeset:

        "First character in each word-wrapped line has incorrect
        character rect when requested range spans multiple lines"
        https://bugs.webkit.org/show_bug.cgi?id=205842
        https://trac.webkit.org/changeset/254144

2020-01-06  Dean Jackson  <dino@apple.com>

        [WebGL] Fill in missing WebGL2 entry points
        https://bugs.webkit.org/show_bug.cgi?id=205689
        <rdar://problem/58280920>

        Reviewed by Simon Fraser.

        Fill in the bits of the WebGL2 API that were missing.

        The specification splits into Base and Implementation
        interfaces, but I put everything in one place since
        we already have to check that we don't have function
        signature clashes.

        I also fixed some situations where we were not
        allowing for an Exception to be returned.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::texImage2D):
        (WebCore::WebGL2RenderingContext::texImage3D):
        (WebCore::WebGL2RenderingContext::texSubImage2D):
        (WebCore::WebGL2RenderingContext::texSubImage3D):
        (WebCore::WebGL2RenderingContext::compressedTexImage2D):
        (WebCore::WebGL2RenderingContext::compressedTexSubImage2D):
        (WebCore::WebGL2RenderingContext::uniform1fv):
        (WebCore::WebGL2RenderingContext::uniform2fv):
        (WebCore::WebGL2RenderingContext::uniform3fv):
        (WebCore::WebGL2RenderingContext::uniform4fv):
        (WebCore::WebGL2RenderingContext::uniform1iv):
        (WebCore::WebGL2RenderingContext::uniform2iv):
        (WebCore::WebGL2RenderingContext::uniform3iv):
        (WebCore::WebGL2RenderingContext::uniform4iv):
        (WebCore::WebGL2RenderingContext::uniformMatrix2fv):
        (WebCore::WebGL2RenderingContext::uniformMatrix3fv):
        (WebCore::WebGL2RenderingContext::uniformMatrix4fv):
        (WebCore::WebGL2RenderingContext::readPixels):
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGL2RenderingContext.idl:
        * html/canvas/WebGLRenderingContext.idl:
        * html/canvas/WebGLRenderingContextBase.idl:

2020-01-07  Daniel Bates  <dabates@apple.com>

        First character in each word-wrapped line has incorrect character rect when requested range spans multiple lines
        https://bugs.webkit.org/show_bug.cgi?id=205842
        <rdar://problem/56884325>

        Reviewed by Zalan Bujtas.

        Adds a new BoundingRectBehavior enumarator, IgnoreEmptyTextSelections, to ignore line boxes
        that are not selected by the specified range when computing the bounding box for it via Range::absoluteBoundingBox().

        A line box is said to be selected if there is at least one character in the specified character
        range. So, a range whose start position coincides with the edge of a line box does not select the
        box. However such ranges are considered to select such boxes when passed to web-exposed APIs
        {Element, Range}.getClientRects() and {Element, Range}.getBoundingClientRect(). These ranges
        produce empty client rectangles and these empty rectangles effect the computation of the bounding
        client rect. This is all speced behavior.

        When computing the glpyh bounding box for a document context request, these empty rectangles are
        not meaningful and cause weird results: the empty rect is unioned with the rect for the next selected
        character producing a rectangle that overlaps two lines. Ignoring them makes things behave more like
        NSLayoutManager.

        * dom/Range.cpp:
        (WebCore::Range::absoluteBoundingBox const):
        (WebCore::Range::absoluteRectsForRangeInText const):
        (WebCore::Range::absoluteTextQuads const):
        * dom/Range.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::absoluteQuadsForRange const):
        * rendering/RenderText.h:
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::absoluteQuadsForRange const):
        Pass an option to ignore empty text selections through. By default Range::absoluteBoundingBox() takes
        an empty set of BoundingRectBehavior enumerators to keep its current behavior.

        (WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Added a boolean as to whether to
        ignore empty selections. If enabled, skip all boxes that are not selected by the specified
        character range.
        * rendering/RenderTextLineBoxes.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Ditto.
        * rendering/SimpleLineLayoutFunctions.h:

2020-01-07  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r254132.
        https://bugs.webkit.org/show_bug.cgi?id=205868

        It is breaking WinCairo build and internal builds. (Requested
        by youenn on #webkit).

        Reverted changeset:

        "Implement MediaRecorder backend in GPUProcess"
        https://bugs.webkit.org/show_bug.cgi?id=205802
        https://trac.webkit.org/changeset/254132

2020-01-07  youenn fablet  <youenn@apple.com>

        Implement MediaRecorder backend in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=205802

        Reviewed by Eric Carlson.

        Add a page provider to create MediaRecorderPrivate implementations.
        This is used by WebKit layer to implement this in GPUProcess.

        Update MediaRecorderPrivate by adding an error callback that is used to surface errors as MediaRecorder error events.

        Covered by existing tests as MediaRecorder implementation in WebKitTestRunner will use GPUProcess.

        * Headers.cmake:
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::create):
        (WebCore::MediaRecorder::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediarecorder/MediaRecorderProvider.cpp: Added.
        (WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
        * Modules/mediarecorder/MediaRecorderProvider.h: Added.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/Page.h:
        (WebCore::Page::mediaRecorderProvider):
        * page/PageConfiguration.cpp:
        (WebCore::PageConfiguration::PageConfiguration):
        * page/PageConfiguration.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::create):
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setUseGPUProcessForWebRTC):

2020-01-07  Rob Buis  <rbuis@igalia.com>

        Remove loader/win
        https://bugs.webkit.org/show_bug.cgi?id=205852

        Reviewed by Youenn Fablet.

        Remove loader/win since it is not used anymore.

        * loader/win/DocumentLoaderWin.cpp: Removed.
        * loader/win/FrameLoaderWin.cpp: Removed.

2020-01-07  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of containsText for AXIsolatedObjects.
        https://bugs.webkit.org/show_bug.cgi?id=205847

        Reviewed by Chris Fleizach.

        No new tests, no new functionality.

        - Moved implementation of containsText from AccessibilityObject to
        AXCoreObject to be re-used by AXIsolatedObject.
        - Implemented AXIsolatedObject::stringValue.
        - AXIsolatedObject::isTable must return false because it is used in the
        SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY macro.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::containsText const): Moved to AXCoreObject.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::containsText const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::containsText const): Implementation in base class AXCoreObject.
        (WebCore::AXIsolatedObject::stringValue const): Deleted.
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:

2020-01-07  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Add API to set purpose and hints of active editable element to input methods
        https://bugs.webkit.org/show_bug.cgi?id=205605

        Reviewed by Žan Doberšek.

        Use ENABLE(AUTOCAPITALIZE) and ENABLE(AUTOCORRECT) instead of ENABLE(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE).

        * Sources.txt: Add Autocapitalize.cpp to the build.
        * html/Autocapitalize.cpp: Add ENABLE(AUTOCAPITALIZE) guards.
        * html/Autocapitalize.h: Ditto.
        * html/HTMLElement.cpp:
        * html/HTMLElement.h:
        * html/HTMLElement.idl:
        * html/HTMLFormControlElement.cpp:
        * html/HTMLFormControlElement.h:
        * html/HTMLFormElement.cpp:
        * html/HTMLFormElement.h:
        * loader/EmptyClients.cpp: Update to new API of EditorClient::setInputMethodState
        * page/EditorClient.h: The focused element or nullptr is now received by setInputMethodState() instead of enabled/disabled boolean.
        * page/FocusController.cpp:
        (WebCore::FocusController::setFocusedElement): Pass the focused element or nullptr to setInputMethodState().

2020-01-07  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] mediastreamsrc ref sinked triggers critical warning in gst 1.17
        https://bugs.webkit.org/show_bug.cgi?id=205777

        Reviewed by Carlos Garcia Campos.

        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        Use a raw pointer to keep track of the src element in the track
        observer, similarily to the other observer implementation. Using
        GRefPtr here would have the side effect of removing the floating
        reference on the element and trigger a critical warning in GStreamer.

2020-01-07  Chris Fleizach  <cfleizach@apple.com>

        AX: Enable ACCESSIBILITY_ISOLATED_TREE
        https://bugs.webkit.org/show_bug.cgi?id=205535
        <rdar://problem/58131075>

        Reviewed by Zalan Bujtas.

        Enable compilation of the accessibility isolated tree and make it a runtime feature.

        * Configurations/FeatureDefines.xcconfig:
        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::clientSupportsIsolatedTree):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setIsAccessibilityIsolatedTreeEnabled):
        (WebCore::RuntimeEnabledFeatures::isAccessibilityIsolatedTreeEnabled const):
        * page/Settings.yaml:

2020-01-06  Fujii Hironori  <Hironori.Fujii@sony.com>

        ComplexTextController::offsetForPosition returns a wrong offset for a glyph boundary in a RTL text
        https://bugs.webkit.org/show_bug.cgi?id=205486

        Reviewed by Ross Kirsling.

        ComplexTextController::offsetForPosition had the following code:

        > unsigned hitIndex = hitGlyphStart + (hitGlyphEnd - hitGlyphStart) * (m_run.ltr() ? x / adjustedAdvance : 1 - x / adjustedAdvance);

        If m_run.ltr() was false and x == 0, hitIndex would become hitGlyphEnd.
        This is not expected. It expects hitIndex < hitGlyphEnd if hitGlyphStart ≠ hitGlyphEnd.
        Let hitIndex be hitGlyphStart-1 in the such condition.

        Above change makes fast/text/ellipsis-text-rtl.html starting to
        fail because offsetForPosition returns the character offset of the
        next glyph if the argument 'h' is in a glyph boundary. In RTL
        text, offsetForPosition should return a character offset of the
        previous glyph in case of a glyph boundary. Use '<=' instead of '<'
        for RTL text in order to select previous glyphs for glyph
        boundaries.

        Test: fast/dom/Document/CaretRangeFromPoint/rtl.html

        * platform/graphics/ComplexTextController.cpp:
        (WebCore::ComplexTextController::offsetForPosition): Compute correct hitGlyphEnd for RTL.

2020-01-06  Zalan Bujtas  <zalan@apple.com>

        [LFC] Start using the UsedHorizontalValues::Constraints values in ::layoutInFlowContent
        https://bugs.webkit.org/show_bug.cgi?id=205831
        <rdar://problem/58353565>

        Reviewed by Antti Koivisto.

        Use the incoming horizontal constraint value instead of querying the root's geometry (which is technically outside of the current formatting context).

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

2020-01-06  Zalan Bujtas  <zalan@apple.com>

        [LFC] computeBorderAndPadding/computeWidthAndMargin/computeStaticPosition functions should take UsedHorizontalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=205825
        <rdar://problem/58351397>

        Reviewed by Antti Koivisto.

        Let's pass in the horizontal constraints so that the compute* functions don't need to
        access containing block's geometry.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin): Deleted.
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):

2020-01-06  ChangSeok Oh  <changseok@webkit.org>

        Unreviewed build fix since r254064.

        * CMakeLists.txt: GraphicsContext3D was renamed GraphicsContextGLOpenGL, not GraphicsContextGLOpenGLBase.

2020-01-06  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove redundant UsedVerticalValues::Constraints(Display::Box)
        https://bugs.webkit.org/show_bug.cgi?id=205813
        <rdar://problem/58346993>

        Reviewed by Antti Koivisto.

        Let's call the other c'tor instead.

        * layout/LayoutUnits.cpp:
        (WebCore::Layout::UsedVerticalValues::Constraints::Constraints): Deleted.
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

2020-01-06  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::layoutInFlowContent should take UsedHorizontalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=205809
        <rdar://problem/58345856>

        Reviewed by Antti Koivisto.

        This patch is in preparation for using the incoming horizontal constraint instead of
        accessing the formatting context root's geometry.
        (e.g. <div style="width: 100px;">text content</div>. The IFC should not need to query the div's display box
        for the horizontal available space (100px))

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        * layout/tableformatting/TableFormattingContext.h:

2020-01-06  Don Olmstead  <don.olmstead@sony.com>

        Rename GraphicsContext3D to GraphicsContextGL
        https://bugs.webkit.org/show_bug.cgi?id=205778
        <rdar://problem/58327597>

        Reviewed by Ross Kirsling.

        Use ENABLE(GRAPHICS_CONTEXT_GL) instead of ENABLE(WEBGL) for relevant files.
        This was causing the build breakage.

        Move methods wrapping OpenGL[ES] 3.0+ functions into GraphicsContextGLOpenGLCommon.cpp
        and remove them from GraphicsContextGLTextureMapper.cpp. Add a check for OpenGL[ES]
        versions rather than depending on a particular platform.

        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/GraphicsContextGL.cpp:
        * platform/graphics/GraphicsContextGL.h:
        * platform/graphics/GraphicsContextGLAttributes.h:
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
        (WebCore::GraphicsContextGLOpenGL::mapBufferRange):
        (WebCore::GraphicsContextGLOpenGL::unmapBuffer):
        (WebCore::GraphicsContextGLOpenGL::copyBufferSubData):
        (WebCore::GraphicsContextGLOpenGL::getInternalformativ):
        (WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample):
        (WebCore::GraphicsContextGLOpenGL::texStorage2D):
        (WebCore::GraphicsContextGLOpenGL::texStorage3D):
        (WebCore::GraphicsContextGLOpenGL::getActiveUniforms):
        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
        (WebCore::GraphicsContextGLOpenGL::mapBufferRange): Deleted.
        (WebCore::GraphicsContextGLOpenGL::unmapBuffer): Deleted.
        (WebCore::GraphicsContextGLOpenGL::copyBufferSubData): Deleted.
        (WebCore::GraphicsContextGLOpenGL::getInternalformativ): Deleted.
        (WebCore::GraphicsContextGLOpenGL::renderbufferStorageMultisample): Deleted.
        (WebCore::GraphicsContextGLOpenGL::texStorage2D): Deleted.
        (WebCore::GraphicsContextGLOpenGL::texStorage3D): Deleted.
        (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): Deleted.

2020-01-06  Zalan Bujtas  <zalan@apple.com>

        [LFC] UsedHorizontalValues::Constraints should not take Display::Box
        https://bugs.webkit.org/show_bug.cgi?id=205811
        <rdar://problem/58346356>

        Reviewed by Antti Koivisto.

        Passing in only the actual rect values (content/padding box left/width) to UsedHorizontalValues::Constraints makes the
        constraint logic look clear.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::outOfFlowHorizontalConstraints):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/LayoutUnits.cpp:
        (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):

2020-01-06  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Only prewarm fonts with valid font names
        https://bugs.webkit.org/show_bug.cgi?id=205822

        Reviewed by Brent Fulgham.

        The font names ".SF NS Text" and ".SF NS Display" are not valid on iOS, and should not be prewarmed.

        No new tests, no behavior change.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontCache::prewarmGlobally):

2020-01-06  Peng Liu  <peng.liu6@apple.com>

        Build (unified) failure after adding source files to support media in GPU process
        https://bugs.webkit.org/show_bug.cgi?id=205616

        Reviewed by Darin Adler.

        No new tests, no functional change.

        * Modules/mediastream/UserMediaClient.h:

2020-01-06  Daniel Bates  <dabates@apple.com>

        Precision of getClientRects(), getBoundingClientRect() differs depending whether simple line layout or line box layout is used
        https://bugs.webkit.org/show_bug.cgi?id=205563
        <rdar://problem/58165528>

        Reviewed by Zalan Bujtas.

        Fix up simple line layout run rect to match the rect returned by the line layout code path.

        * rendering/InlineTextBox.cpp:
        (WebCore::snappedSelectionRect): Added; extracted from localSelectionRect().
        (WebCore::InlineTextBox::localSelectionRect const): Moved some logic into snappedSelectionRect()
        and modified code to use it.
        * rendering/InlineTextBox.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Fix up run rect.

2020-01-06  youenn fablet  <youenn@apple.com>

        XMLHTTPRequest POSTs blob data to a custom WKURLSchemeHandler protocol crash
        https://bugs.webkit.org/show_bug.cgi?id=205685

        Reviewed by Alex Christensen.

        There is no blob registry in the UIProcess.
        This should not matter since we do not yet support blobs in custom scheme handlers.
        But we are calling the blob registry when creating a request body, which does not work in UIProcess.
        Instead, pass a lambda that will be called in case of blobs.
        Covered by API test.

        * platform/network/FormData.cpp:
        (WebCore::FormDataElement::lengthInBytes const):
        (WebCore::FormData::resolveBlobReferences):
        * platform/network/FormData.h:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore::createHTTPBodyCFReadStream):

2020-01-06  Mark Lam  <mark.lam@apple.com>

        Convert ASSERT_DISABLED to ASSERT_ENABLED, and fix some tests of NDEBUG that should actually test for ASSERT_ENABLED.
        https://bugs.webkit.org/show_bug.cgi?id=205776

        Reviewed by Saam Barati.

        * Modules/fetch/FetchBodySource.cpp:
        (WebCore::FetchBodySource::close):
        * Modules/fetch/FetchBodySource.h:
        * Modules/webdatabase/DatabaseDetails.h:
        (WebCore::DatabaseDetails::DatabaseDetails):
        (WebCore::DatabaseDetails::operator=):
        * Modules/webdatabase/DatabaseTask.cpp:
        (WebCore::DatabaseTask::performTask):
        * Modules/webdatabase/DatabaseTask.h:
        * Modules/webdatabase/DatabaseThread.cpp:
        (WebCore::DatabaseThread::terminationRequested const):
        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::TypeAnnotation::TypeAnnotation):
        * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
        (WebCore::WHLSL::findHighZombies):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matches):
        * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
        (WebCore::WHLSL::checkLiteralTypes):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::FindAllTypes::appendNamedType):
        * bindings/js/JSCallbackData.h:
        * bindings/js/JSLazyEventListener.cpp:
        * bindings/js/JSLazyEventListener.h:
        * contentextensions/ContentExtensionCompiler.cpp:
        (WebCore::ContentExtensions::compileRuleList):
        * css/CSSCalculationValue.cpp:
        (WebCore::CSSCalcOperationNode::primitiveType const):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSPrimitiveValue.cpp:
        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const):
        * css/CSSStyleSheet.cpp:
        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::suspendIfNeeded):
        (WebCore::ActiveDOMObject::assertSuspendIfNeededWasCalled const):
        * dom/ActiveDOMObject.h:
        * dom/ContainerNode.cpp:
        * dom/ContainerNodeAlgorithms.cpp:
        * dom/ContainerNodeAlgorithms.h:
        * dom/CustomElementReactionQueue.cpp:
        * dom/CustomElementReactionQueue.h:
        (WebCore::CustomElementReactionDisallowedScope::CustomElementReactionDisallowedScope):
        (WebCore::CustomElementReactionDisallowedScope::~CustomElementReactionDisallowedScope):
        * dom/Document.cpp:
        (WebCore::Document::hitTest):
        * dom/Document.h:
        (WebCore::Document::decrementReferencingNodeCount):
        * dom/Element.cpp:
        (WebCore::Element::addShadowRoot):
        (WebCore::Element::getURLAttribute const):
        (WebCore::Element::getNonEmptyURLAttribute const):
        * dom/Element.h:
        * dom/ElementAndTextDescendantIterator.h:
        (WebCore::ElementAndTextDescendantIterator::ElementAndTextDescendantIterator):
        (WebCore::ElementAndTextDescendantIterator::dropAssertions):
        (WebCore::ElementAndTextDescendantIterator::popAncestorSiblingStack):
        (WebCore::ElementAndTextDescendantIterator::traverseNextSibling):
        (WebCore::ElementAndTextDescendantIterator::traversePreviousSibling):
        * dom/ElementDescendantIterator.h:
        (WebCore::ElementDescendantIterator::ElementDescendantIterator):
        (WebCore::ElementDescendantIterator::dropAssertions):
        (WebCore::ElementDescendantIterator::operator++):
        (WebCore::ElementDescendantIterator::operator--):
        (WebCore::ElementDescendantConstIterator::ElementDescendantConstIterator):
        (WebCore::ElementDescendantConstIterator::dropAssertions):
        (WebCore::ElementDescendantConstIterator::operator++):
        * dom/ElementIterator.h:
        (WebCore::ElementIterator<ElementType>::ElementIterator):
        (WebCore::ElementIterator<ElementType>::traverseNext):
        (WebCore::ElementIterator<ElementType>::traversePrevious):
        (WebCore::ElementIterator<ElementType>::traverseNextSibling):
        (WebCore::ElementIterator<ElementType>::traversePreviousSibling):
        (WebCore::ElementIterator<ElementType>::traverseNextSkippingChildren):
        (WebCore::ElementIterator<ElementType>::dropAssertions):
        (WebCore::ElementIterator<ElementType>::traverseAncestor):
        (WebCore::ElementConstIterator<ElementType>::ElementConstIterator):
        (WebCore::ElementConstIterator<ElementType>::traverseNext):
        (WebCore::ElementConstIterator<ElementType>::traversePrevious):
        (WebCore::ElementConstIterator<ElementType>::traverseNextSibling):
        (WebCore::ElementConstIterator<ElementType>::traversePreviousSibling):
        (WebCore::ElementConstIterator<ElementType>::traverseNextSkippingChildren):
        (WebCore::ElementConstIterator<ElementType>::traverseAncestor):
        (WebCore::ElementConstIterator<ElementType>::dropAssertions):
        * dom/EventContext.cpp:
        * dom/EventContext.h:
        * dom/EventListener.h:
        * dom/EventPath.cpp:
        * dom/EventSender.h:
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::addEventListener):
        (WebCore::EventTarget::setAttributeEventListener):
        (WebCore::EventTarget::innerInvokeEventListeners):
        * dom/Node.cpp:
        (WebCore::Node::~Node):
        (WebCore::Node::moveNodeToNewDocument):
        (WebCore::Node::removedLastRef):
        * dom/Node.h:
        (WebCore::Node::deref const):
        * dom/ScriptDisallowedScope.h:
        (WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
        * dom/ScriptExecutionContext.h:
        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::execute const):
        * dom/SlotAssignment.cpp:
        (WebCore::SlotAssignment::addSlotElementByName):
        (WebCore::SlotAssignment::removeSlotElementByName):
        (WebCore::SlotAssignment::resolveSlotsAfterSlotMutation):
        (WebCore::SlotAssignment::findFirstSlotElement):
        * dom/SlotAssignment.h:
        * dom/TreeScopeOrderedMap.cpp:
        (WebCore::TreeScopeOrderedMap::add):
        (WebCore::TreeScopeOrderedMap::get const):
        * dom/TreeScopeOrderedMap.h:
        * fileapi/Blob.cpp:
        * fileapi/Blob.h:
        * history/BackForwardCache.cpp:
        (WebCore::BackForwardCache::removeAllItemsForPage):
        * history/BackForwardCache.h:
        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::notifyObserversCanvasDestroyed):
        * html/CanvasBase.h:
        * html/HTMLCollection.h:
        (WebCore::CollectionNamedElementCache::didPopulate):
        * html/HTMLSelectElement.cpp:
        (WebCore:: const):
        * html/HTMLTableRowsCollection.cpp:
        (WebCore::assertRowIsInTable):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::indexForPosition const):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::~CanvasRenderingContext2DBase):
        * html/parser/HTMLParserScheduler.cpp:
        (WebCore::HTMLParserScheduler::HTMLParserScheduler):
        (WebCore::HTMLParserScheduler::suspend):
        (WebCore::HTMLParserScheduler::resume):
        * html/parser/HTMLParserScheduler.h:
        * html/parser/HTMLToken.h:
        (WebCore::HTMLToken::beginStartTag):
        (WebCore::HTMLToken::beginEndTag):
        (WebCore::HTMLToken::endAttribute):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
        (WebCore::HTMLTreeBuilder::constructTree):
        * html/parser/HTMLTreeBuilder.h:
        (WebCore::HTMLTreeBuilder::~HTMLTreeBuilder):
        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/displaytree/DisplayBox.cpp:
        (WebCore::Display::Box::Box):
        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::setTopLeft):
        (WebCore::Display::Box::setTop):
        (WebCore::Display::Box::setLeft):
        (WebCore::Display::Box::setContentBoxHeight):
        (WebCore::Display::Box::setContentBoxWidth):
        (WebCore::Display::Box::setHorizontalMargin):
        (WebCore::Display::Box::setVerticalMargin):
        (WebCore::Display::Box::setHorizontalComputedMargin):
        (WebCore::Display::Box::setBorder):
        (WebCore::Display::Box::setPadding):
        * layout/displaytree/DisplayInlineRect.h:
        (WebCore::Display::InlineRect::InlineRect):
        (WebCore::Display::InlineRect::setTopLeft):
        (WebCore::Display::InlineRect::setTop):
        (WebCore::Display::InlineRect::setBottom):
        (WebCore::Display::InlineRect::setLeft):
        (WebCore::Display::InlineRect::setWidth):
        (WebCore::Display::InlineRect::setHeight):
        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::LineBox):
        (WebCore::Display::LineBox::setBaselineOffsetIfGreater):
        (WebCore::Display::LineBox::resetBaseline):
        (WebCore::Display::LineBox::Baseline::Baseline):
        (WebCore::Display::LineBox::Baseline::setAscent):
        (WebCore::Display::LineBox::Baseline::setDescent):
        (WebCore::Display::LineBox::Baseline::reset):
        * layout/displaytree/DisplayRect.h:
        (WebCore::Display::Rect::Rect):
        (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::clone const):
        * layout/floats/FloatingContext.cpp:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::CollapsibleContent::collapse):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::Column::setWidthConstraints):
        (WebCore::Layout::TableGrid::Column::setLogicalWidth):
        (WebCore::Layout::TableGrid::Column::setLogicalLeft):
        * layout/tableformatting/TableGrid.h:
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::continueAfterContentPolicy):
        (WebCore::DocumentLoader::attachToFrame):
        (WebCore::DocumentLoader::detachFromFrame):
        (WebCore::DocumentLoader::addSubresourceLoader):
        * loader/DocumentLoader.h:
        * loader/ImageLoader.cpp:
        * loader/cache/CachedResource.h:
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::lruListFor):
        (WebCore::MemoryCache::removeFromLRUList):
        * page/FrameView.cpp:
        (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
        * page/FrameViewLayoutContext.cpp:
        * page/FrameViewLayoutContext.h:
        * page/Page.cpp:
        * page/Page.h:
        * page/ViewportConfiguration.cpp:
        * page/ViewportConfiguration.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::CurrentEventScope::CurrentEventScope):
        * platform/DateComponents.cpp:
        (WebCore::DateComponents::toStringForTime const):
        * platform/ScrollableArea.cpp:
        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::combineIntoOneSegment const):
        * platform/SharedBuffer.h:
        * platform/Supplementable.h:
        * platform/Timer.cpp:
        (WebCore::TimerBase::checkHeapIndex const):
        (WebCore::TimerBase::updateHeapIfNeeded):
        * platform/graphics/BitmapImage.cpp:
        * platform/graphics/BitmapImage.h:
        * platform/graphics/Image.h:
        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ScratchBuffer::ScratchBuffer):
        (WebCore::ScratchBuffer::getScratchBuffer):
        (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
        * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
        (WebCore::CACFLayerTreeHost::setWindow):
        * platform/graphics/ca/win/CACFLayerTreeHost.h:
        * platform/graphics/cg/ImageBufferDataCG.cpp:
        (WebCore::ImageBufferData::putData):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        * platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:
        (gstAllocatorFastMallocFree):
        * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp:
        (Nicosia::PaintingContextCairo::ForPainting::ForPainting):
        * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp:
        (Nicosia::BackingStoreTextureMapperImpl::createTile):
        * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp:
        (Nicosia::ContentLayerTextureMapperImpl::~ContentLayerTextureMapperImpl):
        * platform/graphics/win/GradientDirect2D.cpp:
        (WebCore::Gradient::fill):
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::putData):
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::appendGeometry):
        (WebCore::Path::Path):
        (WebCore::Path::operator=):
        (WebCore::Path::strokeContains const):
        (WebCore::Path::transform):
        * platform/graphics/win/PlatformContextDirect2D.cpp:
        (WebCore::PlatformContextDirect2D::setTags):
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
        (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
        * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
        (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
        * platform/network/HTTPParsers.cpp:
        (WebCore::isCrossOriginSafeHeader):
        * platform/sql/SQLiteDatabase.cpp:
        * platform/sql/SQLiteDatabase.h:
        * platform/sql/SQLiteStatement.cpp:
        (WebCore::SQLiteStatement::SQLiteStatement):
        (WebCore::SQLiteStatement::prepare):
        (WebCore::SQLiteStatement::finalize):
        * platform/sql/SQLiteStatement.h:
        * platform/win/COMPtr.h:
        * rendering/ComplexLineLayout.cpp:
        (WebCore::ComplexLineLayout::removeInlineBox const):
        * rendering/FloatingObjects.cpp:
        (WebCore::FloatingObject::FloatingObject):
        (WebCore::FloatingObjects::addPlacedObject):
        (WebCore::FloatingObjects::removePlacedObject):
        * rendering/FloatingObjects.h:
        * rendering/GridTrackSizingAlgorithm.cpp:
        * rendering/GridTrackSizingAlgorithm.h:
        * rendering/LayoutDisallowedScope.cpp:
        * rendering/LayoutDisallowedScope.h:
        * rendering/RenderBlock.cpp:
        * rendering/RenderBlock.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutBlockChild):
        (WebCore::RenderBlockFlow::removeFloatingObject):
        (WebCore::RenderBlockFlow::ensureLineBoxes):
        * rendering/RenderBoxModelObject.cpp:
        * rendering/RenderDeprecatedFlexibleBox.cpp:
        (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
        * rendering/RenderElement.cpp:
        * rendering/RenderGeometryMap.cpp:
        (WebCore::RenderGeometryMap::mapToContainer const):
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::placeItemsOnGrid const):
        (WebCore::RenderGrid::baselinePosition const):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::willBeDestroyed):
        * rendering/RenderLayer.cpp:
        (WebCore::ClipRectsCache::ClipRectsCache):
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::paintList):
        (WebCore::RenderLayer::hitTestLayer):
        (WebCore::RenderLayer::updateClipRects):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::traverseVisibleNonCompositedDescendantLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
        (WebCore::RenderLayerCompositor::addDescendantsToOverlapMapRecursive const):
        (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
        (WebCore::RenderLayerCompositor::layerHas3DContent const):
        * rendering/RenderLayoutState.cpp:
        (WebCore::RenderLayoutState::RenderLayoutState):
        (WebCore::RenderLayoutState::computeOffsets):
        (WebCore::RenderLayoutState::addLayoutDelta):
        * rendering/RenderLayoutState.h:
        (WebCore::RenderLayoutState::RenderLayoutState):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::RenderObject):
        (WebCore::RenderObject::~RenderObject):
        (WebCore::RenderObject::clearNeedsLayout):
        * rendering/RenderObject.h:
        * rendering/RenderQuote.cpp:
        (WebCore::quotesForLanguage):
        * rendering/RenderTableCell.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::computeOverflowFromCells):
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::checkConsistency const):
        * rendering/RenderTextLineBoxes.h:
        * rendering/line/BreakingContext.h:
        (WebCore::tryHyphenating):
        * rendering/style/GridArea.h:
        (WebCore::GridSpan::GridSpan):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::~RenderStyle):
        * rendering/style/RenderStyle.h:
        * rendering/updating/RenderTreeBuilderRuby.cpp:
        (WebCore::RenderTreeBuilder::Ruby::detach):
        * rendering/updating/RenderTreePosition.cpp:
        (WebCore::RenderTreePosition::computeNextSibling):
        * rendering/updating/RenderTreePosition.h:
        * svg/SVGToOTFFontConversion.cpp:
        (WebCore::SVGToOTFFontConverter::Placeholder::Placeholder):
        (WebCore::SVGToOTFFontConverter::Placeholder::populate):
        (WebCore::SVGToOTFFontConverter::appendCFFTable):
        (WebCore::SVGToOTFFontConverter::firstGlyph const):
        (WebCore::SVGToOTFFontConverter::appendKERNTable):
        * svg/SVGTransformDistance.cpp:
        (WebCore::SVGTransformDistance::SVGTransformDistance):
        (WebCore::SVGTransformDistance::scaledDistance const):
        (WebCore::SVGTransformDistance::addSVGTransforms):
        (WebCore::SVGTransformDistance::addToSVGTransform const):
        (WebCore::SVGTransformDistance::distance const):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::nativeImage):
        * testing/InternalSettings.cpp:
        * workers/service/ServiceWorkerJob.h:
        * worklets/PaintWorkletGlobalScope.h:
        (WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope):
        * xml/XPathStep.cpp:

2020-01-06  Jack Lee  <shihchieh_lee@apple.com>

        ASSERTION FAILED: hasLayer() in RenderLayer::enclosingOverflowClipLayer
        https://bugs.webkit.org/show_bug.cgi?id=205474

        Reviewed by Simon Fraser.

        Test: fast/css/sticky/sticky-tablecol-crash.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::enclosingClippingBoxForStickyPosition const):
        (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition const):
        (WebCore::RenderBoxModelObject::stickyPositionOffset const):

2020-01-06  Alex Christensen  <achristensen@webkit.org>

        Allow wildcard scheme in UserContentURLPattern
        https://bugs.webkit.org/show_bug.cgi?id=205695

        Reviewed by Darin Adler.

        This is needed for <rdar://problem/58011337> and covered by an API test.

        * page/UserContentURLPattern.cpp:
        (WebCore::UserContentURLPattern::matches const):

2020-01-06  Youenn Fablet  <youenn@apple.com>

        Fix non unified build in FIDO Pin.cpp
        https://bugs.webkit.org/show_bug.cgi?id=205794

        Reviewed by Jiewen Tan.

        No change of behavior, this is a build fix.

        * Modules/webauthn/fido/Pin.cpp:

2020-01-06  Per Arne Vollan  <pvollan@apple.com>

        REGRESSION(r247626): Introduced memory regression
        https://bugs.webkit.org/show_bug.cgi?id=205815

        Unreviewed rollout of https://trac.webkit.org/changeset/247626/webkit.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontCache::prewarmGlobally):
        (WebCore::fontFamiliesForPrewarming): Deleted.

2020-01-06  Yusuke Suzuki  <ysuzuki@apple.com>

        [WebCore] Shrink sizeof(RuleFeature)
        https://bugs.webkit.org/show_bug.cgi?id=205774

        Reviewed by Dean Jackson.

        We noticed that Vector<RuleFeature> is frequently allocated and kept. While sizeof(RuleFeature) is 32,

        1. RuleFeature::invalidationSelector is nullptr basically. It is used only for some specific cases.
        2. RuleFeature::selectorIndex and RuleFeature::selectorListIndex is `unsigned`. But they never exceed `uint16_t` since
           both values are derived from RuleData::m_selectorIndex and RuleData::m_selectorListIndex and both are `uint16_t` size.
        3. Optional<MatchElement> takes 8 bytes since sizeof(MatchElement) is 4. But we can make it 1 byte.

        Given the above observations, this patch introduced RuleFeatureWithInvalidationSelector, which is RuleFeature + invalidationSelector.
        And keep using RuleFeature if invalidationSelector is unnecessary. By applying (2) and (3)'s optimizations, we can now make
        sizeof(RuleFeature) 16, 50% reduction.

        No behavior change.

        * style/RuleData.h:
        * style/RuleFeature.cpp:
        (WebCore::Style::RuleFeature::RuleFeature):
        (WebCore::Style::RuleFeatureSet::collectFeatures):
        (WebCore::Style::RuleFeatureSet::add):
        * style/RuleFeature.h:
        (WebCore::Style::RuleFeatureWithInvalidationSelector::RuleFeatureWithInvalidationSelector):
        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ensureInvalidationRuleSets):

2020-01-05  Dean Jackson  <dino@apple.com>

        Rename GraphicsContext3D to GraphicsContextGL
        https://bugs.webkit.org/show_bug.cgi?id=205778
        <rdar://problem/58327597>

        Reviewed by Sam Weinig.

        Rename all the GraphicsContext3D things to GraphicsContextGL
        (includes Extensions3D and GRAPHICS_CONTEXT_3D).

        GraphicsContext3DBase now becomes GraphicsContextGL.
        GraphicsContext3D is now GraphicsContextGLOpenGL (since it represents
        the OpenGL implementation of the API).

        * CMakeLists.txt:
        * Headers.cmake:
        * PlatformAppleWin.cmake:
        * PlatformFTW.cmake:
        * PlatformGTK.cmake:
        * PlatformMac.cmake:
        * PlatformPlayStation.cmake:
        * PlatformWin.cmake:
        * Sources.txt:
        * SourcesCocoa.txt:
        * SourcesGTK.txt:
        * SourcesWPE.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLVideoElement.cpp:
        * html/HTMLVideoElement.h:
        * html/OffscreenCanvas.cpp:
        * html/canvas/ANGLEInstancedArrays.cpp:
        * html/canvas/OESVertexArrayObject.cpp:
        * html/canvas/WebGL2RenderingContext.cpp:
        * html/canvas/WebGL2RenderingContext.h:
        * html/canvas/WebGLActiveInfo.h:
        * html/canvas/WebGLBuffer.cpp:
        * html/canvas/WebGLBuffer.h:
        * html/canvas/WebGLCompressedTextureASTC.cpp:
        * html/canvas/WebGLCompressedTextureATC.cpp:
        * html/canvas/WebGLCompressedTextureETC.cpp:
        * html/canvas/WebGLCompressedTextureETC1.cpp:
        * html/canvas/WebGLCompressedTexturePVRTC.cpp:
        * html/canvas/WebGLCompressedTextureS3TC.cpp:
        * html/canvas/WebGLContextAttributes.h:
        * html/canvas/WebGLContextGroup.cpp:
        * html/canvas/WebGLContextGroup.h:
        * html/canvas/WebGLContextObject.cpp:
        * html/canvas/WebGLContextObject.h:
        * html/canvas/WebGLDebugShaders.cpp:
        * html/canvas/WebGLDepthTexture.cpp:
        * html/canvas/WebGLDepthTexture.h:
        * html/canvas/WebGLDrawBuffers.cpp:
        * html/canvas/WebGLFramebuffer.cpp:
        * html/canvas/WebGLFramebuffer.h:
        * html/canvas/WebGLObject.cpp:
        * html/canvas/WebGLObject.h:
        * html/canvas/WebGLProgram.cpp:
        * html/canvas/WebGLProgram.h:
        * html/canvas/WebGLQuery.cpp:
        * html/canvas/WebGLQuery.h:
        * html/canvas/WebGLRenderbuffer.cpp:
        * html/canvas/WebGLRenderbuffer.h:
        * html/canvas/WebGLRenderingContext.cpp:
        * html/canvas/WebGLRenderingContext.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        * html/canvas/WebGLRenderingContextBase.h:
        * html/canvas/WebGLSampler.cpp:
        * html/canvas/WebGLSampler.h:
        * html/canvas/WebGLShader.cpp:
        * html/canvas/WebGLShader.h:
        * html/canvas/WebGLShaderPrecisionFormat.h:
        * html/canvas/WebGLSharedObject.cpp:
        * html/canvas/WebGLSharedObject.h:
        * html/canvas/WebGLSync.cpp:
        * html/canvas/WebGLSync.h:
        * html/canvas/WebGLTexture.cpp:
        * html/canvas/WebGLTexture.h:
        * html/canvas/WebGLTransformFeedback.cpp:
        * html/canvas/WebGLTransformFeedback.h:
        * html/canvas/WebGLVertexArrayObject.cpp:
        * html/canvas/WebGLVertexArrayObject.h:
        * html/canvas/WebGLVertexArrayObjectBase.cpp:
        * html/canvas/WebGLVertexArrayObjectBase.h:
        * html/canvas/WebGLVertexArrayObjectOES.cpp:
        * html/canvas/WebGLVertexArrayObjectOES.h:
        * inspector/InspectorShaderProgram.cpp:
        * loader/FrameLoaderClient.h:
        * page/Chrome.cpp:
        * platform/SourcesCairo.txt:
        * platform/TextureMapper.cmake:
        * platform/WebGLStateTracker.cpp:
        * platform/WebGLStateTracker.h:
        * platform/graphics/ANGLEWebKitBridge.cpp:
        * platform/graphics/ExtensionsGL.h: Renamed from Source/WebCore/platform/graphics/Extensions3D.h.
        * platform/graphics/FormatConverter.cpp:
        * platform/graphics/FormatConverter.h:
        * platform/graphics/GLContext.cpp:
        * platform/graphics/GLContext.h:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/GraphicsContext3D.cpp: Removed.
        * platform/graphics/GraphicsContext3DBase.cpp: Removed.
        * platform/graphics/GraphicsContextGL.cpp: Added.
        * platform/graphics/GraphicsContextGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DBase.h.
        * platform/graphics/GraphicsContextGLAttributes.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
        * platform/graphics/ImageBuffer.cpp:
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/MediaPlayer.cpp:
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerPrivate.h:
        * platform/graphics/OpenGLShims.cpp:
        * platform/graphics/angle/ExtensionsGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.cpp.
        * platform/graphics/angle/ExtensionsGLANGLE.h: Renamed from Source/WebCore/platform/graphics/angle/Extensions3DANGLE.h.
        * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Renamed from Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp.
        * platform/graphics/angle/TemporaryANGLESetting.cpp:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        * platform/graphics/cairo/GraphicsContextGLCairo.cpp: Renamed from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp.
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        * platform/graphics/cg/GraphicsContextGLCG.cpp: Renamed from Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp.
        * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm.
        * platform/graphics/cocoa/IOSurface.mm:
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:
        * platform/graphics/cpu/arm/GraphicsContextGLNEON.h: Renamed from Source/WebCore/platform/graphics/cpu/arm/GraphicsContext3DNEON.h.
        * platform/graphics/cv/TextureCacheCV.h:
        * platform/graphics/cv/TextureCacheCV.mm:
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        * platform/graphics/cv/VideoTextureCopierCV.h:
        * platform/graphics/egl/GLContextEGL.cpp:
        * platform/graphics/egl/GLContextEGL.h:
        * platform/graphics/glx/GLContextGLX.cpp:
        * platform/graphics/glx/GLContextGLX.h:
        * platform/graphics/gpu/Texture.cpp:
        * platform/graphics/gpu/Texture.h:
        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/ios/GraphicsContextGLOpenGLESIOS.h: Renamed from Source/WebCore/platform/graphics/ios/GraphicsContext3DIOS.h.
        * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp:
        * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h:
        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
        * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp.
        * platform/graphics/opengl/ExtensionsGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
        * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.h.
        * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp.
        * platform/graphics/opengl/ExtensionsGLOpenGLES.h: Renamed from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h.
        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: Added.
        * platform/graphics/opengl/GraphicsContextGLOpenGL.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3D.h.
        * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp.
        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
        * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: Renamed from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp.
        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp.
        * platform/graphics/opengl/GraphicsContextGLOpenGLManager.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DManager.h.
        * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp.
        * platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.h: Renamed from Source/WebCore/platform/graphics/GraphicsContext3DPrivate.h.
        * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
        * platform/graphics/opengl/TemporaryOpenGLSetting.h:
        * platform/graphics/texmap/BitmapTextureGL.cpp:
        * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: Renamed from Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp.
        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
        * platform/graphics/texmap/TextureMapperGL.cpp:
        * platform/graphics/win/GraphicsContextGLDirect2D.cpp: Renamed from Source/WebCore/platform/graphics/win/GraphicsContext3DDirect2D.cpp.
        * testing/Internals.cpp:

2020-01-05  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r252724): Unable to tap on play button on google video 'See the top search trends of 2019'
        https://bugs.webkit.org/show_bug.cgi?id=205694
        <rdar://problem/58062987>

        Reviewed by Zalan Bujtas.

        After r252724, which separated 'used' from 'specified' z-index in style, we need to copy
        the specified to the used z-index in animated styles, while preserving the existing 'forceStackingContext'
        behavior which set the used z-index to 0.

        Do so by creating Adjuster::adjustAnimatedStyle(), which is called from TreeResolver::createAnimatedElementUpdate()
        if any animations could have affected the style. We need to pass back information about whether the animation should
        force stacking context.

        Test: animations/z-index-in-keyframe.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::apply):
        * animation/KeyframeEffect.h:
        (WebCore::KeyframeEffect::triggersStackingContext const):
        * dom/Element.cpp:
        (WebCore::Element::applyKeyframeEffects):
        * dom/Element.h:
        * page/animation/CSSAnimationController.h:
        (): Deleted.
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::animate):
        * style/StyleAdjuster.cpp:
        (WebCore::Style::Adjuster::adjustAnimatedStyle):
        * style/StyleAdjuster.h:
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

2020-01-06  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Issue mach lookup extension to launch services daemon for Mail
        https://bugs.webkit.org/show_bug.cgi?id=205316

        Reviewed by Brent Fulgham.

        Export function getting bundle identifier.

        Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

        * platform/RuntimeApplicationChecks.h:

2020-01-06  Youenn Fablet  <youenn@apple.com>

        RemoteVideoSample::create does not need to take a MediaSample r value
        https://bugs.webkit.org/show_bug.cgi?id=205793

        Reviewed by Eric Carlson.

        No change of behavior.

        * platform/graphics/RemoteVideoSample.cpp:
        (WebCore::RemoteVideoSample::create):
        * platform/graphics/RemoteVideoSample.h:

2020-01-06  youenn fablet  <youenn@apple.com>

        Implement RTC VTB encoders in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=205713

        Reviewed by Eric Carlson.

        Refactoring to expose a createPixelBuffer routine, to set/get RemoteVideoSample and to create a CVPixelBuffer from an IOSurfaceRef.

        Covered by existing tests, in particular webrtc/video-gpuProcess.html.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/RemoteVideoSample.cpp:
        (WebCore::RemoteVideoSample::create):
        * platform/graphics/RemoteVideoSample.h:
        (WebCore::RemoteVideoSample::rotation const):
        * platform/graphics/cv/ImageTransferSessionVT.h:
        * platform/graphics/cv/ImageTransferSessionVT.mm:
        (WebCore::ImageTransferSessionVT::createPixelBuffer):
        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
        (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
        * platform/mediastream/mac/RealtimeVideoUtilities.h:
        * platform/mediastream/mac/RealtimeVideoUtilities.mm: Added.
        (WebCore::createPixelBufferPool):

2020-01-05  Eric Carlson  <eric.carlson@apple.com>

        [Media in GPU process] Add remote MIME type cache
        https://bugs.webkit.org/show_bug.cgi?id=205763
        <rdar://problem/58312152>

        Reviewed by Dean Jackson.
        
        Create a MIME type cache for RemoteMediaPlayerManager so types without a
        'codecs' parameter don't typically require IPC, and when it is required the
        result is cached so it is only required once.

        * platform/graphics/MIMETypeCache.cpp:
        (WebCore::MIMETypeCache::supportsContainerType):
        (WebCore::MIMETypeCache::canDecodeType):
        (WebCore::MIMETypeCache::setSupportedTypes):
        (WebCore::MIMETypeCache::staticContainerTypeList):
        (WebCore::MIMETypeCache::isUnsupportedContainerType):
        (WebCore::MIMETypeCache::isAvailable const):
        (WebCore::MIMETypeCache::isEmpty const):
        (WebCore::MIMETypeCache::initializeCache):
        (WebCore::MIMETypeCache::canDecodeExtendedType):
        (WebCore::MIMETypeCache::canDecodeTypePrivate): Deleted.
        (WebCore::MIMETypeCache::addSupportedTypes): Deleted.
        (WebCore::MIMETypeCache::addSupportedType): Deleted.
        * platform/graphics/MIMETypeCache.h:
        (WebCore::MIMETypeCache::isUnsupportedContainerType): Deleted.
        (WebCore::MIMETypeCache::isAvailable const): Deleted.
        (WebCore::MIMETypeCache::isEmpty const): Deleted.
        (WebCore::MIMETypeCache::canDecodeTypeInternal): Deleted.
        (WebCore::MIMETypeCache::initializeCache): Deleted.
        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h:
        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
        (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):
        (WebCore::AVAssetMIMETypeCache::setSupportedTypes):
        (WebCore::AVAssetMIMETypeCache::canDecodeTypeInternal): Deleted.
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm:
        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeExtendedType):
        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeTypeInternal): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsTypeAndCodecs):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

2020-01-05  Wenson Hsieh  <wenson_hsieh@apple.com>

        Work towards implementing DisplayList::DrawGlyphs
        https://bugs.webkit.org/show_bug.cgi?id=205782

        Reviewed by Sam Weinig.

        Encode DrawGlyphs when serializing the drawing item over IPC, with the exception of data in WebCore::Font.
        No change in behavior.

        * platform/graphics/GlyphBuffer.h:

        Make GlyphBufferAdvance codable.

        (WebCore::GlyphBufferAdvance::encode const):
        (WebCore::GlyphBufferAdvance::decode):
        * platform/graphics/displaylists/DisplayListItems.cpp:
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawGlyphs::encode const):
        (WebCore::DisplayList::DrawGlyphs::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):
        * platform/text/TextFlags.h:

        Add EnumTraits for FontSmoothingMode, so that it is encodable using `<<`.

2020-01-05  Sam Weinig  <weinig@apple.com>

        Further simplify StringBuilder usage by standardizing hex formating to a single hex() function
        https://bugs.webkit.org/show_bug.cgi?id=205759

        Reviewed by Dean Jackson.

        * Modules/websockets/WebSocket.cpp:
        (WebCore::encodeProtocolString):
        * css/CSSMarkup.cpp:
        (WebCore::serializeCharacterAsCodePoint):
        * css/parser/CSSParserToken.cpp:
        (WebCore::CSSParserToken::serialize const):
        * platform/graphics/Color.cpp:
        (WebCore::Color::serialized const):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::generateHashedName):
        * platform/network/curl/CurlCacheEntry.cpp:
        (WebCore::CurlCacheEntry::generateBaseFilename):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::quoteAndEscapeNonPrintables):
        Replace appendByteAsHex()/appendUnsignedAsHex()/appendUnsignedAsHexFixedSize() with append(hex()).

        * platform/network/FormDataBuilder.cpp:
        (WebCore::FormDataBuilder::appendFormURLEncoded):
        This was the last non-StringBuilder/makeString use of appendByteAsHex. Rather than keep appendByteAsHex
        around, it is replaced with direct appends of the character buffer hex() produces.

2020-01-05  Zalan Bujtas  <zalan@apple.com>

        [SLL] Generate runs for preserved new lines
        https://bugs.webkit.org/show_bug.cgi?id=205762
        <rdar://problem/58311927>

        Reviewed by Antti Koivisto.

        It matches CLL (and IFC) behavior.

        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::createLineRuns):

2020-01-05  Rob Buis  <rbuis@igalia.com>

        Tighten up stylesheet loading
        https://bugs.webkit.org/show_bug.cgi?id=189913

        Reviewed by Antti Koivisto.

        When fetching and processing a linked resource [1], step 11.3 states
        that fetch failure should result in a network error. This patch
        implements that for stylesheets.

        The behavior matches Chrome and Firefox.

        [1] https://html.spec.whatwg.org/multipage/semantics.html#default-fetch-and-process-the-linked-resource

        Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events.https.html

        * css/StyleRuleImport.cpp:
        (WebCore::StyleRuleImport::requestStyleSheet):
        * css/StyleSheetContents.h:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):

2020-01-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Fix compositing/masks/compositing-clip-path-change-no-repaint.html
        https://bugs.webkit.org/show_bug.cgi?id=205771
        <rdar://problem/58319828>

        Reviewed by Antti Koivisto.

        Add LFC line layout check when deciding whether the current layout path needs
        invalidation after style change.

        Original patch by Antti.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::styleDidChange):

2020-01-05  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Fix fast/repaint/simple-line-layout-shrinking-content.html
        https://bugs.webkit.org/show_bug.cgi?id=205773
        <rdar://problem/58319960>

        Reviewed by Antti Koivisto.

        Let's add padding and border to the repaint rect (which is not quite right since at this level reapint rect should
        be about the content change, but that's what SLL does and it fixes some repaint issues when
        the box with padding/border shrinks).

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutLFCLines):

2020-01-05  youenn fablet  <youenn@apple.com>

        Make MediaRecorderPrivate use CompletionHandler for retrieving encoded data
        https://bugs.webkit.org/show_bug.cgi?id=205726

        Reviewed by Eric Carlson.

        Refactoring to allow asynchronous fetching of data.
        No change of behavior.

        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::stopRecording):
        (WebCore::MediaRecorder::createRecordingDataBlob): Deleted.
        * Modules/mediarecorder/MediaRecorder.h:
        * platform/mediarecorder/MediaRecorderPrivate.h:
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::fetchData):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediarecorder/MediaRecorderPrivateMock.cpp:
        (WebCore::MediaRecorderPrivateMock::fetchData):
        * platform/mediarecorder/MediaRecorderPrivateMock.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::fetchData):

2020-01-04  Kenneth Russell  <kbr@chromium.org>

        Add support for iOS Simulator to ANGLE backend for WebGL
        https://bugs.webkit.org/show_bug.cgi?id=205618

        Refactor use of EGL_ANGLE_iosurface_client_buffer extension to
        uniformly use rectangular textures on macOS, and 2D textures on
        iOS, including the simulator. This should make the on-device iOS
        code paths more correct as well.

        Pass usage hints, only affecting the iOS Simulator, when creating
        all pbuffers from IOSurfaces.

        This patch does not turn on ANGLE for the iOS Simulator yet; that
        will be done in a follow-on patch after more testing.

        Covered by the preexisting WebGL conformance suite in the layout
        tests.

        Reviewed by Dean Jackson.

        * platform/graphics/GraphicsContext3DBase.h:
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::reshapeFBOs):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer display]):
        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
        (-[WebGLLayer bindFramebufferToNextAvailableSurface]):
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::VideoTextureCopierCV::attachIOSurfaceToTexture):
        (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):

2020-01-04  Luming Yin  <luming_yin@apple.com>

        Adopt updated MouseEvent initializer
        https://bugs.webkit.org/show_bug.cgi?id=205765

        Reviewed by Wenson Hsieh.

        Adopt updated MouseEvent initializer to fix the iOS build.

        * dom/ios/MouseEventIOS.cpp:
        (WebCore::MouseEvent::create):
        * dom/ios/PointerEventIOS.cpp:
        (WebCore::PointerEvent::PointerEvent):

2020-01-04  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBuilder::ContinuousContent::append should return void
        https://bugs.webkit.org/show_bug.cgi?id=205760
        <rdar://problem/58309948>

        Reviewed by Antti Koivisto.

        Introduce ContinuousContent::isEligible to make merging logic more clear.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::isContentWrappingAllowed const):
        (WebCore::Layout::LineBreaker::shouldKeepEndOfLineWhitespace const):
        (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
        (WebCore::Layout::ContinuousContent::ContinuousContent):
        (WebCore::Layout::ContinuousContent::hasTextContentOnly const):
        (WebCore::Layout::ContinuousContent::isVisuallyEmptyWhitespaceContentOnly const):
        (WebCore::Layout::ContinuousContent::firstTextRunIndex const):
        (WebCore::Layout::ContinuousContent::lastContentRunIndex const):
        (WebCore::Layout::ContinuousContent::hasNonContentRunsOnly const):
        (WebCore::Layout::ContinuousContent::lastWrapOpportunityIndex const):
        (WebCore::Layout::ContinuousContent::TrailingCollapsibleContent::reset):
        (WebCore::Layout::ContinousContent::runs const): Deleted.
        (WebCore::Layout::ContinousContent::isEmpty const): Deleted.
        (WebCore::Layout::ContinousContent::size const): Deleted.
        (WebCore::Layout::ContinousContent::width const): Deleted.
        (WebCore::Layout::ContinousContent::nonCollapsibleWidth const): Deleted.
        (WebCore::Layout::ContinousContent::hasTrailingCollapsibleContent const): Deleted.
        (WebCore::Layout::ContinousContent::isTrailingContentFullyCollapsible const): Deleted.
        (WebCore::Layout::ContinousContent::ContinousContent): Deleted.
        (WebCore::Layout::ContinousContent::hasTextContentOnly const): Deleted.
        (WebCore::Layout::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const): Deleted.
        (WebCore::Layout::ContinousContent::firstTextRunIndex const): Deleted.
        (WebCore::Layout::ContinousContent::lastContentRunIndex const): Deleted.
        (WebCore::Layout::ContinousContent::hasNonContentRunsOnly const): Deleted.
        (WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const): Deleted.
        (WebCore::Layout::ContinousContent::TrailingCollapsibleContent::reset): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinuousContent::isContinuous):
        (WebCore::Layout::LineBuilder::ContinuousContent::canBeExpanded):
        (WebCore::Layout::LineBuilder::ContinuousContent::ContinuousContent):
        (WebCore::Layout::LineBuilder::ContinuousContent::append):
        (WebCore::Layout::LineBuilder::ContinuousContent::close):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::ContinousContent::canBeExpanded): Deleted.
        (WebCore::Layout::LineBuilder::ContinousContent::canBeMerged const): Deleted.
        (WebCore::Layout::LineBuilder::ContinousContent::ContinousContent): Deleted.
        (WebCore::Layout::LineBuilder::ContinousContent::append): Deleted.
        (WebCore::Layout::LineBuilder::ContinousContent::close): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:

2020-01-03  Rob Buis  <rbuis@igalia.com>

        Make text track loading set same-origin fallback flag
        https://bugs.webkit.org/show_bug.cgi?id=205744

        Reviewed by Darin Adler.

        Make text track loading set same-origin fallback flag,
        which changes text track loading to be same-origin
        when the crossorigin attribute is not specified.

        The new behavior matches that of Chrome and Firefox.

        [1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:create-a-potential-cors-request

        Tests: http/tests/security/text-track-crossorigin.html

        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::load):

2020-01-03  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: delete index records with ID and IndexKey instead of value in SQLiteIDBackingStore
        https://bugs.webkit.org/show_bug.cgi?id=205413

        Reviewed by Alex Christensen.

        Since we have created an index on key in the IndexRecords table, we should do the deletion by its key, because 
        looking up a record by index column(s) should be faster than non-index column(s).

        This change makes PerformanceTests/IndexedDB/basic/index-cursor-delete.html about 100% faster.

        No behavior change.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteOneIndexRecord):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
        (WebCore::IDBDatabaseInfo::objectStoreMap const):

2020-01-03  Chris Dumez  <cdumez@apple.com>

        Add support for DragEvent
        https://bugs.webkit.org/show_bug.cgi?id=205758

        Reviewed by Darin Adler.

        Add support for DragEvent:
        - https://html.spec.whatwg.org/multipage/dnd.html#the-dragevent-interface

        Both Blink and Gecko support it. In WebKit, we had no DragEvent and we had added the
        dataTransfer attribute to MouseEvent instead.

        No new tests, updated / rebaselined existing tests.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::createEvent):
        * dom/DragEvent.cpp: Added.
        (WebCore::DragEvent::create):
        (WebCore::DragEvent::createForBindings):
        (WebCore::DragEvent::DragEvent):
        (WebCore::DragEvent::eventInterface const):
        * dom/DragEvent.h: Added.
        (WebCore::DragEvent::dataTransfer const):
        * dom/DragEvent.idl: Added.
        * dom/EventNames.in:
        * dom/MouseEvent.cpp:
        (WebCore::MouseEvent::create):
        (WebCore::MouseEvent::MouseEvent):
        (WebCore::MouseEvent::initMouseEvent):
        * dom/MouseEvent.h:
        * dom/MouseEvent.idl:
        * dom/SimulatedClick.cpp:
        * dom/WheelEvent.cpp:
        (WebCore::WheelEvent::WheelEvent):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::dispatchDragEvent):

2020-01-03  Sihui Liu  <sihui_liu@apple.com>

        Crash in com.apple.WebKit.Networking at UniqueIDBDatabase::performCurrentOpenOperation
        https://bugs.webkit.org/show_bug.cgi?id=205742

        Reviewed by Maciej Stachowiak.

        m_databaseInfo may not be set in performCurrentOpenOperation if there is an error in opening backing store, so 
        we should make an early return to avoid access to m_databaseInfo in this case.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):

2020-01-03  Stephan Szabo  <stephan.szabo@sony.com>

        [WinCairo] Fixing build after "Add a pure virtual base class for GraphicsContext3D"
        https://bugs.webkit.org/show_bug.cgi?id=205743

        Reviewed by Don Olmstead.

        No new tests, build fix.

        * platform/graphics/GraphicsContext3DBase.h: Undefine NO_ERROR on win
        * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
        Move functions showing up as undefined out of #ifdef block
        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
        Fix some accesses to m_attrs to use contextAttributes()

2020-01-03  Chris Dumez  <cdumez@apple.com>

        dom/nodes/Document-createElement-namespace.html WPT test is failing
        https://bugs.webkit.org/show_bug.cgi?id=205748

        Reviewed by Sam Weinig.

        dom/nodes/Document-createElement-namespace.html WPT test was failing in WebKit but passing in Blink
        and Gecko. The issue was that the MIME type passed to DOMParser.parseFromString() would always be
        resolved to "application/xml", no matter which XML MIME type was provided as input (e.g. "text/xml").

        No new tests, rebaselined existing test.

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):

2020-01-03  Chris Dumez  <cdumez@apple.com>

        Document.createAttribute() should take in a localName, not a qualifiedName
        https://bugs.webkit.org/show_bug.cgi?id=205752

        Reviewed by Sam Weinig.

        Document.createAttribute() should take in a localName, not a qualifiedName:
        - https://dom.spec.whatwg.org/#dom-document-createattribute

        Our behavior does not match the DOM specification or other browser engines.

        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::createAttribute):

2020-01-03  Peng Liu  <peng.liu6@apple.com>

        Update the RemoteMediaPlayerManagerProxy::Load XPC message to provide the updated RemoteMediaPlayerConfiguration to the web process
        https://bugs.webkit.org/show_bug.cgi?id=205740

        Reviewed by Eric Carlson.

        Covered by existing tests.

        * platform/graphics/MediaPlayer.cpp:

2020-01-03  Chris Dumez  <cdumez@apple.com>

        Align Range.intersectsNode() with the DOM specification
        https://bugs.webkit.org/show_bug.cgi?id=205745

        Reviewed by Darin Adler.

        Align Range.intersectsNode() with the DOM specification:
        - https://dom.spec.whatwg.org/#dom-range-intersectsnode

        This also aligns our behavior with Chrome 79 and Firefox 71.

        No new tests, rebaselined existing test.

        * dom/Range.cpp:
        (WebCore::Range::intersectsNode const):

2020-01-03  Chris Dumez  <cdumez@apple.com>

        dispatchEvent() should not clear the event's isTrusted flag when it returns early
        https://bugs.webkit.org/show_bug.cgi?id=205731

        Reviewed by Sam Weinig.

        dispatchEvent() should not clear the event's isTrusted flag when it returns early:
        - https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent

        No new tests, rebaselined existing test.

        * dom/EventTarget.cpp:
        (WebCore::EventTarget::dispatchEventForBindings):

2020-01-03  Andy Estes  <aestes@apple.com>

        [Apple Pay] Provide a better error message when Apple Pay blocks user agent script evaluation
        https://bugs.webkit.org/show_bug.cgi?id=205730
        <rdar://problem/55573484>

        Reviewed by Brady Eidson.

        Covered by existing API tests.

        * Modules/applepay/PaymentCoordinator.cpp:
        (WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
        * Modules/applepay/PaymentCoordinator.h:
        * Modules/applepay/PaymentCoordinatorClient.h:
        (WebCore::PaymentCoordinatorClient::userAgentScriptsBlockedErrorMessage const):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeUserAgentScriptInWorldInternal):
        (WebCore::ScriptController::shouldAllowUserAgentScripts const):
        * bindings/js/ScriptController.h:

2020-01-03  Yusuke Suzuki  <ysuzuki@apple.com>

        Put more WebCore/WebKit JS objects into IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205711

        Reviewed by Keith Miller.

        This patch puts more JS objects into IsoSubspace, mainly focusing on JS objects defined manually (not using CodeGeneratorJS.pm).

        No behavior change.

        * bindings/js/JSDOMBuiltinConstructor.h:
        (WebCore::JSDOMBuiltinConstructor::JSDOMBuiltinConstructor): Deleted.
        (WebCore::JSDOMBuiltinConstructor::initializeProperties): Deleted.
        * bindings/js/JSDOMBuiltinConstructorBase.cpp:
        (WebCore::JSDOMBuiltinConstructorBase::subspaceForImpl):
        * bindings/js/JSDOMBuiltinConstructorBase.h:
        (WebCore::JSDOMBuiltinConstructorBase::subspaceFor):
        * bindings/js/JSDOMConstructor.h:
        (WebCore::JSDOMConstructor::JSDOMConstructor): Deleted.
        (WebCore::JSDOMConstructor::initializeProperties): Deleted.
        * bindings/js/JSDOMConstructorBase.cpp:
        (WebCore::JSDOMConstructorBase::subspaceForImpl):
        * bindings/js/JSDOMConstructorBase.h:
        (WebCore::JSDOMConstructorBase::subspaceFor):
        * bindings/js/JSDOMConstructorNotConstructable.h:
        (WebCore::JSDOMConstructorNotConstructable::JSDOMConstructorNotConstructable): Deleted.
        (WebCore::JSDOMConstructorNotConstructable::initializeProperties): Deleted.
        (WebCore::JSDOMConstructorNotConstructable::callThrowTypeError): Deleted.
        (WebCore::JSDOMConstructorNotConstructable::getCallData): Deleted.
        * bindings/js/JSDOMIterator.h:
        (WebCore::JSDOMIteratorPrototype::create): Deleted.
        (WebCore::JSDOMIteratorPrototype::createStructure): Deleted.
        (WebCore::JSDOMIteratorPrototype::JSDOMIteratorPrototype): Deleted.
        * bindings/js/JSDOMNamedConstructor.h:
        (WebCore::JSDOMNamedConstructor::JSDOMNamedConstructor): Deleted.
        (WebCore::JSDOMNamedConstructor::initializeProperties): Deleted.
        * bindings/js/JSDOMWindowProperties.cpp:
        (WebCore::JSDOMWindowProperties::subspaceForImpl):
        * bindings/js/JSDOMWindowProperties.h:
        (WebCore::JSDOMWindowProperties::create): Deleted.
        (WebCore::JSDOMWindowProperties::createStructure): Deleted.
        (WebCore::JSDOMWindowProperties::JSDOMWindowProperties): Deleted.
        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::subspaceForImpl):
        * bindings/js/JSWindowProxy.h:
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WebCoreJSClientData.h:
        (WebCore::JSVMClientData::domBuiltinConstructorSpace):
        (WebCore::JSVMClientData::domConstructorSpace):
        (WebCore::JSVMClientData::domWindowPropertiesSpace):
        (WebCore::JSVMClientData::runtimeArraySpace):
        (WebCore::JSVMClientData::runtimeObjectSpace):
        (WebCore::JSVMClientData::windowProxySpace):
        * bridge/c/CRuntimeObject.h:
        (JSC::Bindings::CRuntimeObject::create): Deleted.
        (JSC::Bindings::CRuntimeObject::createStructure): Deleted.
        * bridge/c/c_instance.cpp:
        (JSC::Bindings::CInstance::getMethod):
        (JSC::Bindings::CRuntimeMethod::create): Deleted.
        (JSC::Bindings::CRuntimeMethod::createStructure): Deleted.
        (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): Deleted.
        (JSC::Bindings::CRuntimeMethod::finishCreation): Deleted.
        * bridge/objc/ObjCRuntimeObject.h:
        (JSC::Bindings::ObjCRuntimeObject::create): Deleted.
        (JSC::Bindings::ObjCRuntimeObject::createStructure): Deleted.
        * bridge/objc/objc_instance.mm:
        (ObjCRuntimeMethod::create): Deleted.
        (ObjCRuntimeMethod::createStructure): Deleted.
        (ObjCRuntimeMethod::ObjCRuntimeMethod): Deleted.
        (ObjCRuntimeMethod::finishCreation): Deleted.
        * bridge/objc/objc_runtime.h:
        (JSC::Bindings::ObjcFallbackObjectImp::create): Deleted.
        (JSC::Bindings::ObjcFallbackObjectImp::propertyName const): Deleted.
        (JSC::Bindings::ObjcFallbackObjectImp::createPrototype): Deleted.
        (JSC::Bindings::ObjcFallbackObjectImp::createStructure): Deleted.
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::ObjcFallbackObjectImp::subspaceForImpl):
        * bridge/runtime_array.cpp:
        (JSC::RuntimeArray::RuntimeArray):
        (JSC::RuntimeArray::subspaceForImpl):
        * bridge/runtime_array.h:
        (JSC::RuntimeArray::create): Deleted.
        (JSC::RuntimeArray::getLength const): Deleted.
        (JSC::RuntimeArray::getConcreteArray const): Deleted.
        (JSC::RuntimeArray::createPrototype): Deleted.
        (JSC::RuntimeArray::createStructure): Deleted.
        * bridge/runtime_method.cpp:
        (JSC::RuntimeMethod::RuntimeMethod):
        * bridge/runtime_method.h:
        * bridge/runtime_object.cpp:
        (JSC::Bindings::RuntimeObject::RuntimeObject):
        (JSC::Bindings::RuntimeObject::subspaceForImpl):
        * bridge/runtime_object.h:

2020-01-03  Simon Fraser  <simon.fraser@apple.com>

        Add some shared schemes to the WebKit.xcworkspace
        https://bugs.webkit.org/show_bug.cgi?id=205698

        Reviewed by Tim Horton.

        Make WebKit.xcworkspace show the following schemes by default:
            All Source
            All Tools
            WTF
            JavaScriptCore
            WebCore
            WebKit
            WebKitLegacy
            DumpRenderTree
            WebKitTestRunner
            TestWebKitAPI
            MiniBrowser
            MobileMiniBrowser.
            
        Also remove the MobileMiniBrowserUITests scheme.

        * WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme: Copied from Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/xcshareddata/xcschemes/MobileMiniBrowserUITests.xcscheme.

2020-01-03  youenn fablet  <youenn@apple.com>

        REGRESSION: [iOS 13] webrtc/datachannel/mdns-ice-candidates.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=201900
        <rdar://problem/55466061>

        Reviewed by Eric Carlson.

        No change of behavior.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::registerMDNSName):
        Fix message typo (missing space).

2020-01-03  Chris Dumez  <cdumez@apple.com>

        Align XPathEvaluator.createNSResolver() / XPathResult.snapshotItem() with the specification
        https://bugs.webkit.org/show_bug.cgi?id=205699

        Reviewed by Alex Christensen.

        Align XPathEvaluator.createNSResolver() / XPathResult.snapshotItem() with the specification and
        other browsers (tested Chrome 79 and Firefox 71). In particular, their parameter should not be
        optional (or nullable).

        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::createNSResolver):
        * dom/Document.h:
        * dom/Document.idl:
        * xml/NativeXPathNSResolver.cpp:
        (WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
        (WebCore::NativeXPathNSResolver::lookupNamespaceURI):
        * xml/NativeXPathNSResolver.h:
        (WebCore::NativeXPathNSResolver::create):
        * xml/XPathEvaluator.cpp:
        (WebCore::XPathEvaluator::createNSResolver):
        * xml/XPathEvaluator.h:
        * xml/XPathEvaluator.idl:
        * xml/XPathResult.idl:

2020-01-03  Rob Buis  <rbuis@igalia.com>

        Implement "create a potential-CORS request"
        https://bugs.webkit.org/show_bug.cgi?id=205326

        Reviewed by Youenn Fablet.

        Implement "create a potential-CORS request" [1] and
        remove deprecatedSetAsPotentiallyCrossOrigin. Add a
        same-origin fallback flag that can be used by clients
        of createPotentialAccessControlRequest in the future.

        No new tests, no functional change.

        * bindings/js/CachedScriptFetcher.cpp:
        (WebCore::CachedScriptFetcher::requestScriptWithCache const):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        * html/parser/HTMLResourcePreloader.cpp:
        (WebCore::PreloadRequest::resourceRequest):
        * loader/CrossOriginAccessControl.cpp:
        (WebCore::createPotentialAccessControlRequest):
        * loader/CrossOriginAccessControl.h:
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement):
        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::preloadIfNeeded):
        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResourceLoader::requestResource):
        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::load):
        * loader/cache/CachedResourceRequest.cpp:
        (WebCore::CachedResourceRequest::deprecatedSetAsPotentiallyCrossOrigin): Deleted.
        * loader/cache/CachedResourceRequest.h:

2020-01-03  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Enable text-transform:capitalize
        https://bugs.webkit.org/show_bug.cgi?id=205721

        Reviewed by Zalan Bujtas.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::canUseFor):

        Enable.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::applyTextTransform): Deleted.

        No need to do anything, RenderText::text() has already applied text transform.

2020-01-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/ruby/ruby-justification.html
        https://bugs.webkit.org/show_bug.cgi?id=205708
        <rdar://problem/58290264>

        Reviewed by Antti Koivisto.

        1. Fix last (content) run's trailing expansion behavior.
        2. Pass in float to TextRun instead of LayoutUnit to avoid losing precision.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::justifyRuns const):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):

2020-01-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/parser/entities-in-html.html
        https://bugs.webkit.org/show_bug.cgi?id=205710
        <rdar://problem/58290731>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::isWhitespaceCharacter):

2020-01-03  Rob Buis  <rbuis@igalia.com>

        <link> with non-CSS type should not be retrieved
        https://bugs.webkit.org/show_bug.cgi?id=88157

        Reviewed by Youenn Fablet.

        If the UA does not support the given MIME type for the given link
        relationship, then the UA should not fetch and process the linked
        resource [1].

        The behavior matches Chrome and Firefox.

        [1] https://html.spec.whatwg.org/multipage/semantics.html#processing-the-type-attribute

        Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-type-attribute.html

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):

2020-01-02  Chris Dumez  <cdumez@apple.com>

        XMLSerializer doesn't correctly encode entities in <style> element
        https://bugs.webkit.org/show_bug.cgi?id=205635

        Reviewed by Alex Christensen.

        As per [1], when doing an XML serialization of text, we should escape '<', '>' and '&', even
        if the text is inside a <style> element. The <style> element exception is for HTML serialization [2].

        [1] https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
        [2] https://html.spec.whatwg.org/#serialising-html-fragments

        Test: fast/dom/xmlserializer-ampersand-in-style.html

        * editing/MarkupAccumulator.cpp:
        (WebCore::MarkupAccumulator::entityMaskForText const):

2020-01-02  Yusuke Suzuki  <ysuzuki@apple.com> and Simon Fraser  <simon.fraser@apple.com>

        Experiment: create lots of different malloc zones for easier accounting of memory use
        https://bugs.webkit.org/show_bug.cgi?id=186422

        Reviewed by Saam Barati.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/SerializedScriptValue.cpp:
        * bindings/js/SerializedScriptValue.h:
        * css/CSSFontFace.cpp:
        * css/CSSFontFace.h:
        * css/CSSSelector.cpp:
        * css/CSSSelector.h:
        * css/CSSValue.cpp:
        * css/CSSValue.h:
        * css/StyleProperties.cpp:
        (WebCore::ImmutableStyleProperties::create):
        * css/StyleProperties.h:
        * css/StyleRule.cpp:
        * css/StyleRule.h:
        * dom/ElementData.cpp:
        (WebCore::ShareableElementData::createWithAttributes):
        (WebCore::UniqueElementData::makeShareableCopy const):
        * dom/ElementData.h:
        * dom/NodeRareData.cpp:
        * dom/NodeRareData.h:
        * dom/QualifiedName.cpp:
        * dom/QualifiedName.h:
        * html/parser/HTMLDocumentParser.cpp:
        * html/parser/HTMLDocumentParser.h:
        * loader/DocumentLoader.cpp:
        * loader/DocumentLoader.h:
        * loader/ResourceLoader.cpp:
        * loader/ResourceLoader.h:
        * loader/cache/CachedResource.cpp:
        * loader/cache/CachedResource.h:
        * page/PerformanceEntry.cpp:
        * page/PerformanceEntry.h:
        * platform/graphics/Font.cpp:
        * platform/graphics/Font.h:
        * platform/graphics/FontCascadeFonts.cpp:
        * platform/graphics/FontCascadeFonts.h:
        * platform/graphics/Region.cpp:
        * platform/graphics/Region.h:
        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
        (WebCore::releaseUint8Vector):
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/nicosia/NicosiaBuffer.cpp:
        (Nicosia::Buffer::Buffer):
        * platform/network/ResourceHandle.cpp:
        * platform/network/ResourceHandleInternal.h:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore::closeCurrentStream):
        (WebCore::advanceCurrentStream):
        * rendering/RenderLayer.cpp:
        * rendering/RenderLayer.h:
        * rendering/TableLayout.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
        * rendering/TableLayout.h:
        * rendering/style/RenderStyle.cpp:
        * rendering/style/RenderStyle.h:
        * rendering/style/SVGRenderStyle.cpp:
        * rendering/style/SVGRenderStyle.h:
        * rendering/style/SVGRenderStyleDefs.cpp:
        * rendering/style/SVGRenderStyleDefs.h:
        * rendering/style/StyleBoxData.cpp:
        * rendering/style/StyleBoxData.h:
        * rendering/style/StyleInheritedData.cpp:
        * rendering/style/StyleInheritedData.h:
        * rendering/style/StyleRareInheritedData.cpp:
        * rendering/style/StyleRareInheritedData.h:
        * rendering/style/StyleRareNonInheritedData.cpp:
        * rendering/style/StyleRareNonInheritedData.h:
        * rendering/style/StyleSurroundData.cpp:
        * rendering/style/StyleSurroundData.h:
        * rendering/style/StyleTransformData.cpp:
        * rendering/style/StyleTransformData.h:
        * style/StyleTreeResolver.cpp:
        * style/StyleTreeResolver.h:
        * svg/animation/SMILTimeContainer.cpp:
        * svg/animation/SMILTimeContainer.h:

2020-01-02  Andy Estes  <aestes@apple.com>

        [Payment Request] Perform payment method data IDL conversion in the PaymentRequest constructor
        https://bugs.webkit.org/show_bug.cgi?id=199225
        <rdar://problem/52217847>

        Reviewed by Darin Adler.

        Implemented support for validating payment method data during Payment Request construction.
        IDL conversion errors for payment method data will now trigger an exception in the
        PaymentRequest constructor rather than being deferred to the show() method.

        Payment Request specified this change in <https://github.com/w3c/payment-request/pull/829>.

        Test: imported/w3c/web-platform-tests/payment-request/constructor_convert_method_data.https.html

        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
        (WebCore::convertAndValidate): Moved the logic for converting a JSValue to an
        ApplePayRequest IDL type from ApplePayPaymentHandler::convertData to here.
        (WebCore::ApplePayPaymentHandler::validateData): Added. Checks that the specified JSValue is
        a valid ApplePayRequest, throwing an exception if not.
        (WebCore::ApplePayPaymentHandler::convertData): Changed to use convertAndValidate to convert
        from a JSValue to an ApplePayRequest.
        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
        * Modules/paymentrequest/PaymentHandler.cpp:
        (WebCore::PaymentHandler::validateData): Added. Calls ApplePayPaymentHandler::validateData
        if Apple Pay handles the specified identifier.
        * Modules/paymentrequest/PaymentHandler.h:
        * Modules/paymentrequest/PaymentRequest.cpp:
        (WebCore::parse): Moved up to be callable by PaymentRequest::create.
        (WebCore::PaymentRequest::create): Validated that serializedData can be converted to a valid
        ApplePayRequest, throwing an exception if not.

2020-01-02  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Fix failing text-indent cases when the IFC root is an anonymous box
        https://bugs.webkit.org/show_bug.cgi?id=205693
        <rdar://problem/58284277>

        Reviewed by Antti Koivisto.

        During text-indent computation we would normally check if the IFC root is anonymous and if so,
        whether it's the first child of its parent element.
        e.g. <div><div>text</div>this text is wrapped inside an anonymous renderer</div>
        The IFC root of the "this text.." content is an anonymous container and it is not
        the first child of its parent renderer.
        However in the LFC integration case, we can't go beyond the IFC root and check for parent-child status. 

        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isAnonymous const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildLayoutTreeForIntegration):
        (WebCore::Layout::LayoutTreeContent::setRootIsFirstChild):
        (WebCore::Layout::LayoutTreeContent::isRootFirstChild const):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        * layout/layouttree/LayoutTreeBuilder.h:

2020-01-02  Alex Christensen  <achristensen@webkit.org>

        Add SPI to disable CORS on requests to URLs matching a pattern
        https://bugs.webkit.org/show_bug.cgi?id=205534
        <rdar://problem/58011337>

        Reviewed by Chris Dumez.

        This should allow us to remove the layering violation in LegacySchemeRegistry::isUserExtensionScheme
        and fix the bug in the radar.  The SPI is exercised by a new API test.

        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
        * page/Page.cpp:
        (WebCore::m_deviceOrientationUpdateProvider):
        (WebCore::Page::shouldDisableCorsForRequestTo const):
        * page/Page.h:
        * page/PageConfiguration.h:
        * platform/LegacySchemeRegistry.cpp:
        (WebCore::LegacySchemeRegistry::isUserExtensionScheme):

2020-01-02  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Text-indent shrinks the available horizontal space
        https://bugs.webkit.org/show_bug.cgi?id=205688
        <rdar://problem/58279938>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):

2020-01-02  Sam Weinig  <weinig@apple.com>

        Simplify StringBuilder API/align with makeString by removing appendFixed* functions and using FormatNumber struct instead
        https://bugs.webkit.org/show_bug.cgi?id=205671

        Reviewed by Alex Christensen.

        * css/CSSFontVariationValue.cpp:
        * css/CSSKeyframeRule.cpp:
        * css/CSSTimingFunctionValue.cpp:
        * css/parser/CSSParserToken.cpp:
        * html/HTMLImageElement.cpp:
        * page/scrolling/AxisScrollSnapOffsets.cpp:
        * platform/graphics/Color.cpp:
        * platform/graphics/ExtendedColor.cpp:
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        * platform/graphics/freetype/FontCacheFreeType.cpp:
        * svg/SVGNumberList.h:
        * svg/SVGPathStringBuilder.cpp:
        * svg/SVGPointList.h:
        * svg/SVGTransformValue.h:
        * svg/properties/SVGPropertyTraits.h:
        * testing/Internals.cpp:
        Replace all uses of builder.appendFixedPrecisionNumber(...) with builder.append(FormattedNumber::fixedPrecision(...))
        and builder.appendFixedWidthNumber(...) with with builder.append(FormattedNumber::fixedWidth(...))

2020-01-01  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove the build warning below since r253939.
        warning: no return statement in function returning non-void [-Wreturn-type]

        No new tests, no behavioral changes.

        * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
        (WebCore::GraphicsContext3D::mapBufferRange):

2020-01-01  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Provide the viewport size when faking ICB
        https://bugs.webkit.org/show_bug.cgi?id=205676
        <rdar://problem/58263799>

        Reviewed by Antti Koivisto.

        Normally we would get the viewport size by checking the ICB, but in integration mode
        the ICB is not sized to the size of the RenderView.

        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::setViewportSize):
        (WebCore::Layout::LayoutState::viewportSize const):
        * layout/LayoutState.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::prepareRootGeometryForLayout):

2020-01-01  Antti Koivisto  <antti@apple.com>

        Make SelectorCompiler interface use CompiledSelector type
        https://bugs.webkit.org/show_bug.cgi?id=205673

        Reviewed by Sam Weinig.

        SelectorCompiler interface is currently rather low-level, taking void* code references.
        Expand use of CompiledSelector type to simplify clients.

        * cssjit/CompiledSelector.h:
        (WebCore::CompiledSelector::wasUsed):
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::compileSelector):

        Generate code directory to a CompiledSelector.

        * cssjit/SelectorCompiler.h:
        (WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
        (WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
        (WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
        (WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):

        Take CompiledSelector.

        * dom/SelectorQuery.cpp:
        (WebCore::SelectorDataList::SelectorDataList):
        (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker const):
        (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext const):
        (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData const):
        (WebCore::SelectorDataList::compileSelector):
        (WebCore::SelectorDataList::execute const):
        (WebCore::isCompiledSelector): Deleted.
        * dom/SelectorQuery.h:
        (WebCore::SelectorDataList::SelectorData::SelectorData): Deleted.
        (WebCore::SelectorDataList::SelectorData::~SelectorData): Deleted.
        (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed const): Deleted.

        Replace SelectorData fields with a CompiledSelector member.

        * style/ElementRuleCollector.cpp:
        (WebCore::Style::ElementRuleCollector::ruleMatches):

2020-01-01  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for ink overflow
        https://bugs.webkit.org/show_bug.cgi?id=205674
        <rdar://problem/58262376>

        Reviewed by Antti Koivisto.

        Add ink overflow information to Display::Run and to each Display::LineBox while
        the display boxes are being created.
        (Eventually we should add both scrollable and ink overflow to Display::Box)

        * layout/displaytree/DisplayInlineRect.h:
        (WebCore::Display::InlineRect::expandToContain):
        (WebCore::Display::InlineRect::inflate):
        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::scrollableOverflow const):
        (WebCore::Display::LineBox::inkOverflow const):
        (WebCore::Display::LineBox::setScrollableOverflow):
        (WebCore::Display::LineBox::setInkOverflow):
        (WebCore::Display::LineBox::scrollableOverflowRect const): Deleted.
        (WebCore::Display::LineBox::setScrollableOverflowRect): Deleted.
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::inkOverflow const):
        (WebCore::Display::Run::Run):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::collectOverflow):
        (WebCore::LayoutIntegration::LineLayout::paint):
        (WebCore::LayoutIntegration::computeVisualOverflow): Deleted.
        * platform/graphics/LayoutSize.h:
        (WebCore::ceiledIntSize):

2019-12-22  Jeff Miller  <jeffm@apple.com>

        Update user-visible copyright strings to include 2020
        https://bugs.webkit.org/show_bug.cgi?id=205552

        Reviewed by Darin Adler.

        * Info.plist:

2020-01-01  youenn fablet  <youenn@apple.com>

        ServiceWorkerJobData should have a move constructor
        https://bugs.webkit.org/show_bug.cgi?id=205555
        <rdar://problem/57853373>

        Reviewed by Darin Adler.

        Previously, ServiceWorkerJobData did not have a move constructor.
        Refactor code to enable it.
        This improves efficiency and ensures that strings and other ref counted fields are
        properly moved and isolated.
        Covered by existing tests.

        * workers/service/ServiceWorkerJobData.cpp:
        (WebCore::ServiceWorkerJobData::isolatedCopy const):
        * workers/service/ServiceWorkerJobData.h:
        (WebCore::ServiceWorkerJobData::decode):

2020-01-01  youenn fablet  <youenn@apple.com>

        Implement transceiver setCodecPreferences
        https://bugs.webkit.org/show_bug.cgi?id=190840
        <rdar://problem/45496326>

        Reviewed by Eric Carlson.

        Add binding code to pipe setCodecPreferences up to webrtc backend,
        Covered by updated and rebased tests.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/mediastream/RTCRtpCapabilities.idl:
        * Modules/mediastream/RTCRtpCodecCapability.idl: Added.
        * Modules/mediastream/RTCRtpTransceiver.cpp:
        (WebCore::RTCRtpTransceiver::setCodecPreferences):
        * Modules/mediastream/RTCRtpTransceiver.h:
        * Modules/mediastream/RTCRtpTransceiver.idl:
        * Modules/mediastream/RTCRtpTransceiverBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
        (WebCore::toExceptionCode): Deleted.
        * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp:
        (WebCore::toRtpCodecCapability):
        (WebCore::LibWebRTCRtpTransceiverBackend::setCodecPreferences):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
        (WebCore::toExceptionCode):
        (WebCore::toException):
        * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/RTCRtpCapabilities.h:
        (): Deleted.
        * platform/mediastream/RTCRtpCodecCapability.h: Added.
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::toRTCRtpCapabilities):

2020-01-01  Rob Buis  <rbuis@igalia.com>

        Make better use of HTTPHeaderValues constants
        https://bugs.webkit.org/show_bug.cgi?id=205672

        Reviewed by Youenn Fablet.

        Use HTTPHeaderValues constants instead of allocating
        temporary strings.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):
        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clientHandshakeRequest const):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::loadImage):
        (WebCore::PingLoader::sendPing):
        * loader/appcache/ApplicationCacheGroup.cpp:
        (WebCore::ApplicationCacheGroup::createRequest):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):

2019-12-31  Peng Liu  <peng.liu6@apple.com>

        Add remote media resource loader for the GPU process
        https://bugs.webkit.org/show_bug.cgi?id=205379

        Reviewed by Youenn Fablet.

        There are two definitions of ShouldContinue: WebCore::ScriptExecutionContext::ShouldContinue
        and WebCore::ShouldContinue. This patch moves WebCore::ShouldContinue to
        WebCore::PolicyChecker::ShouldContinue in order to support transmitting it in XPC messages.

        Tests: media/audio-play-with-video-element.html
               media/audio-play.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::loadPostRequest):
        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
        * loader/FrameLoader.h:
        * loader/MediaResourceLoader.cpp:
        (WebCore::MediaResource::responseReceived):
        * loader/PolicyChecker.h:
        * platform/graphics/PlatformMediaResourceLoader.h:
        (WebCore::PlatformMediaResourceClient::responseReceived):
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (CachedResourceStreamingClient::responseReceived):
        * platform/network/cocoa/WebCoreNSURLSession.mm:
        (WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
        (-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):

2019-12-20  Darin Adler  <darin@apple.com>

        Tidy a bit of StringBuilder usage
        https://bugs.webkit.org/show_bug.cgi?id=205509

        Reviewed by Sam Weinig.

        * dom/Range.cpp:
        (WebCore::Range::toString const): Remove redundant range checking and let the
        StringBuilder::appendSubstring take care of it.

        * editing/MarkupAccumulator.cpp:
        (WebCore::appendCharactersReplacingEntitiesInternal): Use appendSubstring.
        (WebCore::MarkupAccumulator::appendNamespace): Use single calls to
        StringBuilder::append with multiple arguments rather than multiple calls.

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

        [LFC][IFC] Add scrollable overflow rect to Display::LineBox
        https://bugs.webkit.org/show_bug.cgi?id=205661
        <rdar://problem/58256282>

        Reviewed by Antti Koivisto.

        Compute layout overflow rect while closing the line and adjusting the rust vertically.

        * layout/displaytree/DisplayInlineRect.h:
        (WebCore::Display::InlineRect::setBottom):
        (WebCore::Display::InlineRect::expandVerticallyToContain):
        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::scrollableOverflowRect const):
        (WebCore::Display::LineBox::logicalTopLeft const):
        (WebCore::Display::LineBox::setScrollableOverflowRect):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::collectOverflow):

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

        [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-014.html
        https://bugs.webkit.org/show_bug.cgi?id=205657
        <rdar://problem/58254951>

        Reviewed by Antti Koivisto.

        Use the adjusted available width when justifying the runs during line close.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::justifyRuns const):
        (WebCore::Layout::LineBuilder::alignHorizontally):
        * layout/inlineformatting/InlineLineBuilder.h:

2019-12-31  Antti Koivisto  <antti@apple.com>

        StyleRule accessor in RuleData should return a const reference
        https://bugs.webkit.org/show_bug.cgi?id=205655

        Reviewed by Zalan Bujtas.

        It is currently a non-const pointer.

        This leads to StyleRule being const in many other places too.

        * css/StyleRule.h:
        (WebCore::StyleRuleBase::deref const):
        (WebCore::StyleRuleBase::deref): Deleted.

        Make deref const, matching RefCounted and allowing RefPtr<const StyleRule>
        
        * editing/EditingStyle.cpp:
        (WebCore::styleFromMatchedRulesForElement):
        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::buildObjectForRule):
        (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
        * inspector/agents/InspectorCSSAgent.h:
        * style/ElementRuleCollector.cpp:
        (WebCore::Style::ElementRuleCollector::matchedRuleList const):
        (WebCore::Style::ElementRuleCollector::transferMatchedRules):
        (WebCore::Style::ElementRuleCollector::ruleMatches):
        (WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):
        * style/ElementRuleCollector.h:
        * style/InspectorCSSOMWrappers.cpp:
        (WebCore::Style::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
        * style/InspectorCSSOMWrappers.h:
        * style/RuleData.cpp:
        (WebCore::Style::RuleData::RuleData):
        * style/RuleData.h:
        (WebCore::Style::RuleData::styleRule const):
        (WebCore::Style::RuleData::compiledSelector const):
        (WebCore::Style::RuleData::rule const): Deleted.
        * style/RuleFeature.cpp:
        (WebCore::Style::RuleFeature::RuleFeature):
        (WebCore::Style::RuleFeatureSet::collectFeatures):
        * style/RuleFeature.h:
        (WebCore::Style::RuleFeature::RuleFeature): Deleted.
        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::addRule):
        (WebCore::Style::RuleSet::addStyleRule):
        (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):
        (WebCore::Style::RuleSet::MediaQueryCollector::addRuleIfNeeded):
        * style/RuleSet.h:
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::styleRulesForElement):
        (WebCore::Style::Resolver::pseudoStyleRulesForElement):
        * style/StyleResolver.h:
        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::makeRuleSet):
        (WebCore::Style::ensureInvalidationRuleSets):

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

        [LFC][IFC](Regression r253909) Fix fast/text/simple-line-with-br.html
        https://bugs.webkit.org/show_bug.cgi?id=205653
        <rdar://problem/58248900>

        Reviewed by Antti Koivisto.

        When the inline content is followed by a line break (e.g. text content<br>), the line
        break should not initiate a new line unless the line is empty (e.g text content<br><br>).
        Let's include the line break in the LineCandidateContent so that we can close the line by
        adding the trailing line break (This is a partial revert of r253909). 

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::nextWrapOpportunity):
        (WebCore::Layout::LineCandidateContent::inlineRuns const):
        (WebCore::Layout::LineCandidateContent::trailingLineBreak const):
        (WebCore::Layout::LineCandidateContent::setTrailingLineBreak):
        (WebCore::Layout::LineCandidateContent::append):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
        (WebCore::Layout::LineCandidateContent::runs const): Deleted.
        (WebCore::Layout::LineCandidateContent::isLineBreak const): Deleted.
        (WebCore::Layout::LineCandidateContent::setIsLineBreak): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2019-12-31  youenn fablet  <youenn@apple.com>

        Implement RTC VTB decoders in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=205607

        Reviewed by Eric Carlson.

        Add routine to create a RemoveVideoSample from a pixel buffer.
        Update LibWebRTCProvider to enable/disable decoding in GPU Process and add internals API.

        Test: webrtc/video-gpuProcess.html

        * platform/graphics/RemoteVideoSample.cpp:
        (WebCore::RemoteVideoSample::create):
        * platform/graphics/RemoteVideoSample.h:
        * platform/graphics/cv/ImageTransferSessionVT.h:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::LibWebRTCProvider::setUseGPUProcess):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setUseGPUProcessForWebRTC):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-12-30  Eric Carlson  <eric.carlson@apple.com>

        Create media mime type cache base class to reduce duplicate code
        https://bugs.webkit.org/show_bug.cgi?id=205632
        <rdar://problem/58233565>

        Reviewed by Jer Noble.

        No new tests, no functional change.
        
        AVStreamDataParserMIMETypeCache and AVAssetMIMETypeCache have a lot of very similar code,
        so create MIMETypeCache as a base class. Also move most of the logic from 
        MediaPlayerPrivateMediaSourceAVFObjC::supportsType and MediaPlayerPrivateAVFoundationObjC::supportsType
        in the caches.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): Call supportsContainerType.

        * platform/graphics/MIMETypeCache.cpp: Added.
        (WebCore::MIMETypeCache::supportedTypes):
        (WebCore::MIMETypeCache::supportsContainerType):
        (WebCore::MIMETypeCache::canDecodeType):
        (WebCore::MIMETypeCache::canDecodeTypePrivate):
        (WebCore::MIMETypeCache::setSupportedTypes):
        (WebCore::MIMETypeCache::addSupportedType):
        (WebCore::MIMETypeCache::staticContainerTypeList):
        * platform/graphics/MIMETypeCache.h: Added.
        (WebCore::MIMETypeCache::isUnsupportedType):
        (WebCore::MIMETypeCache::isAvailable const):
        (WebCore::MIMETypeCache::canDecodeTypeInternal):
        (WebCore::MIMETypeCache::initializeCache):

        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaEngineSupportParameters::encode const): Drive-by fix - add missing variable.

        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h:
        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
        (WebCore::AVAssetMIMETypeCache::isAvailable const):
        (WebCore::AVAssetMIMETypeCache::canDecodeTypeInternal):
        (WebCore::AVAssetMIMETypeCache::isUnsupportedType):
        (WebCore::AVAssetMIMETypeCache::staticContainerTypeList):
        (WebCore::AVAssetMIMETypeCache::initializeCache):
        (WebCore::AVAssetMIMETypeCache::setSupportedTypes): Moved to base class.
        (WebCore::AVAssetMIMETypeCache::types): Moved to base class as supportedTypes.
        (WebCore::AVAssetMIMETypeCache::supportsContentType): Renamed supportsContainerType.
        (WebCore::AVAssetMIMETypeCache::canDecodeType): Moved to base class.
        (WebCore::AVAssetMIMETypeCache::loadMIMETypes): Deleted.

        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm:
        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeTypeInternal):
        (WebCore::AVStreamDataParserMIMETypeCache::initializeCache):
        (WebCore::AVStreamDataParserMIMETypeCache::types): Moved to base class as supportedTypes.
        (WebCore::AVStreamDataParserMIMETypeCache::supportsContentType): Renamed supportsContainerType.
        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Moved to base class.
        (WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes): Deleted.

        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::supportsContainerType): Renamed from supportsContentType.
        (WebCore::ImageDecoderAVFObjC::canDecodeType):
        (WebCore::ImageDecoderAVFObjC::supportsContentType): Deleted.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

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

        [LFC][Integration] Do not apply trailing whitespace quirk when content is right aligned.
        https://bugs.webkit.org/show_bug.cgi?id=205634
        <rdar://problem/58234523>

        Reviewed by Antti Koivisto.

        Apparently we don't always need this quirk. See SimpleLineLayout::createLineRuns.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::isTextAlignRight const):

2019-12-30  Brady Eidson  <beidson@apple.com>

        Add WKWebView SPI to evaluate a function with arguments
        https://bugs.webkit.org/show_bug.cgi?id=205239

        Reviewed by Alex Christensen.

        Covered by new API tests.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        
        * bindings/js/ExceptionDetails.h:
        
        * bindings/js/RunJavaScriptParameters.h: Added.
        (WebCore::RunJavaScriptParameters::RunJavaScriptParameters):
        (WebCore::RunJavaScriptParameters::encode const):
        (WebCore::RunJavaScriptParameters::decode):
        
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeScriptInWorldIgnoringException):
        (WebCore::ScriptController::executeScriptInWorld):
        (WebCore::ScriptController::callInWorld):
        (WebCore::ScriptController::executeUserAgentScriptInWorld):
        (WebCore::ScriptController::executeUserAgentScriptInWorldInternal):
        (WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld):
        * bindings/js/ScriptController.h:
        
        XPathGrammar changes completely unrelated to the functionality of this patch,
        but because of our poor #include hygiene these were necessary to keep linuxes building.
        * xml/XPathGrammar.cpp:
        * xml/XPathGrammar.y:

2019-12-30  Antti Koivisto  <antti@apple.com>

        Style invalidation cleanups
        https://bugs.webkit.org/show_bug.cgi?id=205644

        Reviewed by Zalan Bujtas.

        Move more of the invalidation code from Style::Scope to Style::Invalidator.

        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::invalidateStyle):
        (WebCore::Style::Invalidator::invalidateAllStyle):
        (WebCore::Style::Invalidator::invalidateHostAndSlottedStyleIfNeeded):
        * style/StyleInvalidator.h:
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::analyzeStyleSheetChange):

        Return StyleSheetChange struct.

        (WebCore::Style::Scope::updateActiveStyleSheets):
        (WebCore::Style::Scope::invalidateStyleAfterStyleSheetChange):

        Use StyleSheetChange to invalidate the style.

        (WebCore::Style::Scope::updateResolver):
        (WebCore::Style::Scope::scheduleUpdate):
        (WebCore::Style::Scope::evaluateMediaQueries):
        (WebCore::Style::invalidateHostAndSlottedStyleIfNeeded): Deleted.
        * style/StyleScope.h:
        (WebCore::Style::Scope::document):
        (WebCore::Style::Scope::shadowRoot const):
        (WebCore::Style::Scope::shadowRoot):

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

        [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/white-space-wrap-after-nowrap-001.html
        https://bugs.webkit.org/show_bug.cgi?id=205633
        <rdar://problem/58234239>

        Reviewed by Antti Koivisto.

        When the LineBreaker comes back with Action::Revert (meaning that the line
        needs to be reverted back to an earlier line wrap opportunity), call LineBuilder::revert and
        close the line.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const): Return push when the current content can be wrapped.
        (WebCore::Layout::ContinousContent::ContinousContent):
        (WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const): Fix the last position logic.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::revert):
        (WebCore::Layout::LineBuilder::collectHangingContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
        (WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
        (WebCore::Layout::LineLayoutContext::addFloatItems): Deleted.
        (WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2019-12-30  youenn fablet  <youenn@apple.com>

        Ignore URL host for schemes that are not using host information
        https://bugs.webkit.org/show_bug.cgi?id=205157
        rdar://problem/57825963

        Reviewed by Darin Adler.

        Tests: http/tests/local/file-url-host.html
               http/tests/security/about-url-host.html
               http/tests/security/data-url-host.html
               http/tests/security/javascript-url-host.html

        Whenever setting the document URL, remove the host information if its scheme is not supposed to have a host.
        This is done for file, data and about schemes.

        Add internals APIs to test this.

        * dom/Document.cpp:
        (WebCore::Document::setURL):
        * page/DOMWindow.h:
        * page/Location.h:
        * page/Location.idl:
        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::shouldIgnoreHost):
        * page/SecurityOrigin.h:
        * testing/Internals.cpp:
        (WebCore::Internals::windowLocationHost):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-12-29  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, build fix after r253938
        https://bugs.webkit.org/show_bug.cgi?id=205629

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::revert):

2019-12-29  Peng Liu  <peng.liu6@apple.com>

        Tweak the format and comment in the code to support media in GPU process
        https://bugs.webkit.org/show_bug.cgi?id=205631

        Reviewed by Eric Carlson.

        No new tests, no functional change.

        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::platformLayer const):
        (WebCore::MediaPlayerPrivateInterface::timedMetadata const):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):

2019-12-29  Eric Carlson  <eric.carlson@apple.com>

        Cleanup media IPC encoders
        https://bugs.webkit.org/show_bug.cgi?id=205630
        <rdar://problem/58232173>

        Reviewed by Anders Carlsson.

        No new tests, no functional change.

        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaEngineSupportParameters::decode):

2019-12-27  Dean Jackson  <dino@apple.com>

        [WebGL] Add a pure virtual base class for GraphicsContext3D
        https://bugs.webkit.org/show_bug.cgi?id=205604

        Reviewed by Sam Weinig.

        This is the first step in a series of patches to allow multiple versions
        of GraphicsContext3D to exist, each using a different backend rendering
        system. I've added a GraphicsContext3DBase class (that will eventually
        be named GraphicsContext3D) holding all the WebGL entry points as well
        as some common helper functions.

        I also took the chance to move some enums into enum classes, which
        makes it more obvious where things come from. I also removed some
        unused interfaces: WebGLRenderingContextErrorMessageCallback and
        WebGLRenderingContextLostMessageCallback.

        The existing GraphicsContext3D now inherits from the base class,
        but is otherwise nearly identical. The next step will be to make
        different instances rather than the mix of #if macros we have now.
        The virtual functions are marked "override" for now, but will become
        "final" in the instances.

        There should be no change in functionality.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/canvas/WebGLProgram.cpp:
        (WebCore::WebGLProgram::cacheActiveAttribLocations):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::initializeNewContext):
        (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
        (WebCore::WebGLRenderingContextBase::getActiveAttrib):
        (WebCore::WebGLRenderingContextBase::getActiveUniform):
        (WebCore::WebGLRenderingContextBase::getContextAttributes):
        (WebCore::WebGLRenderingContextBase::getUniformLocation):
        (WebCore::WebGLRenderingContextBase::texImage2DImpl):
        (WebCore::WebGLRenderingContextBase::texSubImage2DImpl):
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::texImage2D):
        (WebCore::WebGLRenderingContextBase::isTexInternalFormatColorBufferCombinationValid):
        (WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback): Deleted.
        (WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback): Deleted.
        * html/canvas/WebGLRenderingContextBase.h:
        * platform/graphics/FormatConverter.cpp:
        (WebCore::uint8_t>):
        (WebCore::float>):
        (WebCore::uint16_t>):
        (WebCore::FormatConverter::convert):
        * platform/graphics/GraphicsContext3D.cpp:
        (WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
        (WebCore::GraphicsContext3D::extractImageData):
        (WebCore::GraphicsContext3D::extractTextureData):
        (WebCore::TexelBytesForFormat):
        (WebCore::GraphicsContext3D::packPixels):
        (WebCore::GraphicsContext3D::getClearBitsByAttachmentType): Deleted.
        (WebCore::GraphicsContext3D::getClearBitsByFormat): Deleted.
        (WebCore::GraphicsContext3D::getChannelBitsByFormat): Deleted.
        * platform/graphics/GraphicsContext3D.h:
        (WebCore::GraphicsContext3D::ImageExtractor::imageHtmlDomSource):
        (WebCore::GraphicsContext3D::platformGraphicsContext3D const): Deleted.
        (WebCore::GraphicsContext3D::platformTexture const): Deleted.
        (WebCore::GraphicsContext3D::platformLayer const): Deleted.
        (WebCore::GraphicsContext3D::hasAlpha): Deleted.
        (WebCore::GraphicsContext3D::hasColor): Deleted.
        (WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData): Deleted.
        * platform/graphics/GraphicsTypes3D.h:
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
        (WebCore::GraphicsContext3D::readPixels):
        (WebCore::GraphicsContext3D::validateDepthStencil):
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
        (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
        (WebCore::GraphicsContext3D::prepareTexture):
        (WebCore::GraphicsContext3D::readRenderingResults):
        (WebCore::GraphicsContext3D::reshape):
        (WebCore::GraphicsContext3D::bindFramebuffer):
        (WebCore::GraphicsContext3D::copyTexImage2D):
        (WebCore::GraphicsContext3D::copyTexSubImage2D):
        (WebCore::GraphicsContext3D::getContextAttributes): Deleted.
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::getSourceDataFormat):
        (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::create):
        (WebCore::GraphicsContext3D::createShared):
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable):
        (WebCore::GraphicsContext3D::makeContextCurrent):
        (WebCore::GraphicsContext3D::checkGPUStatus):
        (WebCore::GraphicsContext3D::presentRenderbuffer):
        (WebCore::GraphicsContext3D::texImageIOSurface2D):
        (WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore):
        (WebCore::GraphicsContext3D::updateCGLContext):
        (WebCore::GraphicsContext3D::screenDidChange):
        (WebCore::GraphicsContext3D::setContextLostCallback): Deleted.
        (WebCore::GraphicsContext3D::setErrorMessageCallback): Deleted.
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer initWithGraphicsContext3D:]):
        (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
        (-[WebGLLayer bindFramebufferToNextAvailableSurface]):
        * platform/graphics/cv/TextureCacheCV.mm:
        (WebCore::TextureCacheCV::create):
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
        (WebCore::GraphicsContext3D::readPixels):
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::validateDepthStencil):
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
        (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
        (WebCore::GraphicsContext3D::prepareTexture):
        (WebCore::GraphicsContext3D::readRenderingResults):
        (WebCore::GraphicsContext3D::reshape):
        (WebCore::GraphicsContext3D::bindFramebuffer):
        (WebCore::GraphicsContext3D::copyTexImage2D):
        (WebCore::GraphicsContext3D::copyTexSubImage2D):
        (WebCore::GraphicsContext3D::getContextAttributes): Deleted.

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

        [LFC][IFC] Implement LineBuilder::revert
        https://bugs.webkit.org/show_bug.cgi?id=205629
        <rdar://problem/58231425>

        Reviewed by Antti Koivisto.

        LineBuilder::revert simply removes trailing runs, shrinks the line and rebuilds the collapsible content.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::HangingContent::width const):
        (WebCore::Layout::HangingContent::isConditional const):
        (WebCore::Layout::HangingContent::setIsConditional):
        (WebCore::Layout::HangingContent::expand):
        (WebCore::Layout::HangingContent::reset):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::revert):
        (WebCore::Layout::LineBuilder::alignHorizontally):
        (WebCore::Layout::LineBuilder::collectHangingContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::operator== const):
        (WebCore::Layout::LineBuilder::InlineItemRun::operator!= const):
        (WebCore::Layout::LineBuilder::HangingContent::width const): Deleted. Remove m_hangingContent so that revert does not need to deal with it.
        (WebCore::Layout::LineBuilder::HangingContent::isConditional const): Deleted.
        (WebCore::Layout::LineBuilder::HangingContent::setIsConditional): Deleted.
        (WebCore::Layout::LineBuilder::HangingContent::expand): Deleted.
        (WebCore::Layout::LineBuilder::HangingContent::reset): Deleted.

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

        [LFC][IFC] Add LineBreaker::Result::Revert to indicate an earlier line wrap opportunity
        https://bugs.webkit.org/show_bug.cgi?id=205623
        <rdar://problem/58228339>

        Reviewed by Antti Koivisto.

        See webkit.org/b/205613 for more info.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::Result::Result):
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit):

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

        Make RuleSet refcounted
        https://bugs.webkit.org/show_bug.cgi?id=205628
        <rdar://problem/58231798>

        Unreviewed folloup.

        * style/UserAgentStyle.cpp:
        (WebCore::Style::UserAgentStyle::loadFullDefaultStyle):

        Use deref instead of delete.

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

        Make RuleSet refcounted
        https://bugs.webkit.org/show_bug.cgi?id=205628

        Reviewed by Zalan Bujtas.

        For safety, and to support shared ownership.

        Also convert a bunch of places that use raw RuleSet pointers to use Ref/RefPtr instead.

        * style/ElementRuleCollector.cpp:
        (WebCore::Style::ElementRuleCollector::collectMatchingAuthorRules):
        (WebCore::Style::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
        (WebCore::Style::ElementRuleCollector::matchUserRules):
        * style/ElementRuleCollector.h:
        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):
        * style/RuleSet.h:
        (WebCore::Style::RuleSet::create):
        (WebCore::Style::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair): Deleted.
        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::Invalidator):
        (WebCore::Style::Invalidator::collectRuleInformation):
        (WebCore::Style::Invalidator::invalidateIfNeeded):
        (WebCore::Style::Invalidator::addToMatchElementRuleSets):
        * style/StyleInvalidator.h:
        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::ScopeRuleSets):
        (WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
        (WebCore::Style::ScopeRuleSets::initializeUserStyle):
        (WebCore::Style::makeRuleSet):
        (WebCore::Style::ScopeRuleSets::resetAuthorStyle):
        (WebCore::Style::ensureInvalidationRuleSets):
        * style/StyleScopeRuleSets.h:
        (WebCore::Style::ScopeRuleSets::authorStyle const):
        * style/UserAgentStyle.cpp:
        (WebCore::Style::UserAgentStyle::loadFullDefaultStyle):
        (WebCore::Style::UserAgentStyle::loadSimpleDefaultStyle):

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

        [LFC][IFC] Move soft wrap opportunity code out of LineBreaker
        https://bugs.webkit.org/show_bug.cgi?id=205621
        <rdar://problem/58227670>

        Reviewed by Antti Koivisto.

        Let's not mix soft and line wrap opportunity logic.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::ContinousContent::runs const):
        (WebCore::Layout::ContinousContent::isEmpty const):
        (WebCore::Layout::ContinousContent::size const):
        (WebCore::Layout::ContinousContent::width const):
        (WebCore::Layout::ContinousContent::nonCollapsibleWidth const):
        (WebCore::Layout::ContinousContent::hasTrailingCollapsibleContent const):
        (WebCore::Layout::ContinousContent::isTrailingContentFullyCollapsible const):
        (WebCore::Layout::LineBreaker::wrapTextContent const):
        (WebCore::Layout::ContinousContent::ContinousContent):
        (WebCore::Layout::ContinousContent::hasTextContentOnly const):
        (WebCore::Layout::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const):
        (WebCore::Layout::ContinousContent::firstTextRunIndex const):
        (WebCore::Layout::ContinousContent::lastContentRunIndex const):
        (WebCore::Layout::ContinousContent::hasNonContentRunsOnly const):
        (WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const):
        (WebCore::Layout::ContinousContent::TrailingCollapsibleContent::reset):
        (WebCore::Layout::endsWithSoftWrapOpportunity): Deleted.
        (WebCore::Layout::isAtSoftWrapOpportunity): Deleted.
        (WebCore::Layout::LineBreaker::nextWrapOpportunity): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::ContinousContent): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::hasTextContentOnly const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::firstTextRunIndex const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::lastContentRunIndex const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::hasNonContentRunsOnly const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::lastWrapOpportunityIndex const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::TrailingCollapsibleContent::reset): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::ContinousContent::runs const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::isEmpty const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::size const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::width const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::nonCollapsibleWidth const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::hasTrailingCollapsibleContent const): Deleted.
        (WebCore::Layout::LineBreaker::ContinousContent::isTrailingContentFullyCollapsible const): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::nextWrapOpportunity):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):

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

        [LFC][IFC] Keep track of last line wrap opportunity
        https://bugs.webkit.org/show_bug.cgi?id=205619
        <rdar://problem/58227112>

        Reviewed by Antti Koivisto.

        This is in preparation for being able to revert back to an earlier position
        of the current line as the line wrapping opportunity.
        (actually the m_lastWrapOpportunity is already taken into use at LineBreaker::wordBreakBehavior)

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::shouldKeepBeginningOfLineWhitespace):
        (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
        (WebCore::Layout::LineBreaker::shouldWrapFloatBox):
        (WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
        (WebCore::Layout::LineBreaker::wrapTextContent const):
        (WebCore::Layout::LineBreaker::wordBreakBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::LineBreaker::ContinousContent::lastWrapOpportunityIndex const):
        * layout/inlineformatting/InlineLineBreaker.h:

2019-12-25  Dean Jackson  <dino@apple.com>

        [WebGL] Enable ANGLE by default for Cocoa platforms (except simulator)
        https://bugs.webkit.org/show_bug.cgi?id=205483
        rdar://56925821

        Reviewed by Simon Fraser.

        Log an error rather than asserting.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getBufferSubData):

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

        [LFC][IFC] Keep the LineBreaker object around until after the line is closed.
        https://bugs.webkit.org/show_bug.cgi?id=205613
        <rdar://problem/58222870>

        Reviewed by Antti Koivisto.

        In order to be able to point back to an earlier line wrap opportunity on the line e.g.
        <div style="white-space: pre"><span style="white-space: normal">earlier_wrap opportunities</span> <span>can't_wrap_this content</span></div>
        the LineBreaker class needs more context.
        Currently (taking the example above), if the available space runs out somewhere around the second <span> we would just simply
        overflow the line since the overflowing content has a style saying "do not wrap".
        However the line has multiple earlier wrap opportunities inside the first <span>.
        Since we construct a LineBreaker object for each continuous run 

        1. [container start][earlier_wrap]
        2. [ ]
        3. [opportunities][container end]
        4. [ ]
        5. [container start][can't_wrap_this]
        6. [ ]
        7. [content][container end]

        the LineBreaker does not have enough context to point back to the last line wrap opportunity (after run #3).

        This patch is in preparation for supporting such content. 
        1. Rename couple of functions and structs
        2. Move the LineBreaker construction to LineLayoutContext::layoutLine so that we can keep it around for multiple set of runs.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isContentWrappingAllowed):
        (WebCore::Layout::isContentSplitAllowed):
        (WebCore::Layout::LineBreaker::isTextContentWrappingAllowed const):
        (WebCore::Layout::LineBreaker::shouldKeepEndOfLineWhitespace const):
        (WebCore::Layout::LineBreaker::shouldWrapInlineContent):
        (WebCore::Layout::isTextContentWrappingAllowed): Deleted.
        (WebCore::Layout::shouldKeepEndOfLineWhitespace): Deleted.
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::setHyphenationDisabled):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::isLineConsideredEmpty):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit):
        (WebCore::Layout::LineLayoutContext::commitContent):
        (WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

2019-12-23  Darin Adler  <darin@apple.com>

        Refactor to simplify broadcasting to all media elements
        https://bugs.webkit.org/show_bug.cgi?id=205567

        Reviewed by Eric Carlson.

        Over time, we have accumulated many different sets of all the media elements.
        With the goal of being a bit abstract and not building too much behavior into
        the Document object, we ended up with unnecessary complexity, and many sets
        of all the HTMLMediaElement objects. This is a first cut at reducing that complexity.
        At the same time, the refactoring makes all the iteration use a safe algorithm that
        builds a vector of Ref<HTMLMediaElement>, safe even if the work done for each
        media element calls out to arbitrary DOM operations.

        Separately, this patch also includes some name changes that still say "atomic"
        instead of "atom" left over from our renaming of AtomicString to AtomString.

        * Headers.cmake: Removed ApplicationStateChangeListener.h.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * css/StyleSheetContents.cpp:
        (WebCore::StyleSheetContents::estimatedSizeInBytes const): Reworded comment to
        say "atom".

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::getElementsByName): Updated for "atomic" -> "atom".
        (WebCore::ContainerNode::radioNodeList): Ditto.

        * dom/Document.cpp:
        (WebCore::Document::visibilityStateChanged): Moved the code from
        the notifyMediaCaptureOfVisibilityChanged in here. No need for a separate
        function for the two lines of code.
        (WebCore::Document::registerMediaElement): Added. Replaces the multiple registrations
        that each media element would do.
        (WebCore::Document::unregisterMediaElement): Ditto.
        (WebCore::Document::forEachMediaElement): Added. Safely iterates the media elements
        and calls a function on each of them.
        (WebCore::Document::registerForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Deleted.
        (WebCore::Document::unregisterForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Deleted.
        (WebCore::Document::allowsMediaDocumentInlinePlaybackChanged): Deleted.
        (WebCore::Document::mediaVolumeDidChange): Deleted.
        (WebCore::Document::registerForMediaVolumeCallbacks): Deleted.
        (WebCore::Document::unregisterForMediaVolumeCallbacks): Deleted.
        (WebCore::Document::privateBrowsingStateDidChange): Use forEachMediaElement to call
        privateBrowsingStateDidChange on each media element rather than keeping a separate registry.
        (WebCore::Document::registerForPrivateBrowsingStateChangedCallbacks): Deleted.
        (WebCore::Document::unregisterForPrivateBrowsingStateChangedCallbacks): Deleted.
        (WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Updated the type
        to be HTMLMediaElement rather than just Element.
        (WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
        (WebCore::Document::registerForPageScaleFactorChangedCallbacks): Deleted.
        (WebCore::Document::unregisterForPageScaleFactorChangedCallbacks): Deleted.
        (WebCore::Document::pageScaleFactorChangedAndStable): Deleted.
        (WebCore::Document::registerForUserInterfaceLayoutDirectionChangedCallbacks): Deleted.
        (WebCore::Document::unregisterForUserInterfaceLayoutDirectionChangedCallbacks): Deleted.
        (WebCore::Document::userInterfaceLayoutDirectionChanged): Deleted.
        (WebCore::Document::notifyMediaCaptureOfVisibilityChanged): Deleted.
        (WebCore::Document::registerForMediaStreamStateChangeCallbacks): Deleted.
        (WebCore::Document::unregisterForMediaStreamStateChangeCallbacks): Deleted.
        (WebCore::Document::mediaStreamCaptureStateChanged): Use forEachMediaElement to call
        mediaStreamCaptureStarted on each media element rather than keeping a separate registry.
        (WebCore::Document::addApplicationStateChangeListener): Deleted.
        (WebCore::Document::removeApplicationStateChangeListener): Deleted.
        (WebCore::Document::forEachApplicationStateChangeListener): Deleted.

        * dom/Document.h: Clean up forward declarations a bit. Updated for above changes,
        removing many function and data members.

        * dom/Element.cpp:
        (WebCore::Element::spellcheckAttributeState const): Deleted.
        (WebCore::Element::isSpellCheckingEnabled const): Refactored to merge in the logic
        from the spellcheckAttributeState function. The combined function is both a bit easier
        to understand and smaller than the two functions were.

        * dom/Element.h: Removed some unneeded includes. Removed SpellcheckAttributeState.
        Made fastAttributeLookupAllowed private. Removed mediaVolumeDidChange,
        privateBrowsingStateDidChange, captionPreferencesChanged, and spellcheckAttributeState.

        * dom/FullscreenManager.cpp: Removed unneeded includes.
        (WebCore::FullscreenManager::willEnterFullscreen): Use is<HTMLMediaElement> instead of
        calling isMediaElement directly.

        * dom/NameNodeList.cpp:
        (WebCore::NameNodeList::~NameNodeList): Updated for "atomic" -> "atom".
        * dom/Node.cpp:
        (WebCore::NodeListsNodeData::invalidateCaches): Ditto.
        (WebCore::NodeListsNodeData::invalidateCachesForAttribute): Ditto.

        * dom/NodeRareData.h: Removed unneeded includes. Updated for "atomic" -> "atom".
        Made a few coding style tweaks.

        * dom/TreeScope.cpp:
        (WebCore::TreeScope::getElementById const): Updated for "atomic" -> "atom".

        * html/HTMLMediaElement.cpp:
        (WebCore::documentToElementSetMap): Deleted.
        (WebCore::addElementToDocumentMap): Deleted.
        (WebCore::removeElementFromDocumentMap): Deleted.
        (WebCore::HTMLMediaElement::registerWithDocument): Added call to registerMediaElement,
        removed eight now-obsolete registrations.
        (WebCore::HTMLMediaElement::unregisterWithDocument): Ditto.
        (WebCore::HTMLMediaElement::mediaVolumeDidChange): Added an #if !PLATFORM(IOS_FAMILY)
        to preserve the current behavior, since this was not registered for PLATFORM(IOS_FAMILY)
        before. This should be revisited because it's not clear this platform difference is needed.
        (WebCore::HTMLMediaElement::privateBrowsingStateDidChange): Ditto.
        (WebCore::HTMLMediaElement::setMediaGroup): Change to use Document::forEachMediaElement
        so we don't need to keep our own global set of media elements for each document. Required
        a little bit of code structure change. Added a FIXME because the decision about which
        media element is selected depends on hash table order as it always has; seems inappropriate.
        (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Removed the code
        to register/unregister.
        (WebCore::HTMLMediaElement::pageScaleFactorChanged): Only do the work if it's needed;
        this replicates the old behavior which was accomplished by registering/unregistering.

        * html/HTMLMediaElement.h: Removed the overrides for various virtual member functions.
        Instead these are now public functions. Also removed ApplicationStateChangeListener.

        * html/LabelableElement.cpp:
        (WebCore::LabelableElement::labels): Updated for "atomic" -> "atom".
        * html/LabelsNodeList.cpp:
        (WebCore::LabelsNodeList::~LabelsNodeList): Ditto.
        * html/RadioNodeList.cpp:
        (WebCore::RadioNodeList::~RadioNodeList): Ditto.
        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Ditto.
        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::parseHeader): Ditto.

        * page/ApplicationStateChangeListener.h: Removed.

        * page/Page.cpp:
        (WebCore::Page::renderTreeSize const): Use forEachDocument.
        (WebCore::Page::setNeedsRecalcStyleInAllFrames): Ditto.
        (WebCore::Page::unmarkAllTextMatches): Ditto.
        (WebCore::Page::editableElementsInRect const): Ditto.
        (WebCore::Page::setMediaVolume): Tweaked range check so it will reject
        NaN values. Use forEachMediaElement to call mediaVolumeDidChange,
        eliminating the need for Document::mediaVolumeDidChange.
        (WebCore::Page::setPageScaleFactor): Refactored to eliminate large blocks
        of repeated code. Use forEachMediaElement to call pageScaleFactorChanged,
        eliminating the need for Document::pageScaleFactorChangedAndStable.
        (WebCore::Page::setUserInterfaceLayoutDirection): Use forEachMediaElement
        to call userInterfaceLayoutDirectionChanged, eliminating the need for
        Document::userInterfaceLayoutDirectionChanged.
        (WebCore::Page::updateMediaElementRateChangeRestrictions): Use
        forEachMediaElement to call updateRateChangeRestrictionas. The old code
        would call this on all media elements in the current web process, which
        means the functions would be called many times for the same media element.
        (WebCore::Page::updateRendering): Use forEachDocument consistently for
        all the document iteration. Before it was used for half the function and not
        used for the other half; no obvious reason for the differece.
        (WebCore::Page::suspendScriptedAnimations): Use forEachDocument.
        (WebCore::Page::resumeScriptedAnimations): Ditto.
        (WebCore::updateScriptedAnimationsThrottlingReason): Ditto.
        (WebCore::Page::userStyleSheetLocationChanged): Ditto.
        (WebCore::Page::invalidateStylesForAllLinks): Ditto.
        (WebCore::Page::invalidateStylesForLink): Ditto.
        (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames): Ditto.
        (WebCore::Page::setTimerThrottlingState): Ditto.
        (WebCore::Page::dnsPrefetchingStateChanged): Ditto.
        (WebCore::Page::storageBlockingStateChanged): Ditto.
        (WebCore::Page::updateIsPlayingMedia): Ditto.
        (WebCore::Page::setMuted): Ditto.
        (WebCore::Page::stopMediaCapture): Ditto.
        (WebCore::Page::stopAllMediaPlayback): Ditto.
        (WebCore::Page::suspendAllMediaPlayback): Ditto.
        (WebCore::Page::resumeAllMediaPlayback): Ditto.
        (WebCore::Page::suspendAllMediaBuffering): Ditto.
        (WebCore::Page::resumeAllMediaBuffering): Ditto.
        (WebCore::setSVGAnimationsState): Deleted.
        (WebCore::Page::setIsVisibleInternal): Use forEachDocument to call
        suspend/resumeDeviceMotionAndOrientationUpdates, obviating the need for
        Page::suspend/resumeDeviceMotionAndOrientationUpdates. Use
        forEachDocument to call pause/unpauseAnimations, obviating the need for
        WebCore::setSVGAnimationsState. Use forEachDocument to call
        visibilityStateChanged, removing the need to write out a loop that
        gathers the documents into a vector.
        (WebCore::Page::suspendDeviceMotionAndOrientationUpdates): Deleted.
        (WebCore::Page::resumeDeviceMotionAndOrientationUpdates): Deleted.
        (WebCore::Page::captionPreferencesChanged): Use forEachDocument.
        (WebCore::Page::setSessionID): Ditto.
        (WebCore::Page::setPlaybackTarget): Ditto.
        (WebCore::Page::playbackTargetAvailabilityDidChange): Ditto.
        (WebCore::Page::setShouldPlayToPlaybackTarget): Ditto.
        (WebCore::Page::playbackTargetPickerWasDismissed): Ditto.
        (WebCore::Page::setAllowsMediaDocumentInlinePlayback): Use
        forEachMediaElement to call allowsMediaDocumentInlinePlaybackChanged,
        obviating the need for Document::allowsMediaDocumentInlinePlaybackChanged.
        (WebCore::Page::setUnobscuredSafeAreaInsets): Use forEachDocument.
        (WebCore::Page::setUseSystemAppearance): Ditto.
        (WebCore::Page::setFullscreenInsets): Ditto.
        (WebCore::Page::setFullscreenAutoHideDuration): Ditto.
        (WebCore::Page::setFullscreenControlsHidden): Ditto.
        (WebCore::Page::forEachDocument): Merged the collectDocuments function
        in since it's only used here.
        (WebCore::Page::collectDocuments): Deleted.
        (WebCore::Page::forEachMediaElement): Added.
        (WebCore::Page::applicationWillResignActive): Use forEachMediaElement,
        eliminating the need for forEachApplicationStateChangeListener.
        (WebCore::Page::applicationDidBecomeActive): Ditto.
        (WebCore::Page::recomputeTextAutoSizingInAllFrames): Use forEachDocument.

        * page/Page.h: Removed unneeded forward declarations. Removed unused
        FindDirection enum. Tweaked formatting. Use bool instead of uint8_t as
        underlying type for enum class with only two values. Updated for changes above.

        * platform/text/TextEncoding.cpp:
        (WebCore::TextEncoding::TextEncoding): Updated for "atomic" -> "atom".
        (WebCore::TextEncoding::domName const): Ditto.
        (WebCore::TextEncoding::usesVisualOrdering const): Ditto.
        * platform/text/TextEncodingRegistry.cpp:
        (WebCore::addToTextEncodingNameMap): Ditto.
        (WebCore::addToTextCodecMap): Ditto.
        (WebCore::pruneBlacklistedCodecs): Ditto.
        (WebCore::addEncodingName): Ditto.
        (WebCore::atomCanonicalTextEncodingName): Ditto.
        * platform/text/TextEncodingRegistry.h: Ditto.

        * xml/XPathFunctions.cpp:
        (WebCore::XPath::atomicSubstring): Deleted.
        (WebCore::XPath::toStringView): Added. Later could make a StringBuilder member
        function instead.
        (WebCore::XPath::FunId::evaluate const): Use toStringView and StringView::substring
        instead of "atomicSubstring", since getElementById can be called on a StringView
        and there's no need to allocate/deallocate an AtomString just to check if it exists.

2019-12-27  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Ensure layout boxes have expected display types
        https://bugs.webkit.org/show_bug.cgi?id=205606

        Reviewed by Zalan Bujtas.

        In some cases render tree may have display property values that don't match the renderer type. This is fine since the behavior is driven by the renderer.

        LFC layout is driven by display property so the effective value needs to make sense. This patch fixes assertions seen in

        fast/css/fieldset-display-row.html
        fast/css-grid-layout/grid-strict-ordering-crash-2.html
        imported/w3c/web-platform-tests/css/css-display/display-flow-root-001.html
        imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html
        tables/mozilla/bugs/bug275625.html

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::LineLayout):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildLayoutTreeForIntegration):

        Always set display to 'block' for the root RenderBlockFlow.
        Renamed for clarity.

        (WebCore::Layout::TreeBuilder::createLayoutBox):

        Always set <br> display to inline.

        (WebCore::Layout::TreeBuilder::buildTableStructure):
        (WebCore::Layout::TreeBuilder::buildSubTree):

        Pass the parent container instead of parent renderer so we can read effective style.

        * layout/layouttree/LayoutTreeBuilder.h:

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

        [LFC][IFC] Fix LayoutTests/fast/backgrounds/size/backgroundSize15.html
        https://bugs.webkit.org/show_bug.cgi?id=205602
        <rdar://problem/58212499>

        Reviewed by Antti Koivisto.

        softWrapOpportunityIndex could point after the last inline item in the list (when there's no more wrap opportunity)
        e.g text<br> : the softWrapOpportunityIndex is 2.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::nextContentForLine):

2019-12-27  James Darpinian  <jdarpinian@chromium.org>

        ANGLE: Fix WebGL conformance tests for EXT_texture_filter_anisotropic
        https://bugs.webkit.org/show_bug.cgi?id=205520

        Fixes get-extension.html and ext-texture-filter-anisotropic.html.

        Reviewed by Dean Jackson.

        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getExtension):
        (WebCore::WebGL2RenderingContext::getSupportedExtensions):
        (WebCore::WebGL2RenderingContext::getParameter):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getExtension):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::getTexParameter):

2019-12-27  James Darpinian  <jdarpinian@chromium.org>

        ANGLE: Fix WebGL conformance test framebuffer-object-attachment.html
        https://bugs.webkit.org/show_bug.cgi?id=205514

        Rely on ANGLE to implement DEPTH_STENCIL_ATTACHMENT instead of emulating it.

        Reviewed by Dean Jackson.

        * html/canvas/WebGLFramebuffer.cpp:
        (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::setupFlags):
        (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
        (WebCore::WebGLRenderingContextBase::readPixels):

2019-12-26  Antti Koivisto  <antti@apple.com>

        Remove display:compact
        https://bugs.webkit.org/show_bug.cgi?id=205597

        Reviewed by Anders Carlsson.

        It is rendered as 'block' but the value is still parsed. Remove it completely, matching other engines.

        Test: fast/css/display-compact-ignored.html

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSValueKeywords.in:
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::createFor):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):
        * rendering/style/RenderStyleConstants.cpp:
        (WebCore::operator<<):
        * rendering/style/RenderStyleConstants.h:
        * style/StyleAdjuster.cpp:
        (WebCore::Style::equivalentBlockDisplay):

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

        Minor code cleanup around WebCore::Path
        https://bugs.webkit.org/show_bug.cgi?id=205574

        Reviewed by Anders Carlsson.

        Carry out some minor refactoring in WebCore::Path:
        - Change PathElementType into an 8-bit-wide enum class, and move it under PathElement's namespace as simply Type.
        - Change PathElement's `FloatPoint*` that points to an array of 3 FloatPoints into a `FloatPoint[3]`.
        - Change Path::strokeContains() to take a `StrokeStyleApplier&` instead of a `StrokeStyleApplier*`, since it
          assumes that the given `StrokeStyleApplier` is nonnull anyways.
        - Change Path::RoundedRectStrategy into an 8-bit enum class.
        - Other miscellaneous style fixes.

        No change in behavior.

        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (convertPathToScreenSpaceFunction):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
        * inspector/InspectorOverlay.cpp:
        (WebCore::drawShapeHighlight):
        * platform/graphics/FontCascade.cpp:
        (WebCore::findPathIntersections):
        * platform/graphics/Path.cpp:
        (WebCore::Path::addRoundedRect):
        (WebCore::operator<<):
        * platform/graphics/Path.h:
        (WebCore::Path::encode const):
        (WebCore::Path::decode):
        * platform/graphics/PathTraversalState.cpp:
        (WebCore::PathTraversalState::appendPathElement):
        (WebCore::PathTraversalState::processPathElement):
        * platform/graphics/PathTraversalState.h:
        * platform/graphics/cairo/PathCairo.cpp:
        (WebCore::Path::strokeContains const):
        (WebCore::Path::apply const):
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::strokeContains const):
        (WebCore::CGPathApplierToPathApplier):
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::strokeContains const):
        * rendering/shapes/BoxShape.cpp:
        (WebCore::BoxShape::buildDisplayPaths const):
        * rendering/shapes/RectangleShape.cpp:
        (WebCore::RectangleShape::buildDisplayPaths const):
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::shapeDependentStrokeContains):
        * rendering/svg/SVGMarkerData.h:
        (WebCore::SVGMarkerData::updateMarkerDataForPathElement):
        * rendering/svg/SVGPathData.cpp:
        (WebCore::pathFromRectElement):
        * rendering/svg/SVGSubpathData.h:
        (WebCore::SVGSubpathData::updateFromPathElement):
        * svg/SVGPathTraversalStateBuilder.cpp:
        (WebCore::SVGPathTraversalStateBuilder::moveTo):
        (WebCore::SVGPathTraversalStateBuilder::lineTo):
        (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
        (WebCore::SVGPathTraversalStateBuilder::closePath):
        * svg/SVGPathUtilities.cpp:
        (WebCore::buildStringFromPath):
        * testing/Internals.cpp:
        (WebCore::Internals::pathStringWithShrinkWrappedRects):

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

        [LFC][IFC] When align the inline content we need to align the line as well
        https://bugs.webkit.org/show_bug.cgi?id=205596
        <rdar://problem/58197300>

        Reviewed by Antti Koivisto.

        Horizontal alignment means that we not only adjust the runs but also make sure the line box is aligned as well.

        <div style="text-align: center; width: 100px;">centered text</div>
        The line box will also be centered as opposed to start at 0px all the way to [centered text] run's right edge.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignHorizontally):
        (WebCore::Layout::LineBuilder::alignContentHorizontally const): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:

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

        Run with offset from the content box's logical left paint its tab stop at wrong position.
        https://bugs.webkit.org/show_bug.cgi?id=205595
        <rdar://problem/58194698>

        Reviewed by Antti Koivisto.

        Test: fast/text/tab-stops-with-offset-from-parent.html

        Use the run's left offset from the line as the xPos for the TextRun. Most cases the line has only one run
        with 0 offset. This patch fixes the case when the additional runs (with offset != 0) paint their tab positions at the wrong place.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::paintFlow):

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

        [LFC][Painting] Fix LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-001.html
        https://bugs.webkit.org/show_bug.cgi?id=205594
        <rdar://problem/58194138>

        Reviewed by Antti Koivisto.

        Construct the TextRun with relative coordinates to get tab stops right.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):

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

        [LFC][IFC] Forward scan for soft wrap opportunities
        https://bugs.webkit.org/show_bug.cgi?id=205584
        <rdar://problem/58188386>

        Reviewed by Antti Koivisto.

        This patch implements forward scanning to find wrap opportunities in inline content.
        e.g <span></span>example<span><span></span> content</span>
        When we reach "ex-" content, in order to figure out if it is at a wrap opportunity, we scan the content
        forward until after we reach another inline content, in this case " " right before the "content" and
        check if we can break the content between these 2 inline items.

        isAtSoftWrapOpportunity: takes 2 (adjacent by skipping non-content inline items) and return true if there's
        a soft wrap opportunity in between them.
        LineBreaker::nextWrapOpportunity: returns the next wrap opportunity (either a soft wrap opportunity or a line break or the end of the content)

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::isAtSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::nextWrapOpportunity):
        (WebCore::Layout::LineBreaker::ContinousContent::ContinousContent):
        (WebCore::Layout::LineBreaker::lastSoftWrapOpportunity): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineCandidateContent::isLineBreak const):
        (WebCore::Layout::LineCandidateContent::append):
        (WebCore::Layout::LineCandidateContent::setIsLineBreak):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::nextContentForLine):
        (WebCore::Layout::ContinousContent::hasIntrusiveFloats const): Deleted.
        (WebCore::Layout::ContinousContent::runs const): Deleted.
        (WebCore::Layout::ContinousContent::floats const): Deleted.
        (WebCore::Layout::ContinousContent::endsWithLineBreak const): Deleted.
        (WebCore::Layout::ContinousContent::setEndsWithLineBreak): Deleted.
        (WebCore::Layout::ContinousContent::append): Deleted.
        (WebCore::Layout::LineLayoutContext::nextContinousContentForLine): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:

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

        [LFC][IFC] LineBreaker should tell whether the line should receive no more content
        https://bugs.webkit.org/show_bug.cgi?id=205587
        <rdar://problem/58188635>

        Reviewed by Antti Koivisto.

        LineBreaker returns IsEndOfLine::No when the current line should still be able to receive additional content.
        This way we can start closing the line sooner (as opposed to start probing the subsequent content).
        (Note that just because the current content overflows the line, it does not necessarily mean that the subsequent content
        wraps to the next line.)   

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::ContinousContent::lastContentRunIndex const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::addFloatItems):
        (WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine):
        * layout/inlineformatting/LineLayoutContext.h:

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

        [LFC][IFC] Add support for zero-width-space character (U+200B)
        https://bugs.webkit.org/show_bug.cgi?id=205586
        <rdar://problem/58188505>

        Reviewed by Antti Koivisto.

        If a line has only U+200B characters, it is still considered empty from line breaking point of view. 
        (Note that U+200B is not considered a whitespace character so a run with U+200B does not collapse.)

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::appendTextContent): empty runs don't collapse.
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        (WebCore::Layout::LineBuilder::InlineItemRun::hasEmptyTextContent const):
        * layout/inlineformatting/InlineLineBuilder.h:
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::isEmptyContent const):
        * layout/inlineformatting/InlineTextItem.h:

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

        [LFC][IFC] Fix LayoutTests/imported/w3c/web-platform-tests/css/css-text/letter-spacing/letter-spacing-control-chars-001.html
        https://bugs.webkit.org/show_bug.cgi?id=205585
        <rdar://problem/58188420>

        Reviewed by Antti Koivisto.

        TextUtil::fixedPitchWidth works on simple content only (letter-spacing forces slow font measuring path).

        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):

2019-12-24  Antoine Quint  <graouts@apple.com>

        [Web Animations] REGRESSION: Changing the animation-duration of a CSS Animation may not resume it
        https://bugs.webkit.org/show_bug.cgi?id=205580
        <rdar://problem/58127956>

        Reviewed by Dean Jackson.

        Test: webanimations/css-animation-dynamic-duration-change.html

        Setting the animation-duration of an animation will transition the animation back into its idle state
        and the "update animations and send events" procedure would remove that animation from the timeline.
        It would also remove it from the map that would associate an animation with a given CSS Animation name
        so that we would know whether an animation exists for a given animation name when one of the animation's
        properties changed. Since that animation was (mistakenly) removed, we would fail to update its timing
        and it would never be resumed. We now only update the CSS Animation name to animation map when styles
        change.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationWasRemovedFromElement):

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

        Deny Notification API access for non secure contexts
        https://bugs.webkit.org/show_bug.cgi?id=205496
        <rdar://problem/58074660>

        Reviewed by Chris Dumez.

        If document is not SecureContext, deny permission automatically.
        This behavior is matching a planned update to the spec, as discussed in
        https://github.com/whatwg/notifications/issues/93.
        Chrome landed this restriction in M62. Mozilla is also on board with this restriction.

        Test: http/tests/notifications/notification-in-non-secure-context.html

        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::requestPermission):

2019-12-24  youenn fablet  <youenn@apple.com>

        Service Worker doesn't terminate after a period of time when thread blocking
        https://bugs.webkit.org/show_bug.cgi?id=202992
        <rdar://problem/56298596>

        Reviewed by Chris Dumez.

        Whenever running a service worker task, running script or posting events (install, activate, message and fetch),
        start a timer to check that the service worker is not spinning.
        This is done by posting a task to service worker thread and hopping back to the main thread.
        If this post/hop is done before the heartbeat timer is fired, the service worker is considered live.
        Otherwise, the check is failed and the task is considered as failing.
        The service worker will be terminated.
        Timeout is 60 seconds by default and 1 second for test purposes.

        Add settings to have short heartbeat timeout for testing purposes.
        Add internals API to check whether a service worker is running.

        Tests: http/wpt/service-workers/service-worker-spinning-activate.https.html
               http/wpt/service-workers/service-worker-spinning-fetch.https.html
               http/wpt/service-workers/service-worker-spinning-install.https.html
               http/wpt/service-workers/service-worker-spinning-message.https.html

        * page/Settings.yaml:
        * testing/Internals.cpp:
        (WebCore::Internals::isServiceWorkerRunning):
        * testing/Internals.h:
        * testing/Internals.idl:
        * workers/service/SWClientConnection.h:
        (WebCore::SWClientConnection::isServiceWorkerRunning):
        * workers/service/context/SWContextManager.h:
        (WebCore::SWContextManager::Connection::isTestMode const):
        (WebCore::SWContextManager::Connection::setIsTestMode):
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::ServiceWorkerThread):
        (WebCore::ServiceWorkerThread::postFetchTask):
        (WebCore::ServiceWorkerThread::postMessageToServiceWorker):
        (WebCore::ServiceWorkerThread::fireInstallEvent):
        (WebCore::ServiceWorkerThread::finishedFiringInstallEvent):
        (WebCore::ServiceWorkerThread::fireActivateEvent):
        (WebCore::ServiceWorkerThread::finishedFiringActivateEvent):
        (WebCore::ServiceWorkerThread::finishedEvaluatingScript):
        (WebCore::ServiceWorkerThread::start):
        (WebCore::ServiceWorkerThread::finishedStarting):
        (WebCore::ServiceWorkerThread::startFetchEventMonitoring):
        (WebCore::ServiceWorkerThread::startHeartBeatTimer):
        (WebCore::ServiceWorkerThread::heartBeatTimerFired):
        * workers/service/context/ServiceWorkerThread.h:
        (WebCore::ServiceWorkerThread::stopFetchEventMonitoring):
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::startFetch):
        (WebCore::ServiceWorkerThreadProxy::cancelFetch):
        (WebCore::ServiceWorkerThreadProxy::removeFetch):
        * workers/service/server/SWServerToContextConnection.cpp:
        (WebCore::SWServerToContextConnection::didFailHeartBeatCheck):
        * workers/service/server/SWServerToContextConnection.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::didFailHeartBeatCheck):
        * workers/service/server/SWServerWorker.h:

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

        REGRESSION (r253634): Reproducible crash going back and forward on goodreads.com in Page::setPageScaleFactor
        https://bugs.webkit.org/show_bug.cgi?id=205569

        Reviewed by Wenson Hsieh.

        When going quickly back and forward, WebPage::didCommitLoad/WebPage::viewportConfigurationChanged/WebPage::scalePage
        can be called for a page in the page cache, so the FrameView can be null.

        Null-check the view here like the surrounding code does.

        * page/Page.cpp:
        (WebCore::Page::setPageScaleFactor):

2019-12-23  Andres Gonzalez  <andresg_22@apple.com>

        IsolatedObject implementation of property setters.
        https://bugs.webkit.org/show_bug.cgi?id=205566

        Reviewed by Chris Fleizach.

        - Implementation of setters that need to be executed in the main
        thread.
        - Sanity check of the associatedAXObject() before calling corresponding
        method on main thread.

        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::performFunctionOnMainThread):
        (WebCore::AXIsolatedObject::setARIAGrabbed):
        (WebCore::AXIsolatedObject::setIsExpanded):
        (WebCore::AXIsolatedObject::setValue):
        (WebCore::AXIsolatedObject::setSelected):
        (WebCore::AXIsolatedObject::setSelectedRows):
        (WebCore::AXIsolatedObject::setFocused):
        (WebCore::AXIsolatedObject::setSelectedText):
        (WebCore::AXIsolatedObject::setSelectedTextRange):
        (WebCore::AXIsolatedObject::setCaretBrowsingEnabled):
        (WebCore::AXIsolatedObject::setPreventKeyboardDOMEventDispatch):
        (WebCore::AXIsolatedObject::findTextRanges const):
        (WebCore::AXIsolatedObject::performTextOperation):
        (WebCore::AXIsolatedObject::widget const):
        (WebCore::AXIsolatedObject::document const):
        (WebCore::AXIsolatedObject::documentFrameView const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:

2019-12-23  Daniel Bates  <dabates@apple.com>

        REGRESSION (r212693): getClientRects(), getBoundingClientRect() for range that spans multi-lines differs depending on whether text is selected
        https://bugs.webkit.org/show_bug.cgi?id=205527
        <rdar://problem/58128278>

        Reviewed by Zalan Bujtas.

        Include empty rect when range start position coincides with the end of a simple line layout run.
        This makes it match the behavior of line box layout, Firefox's behavior, as well as my understanding
        of Extensions to the Range Interface: <https://drafts.csswg.org/cssom-view/#extensions-to-the-range-interface>
        (Editor's Draft, 10 October 2019).

        At the time of writing, there are two code paths for laying out lines: simple line layout and
        line box layout. Simple line layout is not enabled when there is a selection at the time of
        writing. As a result, we use line box layout to answer getClientRects(), getBoundingClientRect()
        queries.

        Test: fast/dom/Range/mac/getClientRects-and-getBoundingClientRect-before-and-after-selection.html

        * rendering/SimpleLineLayoutResolver.cpp:
        (WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets const): Do not skip over a run
        if its end position coincides with the range's start offset. This ensures that we emit an empty rect
        for this part of the box selection, which matches what we do using the analagous line box layout
        code path.

2019-12-23  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Special combination characters doesn't respect the keystroke order when high CPU load
        https://bugs.webkit.org/show_bug.cgi?id=185248

        Reviewed by Žan Doberšek.

        Notify the editor when a key event handled by input method has been dispatched. This way we can handle the
        composition results right after the event is dispatched.

        * editing/Editor.cpp:
        (WebCore::Editor::didDispatchInputMethodKeydown): Notify the client.
        * editing/Editor.h:
        * page/EditorClient.h:
        (WebCore::EditorClient::didDispatchInputMethodKeydown): Added.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::internalKeyEvent): Call Editor::didDispatchInputMethodKeydown() for events handled by
        input method right after the event is dispatched.
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::preeditUnderlines const):
        (WebCore::PlatformKeyboardEvent::preeditSelectionRangeStart const):
        (WebCore::PlatformKeyboardEvent::preeditSelectionRangeLength const):
        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Return early if the event was handled by input
        method and remove the special case for Char events handled by input method because this is never called with
        Char type for events handled by input method.
        * platform/libwpe/PlatformKeyboardEventLibWPE.cpp:
        (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Return early if the event was handled by input
        method.

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

        Very basic <dialog> show/close support
        https://bugs.webkit.org/show_bug.cgi?id=205543

        Reviewed by Antti Koivisto.
        
        Fix HTMLDialogElement.idl for attribute reflection, and showModal() possibly throwing.
        
        Have show/showModal() and close() toggle the "open" attribute. Implement parseAttribute()
        to initialize m_isOpen from the attribute value.
        
        Add dialog.css, which is appended to the UA stylesheets if the feature is enabled. Have
        it set the display value.

        Tested by web-platform-tests.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * css/dialog.css: Added.
        (dialog):
        (dialog[open]):
        * html/HTMLDialogElement.cpp:
        (WebCore::HTMLDialogElement::isOpen const):
        (WebCore::HTMLDialogElement::show):
        (WebCore::HTMLDialogElement::showModal):
        (WebCore::HTMLDialogElement::close):
        (WebCore::HTMLDialogElement::parseAttribute):
        (WebCore::HTMLDialogElement::toggleOpen):
        (WebCore::HTMLDialogElement::open): Deleted.
        (WebCore::HTMLDialogElement::setOpen): Deleted.
        * html/HTMLDialogElement.h:
        * html/HTMLDialogElement.idl:
        * style/InspectorCSSOMWrappers.cpp:
        (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
        * style/UserAgentStyle.cpp:
        (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
        * style/UserAgentStyle.h:

2019-12-22  Wenson Hsieh  <wenson_hsieh@apple.com>

        [macCatalyst] Mouse clicks dispatch duplicate pointerup and pointerdown events
        https://bugs.webkit.org/show_bug.cgi?id=205551
        <rdar://problem/58058268>

        Reviewed by Tim Horton.

        This began occuring after r251320, wherein some mouse event handling codepaths were enabled in macCatalyst.
        For compatibility, gesture recognizers still fire in the macCatalyst platform. This includes the synthetic click
        gesture, which will still synthesize and send mouseup and mousedown events to the page. After the change, this
        results in pointer events being dispatched under the call to `shouldIgnoreMouseEvent()`. However, at the same
        time, touch event handling codepaths have already dispatched "pointerup" and "pointerdown", so we end up with
        redundant events.

        To fix this macCatalyst-specific bug, simply avoid dispatching pointer events in the case where the synthetic
        click type is some kind of tap gesture; in this case, pointer events have already been dispatched, so we don't
        need to dispatch them again via mouse event handling code.

        Test: pointerevents/ios/pointer-events-with-click-handler.html

        * dom/Element.cpp:
        (WebCore::dispatchPointerEventIfNeeded):

        Also rename shouldIgnoreMouseEvent to dispatchPointerEventIfNeeded to better reflect that this function's
        primary purposee is to dispatch pointer events in response to platform mouse events; then, change the return
        value to an explicit enum class indicating whether the mouse event should be subsequently ignored (as a result
        of the page preventing the dispatched pointer event).

        (WebCore::Element::dispatchMouseEvent):
        (WebCore::shouldIgnoreMouseEvent): Deleted.

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

        Invalidate only affected elements after media query evaluation changes
        https://bugs.webkit.org/show_bug.cgi?id=205392

        Reviewed by Zalan Bujtas.

        We currently invalidate style of the whole tree when a media query evaluation changes.
        We can do better by constructing an invalidation RuleSet and invalidating only those
        elements that are potentially affected.

        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::addRule):
        (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):

        Construct and cache an invalidation RuleSet and associate with a set of media query changes.

        (WebCore::Style::RuleSet::MediaQueryCollector::pushAndEvaluate):
        (WebCore::Style::RuleSet::MediaQueryCollector::pop):
        (WebCore::Style::RuleSet::MediaQueryCollector::addRuleIfNeeded):

        Collect RuleFeatures which we later use to build invalidation RuleSet.

        (WebCore::Style::RuleSet::MediaQueryCollector::addRulePositionIfNeeded): Deleted.
        * style/RuleSet.h:
        (WebCore::Style::DynamicMediaQueryEvaluationChanges::append):
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::evaluateDynamicMediaQueries):
        * style/StyleResolver.h:
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::evaluateMediaQueries):

        Use the invalidation RuleSet for accurate style invalidation.

        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::evaluteDynamicMediaQueryRules):

        Collect invalidation RuleSets for author/user/user agent style.

        * style/StyleScopeRuleSets.h:

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

        [LFC][Integration] Do not remove trailing whitespace when it is followed by a line break
        https://bugs.webkit.org/show_bug.cgi?id=205549
        <rdar://problem/58139893>

        Reviewed by Antti Koivisto.

        Complex line layout quirk: keep the trailing whitespace aroun
        when it is followed by a line break, unless the content overflows the line.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent):

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

        [LFC][Integration] Do not collapse trailing letter spacing
        https://bugs.webkit.org/show_bug.cgi?id=205548
        <rdar://problem/58139872>

        Reviewed by Antti Koivisto.

        Turn off trailing letter-spacing trimming for now.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::InlineItemRun::hasTrailingLetterSpacing const):

2019-12-21  Brian Burg  <bburg@apple.com>

        Web Inspector: add InspectedTargetTypes diagnostic event and related hooks
        https://bugs.webkit.org/show_bug.cgi?id=205174
        <rdar://problem/57887953>

        Reviewed by Devin Rousso.

        Expose debuggable information via InspectorFrontendHost.

        * WebCore.xcodeproj/project.pbxproj: Add new files.

        * inspector/InspectorFrontendClient.h: Add new methods.
        * testing/Internals.cpp: Implement new methods.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::debuggableTypeToString):
        (WebCore::InspectorFrontendHost::debuggableInfo const):
        (WebCore::InspectorFrontendHost::debuggableType): Deleted.
        Expose a `DebuggableInfo` dictionary via the .debuggableInfo getter.


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

        Move Vector HashTraits to HashTraits.h to fix GCC build
        https://bugs.webkit.org/show_bug.cgi?id=205540

        Reviewed by Zalan Bujtas.

        * contentextensions/DFAMinimizer.cpp:

        ActionKey HashTrait claims that emptyValueIsZero. Now with Vector HashTrait having emptyValueIsZero too
        HashMap<ActionKey, Vector<>> started taking the optimized path.

        However ActionKey empty value wasn't actually zero because Empty enum value wasn't 0.

2019-12-21  Kate Cheney  <katherine_cheney@apple.com>

        Add timeStamp to ITP database
        https://bugs.webkit.org/show_bug.cgi?id=205121
        <rdar://problem/57633021>

        Reviewed by John Wilander.

        * loader/ResourceLoadStatistics.h:

2019-12-20  Eric Carlson  <eric.carlson@apple.com>

        [Media in GPU process] Get audio playing
        https://bugs.webkit.org/show_bug.cgi?id=205511
        <rdar://problem/58120354>

        Reviewed by Jer Noble.

        Tested manually with a modified sandbox because it isn't possible to load media
        in the GPU process yet.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::bufferedTimeRangesChanged):
        (WebCore::MediaPlayer::seekableTimeRangesChanged):
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/PlatformTimeRanges.cpp:
        (WebCore::PlatformTimeRanges::PlatformTimeRanges):
        (WebCore::PlatformTimeRanges::clear):
        * platform/graphics/PlatformTimeRanges.h:

2019-12-20  Ryosuke Niwa  <rniwa@webkit.org>

        TextManipulationController should respect new token orders
        https://bugs.webkit.org/show_bug.cgi?id=205378

        Reviewed by Wenson Hsieh.

        Updated TextManipulationController::replace to remove all existing content and insert new tokens in the order they appear.

        To do this, we first find the common ancestor of all nodes in the paragraph and then remove all nodes in between.

        Then we'd insert the node identified by the token identifier and all its ancestors at where they appear. In the case
        the same token is used for the second time, we clone its node. For each leaf node, we find the closest ancestor which
        had already been inserted by the previous token, and append the leaf node along with its ancestors to it.

        I'm expecting to make a lot of refinements & followups to this algorithm in the future but this seems to get basics done.

        Tests: TextManipulation.CompleteTextManipulationReplaceSimpleSingleParagraph
               TextManipulation.CompleteTextManipulationDisgardsTokens
               TextManipulation.CompleteTextManipulationReordersContent
               TextManipulation.CompleteTextManipulationCanSplitContent
               TextManipulation.CompleteTextManipulationCanMergeContent
               TextManipulation.CompleteTextManipulationFailWhenContentIsRemoved
               TextManipulation.CompleteTextManipulationFailWhenExcludedContentAppearsMoreThanOnce
               TextManipulation.CompleteTextManipulationPreservesExcludedContent

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::didCreateRendererForElement):
        (WebCore::TextManipulationController::completeManipulation):
        (WebCore::TextManipulationController::replace):

2019-12-20  Sihui Liu  <sihui_liu@apple.com>

        REGRESSION (r253807): crash in storage/indexeddb/modern/opendatabase-request-private.html
        https://bugs.webkit.org/show_bug.cgi?id=205515

        Reviewed by Alex Christensen.

        When m_openRequests of IDBTransaction is empty, we expect all requests associated with the transactions should 
        be completed, but in IDBOpenDBRequest, we removed the request from m_openRequests before 
        m_currentlyCompletingRequest finished. This is because the order of calling ActiveDOMObject::stop() is random.

        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::cancelForStop):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::abortOnServerAndCancelRequests):
        (WebCore::IDBTransaction::connectionClosedFromServer):

2019-12-20  Megan Gardner  <megan_gardner@apple.com>

        Paint highlights specified in CSS Highlight API
        https://bugs.webkit.org/show_bug.cgi?id=205318

        Reviewed by Ryosuke Niwa.

        Render highlights when present, similar to the way we render selection.

        Tests: imported/w3c/web-platform-tests/css/css-highlight-api/highlight-text-across-elements.html
               imported/w3c/web-platform-tests/css/css-highlight-api/highlight-text.html

        * Modules/highlight/HighlightMap.h:
        (WebCore::HighlightMap::map const):

        Add a getter for the internal HashMap.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::selectionState):
        (WebCore::InlineTextBox::verifySelectionState const):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::clampedStartEndForState const):
        (WebCore::InlineTextBox::selectionStartEnd const):
        (WebCore::InlineTextBox::highlightStartEnd const):
        (WebCore::InlineTextBox::resolveStyleForMarkedText):

        Use the highlight name from the HighlightRangeGroup to obtain the style from the renderer.

        (WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

        Render the highlights when painting text. Determine if a highlight is present in the current RenderObject, and
        add additional MarkedText to be rendered when painting

        * rendering/InlineTextBox.h:
        * rendering/MarkedText.cpp:
        (WebCore::subdivide):
        * rendering/MarkedText.h:
        (WebCore::MarkedText::operator== const):

        Expand MarkedText to take a style name.

        * rendering/SelectionRangeData.cpp:
        (WebCore::SelectionRangeData::setContext):
        (WebCore::SelectionRangeData::selectionStateForRenderer):
        (WebCore::SelectionRangeData::set):
        * rendering/SelectionRangeData.h:

        Leverage SelectionRangeData for highlights.

2019-12-20  Chris Dumez  <cdumez@apple.com>

        [iOS Debug] imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https.html is crashing
        https://bugs.webkit.org/show_bug.cgi?id=205506
        <rdar://problem/58118091>

        Reviewed by Darin Adler.

        Drop iOS specific hack in FrameLoader::checkCompleted() that was causing this crash in iOS Debug.
        This hack was added a long time ago to fix back/forward navigation after clicking an intra PDF
        document hyperlink. I have verified on iOS 13 that the behavior is unchanged without this code:
        - Back/forward navigation within a PDF work in UIWebView and do not work in WKWebView

        No new tests, unskipped existing test.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkCompleted):

2019-12-20  Chris Dumez  <cdumez@apple.com>

        [Bindings] Add @@toStringTag to our iterator prototype object
        https://bugs.webkit.org/show_bug.cgi?id=205516

        Reviewed by Darin Adler.

        Add @@ toStringTag to our iterator prototype object, as per:
        - https://heycam.github.io/webidl/#es-iterator-prototype-object

        No new tests, rebaselined existing tests.

        * bindings/js/JSDOMIterator.h:
        (WebCore::IteratorTraits>::finishCreation):

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

        MediaKeySession.load() fails
        https://bugs.webkit.org/show_bug.cgi?id=205467

        Reviewed by Eric Carlson.

        Invert the storageURL condition in load().

        Drive-by fix: ask the group for it's sessionID, not the session, if it exists.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):

2019-12-20  Chris Dumez  <cdumez@apple.com>

        sendBeacon on Safari 13 seeing high failure rates
        https://bugs.webkit.org/show_bug.cgi?id=204665
        <rdar://problem/57522622>

        Reviewed by Darin Adler.

        Revert r245344 to try and reduce our failure rate for Beacon. This is the only change
        to our Beacon implementation that I am aware we made in Safari 13. Using a lower priority
        for Beacon makes it more likely that the Beacon load is still pending when the network
        process exits, which would interrupt the Beacon.

        Since we're trying to convince developers to move away from synchronous XHR and to using
        the Beacon API intead, it is important that our Beacon API be as reliable as possible.

        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::sendBeacon):
        * loader/PingLoader.cpp:
        (WebCore::PingLoader::sendPing):

2019-12-20  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r253820.

        Broke Mac testing

        Reverted changeset:

        "Invalidate only affected elements after media query
        evaluation changes"
        https://bugs.webkit.org/show_bug.cgi?id=205392
        https://trac.webkit.org/changeset/253820

2019-12-20  youenn fablet  <youenn@apple.com>

        SWServer can be created without any path to store registrations in non ephemeral sessions
        https://bugs.webkit.org/show_bug.cgi?id=205500

        Reviewed by Simon Fraser.

        No change of behavior in release.
        Remove debug assert and log the case of a non ephemeral session without a path.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::SWServer):

2019-12-20  Brian Burg  <bburg@apple.com>

        Web Inspector: convert some InspectorFrontendHost methods to getters
        https://bugs.webkit.org/show_bug.cgi?id=205475

        Reviewed by Devin Rousso.

        No reason for these to be method calls, so expose as getters / attributes instead.

        * inspector/InspectorFrontendClient.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::isRemote const):
        (WebCore::debuggableTypeToString):
        (WebCore::InspectorFrontendHost::localizedStringsURL): Deleted.
        (WebCore::InspectorFrontendHost::backendCommandsURL): Deleted.
        (WebCore::InspectorFrontendHost::debuggableType): Deleted.
        (WebCore::InspectorFrontendHost::inspectionLevel): Deleted.
        (WebCore::InspectorFrontendHost::platform): Deleted.
        (WebCore::InspectorFrontendHost::port): Deleted.
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.idl:
        * testing/Internals.cpp:

2019-12-20  Andres Gonzalez  <andresg_22@apple.com>

        IsolatedObject support for multiple parameterized attributes.
        https://bugs.webkit.org/show_bug.cgi?id=205508

        Reviewed by Chris Fleizach.

        - AXObjectCache now keeps the PageIdentifier so that it is possible to
        retrieve it on the secondary thread without querying the Document.
        - isIncrementor is exposed on AXCoreObject for spin button support.
        - Several parameterized attributes implementation related to
        TextMarkers are now dispatch to the main thread.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::AXObjectCache):
        (WebCore::AXObjectCache::setIsolatedTreeFocusedObject):
        (WebCore::AXObjectCache::isolatedTreeRootObject):
        (WebCore::AXObjectCache::remove):
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilitySpinButton.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::AXIsolatedObject):
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::updateBackingStore):
        (WebCore::AXIsolatedObject::findTextRanges const):
        (WebCore::AXIsolatedObject::performTextOperation):
        (WebCore::AXIsolatedObject::axObjectCache const):
        (WebCore::AXIsolatedObject::widget const):
        (WebCore::AXIsolatedObject::document const):
        (WebCore::AXIsolatedObject::documentFrameView const):
        (WebCore::AXIsolatedObject::isLoaded const): Implemented in header.
        (WebCore::AXIsolatedObject::supportsPath const): Implemented in header.
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper subrole]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2019-12-20  Daniel Bates  <dabates@apple.com>

        Share code for computing the absolute positioned line boxes for a range
        https://bugs.webkit.org/show_bug.cgi?id=205510

        Reviewed by Wenson Hsieh.

        Implement RenderTextLineBoxes::absoluteRectsForRange() in terms of absoluteQuadsForRange()
        to remove almost identical code. This makes absoluteRectsForRange() a tiny bit slower. If
        it turns out this slowness isn't so tiny then we should use revert this change and implement
        again using templates to avoid duplication.

        Also moved absoluteQuadsForRange() to be above absoluteRectsForRange() to group these
        related functions closer together.

        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::absoluteQuadsForRange const): No change, though I moved it
        to be above absoluteRectsForRange().
        (WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Implement in terms of absoluteQuadsForRange().
        * rendering/RenderTextLineBoxes.h: Group absolute*ForRange() declarations.

2019-12-20  youenn fablet  <youenn@apple.com>

        Remove the certificate info checks related to getUserMedia
        https://bugs.webkit.org/show_bug.cgi?id=205493

        Reviewed by Eric Carlson.

        Now that navigator.mediaDevices is SecureContext, we do not need to do the same checks in UserMediaController.
        UserMediaController was also checking the certificate info which is not necessary for MediaDevices.
        Covered by manual tests.

        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::isSecure):
        (WebCore::isAllowedByFeaturePolicy): Deleted.
        (WebCore::isAllowedToUse): Deleted.
        (WebCore::UserMediaController::canCallGetUserMedia const): Deleted.
        (WebCore::UserMediaController::logGetUserMediaDenial): Deleted.

2019-12-19  Dean Jackson  <dino@apple.com>

        Build ANGLE as a dynamic library
        https://bugs.webkit.org/show_bug.cgi?id=204708
        rdar://57349384

        Reviewed by Tim Horton.

        Weak link against libANGLE-shared.dylib rather than strong link to libANGLE.a.

        * Configurations/WebCore.xcconfig:
        * Configurations/WebCoreTestSupport.xcconfig:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/ANGLEWebKitBridge.cpp:
        (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
        (WebCore::ANGLEWebKitBridge::compileShaderSource):
        (WebCore::ANGLEWebKitBridge::angleAvailable):
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):

2019-12-20  Antti Koivisto  <antti@apple.com>

        Invalidate only affected elements after media query evaluation changes
        https://bugs.webkit.org/show_bug.cgi?id=205392

        Reviewed by Zalan Bujtas.

        We currently invalidate style of the whole tree when a media query evaluation changes.
        We can do better by constructing an invalidation RuleSet and invalidating only those
        elements that are potentially affected.

        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::addRule):
        (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):

        Construct and cache an invalidation RuleSet and associate with a set of media query changes.

        (WebCore::Style::RuleSet::MediaQueryCollector::pushAndEvaluate):
        (WebCore::Style::RuleSet::MediaQueryCollector::pop):
        (WebCore::Style::RuleSet::MediaQueryCollector::addRuleIfNeeded):

        Collect RuleFeatures which we later use to build invalidation RuleSet.

        (WebCore::Style::RuleSet::MediaQueryCollector::addRulePositionIfNeeded): Deleted.
        * style/RuleSet.h:
        (WebCore::Style::DynamicMediaQueryEvaluationChanges::append):
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::evaluateDynamicMediaQueries):
        * style/StyleResolver.h:
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::evaluateMediaQueries):

        Use the invalidation RuleSet for accurate style invalidation.

        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::evaluteDynamicMediaQueryRules):

        Collect invalidation RuleSets for author/user/user agent style.

        * style/StyleScopeRuleSets.h:

2019-12-20  Diego Pino Garcia  <dpino@igalia.com>

        [GTK][WPE] Wrong visualization of Conic gradients in high resolution displays
        https://bugs.webkit.org/show_bug.cgi?id=205444

        Reviewed by Carlos Alberto Lopez Perez.

        Reduce the size of the separation between sections since a separation of
        1 pixel is too wide in high resolution displays.

        * platform/graphics/cairo/GradientCairo.cpp:
        (WebCore::addConicSector):

2019-12-20  Zalan Bujtas  <zalan@apple.com>

        Unreviewed, address review comment missed in the initial commit.

        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine):
        (WebCore::Layout::LineLayoutContext::commitContent):

2019-12-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Refactor LineLayoutContext class
        https://bugs.webkit.org/show_bug.cgi?id=205494
        <rdar://problem/58109493>

        Reviewed by Antti Koivisto.

        This patch is in preparation for being able to pre-scan the inline content for soft wrap opportunities.

        Currently processing the inline content means pushing the inline items to an uncommitted queue until after
        we find a soft wrap opportunity and then we ask the LineBreaker whether this uncommitted, "continuous content" can be placed
        on the current line.
        while (has unprocessed inline item) {
            get next inline item
            if (inline item is at a soft wrap opportunity)
                sumbit uncommitted queue to line breaking
            else
                add to uncommitted queue
        }
        This patch omits the uncommitted queue by collecting the inline items first. This removes some code complexity and it also
        helps to be able to pre-scan the content for soft wrap opportunities.
        while (has unprocessed inline item) {
            get next continuous content
            submit content to line breaking
        }

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::ContinousContent::ContinousContent):
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::Run::Run):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::ContinousContent::hasIntrusiveFloats const):
        (WebCore::Layout::ContinousContent::runs const):
        (WebCore::Layout::ContinousContent::floats const):
        (WebCore::Layout::ContinousContent::endsWithLineBreak const):
        (WebCore::Layout::ContinousContent::setEndsWithLineBreak):
        (WebCore::Layout::ContinousContent::append):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::nextContinousContentForLine):
        (WebCore::Layout::LineLayoutContext::addFloatItems):
        (WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine):
        (WebCore::Layout::LineLayoutContext::commitContent):
        (WebCore::Layout::LineLayoutContext::commitPendingContent): Deleted.
        (WebCore::Layout::LineLayoutContext::placeInlineItem): Deleted.
        (WebCore::Layout::LineLayoutContext::processUncommittedContent): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::append): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::reset): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::shrink): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:
        (WebCore::Layout::LineLayoutContext::formattingContext const):
        (WebCore::Layout::LineLayoutContext::root const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::width const): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::size): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::isEmpty): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::runs const): Deleted.

2019-12-20  Rob Buis  <rbuis@igalia.com>

        Fetch: handle emtpy Location value
        https://bugs.webkit.org/show_bug.cgi?id=205462

        Reviewed by Youenn Fablet.

        Handle empty Location value on redirect as specified here:
        https://fetch.spec.whatwg.org/#concept-http-redirect-fetch step 3

        Tests: web-platform-tests/fetch/api/redirect/redirect-empty-location.any.html
               web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker.html

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):

2019-12-20  youenn fablet  <youenn@apple.com>

        DOMPromise::whenPromiseIsSettled is asserting in service worker
        https://bugs.webkit.org/show_bug.cgi?id=205440

        Reviewed by Chris Dumez.

        The promise.get(@then) is sometimes throwing an exception probably due to service worker being stopped.
        We need to catch the JS exception and exit early if the getter fails.
        Covered by existing service worker tests in debug mode.

        * bindings/js/JSDOMPromise.cpp:
        (WebCore::DOMPromise::whenPromiseIsSettled):

2019-12-20  youenn fablet  <youenn@apple.com>

        Make ServiceWorker::postMessage use the exec state from the JS binding layer
        https://bugs.webkit.org/show_bug.cgi?id=205395

        Reviewed by Chris Dumez.

        Instead of using ScriptExecutionContext::execState, we can ask the JS binding layer to pass the exec state and use it.
        Since ServiceWorker is an ActiveDOMObject, we use its scriptExecutionContext() to compute the ServiceWorker source identifier.
        We do the same for ServiceWorkerClient which is a context destruction observer and which only lives in Service Worker scope so calling ScriptExecutionContext::execState is suboptimal.

        No change of behavior.

        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::postMessage):
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorker.idl:
        * workers/service/ServiceWorkerClient.cpp:
        (WebCore::ServiceWorkerClient::postMessage):
        * workers/service/ServiceWorkerClient.h:
        * workers/service/ServiceWorkerClient.idl:

2019-12-20  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Implement coders for CTAP ClientPIN requests and responses
        https://bugs.webkit.org/show_bug.cgi?id=205376
        <rdar://problem/58034395>

        Reviewed by Brent Fulgham.

        This patch implements coders for authenticatorClientPIN requests and responses
        following the spec:
        https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#authenticatorClientPIN

        Specifically, it
        i) implements authenticatorClientPIN subCommand: getRetries, getKeyAgreement and getPINToken;
        ii) adds pinAuth/pinProtocol to authenticatorMakeCredential/authenticatorGetAssertion.

        The authenticatorClientPIN subCommands are based on a Chromium patch:
        https://chromium-review.googlesource.com/c/chromium/src/+/1457004 Specifically, it adopts the
        interfaces from that patch, but rewrites the BoringSSL-based crypto features using WebCore's
        WebCrypto implementation. This allows us to focus on high level crypto interfaces, and lets
        WebCrypto handle the underlying crypto library. Also, the original Chromium patch lacks tests.
        We introduce a large set of API tests to confirm proper function.

        This patch also makes the AES CBC, EDCH, and HMAC platform* implementations public, so that
        these implementations can be shared by WebAuthentication and test infrastructure.

        Covered by API tests.

        * Modules/webauthn/WebAuthenticationConstants.h:
        * Modules/webauthn/cbor/CBORReader.cpp:
        (cbor::CBORReader::readCBORMap):
        Let CBORReader recognize negative map keys.
        * Modules/webauthn/fido/DeviceRequestConverter.cpp:
        (fido::encodeMakeCredenitalRequestAsCBOR):
        (fido::encodeGetAssertionRequestAsCBOR):
        * Modules/webauthn/fido/DeviceRequestConverter.h:
        * Modules/webauthn/fido/Pin.cpp: Added.
        (fido::pin::hasAtLeastFourCodepoints):
        (fido::pin::makePinAuth):
        (fido::pin::encodeRawPublicKey):
        (fido::pin::validateAndConvertToUTF8):
        (fido::pin::encodePinCommand):
        (fido::pin::RetriesResponse::parse):
        (fido::pin::KeyAgreementResponse::KeyAgreementResponse):
        (fido::pin::KeyAgreementResponse::parse):
        (fido::pin::KeyAgreementResponse::parseFromCOSE):
        (fido::pin::encodeCOSEPublicKey):
        (fido::pin::TokenResponse::TokenResponse):
        (fido::pin::TokenResponse::parse):
        (fido::pin::TokenResponse::pinAuth const):
        (fido::pin::TokenResponse::token const):
        (fido::pin::encodeAsCBOR):
        (fido::pin::TokenRequest::tryCreate):
        (fido::pin::TokenRequest::TokenRequest):
        (fido::pin::TokenRequest::sharedKey const):
        * Modules/webauthn/fido/Pin.h: Added.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * crypto/CryptoAlgorithm.h:
        * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
        * crypto/algorithms/CryptoAlgorithmECDH.h:
        * crypto/algorithms/CryptoAlgorithmHMAC.h:
        * crypto/keys/CryptoKeyAES.cpp:
        * crypto/keys/CryptoKeyAES.h:
        * crypto/keys/CryptoKeyEC.h:
        * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
        (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
        (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
        * crypto/mac/CryptoKeyRSAMac.cpp:
        (WebCore::CryptoKeyRSA::algorithm const):

2019-12-19  Doug Kelly  <dougk@apple.com>

        Update TrackBase to store m_mediaElement as a WeakPtr
        https://bugs.webkit.org/show_bug.cgi?id=205460

        Reviewed by Eric Carlson.

        Store the HTMLMediaElement in TrackBase and related classes as a WeakPtr to give some proper idea of pointer lifetime, since while the
        HTMLMediaElement is optional, if set, it should be a valid HTMLMediaElement.

        No new tests since no functionality changed.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::videoTracks):
        (WebCore::SourceBuffer::audioTracks):
        (WebCore::SourceBuffer::textTracks):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::textTrackModeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
        (WebCore::HTMLMediaElement::ensureAudioTracks):
        (WebCore::HTMLMediaElement::ensureTextTracks):
        (WebCore::HTMLMediaElement::ensureVideoTracks):
        * html/track/AudioTrack.cpp:
        (WebCore::AudioTrack::willRemove):
        (WebCore::AudioTrack::setMediaElement):
        * html/track/AudioTrack.h:
        * html/track/AudioTrackList.cpp:
        (WebCore::AudioTrackList::AudioTrackList):
        * html/track/AudioTrackList.h:
        * html/track/InbandTextTrack.cpp:
        (WebCore::InbandTextTrack::willRemove):
        (WebCore::InbandTextTrack::setMediaElement):
        * html/track/InbandTextTrack.h:
        * html/track/TextTrackList.cpp:
        (WebCore::TextTrackList::TextTrackList):
        * html/track/TextTrackList.h:
        * html/track/TrackBase.cpp:
        (WebCore::TrackBase::element):
        (WebCore::TrackBase::setMediaElement):
        * html/track/TrackBase.h:
        (WebCore::TrackBase::mediaElement):
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::TrackListBase):
        (WebCore::TrackListBase::element const):
        * html/track/TrackListBase.h:
        (WebCore::TrackListBase::mediaElement const):
        * html/track/VideoTrack.cpp:
        (WebCore::VideoTrack::willRemove):
        (WebCore::VideoTrack::setMediaElement):
        * html/track/VideoTrack.h:
        * html/track/VideoTrackList.cpp:
        (WebCore::VideoTrackList::VideoTrackList):
        * html/track/VideoTrackList.h:

2019-12-19  Doug Kelly  <dougk@apple.com>

        Invalid assert with tracks not associated to media element
        https://bugs.webkit.org/show_bug.cgi?id=205360

        Reviewed by Eric Carlson.

        Remove asserts around TextTrack when not attached to a media element and instead return a zero index.

        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::trackIndex):
        (WebCore::TextTrack::trackIndexRelativeToRenderedTracks):

2019-12-19  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: remove timer for pending operations in IDBTransaction
        https://bugs.webkit.org/show_bug.cgi?id=205312

        Reviewed by Brady Eidson.

        When pendingOperationTimer fired, IDBTransasction would try processing pending operations or commiting 
        automatically.
        pendingOperationTimer was scheduled when some conditions changed and IDBTransaction could start processing 
        pending operations or start commiting, for example, when new pending operations was created.

        For better performance, we may start processing right away after the condition change, without using a Timer.
        This patch gives us about 10% speed up on test: PerformanceTests/IndexedDB/basic/objectstore-cursor.html.

        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::dispatchEvent):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::IDBTransaction):
        (WebCore::IDBTransaction::abortInProgressOperations):
        (WebCore::IDBTransaction::removeRequest):
        (WebCore::IDBTransaction::scheduleOperation):
        (WebCore::IDBTransaction::finishedDispatchEventForRequest):
        (WebCore::IDBTransaction::didStart):
        (WebCore::IDBTransaction::operationCompletedOnClient):
        (WebCore::IDBTransaction::deactivate):
        (WebCore::IDBTransaction::connectionClosedFromServer):
        (WebCore::IDBTransaction::handlePendingOperations):
        (WebCore::IDBTransaction::autoCommit):
        (WebCore::IDBTransaction::trySchedulePendingOperationTimer): Deleted.
        (WebCore::IDBTransaction::pendingOperationTimerFired): Deleted.
        * Modules/indexeddb/IDBTransaction.h:

2019-12-19  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::RenderTreeBuilder::attach
        https://bugs.webkit.org/show_bug.cgi?id=205476

        Reviewed by Ryosuke Niwa.

        Test: fast/ruby/crash-insert-duplicate-rt-element.html

        * rendering/updating/RenderTreeBuilderRuby.cpp:
        (WebCore::RenderTreeBuilder::Ruby::attach):

2019-12-19  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in WebCore::findPlaceForCounter with display: contents parent
        https://bugs.webkit.org/show_bug.cgi?id=205290

        Reviewed by Ryosuke Niwa.

        Test: fast/css/counters/findPlaceForCounter-crash.html

        * rendering/RenderCounter.cpp:
        (WebCore::parentOrPseudoHostElement):

2019-12-19  Chris Dumez  <cdumez@apple.com>

        REGRESSION: (r251677) imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=205164
        <rdar://problem/57879042>

        Reviewed by Ryosuke Niwa.

        Submitting a form should cancel any pending navigation scheduled by a previous submission of this form:
        - https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm (step 22.3)

        No new tests, rebaselined existing tests.

        Test: fast/forms/form-double-submission.html

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submit):
        * html/HTMLFormElement.h:
        * loader/FormSubmission.h:
        (WebCore::FormSubmission::cancel):
        (WebCore::FormSubmission::wasCancelled const):

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::submitForm):
        Drop previous non-standard compliant logic to avoid double-form submission.

        * loader/NavigationScheduler.cpp:

2019-12-19  Ryosuke Niwa  <rniwa@webkit.org>

        Make ShadowRoot.delegateFocus work in iOS
        https://bugs.webkit.org/show_bug.cgi?id=202875

        Reviewed by Wenson Hsieh.

        This patch fixes the bug that a shadow tree doesn't recieve focus delegation even if the shadow host
        had delegateFocus flag set unless the shadow host itself is focusable beacuse Frame's
        nodeRespondingToClickEvents and friends would return false on the shadow host.

        Test: fast/shadow-dom/delegates-focus-by-activation.html

        * page/ios/FrameIOS.mm:
        (WebCore::nodeIsMouseFocusable): Added the logic to handle shadow hosts whose shadow root has
        delegates focus flag set.
        (WebCore::nodeWillRespondToMouseEvents): Extracted out of approximateNodeAtViewportLocationLegacy.
        (WebCore::Frame::approximateNodeAtViewportLocationLegacy):
        (WebCore::ancestorRespondingToClickEventsNodeQualifier):

2019-12-19  Kate Cheney  <katherine_cheney@apple.com>

        Activate the SQLite database as an on-by-default feature
        https://bugs.webkit.org/show_bug.cgi?id=204774
        <rdar://problem/57592141>

        Reviewed by Brent Fulgham.

        The ITP SQLite database should be on by default.

        * page/RuntimeEnabledFeatures.h:

2019-12-19  Per Arne Vollan  <pvollan@apple.com>

        REGRESSION (r253530): Incorrect colors in Dark Mode
        https://bugs.webkit.org/show_bug.cgi?id=205457

        Unreviewed rollout of r253530.

        * WebCore.xcodeproj/project.pbxproj:
        * rendering/CSSValueKey.h: Removed.
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::systemColor const):
        (WebCore::cssValueIDSelectorList): Deleted.
        (WebCore::systemColorFromCSSValueID): Deleted.
        (WebCore::globalCSSValueToSystemColorMap): Deleted.
        (WebCore::RenderThemeIOS::getOrCreateCSSValueToSystemColorMap): Deleted.
        (WebCore::RenderThemeIOS::setCSSValueToSystemColorMap): Deleted.

2019-12-19  James Darpinian  <jdarpinian@chromium.org>

        ANGLE: Fix last WebGL conformance regressions
        https://bugs.webkit.org/show_bug.cgi?id=205306

        Fixes the last few WebGL conformance regressions when enabling ANGLE on AMD GPUs on Mac.
        The combination of alpha:false and antialias:true was broken, and validation of
        non-ascii characters in comments was broken by a recent change to the test.

        Reviewed by Dean Jackson.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::shaderSource):
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::reshapeFBOs):

2019-12-19  Alan Bujtas  <zalan@apple.com>

        Unreviewed, rolling out r253711.

        Broke two tests on Mac and iOS

        Reverted changeset:

        "[LFC][IFC] LineLayoutContext::m_uncommittedList is not always
        a continuous list of runs"
        https://bugs.webkit.org/show_bug.cgi?id=205404
        https://trac.webkit.org/changeset/253711

2019-12-19  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject::findMatchingObjects implementation.
        https://bugs.webkit.org/show_bug.cgi?id=205428

        Reviewed by Chris Fleizach.

        This method is exercised by several layout tests such as
        accessibility/mac/search-predicate.html.

        - Moved the search algorithm in the implementation of
        AccessibilityObject::findMatchingObjects to the Accessibility namespace,
        so that it can be used in AXIsolatedObject as well.
        - Static helper functions are also moved into the Accessibility
        namespace.
        - Changed the signature of containsText to be more appropriate and in
        line with other methods.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::containsText const):
        (WebCore::AccessibilityObject::findMatchingObjects):
        (WebCore::Accessibility::isAccessibilityObjectSearchMatchAtIndex): Moved from AccessibilityObject.
        (WebCore::Accessibility::isAccessibilityObjectSearchMatch): Moved from AccessibilityObject.
        (WebCore::Accessibility::isAccessibilityTextSearchMatch): Moved from AccessibilityObject.
        (WebCore::Accessibility::objectMatchesSearchCriteriaWithResultLimit): Moved from AccessibilityObject.
        (WebCore::Accessibility::findMatchingObjects): Search algorithm to be reused by AccessibilityObject and AXIsolatedObject.
        (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex): Moved.
        (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch): Moved.
        (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch): Moved.
        (WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit): Moved.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::findMatchingObjects):
        (WebCore::AXIsolatedObject::containsText const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:

2019-12-19  Wenson Hsieh  <wenson_hsieh@apple.com>

        pal/FileSizeFormatter.h declares fileSizeDescription in the top-level namespace
        https://bugs.webkit.org/show_bug.cgi?id=205453

        Reviewed by Tim Horton.

        Change fileSizeDescription to PAL::fileSizeDescription. No change in behavior.

        * html/HTMLAttachmentElement.cpp:
        (WebCore::HTMLAttachmentElement::setFile):
        (WebCore::HTMLAttachmentElement::updateAttributes):

2019-12-19  Chris Dumez  <cdumez@apple.com>

        imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-installed.https.html is flaky
        https://bugs.webkit.org/show_bug.cgi?id=205408

        Reviewed by Youenn Fablet.

        imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-installed.https.html has been
        flaky since it was imported. We now queue a task on the HTML event loop to resolve the skipWaiting promise
        so that its ordering is correct, between the active event being fired and the service worker state becoming
        "activated".

        No new tests, upskipped existing test.

        * workers/service/ServiceWorkerGlobalScope.cpp:
        (WebCore::ServiceWorkerGlobalScope::skipWaiting):
        * workers/service/context/SWContextManager.h:
        * workers/service/server/SWServerToContextConnection.cpp:
        (WebCore::SWServerToContextConnection::skipWaiting):
        * workers/service/server/SWServerToContextConnection.h:

2019-12-19  Chris Dumez  <cdumez@apple.com>

        Stop blocking the worker thread in WorkerMessagePortChannelProvider::postMessageToRemote()
        https://bugs.webkit.org/show_bug.cgi?id=205414

        Reviewed by Youenn Fablet.

        Stop blocking the worker thread in WorkerMessagePortChannelProvider::postMessageToRemote() as it does not appear
        to be needed and it badly impacts performance. This basically replaces a callOnMainThreadAndWait
        call (which was added in r249378 as part of a refactoring) with a callOnMainThread call.

        This makes fast/workers/worker-cloneport.html runs twice as fast on my machine, which is important
        because this test is so slow it is timing out in some configurations.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::postMessage):
        * dom/messageports/MessagePortChannelProvider.h:
        * dom/messageports/MessagePortChannelProviderImpl.cpp:
        (WebCore::MessagePortChannelProviderImpl::postMessageToRemote):
        * dom/messageports/MessagePortChannelProviderImpl.h:
        * dom/messageports/WorkerMessagePortChannelProvider.cpp:
        (WebCore::WorkerMessagePortChannelProvider::postMessageToRemote):
        * dom/messageports/WorkerMessagePortChannelProvider.h:

2019-12-19  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION (r251015): Hitting return before a space deletes text after the insertion position
        https://bugs.webkit.org/show_bug.cgi?id=205425
        <rdar://problem/57575960>

        Reviewed by Tim Horton.

        After r251015, we (rightfully) no longer call ensureLineBoxes() when computing upstream or downstream positions.
        However, logic in deleteInsignificantTextDownstream (which is invoked after hitting return before a space in a
        text node) assumes that line boxes must be generated for the RenderText of the text node containing the
        downstream position. The lack of inline text boxes then causes deleteInsignificantText to always remove the
        entire text node.

        To fix this, have deleteInsignificantText ensure that line boxes exist for the text node's renderer, right
        before asking for the renderer's line boxes.

        Test: editing/inserting/insert-paragraph-before-space.html

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::deleteInsignificantText):

2019-12-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Add initial API for input method
        https://bugs.webkit.org/show_bug.cgi?id=204679

        Reviewed by Žan Doberšek.

        * platform/PlatformKeyboardEvent.h: Also define handledByInputMethod() for WPE port.

2019-12-19  Charlie Turner  <cturner@igalia.com>

        [GStreamer][EME] Notify all elements waiting for CDM attachment
        https://bugs.webkit.org/show_bug.cgi?id=205382

        Reviewed by Xabier Rodriguez-Calvar.

        When multiple demuxers are in flight asking for a CDM instance,
        only one of them was getting woken up when a CDM was attached,
        leaving the other(s) blocking their respective streaming threads
        and locking the pipeline. Switch back to a condition variable from
        a semaphore to fix this issue.

        Covered by existing tests.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
        Initialize the new isPlayerShuttingDown predicate to false.
        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
        Set the new predicate for player shutdown at the start of
        destruction, so that background threads can known when the should
        abort their operations as a result of being unblocked by the
        destructor.
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Go back
        to using condition variables, so we can unblock more than one
        waiter.
        (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
        Helper predicate to make clear that the presence of a valid
        CDMInstance pointer is a sign that it has been attached.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add
        an isPlayerShuttingDown method using an Atomic<bool>. We need this
        to avoid racing set_context() on a decryptor element with the
        pipeline being set to NULL. Before we were using the notifier as a
        proxy for player shutdown, since it is invalidated during player
        destruction. This is not a maintainable solution, since other
        programmers would feel free to reorder the position at which the
        notifier is invalidated, and then introduce a very hard to find
        bug. By introducing this flag at the start of destruction, we will
        always have a known way to check, after a streaming thread has
        woken up again, whether we should call any player methods, or
        return early due to shutdown in progress.
        (WebCore::MediaPlayerPrivateGStreamer::isPlayerShuttingDown
        const): Predicate for player in the process of shutdown. This
        should be used by background threads, which upon wakeup, may need
        to be aware of whether they will be in a race with the pipeline
        going to NULL.
        (WebCore::MediaPlayerPrivateGStreamer::isCDMAttached const):

2019-12-19  Carlos Garcia Campos  <cgarcia@igalia.com>

        [CoordinatedGraphics] ThreadedDisplayRefreshMonitor is never released
        https://bugs.webkit.org/show_bug.cgi?id=205387

        Reviewed by Žan Doberšek.

        The problem is that DisplayRefreshMonitorManager::createMonitorForClient() always creates a new one for
        RenderingUpdateScheduler because it's not notified of the window screen change. So,
        createDisplayRefreshMonitor() is called every time, which returns a reference of the same object, but it's added
        to the monitors vector of DisplayRefreshMonitorManager and never removed from there.

        * page/Chrome.cpp:
        (WebCore::Chrome::windowScreenDidChange): Notify the RenderingUpdateScheduler about the screen change.
        * page/RenderingUpdateScheduler.h: Make windowScreenDidChange public.

2019-12-19  youenn fablet  <youenn@apple.com>

        Safari resumes autoplay audio elements after getUserMedia
        https://bugs.webkit.org/show_bug.cgi?id=197688
        <rdar://problem/57674395>

        Reviewed by Eric Carlson.

        Covered by updated test.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaStreamCaptureStarted):
        Previously, we were piggybacking on resuming autoplay, which happens after interuption.
        This is incorrect as it tries to play paused elements.
        Instead we just try to play a media element if it can autoplay without changing the m_autoplaying value.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::mediaStreamCaptureStarted): Deleted.

2019-12-18  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: perform IDBServer work only on background thread
        https://bugs.webkit.org/show_bug.cgi?id=203690
        <rdar://problem/56908496>

        Reviewed by Alex Christensen.

        The basic workflow of IDB server side was:
        1. IPC thread dispatches IDB messages to main thread
        2. main thread handles messages and dispatches database tasks to IDB thread
        3. IDB thread finishes work and dispatches task result to main thread
        4. main thread sends IPC messages with task results

        For better performance, this patch changes the workflow to:
        1. IPC thread dispatches IDB messages to IDB thread
        2. IDB thread handles messages, perform tasks and sends IPC messages with task results
        In this way, we can avoid the cost of thread hopping to main thread.

        Previously IDBServer and UniqueIDBDatabase were created on the main thread and may be accessed from IDB 
        thread, and now they are created on the IDB thread only. Therefore, we don't need all those variables
        used to sync the database status between main thread and background thread, and the logic becomes simpler.

        This patch also removes timer in UniqueIDBDatabase for better performance.

        Covered by existing tests.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::didCloseFromServer): IDBClient no longer needs to confirm connection close initiated by
        IDBServer. When IDBServer closes the connection, it would remove the connection from the open connection set 
        right away.
        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
        (WebCore::IDBClient::IDBConnectionProxy::didCloseFromServer): 
        (WebCore::IDBClient::IDBConnectionProxy::confirmDidCloseFromServer): Deleted.
        * Modules/indexeddb/client/IDBConnectionProxy.h:
        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
        (WebCore::IDBClient::IDBConnectionToServer::confirmDidCloseFromServer): Deleted.
        * Modules/indexeddb/client/IDBConnectionToServer.h:
        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
        (WebCore::IDBServer::IDBConnectionToClient::IDBConnectionToClient):
        * Modules/indexeddb/server/IDBConnectionToClient.h:
        (WebCore::IDBServer::IDBConnectionToClient::clearDelegate):
        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

        * Modules/indexeddb/server/IDBServer.cpp: Add threading assertions everywhere for safety. Also, as IDBServer
        may be accessed on main thread for process suspension, we need to assert lock of IDBServer is held everywhere.
        (WebCore::IDBServer::IDBServer::IDBServer):
        (WebCore::IDBServer::IDBServer::~IDBServer):
        (WebCore::IDBServer::IDBServer::registerConnection):
        (WebCore::IDBServer::IDBServer::unregisterConnection):
        (WebCore::IDBServer::IDBServer::registerTransaction):
        (WebCore::IDBServer::IDBServer::unregisterTransaction):
        (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
        (WebCore::IDBServer::IDBServer::openDatabase):
        (WebCore::IDBServer::IDBServer::deleteDatabase):
        (WebCore::IDBServer::IDBServer::abortTransaction):
        (WebCore::IDBServer::IDBServer::createObjectStore):
        (WebCore::IDBServer::IDBServer::deleteObjectStore):
        (WebCore::IDBServer::IDBServer::renameObjectStore):
        (WebCore::IDBServer::IDBServer::clearObjectStore):
        (WebCore::IDBServer::IDBServer::createIndex):
        (WebCore::IDBServer::IDBServer::deleteIndex):
        (WebCore::IDBServer::IDBServer::renameIndex):
        (WebCore::IDBServer::IDBServer::putOrAdd):
        (WebCore::IDBServer::IDBServer::getRecord):
        (WebCore::IDBServer::IDBServer::getAllRecords):
        (WebCore::IDBServer::IDBServer::getCount):
        (WebCore::IDBServer::IDBServer::deleteRecord):
        (WebCore::IDBServer::IDBServer::openCursor):
        (WebCore::IDBServer::IDBServer::iterateCursor):
        (WebCore::IDBServer::IDBServer::establishTransaction):
        (WebCore::IDBServer::IDBServer::commitTransaction):
        (WebCore::IDBServer::IDBServer::didFinishHandlingVersionChangeTransaction):
        (WebCore::IDBServer::IDBServer::databaseConnectionPendingClose):
        (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
        (WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):
        (WebCore::IDBServer::IDBServer::didFireVersionChangeEvent):
        (WebCore::IDBServer::IDBServer::openDBRequestCancelled):
        (WebCore::IDBServer::IDBServer::getAllDatabaseNames):
        (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
        (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
        (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
        (WebCore::IDBServer::IDBServer::requestSpace):
        (WebCore::IDBServer::IDBServer::stopDatabaseActivitiesOnMainThread):
        (WebCore::IDBServer::IDBServer::create): Deleted.
        (WebCore::IDBServer::IDBServer::confirmDidCloseFromServer): Deleted.
        (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames): Deleted.
        (WebCore::IDBServer::IDBServer::didGetAllDatabaseNames): Deleted.
        (WebCore::IDBServer::IDBServer::postDatabaseTask): Deleted. IDBServer is on the background thread only. This 
        functionality is moved to its parent (WebIDBServer/InProcessIDBServer).
        (WebCore::IDBServer::IDBServer::postDatabaseTaskReply): Deleted.
        (WebCore::IDBServer::generateDeleteCallbackID): Deleted.
        (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince): Deleted. Merged to 
        closeAndDeleteDatabasesModifiedSince.
        (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins): Deleted. Merged to 
        closeAndDeleteDatabasesForOrigins.
        (WebCore::IDBServer::IDBServer::didPerformCloseAndDeleteDatabases): Deleted.
        (WebCore::IDBServer::IDBServer::tryStop): Deleted.
        (WebCore::IDBServer::IDBServer::resume): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::lock):

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp: Biggest changes are:
        1. merge all perform[Task] and didPerform[Task] functions into [Task] functions.
        2. remove all database members used to track state between main thread and database thread, because the tasks
        are executed in order on one background thread.
        3. m_operationAndTransactionTimer is removed. operationAndTransactionTimerFired is replaced by two functions:
        handleDatabaseOperations and handleTransactions. And these functions are placed at places where we schedule the 
        timer.
        4. lock is moved to IDBServer because UniqueIDBDatabase will never be accessed from different threads.
        (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
        (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
        (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
        (WebCore::IDBServer::UniqueIDBDatabase::notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::getCount):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::prefetchCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::didFinishHandlingVersionChange):
        (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
        (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromServer):
        (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::handleTransactions):
        (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted):
        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
        (WebCore::IDBServer::UniqueIDBDatabase::abortActiveTransactions):
        (WebCore::IDBServer::UniqueIDBDatabase::close):
        (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableRequest):
        (WebCore::IDBServer::UniqueIDBDatabase::hasAnyPendingCallbacks const): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::generateUniqueCallbackIdentifier): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performStartVersionChangeTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformStartVersionChangeTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformClearObjectStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameIndex): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetAllRecords): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performGetCount): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetCount): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteRecord): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performOpenCursor): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformOpenCursor): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformIterateCursor): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::prepareToFinishTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::transactionDestroyed): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::isCurrentlyInUse const): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::hasUnfinishedTransactions const): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performActivateTransactionInBackingStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::maybeFinishHardClose): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performGetResultCallback): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performGetAllResultsCallback): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::performCountCallback): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::forgetErrorCallback): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransactionOnMainThread): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionOnMainThread): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::suspend): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::resume): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        (WebCore::IDBServer::UniqueIDBDatabase::server):
        (WebCore::IDBServer::UniqueIDBDatabase::hardClosedForUserDelete const): Deleted.
        (): Deleted.

        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: The callbacks will be called right away, so there
        is no need to keep weak pointers.
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFinishHandlingVersionChange):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::confirmDidCloseFromServer): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::server):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setMainThreadAbortResult):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::mainThreadAbortResult const):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setState): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::state const): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::setResult): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::result const): Deleted.
        (): Deleted.
        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
        (WebCore::nextServerResourceNumber):
        * loader/EmptyClients.cpp:

2019-12-18  Devin Rousso  <drousso@apple.com>

        Web Inspector: Elements: restrict showing paint flashing and compositing borders to the Web Inspector session
        https://bugs.webkit.org/show_bug.cgi?id=205201

        Reviewed by Timothy Hatcher.

        We often get bugs from users who turn on paint flashing or compositing borders, close Web
        Inspector, reopen Web Inspector, and are then surprised when the page flashes red or these
        borders exist all over the page.

        Given that the dark mode and print styles toggles are limited to the Web Inspector session,
        we should make these have the same behavior.

        * page/Settings.yaml:
        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::getCompositingBordersVisible): Deleted.
        (WebCore::InspectorPageAgent::setCompositingBordersVisible): Deleted.
        Allow Web Inspector to override the `showDebugBorders` and `showRepaintCounter` settings via
        the `inspectorOverride` key, rather than setting them manually via a special `Page` command.

2019-12-18  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Cursor should update when the platform deems it necessary
        https://bugs.webkit.org/show_bug.cgi?id=205429
        <rdar://problem/57983076>

        Reviewed by Wenson Hsieh.

        * page/EventHandler.h:
        Expose selectCursor for WebKit's use.

2019-12-18  Antoine Quint  <graouts@apple.com>

        Animations stop if new tab opened (and closed)
        https://bugs.webkit.org/show_bug.cgi?id=202360
        <rdar://problem/55923261>

        Reviewed by Dean Jackson.

        In the case where we would have a fill-forwards software animation when an animation that could be
        accelerated started, we would fail to start an accelerated animation because we had no composited
        renderer. However, we would still advertise a state of "running accelerated" and the DocumentTimeline
        would not schedule ticks to run the animation in software.

        We now only schedule accelerated animations once their delay phase is over and the animation is in its
        "active" phase, which helps to only schedule accelerated animations once they actually have an effect
        that is worth accelerating, and reset pending accelerated actions in case we try to start an accelerated
        animation but fail to because we don't have a composited renderer.

        Test: webanimations/animation-of-accelerated-property-after-non-accelerated-property.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::apply):
        (WebCore::KeyframeEffect::updateAcceleratedAnimationState):
        (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
        * animation/KeyframeEffect.h:

2019-12-18  Eric Carlson  <eric.carlson@apple.com>

        Remove more unused MediaPlayer methods
        https://bugs.webkit.org/show_bug.cgi?id=205405
        <rdar://problem/58049744>

        Reviewed by Jer Noble.

        No new tests, this just removes unused code.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerIsInMediaDocument const): Deleted.
        * html/HTMLMediaElement.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::inMediaDocument const): Deleted.
        (WebCore::MediaPlayer::handlePlaybackCommand): Deleted.
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired const):
        (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand): Deleted.
        (WebCore::MediaPlayerClient::mediaPlayerIsInMediaDocument const): Deleted.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::requestedRate const): Deleted.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        (WebCore::MediaPlayerPrivateAVFoundation::metaDataAvailable const):
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformPlay):

2019-12-18  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: Runtime.enable reports duplicates (non existent) contexts
        https://bugs.webkit.org/show_bug.cgi?id=204859

        Reviewed by Devin Rousso.

        Do not report main world context as non-main world one when Runtime.enable is called.

        Test: inspector/runtime/executionContextCreated-onEnable.html

        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::enable):
        (WebCore::PageRuntimeAgent::reportExecutionContextCreation):

2019-12-18  Antti Koivisto  <antti@apple.com>

        Optimize Style::Invalidator for multiple RuleSet case
        https://bugs.webkit.org/show_bug.cgi?id=205406

        Reviewed by Zalan Bujtas.

        * style/StyleInvalidator.cpp:
        (WebCore::Style::m_dirtiesAllStyle):
        (WebCore::Style::Invalidator::Invalidator):
        (WebCore::Style::Invalidator::collectRuleInformation):

        Collect bunch of bits so we don't need to traverse again.

        (WebCore::Style::Invalidator::invalidateIfNeeded):

        Bail out when we find a reson to invalidate.

        (WebCore::Style::Invalidator::invalidateStyle):
        (WebCore::Style::Invalidator::invalidateInShadowTreeIfNeeded):
        * style/StyleInvalidator.h:

2019-12-18  Andres Gonzalez  <andresg_22@apple.com>

        AXIsolatedObject support for spin button increment/decrementButton.
        https://bugs.webkit.org/show_bug.cgi?id=205356

        Reviewed by Chris Fleizach.

        Several LayoutTests exercise this functionality.

        - Exposed increment/decrementButton in AXCoreObject in order to
        properly support it in AXIsolatedObject.
        - Used AXCoreObject::increment/decrementButton in the wrapper instead
        of downcasting to an implementation class, which does not work for an
        isolated object.
        - Implemented AXIsolatedObject::isDetachedFromParent.
        - Fixed initialization of AXIsolatedObject::m_parent and m_id.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilitySpinButton.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::isDetachedFromParent):
        (WebCore::AXIsolatedObject::isAccessibilityScrollView const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2019-12-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineLayoutContext::m_uncommittedList is not always a continuous list of runs
        https://bugs.webkit.org/show_bug.cgi?id=205404
        <rdar://problem/58049699>

        Reviewed by Antti Koivisto.

        Since LineLayoutContext's m_uncommittedList is not necessarily continuous set of runs (continuous in the content of not having a soft wrap opportunity)
        we can't use LineBreaker's Content struct anymore to store the uncommitted content.
        Let's use a dedicated UncommittedContent struct instead. It also enables us to pass in a const RunList& to the ContinousContent. ContinousContent should never mutate this list.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::shouldKeepEndOfLineWhitespace):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::ContinousContent::ContinousContent):
        (WebCore::Layout::LineBreaker::ContinousContent::hasTextContentOnly const):
        (WebCore::Layout::LineBreaker::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const):
        (WebCore::Layout::LineBreaker::ContinousContent::firstTextRunIndex const):
        (WebCore::Layout::LineBreaker::ContinousContent::hasNonContentRunsOnly const):
        (WebCore::Layout::LineBreaker::ContinousContent::TrailingCollapsibleContent::reset):
        (WebCore::Layout::LineBreaker::Content::append): Deleted.
        (WebCore::Layout::LineBreaker::Content::reset): Deleted.
        (WebCore::Layout::LineBreaker::Content::shrink): Deleted.
        (WebCore::Layout::LineBreaker::Content::hasTextContentOnly const): Deleted.
        (WebCore::Layout::LineBreaker::Content::isVisuallyEmptyWhitespaceContentOnly const): Deleted.
        (WebCore::Layout::LineBreaker::Content::firstTextRunIndex const): Deleted.
        (WebCore::Layout::LineBreaker::Content::hasNonContentRunsOnly const): Deleted.
        (WebCore::Layout::LineBreaker::Content::TrailingCollapsibleContent::reset): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::ContinousContent::runs const):
        (WebCore::Layout::LineBreaker::ContinousContent::isEmpty const):
        (WebCore::Layout::LineBreaker::ContinousContent::size const):
        (WebCore::Layout::LineBreaker::Content::runs): Deleted.
        (WebCore::Layout::LineBreaker::Content::runs const): Deleted.
        (WebCore::Layout::LineBreaker::Content::isEmpty const): Deleted.
        (WebCore::Layout::LineBreaker::Content::size const): Deleted.
        (WebCore::Layout::LineBreaker::Content::width const): Deleted.
        (WebCore::Layout::LineBreaker::Content::nonCollapsibleWidth const): Deleted.
        (WebCore::Layout::LineBreaker::Content::hasTrailingCollapsibleContent const): Deleted.
        (WebCore::Layout::LineBreaker::Content::isTrailingContentFullyCollapsible const): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::append):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::reset):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::shrink):
        * layout/inlineformatting/LineLayoutContext.h:
        (WebCore::Layout::LineLayoutContext::UncommittedContent::width const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::size):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::isEmpty):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::runs const):

2019-12-18  youenn fablet  <youenn@apple.com>

        Protect ServiceWorker::postMessage from a null execState
        https://bugs.webkit.org/show_bug.cgi?id=205394
        <rdar://problem/57392221>

        Reviewed by Chris Dumez.

        Crash logs indicate null pointer crashes.
        We should return early in that case.

        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::postMessage):

2019-12-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBreaker::lastSoftWrapOpportunity should take a list of runs
        https://bugs.webkit.org/show_bug.cgi?id=205402
        <rdar://problem/58048310>

        Reviewed by Antti Koivisto.

        LineBreaker::Content is supposed to hold a continuous set of runs and the input to lastSoftWrapOpportunity is not
        necessarily continuous (most of the time it is though). 

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isContentSplitAllowed):
        (WebCore::Layout::LineBreaker::wrapTextContent const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::LineBreaker::lastSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::Content::lastSoftWrapOpportunity): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):

2019-12-18  youenn fablet  <youenn@apple.com>

        AppCache should request certificate info when loading resources
        https://bugs.webkit.org/show_bug.cgi?id=205393

        Reviewed by Anders Carlsson.

        Covered by existing tests not crashing in Debug with newly added ASSERT.

        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::isSecure):
        ASSERT that certificate info is there.
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::responseReceived):
        ASSERT that certificate info is there.
        * loader/appcache/ApplicationCacheResourceLoader.cpp:
        (WebCore::ApplicationCacheResourceLoader::create):
        Request certificate info for all app cache resources.

2019-12-18  youenn fablet  <youenn@apple.com>

        Add support for Audio Capture in GPUProcess
        https://bugs.webkit.org/show_bug.cgi?id=205056

        Reviewed by Eric Carlson.

        Export some WebCore headers.
        Allow disabling the audio session debug assert in the GPU process.
        No change of behavior.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/mac/BaseAudioSharedUnit.cpp:
        (WebCore::BaseAudioSharedUnit::startUnit):
        * platform/mediastream/mac/BaseAudioSharedUnit.h:
        (WebCore::BaseAudioSharedUnit::setDisableAudioSessionCheck):
        * platform/mediastream/mac/MockAudioSharedUnit.h:

2019-12-18  Eric Carlson  <eric.carlson@apple.com>

        Remove unused MediaPlayer methods
        https://bugs.webkit.org/show_bug.cgi?id=205341
        <rdar://problem/58006776>

        Reviewed by Jer Noble.

        No new tests, this just removes unused code.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaLoadingFailedFatally):
        (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Deleted.
        (WebCore::HTMLMediaElement::mediaPlayerSetSize): Deleted.
        (WebCore::HTMLMediaElement::mediaPlayerIsPaused const): Deleted.
        * html/HTMLMediaElement.h:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::setDisplayMode):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocument::MediaDocument):
        (WebCore::MediaDocument::~MediaDocument):
        (WebCore::MediaDocument::mediaElementSawUnsupportedTracks): Deleted.
        * html/MediaDocument.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::canLoadPoster const): Deleted.
        (WebCore::MediaPlayer::setPoster): Deleted.
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerContentsScale const):
        (WebCore::MediaPlayerClient::mediaPlayerPlatformVolumeConfigurationRequired const):
        (WebCore::MediaPlayerClient::mediaPlayerSawUnsupportedTracks): Deleted.
        (WebCore::MediaPlayerClient::mediaPlayerSetSize): Deleted.
        (WebCore::MediaPlayerClient::mediaPlayerIsPaused const): Deleted.
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::setSize):
        (WebCore::MediaPlayerPrivateInterface::canLoadPoster const): Deleted.
        (WebCore::MediaPlayerPrivateInterface::setPoster): Deleted.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::setSize): Deleted.
        (WebCore::MediaPlayerPrivateAVFoundation::repaint): Deleted.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:

2019-12-18  Doug Kelly  <dougk@apple.com>

        Ensure transparency layers are properly ended when only painting root background
        https://bugs.webkit.org/show_bug.cgi?id=205285

        Reviewed by Simon Fraser.

        Ensure that if we are in a transparency layer and returning early from paintLayerContents() because of PaintLayerPaintingRootBackgroundOnly, we properly
        reset the transparency state before returning.

        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContextStateStackChecker::~GraphicsContextStateStackChecker):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayerContents):

2019-12-18  ChangSeok Oh  <changseok@webkit.org>

        [GTK] WebGL backed by ANGLE flickers when USE_OPENGL_ES is enabled.
        https://bugs.webkit.org/show_bug.cgi?id=202508

        Reviewed by Žan Doberšek.

        The color format and internal one of BitmapTextureGL cannot be matched
        where USE_ANGLE_WEBGL and USE_OPENGL_ES are enabled simultaneously.
        This causes the flickering issue on WebGL scene since it prevents TextureMapper
        from recycling available layer buffers due to mismatched color format.
        When ANGLE_WEBGL is enabled, the internal color format is set GL_RGBA8.
        However, that is not compatible to GLES textures. To address this,
        We always make the color format of BitmapTextureGL GL_RGBA,
        and only set its internal color format with a given value.

        No new tests since no functionality changed.

        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
        (Nicosia::GC3DLayer::swapBuffersIfNeeded):
        * platform/graphics/texmap/BitmapTextureGL.cpp:
        (WebCore::BitmapTextureGL::BitmapTextureGL):

2019-12-18  Antti Koivisto  <antti@apple.com>

        Style::Invalidator should be able to invalidate using multiple RuleSets in one pass
        https://bugs.webkit.org/show_bug.cgi?id=205391

        Reviewed by Zalan Bujtas.

        It is inefficient to do multiple passes over DOM if there are multiple RuleSets to invalidate with.

        * style/AttributeChangeInvalidation.cpp:
        (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):

        Collect to a HashMap per MatchElement.

        (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):

        Call to common invalidation function in Style::Invalidator.

        * style/AttributeChangeInvalidation.h:
        * style/ClassChangeInvalidation.cpp:
        (WebCore::Style::ClassChangeInvalidation::computeInvalidation):
        (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):

        Same for classes.

        * style/ClassChangeInvalidation.h:
        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::Invalidator):

        Take a Vector of RuleSets.

        (WebCore::Style::Invalidator::invalidateIfNeeded):

        Loop as needed.

        (WebCore::Style::Invalidator::invalidateStyle):
        (WebCore::Style::Invalidator::invalidateInShadowTreeIfNeeded):
        (WebCore::Style::Invalidator::invalidateWithMatchElementRuleSets):

        Factor the invalidation loop and HashMap to Invalidator.

        * style/StyleInvalidator.h:

2019-12-18  Simon Fraser  <simon.fraser@apple.com>

        Move m_exposedContentRect into the DelegatedScrollingGeometry optional
        https://bugs.webkit.org/show_bug.cgi?id=205377

        Reviewed by Tim Horton.

        ScrollView's m_exposedContentRect is only set for delegated scrolling, so move it into
        DelegatedScrollingGeometry and remove the iOS #ifdefs around it. Move the WAK/NSView-related
        code into platformExposedContentRect() for iOS WK1. Stub out exposedContentRect() functions
        on TiledCoreAnimationDrawingArea.        

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::exposedContentRect const):
        (WebCore::ScrollView::setExposedContentRect):
        (WebCore::ScrollView::platformExposedContentRect const):
        * platform/ScrollView.h:
        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::platformExposedContentRect const):
        (WebCore::ScrollView::exposedContentRect const): Deleted.
        (WebCore::ScrollView::setExposedContentRect): Deleted.

2019-12-18  Chris Dumez  <cdumez@apple.com>

        REGRESSION: 32 Tests Crashing on Mac Debug wk2 with ASSERTION FAILED: m_pendingActivityForEventDispatch
        https://bugs.webkit.org/show_bug.cgi?id=205397
        <rdar://problem/58043626>

        Unreviewed, fix debug assertion after r253667. The debug assertion is confused because we now use
        the HTML5 event loop, which takes care of taking an ActiveDOMObject PendingActivity whenever we
        queue an event.

        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
        (WebCore::ServiceWorkerRegistration::getNewestWorker const):
        (WebCore::ServiceWorkerRegistration::updateStateFromServer):
        (WebCore::ServiceWorkerRegistration::queueTaskToFireUpdateFoundEvent):
        (WebCore::ServiceWorkerRegistration::stop):
        (WebCore::ServiceWorkerRegistration::hasPendingActivity const):
        (WebCore::ServiceWorkerRegistration::getNewestWorker): Deleted.
        (WebCore::ServiceWorkerRegistration::updatePendingActivityForEventDispatch): Deleted.
        * workers/service/ServiceWorkerRegistration.h:

2019-12-18  Diego Pino Garcia  <dpino@igalia.com>

        [GTK][WPE] Renderization of Conic gradients
        https://bugs.webkit.org/show_bug.cgi?id=202739

        Reviewed by Carlos Alberto Lopez Perez.

        * platform/graphics/cairo/GradientCairo.cpp:
        (WebCore::Gradient::createPlatformGradient): Add support for conic gradient.
        (WebCore::addColorStopRGBA): Refactored code to a function.
        (WebCore::createConic): Creates a conic gradient.
        (WebCore::addConicSector): Adds a sector to a conic gradient.
        (WebCore::setCornerColorRGBA): Sets a RGBA color to mesh patch.
        (WebCore::interpolateColorStop): Offset and RGBA color interpolation.

2019-12-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBreaker::isAtSoftWrapOpportunity should return the wrap position
        https://bugs.webkit.org/show_bug.cgi?id=205371
        <rdar://problem/58029811>

        Reviewed by Antti Koivisto.

        Rename isAtSoftWrapOpportunity to lastSoftWrapOpportunity to reflect that it returns the last soft wrap
        opportunity index.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::Content::lastSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::Content::append):
        (WebCore::Layout::LineBreaker::Content::isAtSoftWrapOpportunity): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):

2019-12-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add lastInlineItemWithContent to LineBreaker::Content::isAtSoftWrapOpportunity
        https://bugs.webkit.org/show_bug.cgi?id=205362
        <rdar://problem/58025349>

        Reviewed by Antti Koivisto.

        This is in preparation for being able to return a previous run index as the soft wrapping opportunity.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::Content::isAtSoftWrapOpportunity):

2019-12-18  Dean Jackson  <dino@apple.com>

        Reverting libANGLE.a -> libANGLE-shared.dylib.

        The internal Apple build systems are still unhappy with
        this change, so I'm reverting it until I can be sure
        they'll accept it.

        * Configurations/WebCore.xcconfig:
        * Configurations/WebCoreTestSupport.xcconfig:
        * platform/graphics/ANGLEWebKitBridge.cpp:
        (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
        (WebCore::ANGLEWebKitBridge::compileShaderSource):
        (WebCore::ANGLEWebKitBridge::angleAvailable): Deleted.
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):

2019-12-18  Chris Lord  <clord@igalia.com>

        Missing headers in worker files cause random build failures when adding new files
        https://bugs.webkit.org/show_bug.cgi?id=205385

        Reviewed by Youenn Fablet.

        No new tests, no behavioral changes.

        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        * workers/service/server/SWServerRegistration.cpp:

2019-12-18  Chris Lord  <clord@igalia.com>

        [GTK][WPE] OffscreenCanvas worker tests that call drawImage crash in debug builds
        https://bugs.webkit.org/show_bug.cgi?id=205339

        Reviewed by Carlos Garcia Campos.

        Don't unnecessarily create an Image object in the Cairo graphics
        backend when using drawImage/drawPattern. Doing so calls code that
        isn't safe to use off-main-thread and causes OffscreenCanvas worker
        tests to crash in debug builds.

        No new tests, no behavioral changes.

        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::cairoSurfaceCopy):
        (WebCore::cairoSurfaceCoerceToImage):
        (WebCore::ImageBuffer::draw):
        (WebCore::ImageBuffer::drawPattern):

2019-12-17  Simon Fraser  <simon.fraser@apple.com>

        Remove iOS #ifdefs around unobscuredContentSize
        https://bugs.webkit.org/show_bug.cgi?id=205372

        Reviewed by Tim Horton.

        Long-term, all of the ScrollView geometry data related to delegated scrolling
        will move to Optional<DelegatedScrollingGeometry> m_delegatedScrollingGeometry
        and not be wrapped in platform #ifdefs.

        Take the first step of moving unobscuredContentSize into that struct.

        I added platformUnobscuredContentRect() to handle the iOS WK1 case, called 
        when there is a platform widget.
        
        m_fixedVisibleContentRect is only used by coördinated graphics.

        * page/FrameView.cpp:
        (WebCore::FrameView::unobscuredContentSizeChanged):
        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::unobscuredContentSize const):
        (WebCore::ScrollView::setUnobscuredContentSize):
        (WebCore::ScrollView::unobscuredContentRect const):
        (WebCore::ScrollView::platformVisibleContentRect const):
        (WebCore::ScrollView::platformVisibleContentSize const):
        (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea const):
        (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea const):
        (WebCore::ScrollView::platformUnobscuredContentRect const):
        * platform/ScrollView.h:
        (WebCore::ScrollView::unobscuredContentSize const): Deleted.
        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::platformUnobscuredContentRect const):
        (WebCore::ScrollView::unobscuredContentRect const): Deleted.
        (WebCore::ScrollView::setUnobscuredContentSize): Deleted.
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::platformUnobscuredContentRect const):

2019-12-17  Chris Dumez  <cdumez@apple.com>

        Port service worker code to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=205359

        Reviewed by Ryosuke Niwa.

        Port service worker code to the HTML5 event loop. We were mixing using the HTML5 event loop and ScriptExecutionContext::postTask().
        This would cause test flakiness because tasks posted via thsse 2 mechanisms could get processed out of order, even though the
        service worker specification guarantees a specific ordering.

        The new pattern is that we only use WorkerRunLoop::postTask() to hop to the worker thread from the main thread, and not for any work
        specified in the service workers specification. Whenever the service workers specifications to "queue a task", we now queue a task
        on the ScriptExecutionContext's event loop, with the specified TaskSource.

        No new tests, updated existing test.

        * dom/ScriptExecutionContext.cpp:
        * dom/ScriptExecutionContext.h:
        * workers/service/SWClientConnection.cpp:
        (WebCore::dispatchToContextThreadIfNecessary):
        (WebCore::SWClientConnection::postTaskForJob):
        (WebCore::SWClientConnection::updateRegistrationState):
        (WebCore::SWClientConnection::updateWorkerState):
        (WebCore::SWClientConnection::fireUpdateFoundEvent):
        (WebCore::SWClientConnection::notifyClientsOfControllerChange):
        (WebCore::SWClientConnection::clearPendingJobs):
        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::updateState):
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::updateRegistrationState):
        (WebCore::ServiceWorkerContainer::updateWorkerState):
        (WebCore::ServiceWorkerContainer::queueTaskToFireUpdateFoundEvent):
        (WebCore::ServiceWorkerContainer::queueTaskToDispatchControllerChangeEvent):
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::queueTaskToFireUpdateFoundEvent):
        * workers/service/ServiceWorkerRegistration.h:
        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::postMessageToServiceWorker):
        (WebCore::SWContextManager::fireInstallEvent):
        (WebCore::SWContextManager::fireActivateEvent):
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::queueTaskToFireFetchEvent):
        (WebCore::ServiceWorkerThread::queueTaskToPostMessage):
        (WebCore::ServiceWorkerThread::queueTaskToFireInstallEvent):
        (WebCore::ServiceWorkerThread::queueTaskToFireActivateEvent):
        * workers/service/context/ServiceWorkerThread.h:
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::notifyNetworkStateChange):
        (WebCore::ServiceWorkerThreadProxy::startFetch):

2019-12-17  Chris Dumez  <cdumez@apple.com>

        Unreviewed, revert r253493 because it broke an Apple internal site

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submit):
        * html/HTMLFormElement.h:
        * loader/FormSubmission.h:
        (WebCore::FormSubmission::cancel): Deleted.
        (WebCore::FormSubmission::wasCancelled const): Deleted.
        * loader/NavigationScheduler.cpp:

2019-12-17  Fujii Hironori  <fujii.hironori@gmail.com>

        [cairo] text-align:justify wrongly expands CJK ideograph characters
        https://bugs.webkit.org/show_bug.cgi?id=205321

        Reviewed by Carlos Garcia Campos.

        Even though canExpandAroundIdeographsInComplexText of
        FontCairoHarfbuzzNG.cpp returns false, ComplexTextController
        doesn't take it account. It ends up to expanding all ideographs
        with a undesired expansion width.

        WidthIterator properly checks canExpandAroundIdeographsInComplexText.
        ComplexTextController also should do so.

        * platform/graphics/ComplexTextController.cpp:
        (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Check canExpandAroundIdeographsInComplexText.
        * platform/graphics/FontCascade.h: Friend with ComplexTextController to allow calling canExpandAroundIdeographsInComplexText.

2019-12-17  Brent Fulgham  <bfulgham@apple.com>

        Limit URL to reasonable size
        https://bugs.webkit.org/show_bug.cgi?id=203825
        <rdar://problem/56878680>

        Reviewed by Ryosuke Niwa.

        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::canDisplay const): Place an upper bound on the amount of
        memory a URL may consume.

2019-12-17  Eric Carlson  <eric.carlson@apple.com>

        Add remote media player methods for prepareToPlay, preload, private browsing mode, preserves pitch, and failed to load
        https://bugs.webkit.org/show_bug.cgi?id=205351
        <rdar://problem/58018451>

        Reviewed by Jer Noble.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::remoteEngineFailedToLoad):
        * platform/graphics/MediaPlayer.h:

2019-12-17  Kate Cheney  <katherine_cheney@apple.com>

        Add run-time flag for in-app browser privacy
        https://bugs.webkit.org/show_bug.cgi?id=205288
        <rdar://problem/57569206>

        Reviewed by John Wilander.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setInAppBrowserPrivacyEnabled):
        (WebCore::RuntimeEnabledFeatures::isInAppBrowserPrivacyEnabled const):
        * page/Settings.yaml:

2019-12-17  Ryosuke Niwa  <rniwa@webkit.org>

        executeIfJavaScriptURL should check requester's security origin
        https://bugs.webkit.org/show_bug.cgi?id=205324

        Reviewed by Brent Fulgham.

        Don't execute the JavaScript in ScriptController::executeIfJavaScriptURL if the security origin
        of the current document is no longer accessible from the request originator's security origin.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeIfJavaScriptURL): Added a check.
        * bindings/js/ScriptController.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected): Pass around the security origin of the requester.
        (WebCore::FrameLoader::submitForm):

2019-12-16  Ryosuke Niwa  <rniwa@webkit.org>

        Document::setFocusedElement should not set m_focusedElement to an element in another document
        https://bugs.webkit.org/show_bug.cgi?id=205325

        Reviewed by Wenson Hsieh.

        Added an early exit for when the newly focused element had moved
        while blurring the previously focused element.

        * dom/Document.cpp:
        (WebCore::Document::setFocusedElement):

2019-12-17  James Darpinian  <jdarpinian@chromium.org>

        Fix WebGL conformance test build_177_to_178.html with USE_ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=204927

        Disable ANGLE_texture_rectangle when compiling user shaders.
        This mirrors a change I made to Chromium here:
        https://chromium-review.googlesource.com/c/chromium/src/+/1842223

        Reviewed by Dean Jackson.

        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::compileShader):

2019-12-17  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Cursor should update on mouse movement and style change
        https://bugs.webkit.org/show_bug.cgi?id=205317
        <rdar://problem/46793696>

        Reviewed by Anders Carlsson.

        * Configurations/WebCore.xcconfig:
        Link AppKit for NSCursor.

        * SourcesCocoa.txt:
        Remove CursorIOS.cpp.
        De-unify CursorMac; because it imports AppKit headers, we have to
        take care to make sure it doesn't also get WAK (which it does if you
        leave it unified).

        * WebCore.xcodeproj/project.pbxproj:
        Remove CursorIOS.cpp and de-unify CursorMac (by adding it to the target)

        * loader/EmptyClients.h:
        * page/Chrome.cpp:
        (WebCore::Chrome::setCursor):
        (WebCore::Chrome::setCursorHiddenUntilMouseMoves):
        Unifdef many things.

        * page/ChromeClient.h:
        (WebCore::ChromeClient::supportsSettingCursor):
        Add a ChromeClient bit, supportsSettingCursor, which can be used
        to guard work that shouldn't happen if a platform doesn't support
        pushing cursor updates out from WebCore. This will be true everywhere
        except iOS, and does the work of the old platform ifdefs.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::EventHandler):
        (WebCore::EventHandler::clear):
        (WebCore::EventHandler::updateCursor):
        (WebCore::EventHandler::selectCursor):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::scheduleCursorUpdate):
        * page/EventHandler.h:
        * platform/Cursor.cpp:
        * platform/Cursor.h:
        Unifdef, and use supportsSettingCursor to avoid some unnecessary work.

        * platform/ios/CursorIOS.cpp: Removed.
        * platform/ios/WidgetIOS.mm:
        (WebCore::Widget::setCursor):
        Propagate cursor changes upwards.

        * platform/mac/CursorMac.mm:
        (WebCore::cursor):
        (WebCore::Cursor::ensurePlatformCursor const):
        CursorMac is now built in macCatalyst. However, parts that depend
        on HIServices or NSImage are #ifdeffed out, and fall back to an arrow.

2019-12-17  Antti Koivisto  <antti@apple.com>

        REGRESSION: ASSERTION FAILED: FontCache::singleton().generation() == m_generation
        https://bugs.webkit.org/show_bug.cgi?id=204933
        <rdar://problem/57458432>

        Reviewed by Zalan Bujtas.

        Test: fast/shadow-dom/font-cache-invalidation.html

        When font cache version number is bumped we need to invalidate matches declarations caches because
        they may now contain stale font references. The code to do this failed to look into shadow trees.

        * dom/Document.cpp:
        (WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::invalidateMatchedDeclarationsCache):

        Also invalidate the shadow trees.

        * style/StyleScope.h:

2019-12-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][Painting] Add basic support for z-index based painting
        https://bugs.webkit.org/show_bug.cgi?id=205345
        <rdar://problem/58010942>

        Reviewed by Antti Koivisto.

        This is just a very simple z-index based painting to be able to run WPT where
        z-index is heavily used to hide/reveal red/green boxes.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::absoluteDisplayBox):
        (WebCore::Display::isPaintRootCandidate):
        (WebCore::Display::paintSubtree):
        (WebCore::Display::collectPaintRootsAndContentRect):
        (WebCore::Display::Painter::paint):
        (WebCore::Display::paintBoxDecorationAndChildren): Deleted.

2019-12-17  youenn fablet  <youenn@apple.com>

        Update session category in MockAudioSharedUnit as done in CoreAudioSharedUnit
        https://bugs.webkit.org/show_bug.cgi?id=205328

        Reviewed by Eric Carlson.

        We were updating the audio session when starting capturing with the CoreAudioSharedUnit
        but not with the MockAudioSharedUnit.
        Refactor the code to update the audio session in the base class BaseAudioSharedUnit.
        Share more code between start and resume case in BaseAudioSharedUnit.

        Covered by platform/ios/mediastream/audio-muted-in-background-tab.html in Debug.

        * platform/mediastream/mac/BaseAudioSharedUnit.cpp:
        (WebCore::BaseAudioSharedUnit::startProducingData):
        (WebCore::BaseAudioSharedUnit::startUnit):
        (WebCore::BaseAudioSharedUnit::resume):
        * platform/mediastream/mac/BaseAudioSharedUnit.h:
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::startInternal):
        * platform/mediastream/mac/MockAudioSharedUnit.mm:
        (WebCore::MockAudioSharedUnit::startInternal):

2019-12-17  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer][WPE] Fix regressions related to our 'Fix GStreamer capturer mock' patch
        https://bugs.webkit.org/show_bug.cgi?id=205270

        MockGStreamerAudioCaptureSource rightfully defaults to echoCancellation=True,
        see https://bugs.webkit.org/show_bug.cgi?id=205057

        Reviewed by Philippe Normand.

        This fixes existing tests

        * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeAudioSource::addHum):

2019-12-17  Antti Koivisto  <antti@apple.com>

        Resolve dynamic media queries without reconstructing RuleSets
        https://bugs.webkit.org/show_bug.cgi?id=205264

        Reviewed by Zalan Bujtas.

        We currently do a full style resolver reset whenever a media query result changes. This is very inefficient
        as we need to reconstuct all RuleSets and optimization structures. We also lose related caches and are forced
        to re-resolve full document style. This may happen frequently, for example when resizing window on a responsive
        web site.

        With this patch we construct RuleDatas also for non-matching dynamic media queries and simply mark them disabled.
        We create a data structure that allows enabling and disabling them efficiently as a response to environment changes
        (like view resize). This allows us to avoid throwing away anything during common scenarios.

        Test: fast/media/media-query-dynamic-with-font-face.html

        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::evaluate const):

        Add a mode where dynamic media queries all evaluate to true and only static properties can cause the query to fail.

        * css/MediaQueryEvaluator.h:
        * style/ElementRuleCollector.cpp:
        (WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):

        Skip disabled rules during rule collection.

        * style/RuleData.cpp:
        (WebCore::Style::RuleData::RuleData):
        * style/RuleData.h:
        (WebCore::Style::RuleData::isEnabled const):
        (WebCore::Style::RuleData::setEnabled):

        Add a bit.

        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::addRule):

        Collect positions of rules affected by dynamic media queries.

        (WebCore::Style::RuleSet::addPageRule):
        (WebCore::Style::RuleSet::addChildRules):
        (WebCore::Style::RuleSet::addRulesFromSheet):

        First check for a special case where we have style resolver mutating rules (like @font-face) inside a media query.
        In this case we fall back to static resolution.

        Then collect the rules. Static media queries (print etc) are evaluated right away, dynamic ones are collected by MediaQueryCollector.

        (WebCore::Style::RuleSet::addStyleRule):
        (WebCore::Style::RuleSet::traverseRuleDatas):
        (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):

        Evaluate media queries for changes and flip the enabled state of the rules if needed.

        (WebCore::Style::RuleSet::MediaQueryCollector::pushAndEvaluate):
        (WebCore::Style::RuleSet::MediaQueryCollector::pop):
        (WebCore::Style::RuleSet::MediaQueryCollector::didMutateResolver):
        (WebCore::Style::RuleSet::MediaQueryCollector::addRulePositionIfNeeded):
        * style/RuleSet.h:
        (WebCore::Style::RuleSet::hasViewportDependentMediaQueries const):
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::hasViewportDependentMediaQueries const):
        (WebCore::Style::Resolver::evaluateDynamicMediaQueries):
        (WebCore::Style::Resolver::addMediaQueryDynamicResults): Deleted.
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByViewportChange const): Deleted.
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByAccessibilitySettingsChange const): Deleted.
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByAppearanceChange const): Deleted.

        Profiling doesn't show any need to handle the cases separately. Replace with single evaluateDynamicMediaQueries path.
        We can bring type specific paths back easily if needed.

        * style/StyleResolver.h:
        (WebCore::Style::Resolver::hasViewportDependentMediaQueries const): Deleted.
        (WebCore::Style::Resolver::hasAccessibilitySettingsDependentMediaQueries const): Deleted.
        (WebCore::Style::Resolver::hasAppearanceDependentMediaQueries const): Deleted.
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::evaluateMediaQueriesForViewportChange):
        (WebCore::Style::Scope::evaluateMediaQueriesForAccessibilitySettingsChange):
        (WebCore::Style::Scope::evaluateMediaQueriesForAppearanceChange):

        Call into general evaluateDynamicMediaQueries.

        (WebCore::Style::Scope::evaluateMediaQueries):

        In normal case we can just invalidate style, not throw everything away.
        This can be further improved by adding optimization rule sets.

        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
        (WebCore::Style::ScopeRuleSets::initializeUserStyle):
        (WebCore::Style::ScopeRuleSets::collectRulesFromUserStyleSheets):
        (WebCore::Style::makeRuleSet):
        (WebCore::Style::ScopeRuleSets::hasViewportDependentMediaQueries const):
        (WebCore::Style::ScopeRuleSets::evaluteDynamicMediaQueryRules):
        (WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):
        (WebCore::Style::ensureInvalidationRuleSets):
        * style/StyleScopeRuleSets.h:

2019-12-17  youenn fablet  <youenn@apple.com>

        FileList should be exposed to workers
        https://bugs.webkit.org/show_bug.cgi?id=204074

        Reviewed by Chris Dumez.

        Covered by rebased test.

        * fileapi/FileList.idl:

2019-12-16  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove the build warnings below since r253488.
        warning: unused parameter ‘foo’ [-Wunused-parameter]

        No new tests, no behavioral changes.

        * testing/Internals.cpp:
        (WebCore::Internals::hasSandboxMachLookupAccessToXPCServiceName):

2019-12-16  Said Abou-Hallawa  <sabouhallawa@apple.com>

        WebGLRenderingContext.texImage2D() should respect EXIF orientation
        https://bugs.webkit.org/show_bug.cgi?id=205141

        Reviewed by Simon Fraser.

        If image orientation is not the default, WebGLRenderingContext.texImage2D()
        needs to draw this image into an ImageBuffer, makes a temporary Image
        from the ImageBuffer then draw this temporary Image to the WebGL texture.

        Test: fast/images/exif-orientation-webgl-texture.html

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::texSubImage2D):
        (WebCore::WebGLRenderingContextBase::texImage2D):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/Image.h:
        (WebCore::Image::orientation const):

2019-12-16  Simon Fraser  <simon.fraser@apple.com>

        Change 'delegatesPageScaling' from a Setting to a flag on ScrollView
        https://bugs.webkit.org/show_bug.cgi?id=205319

        Reviewed by Tim Horton.

        delegatesPageScaling() is never toggled at runtime (even by tests), and it should
        be a flag on FrameView just like delegatesScrolling (maybe in future the flags can merge).

        So remove the Setting, and have DrawingArea control whether page scaling is delegated.
        
        In WebKit1, WebFrameLoaderClient::transitionToCommittedForNewPage() turns on delegated
        page scaling for iOS.

        * page/Frame.cpp:
        (WebCore::Frame::frameScaleFactor const):
        * page/FrameSnapshotting.cpp:
        (WebCore::snapshotFrameRectWithClip):
        * page/FrameView.cpp:
        (WebCore::FrameView::visibleContentScaleFactor const):
        * page/Page.cpp:
        (WebCore::Page::setPageScaleFactor):
        * page/Settings.yaml:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setDelegatesPageScaling):
        * platform/ScrollView.h:
        (WebCore::ScrollView::delegatesPageScaling const):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::addToOverlapMap const):

2019-12-16  Ryosuke Niwa  <rniwa@webkit.org>

        TextManipulationController should observe newly inserted or displayed contents
        https://bugs.webkit.org/show_bug.cgi?id=205203
        <rdar://problem/56567020>

        Reviewed by Wenson Hsieh.

        This patch makes TextManipulationController detect newly inserted or displayed contents and invoke
        the callbacks with the newly found items.

        To do this, we add a new WeakHashSet to TextManipulationController to which an element is added
        whenever its renderer is created. Because it's expensive (and not safe) to find paragraphs around
        a newly inserted content, we schedule a new event loop task to do this work.

        To find newly inserted paragraphs, we first expand the element's boundary to its start and end of
        paragraphs. Because each element in this paragraph could have been added in the weak hash set, we
        use hash map to de-duplicate start and end positions. We also filter out any element whose parent
        is also in the weak hash set since they would simply find inner paragraphs.

        Tests: TextManipulation.StartTextManipulationFindNewlyInsertedParagraph
               TextManipulation.StartTextManipulationFindNewlyDisplayedParagraph
               TextManipulation.StartTextManipulationFindSameParagraphWithNewContent

        * dom/TaskSource.h:
        (WebCore::TaskSource::InternalAsyncTask): Added.
        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::startObservingParagraphs):
        (WebCore::TextManipulationController::observeParagraphs): Extracted out of startObservingParagraphs.
        (WebCore::TextManipulationController::didCreateRendererForElement): Added. Gets called whenever
        a new RenderElement is created.
        (WebCore::makePositionTuple): Added.
        (WebCore::makeHashablePositionRange): Added.
        (WebCore::TextManipulationController::scheduleObservartionUpdate): Added.
        * editing/TextManipulationController.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::createRenderer):

2019-12-16  Daniel Bates  <dabates@apple.com>

        Reproducible case of backwards nextParagraph returning a position ahead of the input position
        https://bugs.webkit.org/show_bug.cgi?id=196127
        <rdar://problem/49135890>

        Reviewed by Wenson Hsieh.

        Fix up the code to handle:

                1. When the specified position is at a paragraph boundary.
                        For this case, we do what we do now for the !withinUnitOfGranularity case.
                2. When the specified position is actually inside a paragraph:
                        For this case, we need to return the end of the previous paragraph or the
                        start of the next paragraph depending on whether we are selecting forward
                        or backwards, respectively.

        * editing/VisibleUnits.cpp:
        (WebCore::nextParagraphBoundaryInDirection):

2019-12-16  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Remove ArrayBufferNeuteringWatchpointSet
        https://bugs.webkit.org/show_bug.cgi?id=205194

        Reviewed by Saam Barati.

        * bindings/js/SerializedScriptValue.h:
        (WebCore::SerializedScriptValue::decode):

2019-12-16  Doug Kelly  <dougk@apple.com>

        Ensure consistent sorting of identical track names
        https://bugs.webkit.org/show_bug.cgi?id=204825

        Reviewed by Eric Carlson.

        When sorting TextTracks, if the menu text is the same, fall back to the order in which the tracks were added to ensure a consistent sort.

        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::textTrackCompare):
        (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):

2019-12-16  Antti Koivisto  <antti@apple.com>

        Remove display:contents feature flag
        https://bugs.webkit.org/show_bug.cgi?id=205276

        Reviewed by Ryosuke Niwa.

        The feature has been enabled for a while. There is no reason to have a flag for it anymore.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setDisplayContentsEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::displayContentsEnabled const): Deleted.
        * style/StyleAdjuster.cpp:
        (WebCore::Style::Adjuster::adjustDisplayContentsStyle const):

2019-12-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html
        https://bugs.webkit.org/show_bug.cgi?id=205287
        <rdar://problem/57976834>

        Reviewed by Antti Koivisto.

        Consolidate word break rules into a function to be able to make sure "line-break: anywhere" takes priority over word-break values.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::wordBreakBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::isTextSplitAtArbitraryPositionAllowed): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:

2019-12-16  Andres Gonzalez  <andresg_22@apple.com>

        Isolated object implementation of parameterized attribute SelectTextWithCriteria.
        https://bugs.webkit.org/show_bug.cgi?id=205210

        Reviewed by Chris Fleizach.

        LayoutTests/accessibility/mac/find-and-replace-match-capitalization.html exercise this functionality.

        Requests for parameterized attributes that require computations in
        the WebCore DOM need to be dispatched to the main thread. This
        change is the blueprint for all other attributes to follow.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::isolatedTreeRootObject): The isolated tree root object is always retrieved in the main thread.
        (WebCore::AXObjectCache::generateIsolatedTree): Sets the AXObjectCache for the generated IsolatedTree.
        * accessibility/AccessibilityObjectInterface.h: Added the template functions to dispatch to the main thread.
        (WebCore::Accessibility::performFunctionOnMainThread):
        (WebCore::Accessibility::retrieveValueFromMainThread):
        * accessibility/AccessibilityRenderObject.cpp: Removed obsolete asserts.
        (WebCore::AccessibilityRenderObject::visibleChildren):
        (WebCore::AccessibilityRenderObject::tabChildren):
        * accessibility/isolatedtree/AXIsolatedTree.h: It now holds a reference to the AXObjectCache.
        (WebCore::AXIsolatedTree::axObjectCache const):
        (WebCore::AXIsolatedTree::setAXObjectCache):
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::findTextRanges const):
        (WebCore::AXIsolatedObject::performTextOperation):
        (WebCore::AXIsolatedObject::axObjectCache const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Moved template functions to dispatch to the main thread into the Accessibility namespace to use them in the isolated object implementation.
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper scrollViewParent]):
        (-[WebAccessibilityObjectWrapper windowElement:]):
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        (performAccessibilityFunctionOnMainThread): Moved.
        (retrieveAccessibilityValueFromMainThread): Moved.

2019-12-16  youenn fablet  <youenn@apple.com>

        Consider top-level context whose origin is unique as insecure
        https://bugs.webkit.org/show_bug.cgi?id=205111

        Reviewed by Brent Fulgham.

        Tests: http/tests/security/top-level-unique-origin.https.html
               http/tests/security/top-level-unique-origin2.https.html

        * dom/Document.cpp:
        (WebCore::Document::isSecureContext const):
        There is no guarantee that top level unique origin contexts like data URL are SecureContext.
        This patch makes them no longer SecureContext.
        This helps getting closer to https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy
        which identifies all unique origins as "Not Trustworthy".
        Child unique origin contexts will stay SecureContext if their parents are.

2019-12-16  Daniel Bates  <dabates@apple.com>

        -requestDocumentContext always returns 1 text unit more granularity than requested
        https://bugs.webkit.org/show_bug.cgi?id=205142
        <rdar://problem/57858236>

        Reviewed by Darin Adler and Wenson Hsieh.

        Fix up the code to actually determine if the specified position is at a sentence
        boundary. Currently the code will always return false when asking whether the
        specified position is at a sentence boundary (i.e. "end of the sentence") because
        it compares it to the position of the end of the *next* sentence or the beginning
        of the current sentence when selecting forward or backwards, respectively.

        * editing/VisibleUnits.cpp:
        (WebCore::atBoundaryOfGranularity):

2019-12-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add initial support for line-break: anywhere
        https://bugs.webkit.org/show_bug.cgi?id=205278
        <rdar://problem/57969694>

        Reviewed by Antti Koivisto.

        1. There is a soft wrap opportunity around every typographic character unit.
        2. The different wrapping opportunities must not be prioritized. Hyphenation is not applied.

        Fix imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-002.html.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isTextSplitAtArbitraryPositionAllowed):
        (WebCore::Layout::LineBreaker::Content::isAtSoftWrapOpportunity):

2019-12-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Rename LineBuilder::m_skipAlignment to LineBuilder::m_intrinsicWidthLine
        https://bugs.webkit.org/show_bug.cgi?id=205257
        <rdar://problem/57955958>

        Reviewed by Antti Koivisto.

        It's going to be used for hanging glyphs.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::alignContentHorizontally const):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        * layout/inlineformatting/InlineLineBuilder.h:

2019-12-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Should use the term collapsed/collapsible instead of trimmed/trimmable
        https://bugs.webkit.org/show_bug.cgi?id=205255
        <rdar://problem/57954672>

        Reviewed by Antti Koivisto.

        While trimming is also a spec term, collapsible is closer to the spec language.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::shouldKeepEndOfLineWhitespace):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::Content::append):
        (WebCore::Layout::LineBreaker::Content::reset):
        (WebCore::Layout::LineBreaker::Content::shrink):
        (WebCore::Layout::LineBreaker::Content::TrailingCollapsibleContent::reset):
        (WebCore::Layout::LineBreaker::Content::trim): Deleted.
        (WebCore::Layout::LineBreaker::Content::TrailingTrimmableContent::reset): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::Content::nonCollapsibleWidth const):
        (WebCore::Layout::LineBreaker::Content::hasTrailingCollapsibleContent const):
        (WebCore::Layout::LineBreaker::Content::isTrailingContentFullyCollapsible const):
        (WebCore::Layout::LineBreaker::Content::nonTrimmableWidth const): Deleted.
        (WebCore::Layout::LineBreaker::Content::hasTrailingTrimmableContent const): Deleted.
        (WebCore::Layout::LineBreaker::Content::isTrailingContentFullyTrimmable const): Deleted.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent):
        (WebCore::Layout::LineBuilder::collectHangingContent):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::CollapsibleContent::CollapsibleContent):
        (WebCore::Layout::LineBuilder::CollapsibleContent::append):
        (WebCore::Layout::LineBuilder::CollapsibleContent::collapse):
        (WebCore::Layout::LineBuilder::CollapsibleContent::collapseTrailingRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsibleWhitespace const):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::TrimmableContent): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::append): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::trim): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::trailingCollapsibleWidth const):
        (WebCore::Layout::LineBuilder::isTrailingRunFullyCollapsible const):
        (WebCore::Layout::LineBuilder::CollapsibleContent::isTrailingRunFullyCollapsible const):
        (WebCore::Layout::LineBuilder::CollapsibleContent::isTrailingRunPartiallyCollapsible const):
        (WebCore::Layout::LineBuilder::CollapsibleContent::reset):
        (WebCore::Layout::LineBuilder::trailingTrimmableWidth const): Deleted.
        (WebCore::Layout::LineBuilder::isTrailingRunFullyTrimmable const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::width const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::firstRunIndex): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::isEmpty const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunFullyTrimmable const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunPartiallyTrimmable const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::reset): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

2019-12-16  youenn fablet  <youenn@apple.com>

        SecurityOrigin should be unique for null blob URLs that have been unregistered
        https://bugs.webkit.org/show_bug.cgi?id=205169

        Reviewed by Darin Adler.

        In case we cannot retrieve a cached origin for a null origin, just create a unique one.
        This is better than having an origin with an empty host and empty scheme.

        Test: http/tests/security/blob-null-url-location-origin.html

        * fileapi/ThreadableBlobRegistry.cpp:
        (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
        (WebCore::ThreadableBlobRegistry::getCachedOrigin):

2019-12-15  Emilio Cobos Álvarez  <emilio@crisal.io>

        CSSParserMode::HTMLAttributeMode is unused.
        https://bugs.webkit.org/show_bug.cgi?id=205247

        Reviewed by Antti Koivisto.

        We parse HTML attributes with regular quirks mode parsing mode.
        Internal properties work anyway as we pass CSSPropertyID directly.

        No new tests, no behavior change.

        * css/parser/CSSParserMode.h:
        (WebCore::isQuirksModeBehavior):
        (WebCore::isUnitLessValueParsingEnabledForMode):

2019-12-15  Emilio Cobos Álvarez  <emilio@crisal.io>

        Remove -webkit-marquee.
        https://bugs.webkit.org/show_bug.cgi?id=117769

        Reviewed by Simon Fraser.

        This doesn't simplify the code so much yet but makes the CSS properties not
        accessible by web content, which means that how marquee is implemented is now an
        implementation detail that WebKit can change.

        Had to keep some of parsing code because addHTMLLengthToStyle uses the
        CSS parser, which is a bit unfortunate. But we can avoid dealing with
        identifiers so it can be simplified a bit, and similarly we can avoid
        having a shorthand altogether.

        Covered by existing tests that are being modified to reflect the
        change.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSProperties.json:
        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getPropertyValue const):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        (WebCore::CSSPropertyParser::parseShorthand):

2019-12-14  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fix various non-unified build issues introduced since r251698
        https://bugs.webkit.org/show_bug.cgi?id=204891

        Reviewed by Alex Christensen.

        No new tests needed.

        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: Add missing inclusion of
        markup.h
        * accessibility/AccessibilityObject.cpp: Add missing inclusion of RenderInline.h
        * animation/WebAnimationUtilities.cpp: Add missing inclusion of Animation.h
        * animation/WebAnimationUtilities.h: Add inclusion of wtf/Forward.h to ensure that
        WTF::String is declared.
        * css/DOMCSSNamespace.cpp: Add missing inclusion of Document.h
        * dom/WindowEventLoop.cpp: Add missing inclusion of SecurityOrigin.h
        * dom/WindowEventLoop.h: Add forward declaration of SecurityOrigin
        * layout/displaytree/DisplayInlineContent.cpp: Move ENABLE(LAYOUT_FORMATTING_CONTEXT) guard
        after inclusion of config.h, to ensure that the ENABLE() macro is defined before being used.
        * loader/ProgressTracker.h: Add missing inclusion of wtf/UniqueRef.h
        * page/LoggedInStatus.cpp: Add missing inclusion of wtf/text/StringConcatenateNumbers.h
        * page/PageConfiguration.cpp: Add missing inclusions of AlternativeTextClient.h and
        PlugInClient.h
        * rendering/RenderFlexibleBox.cpp: Add missing inclusion of wtf/SetForScope.h
        * rendering/updating/RenderTreeBuilderBlock.h: Add missing forward declaration of
        RenderBlockFlow.
        * rendering/updating/RenderTreeBuilderBlockFlow.h: Add missing forward declaration of
        RenderBlockFlow.
        * rendering/updating/RenderTreeBuilderMultiColumn.h: Add missing forward declaration of
        RenderMultiColumnFlow.
        * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp: Add missin inclusion of
        RenderView.h
        * style/StyleBuilder.cpp: Add missing inclusion of HTMLElement.h
        * style/StyleBuilderState.cpp: Ditto.
        * style/StyleScopeRuleSets.h: Move forward declaration of InspectorCSSOMWrappers into the
        Style namespace, where it belongs; add missing namespace prefix in appendAuthorStyleSheets()
        declaration.

2019-12-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add basic support for hanging content
        https://bugs.webkit.org/show_bug.cgi?id=205252
        <rdar://problem/57947773>

        Reviewed by Antti Koivisto.

        Collect the hanging content after collapsing trailing whitespace and adjust
        the available space when computing the extra width for horizontal alignment.

        IFC passes imported/w3c/web-platform-tests/css/css-text/ directory now.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentHorizontally const):
        (WebCore::Layout::LineBuilder::collectHangingContent):
        (WebCore::Layout::LineBuilder::appendTextContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::HangingContent::width const):
        (WebCore::Layout::LineBuilder::HangingContent::isConditional const):
        (WebCore::Layout::LineBuilder::HangingContent::setIsConditional):
        (WebCore::Layout::LineBuilder::HangingContent::expand):
        (WebCore::Layout::LineBuilder::HangingContent::reset):

2019-12-15  Emilio Cobos Álvarez  <emilio@crisal.io>

        [GStreamer] Fix silly bug in GStreamerVideoFrameLibWebRTC.
        https://bugs.webkit.org/show_bug.cgi?id=205248

        Reviewed by Philippe Normand.

        Binary operators in C++ don't work like in JavaScript, so this was always
        passing 1.

        No new tests, no observable behavior change.

        * platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:
        (WebCore::GStreamerVideoFrameLibWebRTC::ToI420):

2019-12-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html
        https://bugs.webkit.org/show_bug.cgi?id=205246
        <rdar://problem/57944015>

        Reviewed by Antti Koivisto.

        Fix the "soft wrap opportunity" case when both the incoming and the previous runs are whitespace.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::Content::isAtSoftWrapOpportunity):

2019-12-15  Zalan Bujtas  <zalan@apple.com>

        Unreviewed, address review comments missed in the initial commit.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wrapTextContent const):
        * layout/inlineformatting/InlineLineBreaker.h:

2019-12-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-006.html
        https://bugs.webkit.org/show_bug.cgi?id=205245
        <rdar://problem/57943885>

        Reviewed by Antti Koivisto.

        Line breaking should be able to differentiate 
        1. the case when the candidate content's first character does not fit the line
        2. and when the candidate content has multiple runs and 
          (a) the overflow run is not the first one
          (b) it can't be wrapped and we fall back to the first run in the list
        In both cases wordBreakingBehavior returns { 0, { } }, where 0 is the trailing run index (first run) and the nullopt indicates
        that there's no partial content.

        Introduce TextWrappingContext to be able to tell these cases apart. 

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wrapTextContent const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:

2019-12-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Introduce LineBreaker::PartialRun
        https://bugs.webkit.org/show_bug.cgi?id=205244
        <rdar://problem/57943825>

        Reviewed by Antti Koivisto.

        Use PartialRun instead of LeftSide and also use it as optional in PartialTrailingContent.
        This is in preparation for fixing "break-spaces" failing cases.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

2019-12-14  Per Arne Vollan  <pvollan@apple.com>

        Map CSS value ID to system color in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=204314
        <rdar://problem/57295392>

        Reviewed by Brent Fulgham.

        Currently, RenderThemeIOS is mapping CSS value IDs to system colors in the WebContent process. This mapping leads to
        invoking selectors on UITraitCollection and UIColor, which will send messages to the runningboard daemon. Since we
        will be blocking access to this daemon in the WebContent process, this mapping should be moved to the UI process.
        The UI process will create a mapping between CSS value IDs and system colors, and pass it to the WebContent process.

        No new tests, covered by existing tests.

        * WebCore.xcodeproj/project.pbxproj:
        * rendering/CSSValueKey.h: Added.
        (WebCore::operator==):
        (WebCore::CSSValueKey::encode const):
        (WebCore::CSSValueKey::decode):
        (WebCore::CSSValueKey::hash const):
        (WTF::CSSValueKeyHash::hash):
        (WTF::CSSValueKeyHash::equal):
        (WTF::HashTraits<WebCore::CSSValueKey>::emptyValue):
        (WTF::HashTraits<WebCore::CSSValueKey>::constructDeletedValue):
        (WTF::HashTraits<WebCore::CSSValueKey>::isDeletedValue):
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::cssValueIDSelectorList):
        (WebCore::systemColorFromCSSValueID):
        (WebCore::globalCSSValueToSystemColorMap):
        (WebCore::RenderThemeIOS::createCSSValueToSystemColorMap):
        (WebCore::RenderThemeIOS::setCSSValueToSystemColorMap):
        (WebCore::RenderThemeIOS::systemColor const):

2019-12-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
        https://bugs.webkit.org/show_bug.cgi?id=205237
        <rdar://problem/57940108>

        Reviewed by Antti Koivisto.

        "white-space: break-spaces" : A line breaking opportunity exists after every preserved white space character,
        including between white space characters.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::Content::isAtSoftWrapOpportunity):

2019-12-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Rename LineBreaker::Content::isAtContentBoundary to isAtSoftWrapOpportunity
        https://bugs.webkit.org/show_bug.cgi?id=205235
        <rdar://problem/57939955>

        Reviewed by Antti Koivisto.

        The "soft wrap opportunity" is closer to the spec term.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::endsWithSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::Content::isAtSoftWrapOpportunity):
        (WebCore::Layout::LineBreaker::Content::append):
        (WebCore::Layout::endsWithBreakingOpportunity): Deleted.
        (WebCore::Layout::LineBreaker::Content::isAtContentBoundary): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):

2019-12-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for white-space: break-spaces
        https://bugs.webkit.org/show_bug.cgi?id=205234
        <rdar://problem/57938253>

        Reviewed by Antti Koivisto.

        "For break-spaces, a soft wrap opportunity exists after every space and every tab."
        There are a few different ways to deal with breakable whitespace content.
        The current approach is to split them into individual InlineTextItems so that
        line breaking sees them as individual runs so that it never needs to split them in
        case of overflow.

        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::shouldPreserveTrailingWhitespace):

2019-12-14  David Kilzer  <ddkilzer@apple.com>

        Add release assert for selectedIndex in WebKit::WebPopupMenu::show()
        <https://webkit.org/b/205223>
        <rdar://problem/57929078>

        Reviewed by Wenson Hsieh.

        * platform/PopupMenu.h:
        (WebCore::PopupMenu::show):
        - Rename `index` parameter to `selectedIndex`.

2019-12-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add text-indent support
        https://bugs.webkit.org/show_bug.cgi?id=205231
        <rdar://problem/57932746>

        Reviewed by Antti Koivisto.

        This property specifies the indentation applied to lines of inline content in a block.
        The indent is treated as a margin applied to the start edge of the line box.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::computedTextIndent const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):

2019-12-13  Sunny He  <sunny_he@apple.com>

        Nullptr crash if SVG element if element parent becomes document node
        https://bugs.webkit.org/show_bug.cgi?id=205217

        Reviewed by Ryosuke Niwa.

        Test: svg/dom/replaceChild-document-crash.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::layoutOverflowRectForPropagation const):
        * rendering/svg/RenderSVGText.cpp:
        (WebCore::RenderSVGText::layout):

2019-12-13  Brady Eidson  <beidson@apple.com>

        Refactor ScriptController's proliferation of ExceptionDetails*.
        https://bugs.webkit.org/show_bug.cgi?id=205151

        Reviewed by Alex Christensen.

        No new tests (Refactor, no behavior change).

        There's so many ExceptionDetails* null pointers being passed around in the ScriptController
        family of functions.

        Let's make it a little more explicit which callers get exceptions and which don't.


        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):

        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute):

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluateInWorldIgnoringException):
        (WebCore::ScriptController::evaluateInWorld):
        (WebCore::ScriptController::evaluateIgnoringException):
        (WebCore::ScriptController::executeScriptInWorldIgnoringException):
        (WebCore::ScriptController::executeScriptInWorld):
        (WebCore::ScriptController::executeUserAgentScriptInWorld):
        (WebCore::ScriptController::executeScriptIgnoringException):
        (WebCore::ScriptController::executeIfJavaScriptURL):
        (WebCore::ScriptController::evaluate): Deleted.
        (WebCore::ScriptController::executeScript): Deleted.
        * bindings/js/ScriptController.h:
        
        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
        
        * dom/Document.cpp:
        (WebCore::Document::ensurePlugInsInjectedScript):
        
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::executeClassicScript):
        
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
        
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
        (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
        
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
        
        * loader/ContentFilter.cpp:
        (WebCore::ContentFilter::didDecide):
        
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptImmediately):
        
        * xml/XMLTreeViewer.cpp:
        (WebCore::XMLTreeViewer::transformDocumentToTreeView):

2019-12-13  Eric Carlson  <eric.carlson@apple.com>

        Add remote media player message to load and play
        https://bugs.webkit.org/show_bug.cgi?id=205220
        <rdar://problem/57927486>

        Reviewed by Jer Noble.

        No new tests. Tested manually because it is not possible to test on a bot yet.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::loadWithNextMediaEngine): Call the new method prepareForPlayback
        instead of making four calls to set properties on a new player.
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::load): Add a load variant that takes a URL,
        contentType, and keySystem.
        (WebCore::MediaPlayerPrivateInterface::prepareForPlayback):

2019-12-13  James Darpinian  <jdarpinian@chromium.org>

        ANGLE: fix blending with alpha:false context
        https://bugs.webkit.org/show_bug.cgi?id=205218

        Fixes WebGL conformance test context-hidden-alpha.html.

        Reviewed by Alex Christensen.

        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
            Specify internalformat GL_RGB instead of GL_BGRA_EXT when alpha is disabled.

2019-12-13  Jer Noble  <jer.noble@apple.com>

        Unreviewed 32-bit build fix: explicitly cast the bitrate to an int when creating a JSON
        object for logging purposes.

        * platform/mediacapabilities/MediaCapabilitiesLogging.cpp:
        (WebCore::toJSONObject):

2019-12-13  Dean Jackson  <dino@apple.com>

        MacCatalyst build of libANGLE is installed in the incorrect location
        https://bugs.webkit.org/show_bug.cgi?id=205219
        <rdar://problem/57713353>

        Reviewed by Simon Fraser.

        The location that WebCore was looking for embedded libraries was
        incorrect for Catalyst builds. We never noticed because until now
        there were no embedded libraries, and local builds all go into
        the same location so this would only happen on Production builds.

        Also, libANGLE became libANGLE-shared.

        * Configurations/WebCore.xcconfig: Link with libANGLE's new name, and
        look in the correct directory.

2019-12-13  Myles C. Maxfield  <mmaxfield@apple.com>

        [watchOS] Apple.com is rendered in Times New Roman
        https://bugs.webkit.org/show_bug.cgi?id=205179
        <rdar://problem/57233936>

        Reviewed by Tim Horton.

        We should just make watchOS use the same font lookup attributes as iOS and macOS.

        Test: fast/text/smiley-local-font-src.html

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontDatabase::fontForPostScriptName):

2019-12-13  Chris Dumez  <cdumez@apple.com>

        Implement PostMessageOptions for postMessage
        https://bugs.webkit.org/show_bug.cgi?id=191028

        Reviewed by Alex Christensen.

        Implement PostMessageOptions dictionary parameter for postMessage:
        - https://github.com/whatwg/html/issues/3799
        - https://github.com/w3c/ServiceWorker/pull/1344

        Blink and Gecko already support this.

        No new tests, rebaselined existing tests.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::postMessage):
        * dom/MessagePort.h:
        * dom/MessagePort.idl:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::postMessage):
        * page/DOMWindow.h:
        (WebCore::WindowPostMessageOptions::WindowPostMessageOptions):
        * page/DOMWindow.idl:
        * page/PostMessageOptions.h: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl.
        (WebCore::PostMessageOptions::PostMessageOptions):
        * page/PostMessageOptions.idl: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl.
        * workers/DedicatedWorkerGlobalScope.cpp:
        (WebCore::DedicatedWorkerGlobalScope::postMessage):
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/DedicatedWorkerGlobalScope.idl:
        * workers/Worker.cpp:
        (WebCore::Worker::postMessage):
        * workers/Worker.h:
        * workers/Worker.idl:
        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::postMessage):
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorker.idl:
        * workers/service/ServiceWorkerClient.cpp:
        (WebCore::ServiceWorkerClient::postMessage):
        * workers/service/ServiceWorkerClient.h:
        * workers/service/ServiceWorkerClient.idl:

2019-12-13  Wenson Hsieh  <wenson_hsieh@apple.com>

        Implement encoding/decoding for DisplayList::DrawNativeImage
        https://bugs.webkit.org/show_bug.cgi?id=205200

        Reviewed by Simon Fraser.

        Implements basic encoding and decoding for the DrawNativeImage drawing item, such that it can be sent and
        replayed in the GPU process. See WebKit ChangeLogs for more details. Eventually, we should avoid calling into
        drawNativeImage in the web process altogether, but for now, both DrawNativeImage and DrawImage drawing items
        rely on drawing native images into ImageBuffers. See: <https://webkit.org/b/205213>.

        * platform/graphics/NativeImage.h:

        Add a NativeImageHandle wrapper around a NativeImagePtr to make it simpler to decode and encode NativeImagePtrs
        using << and >> operators.

        * platform/graphics/displaylists/DisplayListItems.cpp:
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawNativeImage::encode const):
        (WebCore::DisplayList::DrawNativeImage::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):

2019-12-13  youenn fablet  <youenn@apple.com>

        Add support for WebIDL set-like forEach
        https://bugs.webkit.org/show_bug.cgi?id=204847

        Reviewed by Chris Dumez.

        Add support to setlike forEach as done for maplike.
        Covered by rebased binding tests and updated layout test.

        * bindings/js/JSDOMBindingInternals.js:
        (forEachWrapper):
        * bindings/js/JSDOMMapLike.cpp:
        (WebCore::forwardForEachCallToBackingMap):
        * bindings/js/JSDOMSetLike.cpp:
        (WebCore::DOMSetAdapter::clear):
        (WebCore::forwardForEachCallToBackingSet):
        * bindings/js/JSDOMSetLike.h:
        (WebCore::DOMSetAdapter::add):
        (WebCore::getAndInitializeBackingSet):
        (WebCore::forwardSizeToSetLike):
        (WebCore::forwardEntriesToSetLike):
        (WebCore::forwardKeysToSetLike):
        (WebCore::forwardValuesToSetLike):
        (WebCore::forwardForEachToSetLike):
        (WebCore::forwardClearToSetLike):
        (WebCore::forwardHasToSetLike):
        (WebCore::forwardAddToSetLike):
        (WebCore::forwardDeleteToSetLike):
        * bindings/scripts/IDLParser.pm:
        (parseSetLikeProperties):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        (WebCore::jsReadOnlySetLikePrototypeFunctionForEachBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionForEach):
        * bindings/scripts/test/JS/JSSetLike.cpp:
        (WebCore::jsSetLikePrototypeFunctionForEachBody):
        (WebCore::jsSetLikePrototypeFunctionForEach):

2019-12-13  Chris Dumez  <cdumez@apple.com>

        REGRESSION: (r251677) imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=205164
        <rdar://problem/57879042>

        Reviewed by Alex Christensen.

        Submitting a form should cancel any pending navigation scheduled by a previous submission of this form:
        - https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm (step 22.3)

        No new tests, rebaselined existing tests.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submit):
        * html/HTMLFormElement.h:
        * loader/FormSubmission.h:
        (WebCore::FormSubmission::cancel):
        (WebCore::FormSubmission::wasCancelled const):
        * loader/NavigationScheduler.cpp:

2019-12-13  John Wilander  <wilander@apple.com>

        IsLoggedIn: Abstract data type for IsLoggedIn state
        https://bugs.webkit.org/show_bug.cgi?id=205041
        <rdar://problem/56723904>

        Reviewed by Chris Dumez.

        New API tests added.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/LoggedInStatus.cpp: Added.
        (WebCore::LoggedInStatus::create):
        (WebCore::LoggedInStatus::LoggedInStatus):
        (WebCore::LoggedInStatus::setTimeToLive):
        (WebCore::LoggedInStatus::hasExpired const):
        (WebCore::LoggedInStatus::expiry const):
        * page/LoggedInStatus.h: Added.
        (WebCore::LoggedInStatus::registrableDomain const):
        (WebCore::LoggedInStatus::username const):
        (WebCore::LoggedInStatus::credentialTokenType const):
        (WebCore::LoggedInStatus::authenticationType const):
        (WebCore::LoggedInStatus::loggedInTime const):

2019-12-13  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Deny mach lookup access to "*.apple-extension-service" in the WebContent process
        https://bugs.webkit.org/show_bug.cgi?id=205134
        <rdar://problem/56984257>

        Reviewed by Brent Fulgham.

        Add method to Internals checking mach lookup access to a given XPC service name.

        Test: fast/sandbox/ios/sandbox-mach-lookup.html

        * testing/Internals.cpp:
        (WebCore::Internals::hasSandboxMachLookupAccessToXPCServiceName):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-12-13  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Sanitize HTML and image data written using clipboard.write
        https://bugs.webkit.org/show_bug.cgi?id=205188
        <rdar://problem/57612968>

        Reviewed by Darin Adler.

        Sanitizes HTML ("text/html") and image ("image/png") content when writing to the platform pasteboard using the
        clipboard API. See below for more details.

        Tests: editing/async-clipboard/sanitize-when-reading-markup.html
               editing/async-clipboard/sanitize-when-writing-image.html
               ClipboardTests.WriteSanitizedMarkup

        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded):

        Add a new helper method to sanitize `m_data` after loading finishes, but before invoking the completion handler
        to notify the data source about the clipboard data. Currently, we support writing "text/plain", "text/uri-list",
        "text/html" and "image/png"; we sanitize HTML by stripping away hidden content such as comments, script, and
        event listeners, and sanitize image data by painting it into a new graphics context and re-encoding the rendered
        contents as an image.

        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::invokeCompletionHandler):
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
        * platform/PlatformPasteboard.h:
        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::cocoaTypeToImageType):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::platformPasteboardTypeForSafeTypeForDOMToReadAndWrite):

        Adjust these helpers to map "image/png" to the platform PNG type on iOS ("public.png"). The extra
        IncludeImageTypes argument was added to avoid considering "image/png" a web-safe type for writing and reading
        when exercising DataTransfer APIs, which currently don't support reading the "image/png" MIME type. In the
        future, we should consider adding support for image sanitization when using DataTransfer.setData or
        DataTransferItemList.add, and then remove this flag.

        (WebCore::createItemProviderRegistrationList):
        * platform/mac/LegacyNSPasteboardTypes.h:

        Add an entry for legacyPNGPasteboardType on macOS, and replace one use of it in PasteboardCocoa.mm.

        (WebCore::legacyPNGPasteboardType):
        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::write):
        (WebCore::PlatformPasteboard::platformPasteboardTypeForSafeTypeForDOMToReadAndWrite):

        Likewise, map "image/png" to legacyPNGPasteboardType() on macOS, which was added above.

        (WebCore::createPasteboardItem):

2019-12-13  Chris Dumez  <cdumez@apple.com>

        Behavior of [[GetOwnProperty]] for cross-origin windows is not spec-compliant
        https://bugs.webkit.org/show_bug.cgi?id=205184

        Reviewed by Darin Adler.

        Behavior of [[GetOwnProperty]] for cross-origin windows is not spec-compliant:
        - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)

        We should be able to return frames by name, even if their name conflict with the name of a
        same-origin window property (e.g. "close"). Previously, we would throw a SecurityError in
        this case.

        No new tests, rebaselined existing test.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

2019-12-13  Eric Carlson  <eric.carlson@apple.com>

        Add infrastructure needed for playing media player in the GPU process
        https://bugs.webkit.org/show_bug.cgi?id=205094
        <rdar://problem/57815393>

        Reviewed by Youenn Fablet.

        No new tests, no functional change yet.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/ContentType.h:
        (WebCore::ContentType::encode const):
        (WebCore::ContentType::decode):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::nullLogger):
        (WebCore::nullContentTypeVector):
        (WebCore::mutableInstalledMediaEnginesVector):
        (WebCore::registerRemotePlayerCallback):
        (WebCore::RemoteMediaPlayerSupport::setRegisterRemotePlayerCallback):
        (WebCore::buildMediaEnginesVector):
        (WebCore::installedMediaEngines):
        (WebCore::addMediaEngine):
        (WebCore::MediaPlayer::mediaEngine):
        (WebCore::bestMediaEngineForSupportParameters):
        (WebCore::MediaPlayer::nextMediaEngine):
        (WebCore::MediaPlayer::create):
        (WebCore::MediaPlayer::MediaPlayer):
        (WebCore::MediaPlayer::nextBestMediaEngine):
        (WebCore::MediaPlayer::loadWithNextMediaEngine):
        (WebCore::MediaPlayer::getSupportedTypes):
        (WebCore::MediaPlayer::originsInMediaCache):
        (WebCore::MediaPlayer::clearMediaCache):
        (WebCore::MediaPlayer::clearMediaCacheForOrigins):
        (WebCore::MediaPlayer::supportsKeySystem):
        (WebCore::MediaPlayer::networkStateChanged):
        (WebCore::nextMediaEngine): Deleted.
        (WebCore::MediaPlayer::nextBestMediaEngine const): Deleted.
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaEngineSupportParameters::encode const):
        (WebCore::MediaEngineSupportParameters::decode):
        (WebCore::MediaPlayerFactory::~MediaPlayerFactory):
        (WebCore::MediaPlayerFactory::originsInMediaCache const):
        (WebCore::MediaPlayerFactory::clearMediaCache const):
        (WebCore::MediaPlayerFactory::clearMediaCacheForOrigins const):
        (WebCore::MediaPlayerFactory::supportsKeySystem const):
        (WebCore::MediaPlayer::setVideoFullscreenLayer): Deleted.
        (WebCore::MediaPlayer::size const): Deleted.
        (WebCore::MediaPlayer::invalidTime): Deleted.
        (WebCore::MediaPlayer::platformVolumeConfigurationRequired const): Deleted.
        (WebCore::MediaPlayer::contentMIMEType const): Deleted.
        (WebCore::MediaPlayer::contentTypeCodecs const): Deleted.
        (WebCore::MediaPlayer::contentMIMETypeWasInferredFromExtension const): Deleted.
        (WebCore::MediaPlayer::mediaPlayerLogIdentifier): Deleted.
        (WebCore::MediaPlayer::renderingCanBeAccelerated const): Deleted.
        (WebCore::MediaPlayer::renderingModeChanged const): Deleted.
        (WebCore::MediaPlayer::acceleratedCompositingEnabled): Deleted.
        (WebCore::MediaPlayer::activeSourceBuffersChanged): Deleted.
        (WebCore::MediaPlayer::playerContentBoxRect const): Deleted.
        (WebCore::MediaPlayer::playerContentsScale const): Deleted.
        (WebCore::MediaPlayer::shouldUsePersistentCache const): Deleted.
        (WebCore::MediaPlayer::mediaCacheDirectory const): Deleted.
        (WebCore::MediaPlayer::isVideoPlayer const): Deleted.
        (WebCore::MediaPlayer::mediaEngineUpdated): Deleted.
        (WebCore::MediaPlayer::isLooping const): Deleted.
        (WebCore::MediaPlayer::requestInstallMissingPlugins): Deleted.
        (WebCore::MediaPlayer::client const): Deleted.
        * platform/graphics/MediaPlayerEngineIdentifiers.h: Copied from Source/WebCore/platform/ContentType.h.
        (WebCore::MediaPlayerEngineIdentifiers::avFoundationEngineIdentifier):
        (WebCore::MediaPlayerEngineIdentifiers::avFoundationMSEEngineIdentifier):
        (WebCore::MediaPlayerEngineIdentifiers::avFoundationMediaStreamEngineIdentifier):
        (WebCore::MediaPlayerEngineIdentifiers::GStreamerMediaEngineIdentifier):
        (WebCore::MediaPlayerEngineIdentifiers::GStreamerMSEMediaEngineIdentifier):
        (WebCore::MediaPlayerEngineIdentifiers::holePunchMediaEngineIdentifier):
        (WebCore::MediaPlayerEngineIdentifiers::MediaFoundationMediaEngineIdentifier):
        * platform/graphics/PlatformTimeRanges.h:
        (WebCore::PlatformTimeRanges::PlatformTimeRanges): Deleted.
        (WebCore::PlatformTimeRanges::length const): Deleted.
        (WebCore::PlatformTimeRanges::Range::Range): Deleted.
        (WebCore::PlatformTimeRanges::Range::isPointInRange const): Deleted.
        (WebCore::PlatformTimeRanges::Range::isOverlappingRange const): Deleted.
        (WebCore::PlatformTimeRanges::Range::isContiguousWithRange const): Deleted.
        (WebCore::PlatformTimeRanges::Range::unionWithOverlappingOrContiguousRange const): Deleted.
        (WebCore::PlatformTimeRanges::Range::isBeforeRange const): Deleted.
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine):
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp:
        (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine):
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):

2019-12-13  Cathie Chen  <cathiechen@igalia.com>

        Fixed compile error in BaseAudioSharedUnit.h
        https://bugs.webkit.org/show_bug.cgi?id=205205

        Need to include some headers and put "#pragma once" in front.

        Unreviewed, fixed compile error.

        * platform/mediastream/mac/BaseAudioSharedUnit.h:

2019-12-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/simple-line-with-br.html
        https://bugs.webkit.org/show_bug.cgi?id=205207
        <rdar://problem/57913504>

        Reviewed by Antti Koivisto.

        Apply https://www.w3.org/TR/css-text-3/#white-space-property's matrix to end-of-the-line whitespace.
        (Keep white-space: mormal no-wrap pre-wrap and pre-line content)

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::shouldKeepEndOfLineWhitespace):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::Content::isVisuallyEmptyWhitespaceContentOnly const):
        (WebCore::Layout::isTrailingWhitespaceWithPreWrap): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):

2019-12-13  Chris Lord  <clord@igalia.com>

        Implement OffscreenCanvas.convertToBlob
        https://bugs.webkit.org/show_bug.cgi?id=202573

        Reviewed by Darin Adler.

        Implement OffscreenCanvas.convertToBlob. This also involves making
        isSupportedImageMIMETypeForEncoding safe to use off the main thread,
        and implementing OffscreenCanvas.securityOrigin.

        No new tests, these changes fix existing tests.

        * html/OffscreenCanvas.cpp:
        (WebCore::toEncodingMimeType):
        (WebCore::qualityFromDouble):
        (WebCore::OffscreenCanvas::convertToBlob):
        (WebCore::OffscreenCanvas::securityOrigin const):
        * html/OffscreenCanvas.h:
        * html/OffscreenCanvas.idl:
        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData):
        (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
        * platform/MIMETypeRegistry.h:
        (WebCore::MIMETypeRegistryThreadGlobalData::MIMETypeRegistryThreadGlobalData):
        (WebCore::MIMETypeRegistryThreadGlobalData::supportedImageMIMETypesForEncoding const):
        * platform/ThreadGlobalData.cpp:
        (WebCore::ThreadGlobalData::mimeTypeRegistryThreadGlobalData):
        * platform/ThreadGlobalData.h:
        * workers/WorkerGlobalScope.h:

2019-12-13  youenn fablet  <youenn@apple.com>

        Make DOMCacheStorage::retrieveCaches take a CompletionHandler
        https://bugs.webkit.org/show_bug.cgi?id=205204

        Reviewed by Chris Dumez.

        Covered by existing tests.

        * Modules/cache/DOMCacheEngine.cpp:
        (WebCore::DOMCacheEngine::errorToException):
        This will improve logging and will make sure we do not crash in debug in case of stopped error.
        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::retrieveCaches):
        Use of a completion handler to make sure we answer the caller, even with an error case.
        * Modules/cache/DOMCacheStorage.h:

2019-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        [HarfBuzz] WebKitWebProcess crashes when displaying a KaTeX formula
        https://bugs.webkit.org/show_bug.cgi?id=204689

        Reviewed by Carlos Alberto Lopez Perez.

        We are creating and caching an hb_font_t for the given FontPlatformData's FT_Face, but the face is not
        referenced so it is destroyed eventually while the hb_font_t is still alive. We need to keep a reference of the
        FT_Face while the hb_font_t is alive.

        * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
        (WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): Create the hb_face_t with
        hb_ft_face_create_referenced() instead of hb_ft_face_create_cached().

2019-12-13  Ali Juma  <ajuma@chromium.org>

        Crash in RenderLayerBacking::updateCompositedBounds from using cleared WeakPtr from m_backingSharingLayers
        https://bugs.webkit.org/show_bug.cgi?id=204648

        Reviewed by Simon Fraser.

        RenderLayerBacking's clearBackingSharingProviders clears layers'
        backingSharingProviders unconditionally, even when a layer's
        backingSharingProvider is some other RenderLayerBacking's owning
        layer. This leaves the layer in a state where its backingProviderLayer
        is null, even though it appears in the other RenderLayerBacking's
        m_backingSharingLayers, which leads to a crash if this layer is destroyed
        and the other RenderLayerBacking tries to use its pointer to this
        layer.

        Avoid this inconsistency by making clearBackingSharingProviders check
        whether a layer's backingSharingProvider is the current RenderLayerBacking's
        owner, before clearing it.

        Test: compositing/shared-backing/move-sharing-child.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::clearBackingSharingLayerProviders):
        (WebCore::RenderLayerBacking::setBackingSharingLayers):
        (WebCore::RenderLayerBacking::clearBackingSharingLayers):

2019-12-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/simple-line-with-multiple-renderers.html
        https://bugs.webkit.org/show_bug.cgi?id=205193
        <rdar://problem/57900709>

        Reviewed by Antti Koivisto.

        Use LazyLineBreakIterator to find out if 2 (visually)adjacent non-whitespace inline items are
        on a soft breaking opportunity.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::endsWithBreakingOpportunity):
        (WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::moveToNextBreakablePosition):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::findNextBreakablePosition):
        * layout/inlineformatting/text/TextUtil.h:

2019-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        Uninitialized variables in RenderLayer
        https://bugs.webkit.org/show_bug.cgi?id=205165

        Reviewed by Simon Fraser.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer): Initialize m_isNormalFlowOnly and m_isCSSStackingContext.

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

        Unreviewed. Fix the build warnings below since r253353.
        warning: unused parameter 'foo' [-Wunused-parameter]

        Also, remove unnecessary tab spaces from Internals.h.

        No new tests, no new behavioral changes.

        * testing/Internals.cpp:
        (WebCore::Internals::hasSandboxMachLookupAccessToGlobalName):
        * testing/Internals.h:

2019-12-12  Jack Lee  <shihchieh_lee@apple.com>

        Protect lifetime of frame and frameView objects
        https://bugs.webkit.org/show_bug.cgi?id=205128

        Reviewed by Ryosuke Niwa.

        Could not write a reproducible test case for this.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::focus):
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::focusDocumentView):
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::focusDocumentView):

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

        Add logging for MediaCapabilities.decodeInfo()
        https://bugs.webkit.org/show_bug.cgi?id=205172

        Reviewed by Eric Carlson.

        Add logging for decodingInfo() that can emit string versions of both the input
        MediaConfiguration and the output MediaCapabilitiesInfo objects.

        * Modules/mediacapabilities/MediaCapabilities.cpp:
        (WebCore::MediaCapabilities::decodingInfo):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediacapabilities/MediaCapabilitiesLogging.cpp: Added.
        (WebCore::toJSONObject):
        (WebCore::toJSONString):
        (WTF::LogArgument<WebCore::VideoConfiguration>::toString):
        (WTF::LogArgument<WebCore::AudioConfiguration>::toString):
        (WTF::LogArgument<WebCore::MediaConfiguration>::toString):
        (WTF::LogArgument<WebCore::MediaDecodingConfiguration>::toString):
        (WTF::LogArgument<WebCore::MediaEncodingConfiguration>::toString):
        (WTF::LogArgument<WebCore::MediaCapabilitiesInfo>::toString):
        (WTF::LogArgument<WebCore::MediaCapabilitiesDecodingInfo>::toString):
        (WTF::LogArgument<WebCore::MediaCapabilitiesEncodingInfo>::toString):
        (WTF::LogArgument<WebCore::ColorGamut>::toString):
        (WTF::LogArgument<WebCore::HdrMetadataType>::toString):
        (WTF::LogArgument<WebCore::TransferFunction>::toString):
        (WTF::LogArgument<WebCore::MediaDecodingType>::toString):
        (WTF::LogArgument<WebCore::MediaEncodingType>::toString):
        * platform/mediacapabilities/MediaCapabilitiesLogging.h: Added.

2019-12-12  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r172814): Don't export inline SQLiteDatabase::disableThreadingChecks() method
        <https://webkit.org/b/205140>

        Reviewed by Alex Christensen.

        * platform/sql/SQLiteDatabase.h:
        (WebCore::SQLiteDatabase::disableThreadingChecks):
        Remove WEBCORE_EXPORT macro from inline method. This only seems
        to occur on Release builds with compiler optimizations disabled.

2019-12-12  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Lock-down JSGlobalObject and derived classes in IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205108

        Reviewed by Mark Lam.

        We put derived classes of JSGlobalObject in IsoSubspace in WebCore side too.

        * bindings/js/JSDOMGlobalObject.h:
        * bindings/js/JSDOMWindowBase.h:
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::globalObjectOutputConstraintSubspaceFor): Deleted.
        * bindings/js/JSDOMWrapper.h:
        * bindings/js/JSRemoteDOMWindowBase.h:
        * bindings/js/JSWindowProxy.h:
        * bindings/js/JSWorkerGlobalScopeBase.h:
        (WebCore::JSWorkerGlobalScopeBase::subspaceFor):
        * bindings/js/JSWorkletGlobalScopeBase.h:
        (WebCore::JSWorkletGlobalScopeBase::subspaceFor):
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WebCoreJSClientData.h:
        (WebCore::JSVMClientData::subspaceForJSDOMWindow):
        (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope):
        (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow):
        (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope):
        (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope):
        (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope):
        (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope):
        (WebCore::JSVMClientData::forEachOutputConstraintSpace):
        (WebCore::JSVMClientData::globalObjectOutputConstraintSpace): Deleted.
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        (GeneratePrototypeDeclaration):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        * bindings/scripts/test/JS/JSMapLike.cpp:
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
        * bindings/scripts/test/JS/JSSetLike.cpp:
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        * bindings/scripts/test/JS/JSTestException.cpp:
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::JSTestGlobalObject::subspaceForImpl):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::JSTestGlobalObject::subspaceFor):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        * bindings/scripts/test/JS/JSTestNode.cpp:
        * bindings/scripts/test/JS/JSTestObj.cpp:
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        * bridge/runtime_method.h:

2019-12-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][Integration] Paint seemingly blank runs (0 width, result of negative letter-spacing)
        https://bugs.webkit.org/show_bug.cgi?id=205114
        <rdar://problem/57837165>

        Reviewed by Antti Koivisto.

        Let's not intersect the run's rect with the damaged area when we don't yet have any paint
        overflow information (This should rather use the line box set to identify the line range to paint.)

        * layout/displaytree/DisplayInlineContent.cpp:
        (WebCore::Display:: const):

2019-12-12  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Deny mach lookup access to content filter service in the WebContent sandbox
        https://bugs.webkit.org/show_bug.cgi?id=205077

        Reviewed by Brent Fulgham.

        Add a global flag to ParentalControlsContentFilter to indicate whether the Web content filter extension has
        been consumed. If the flag has been set, there is no need to check [WebFilterEvaluator isManagedSession],
        since the flag will tell if filtering is required.

        The API test ContentFiltering.LazilyLoadPlatformFrameworks has been modified to pass after this change.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/ParentalControlsContentFilter.h:
        * platform/cocoa/ParentalControlsContentFilter.mm:
        (WebCore::ParentalControlsContentFilter::enabled):
        (WebCore::ParentalControlsContentFilter::setHasConsumedSandboxExtension):

2019-12-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/whitespace/023.html
        https://bugs.webkit.org/show_bug.cgi?id=205170
        <rdar://problem/57881365>

        Reviewed by Antti Koivisto.

        Do not try to find expansion opportunities in content with preserved whitespace.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinousContent::ContinousContent):
        (WebCore::Layout::LineBuilder::ContinousContent::append):
        (WebCore::Layout::LineBuilder::ContinousContent::close):

2019-12-12  Patrick Griffis  <pgriffis@igalia.com>

        [SOUP] Use new API for strict secure cookies
        https://bugs.webkit.org/show_bug.cgi?id=169356

        Reviewed by Michael Catanzaro.

        The new soup API implements this spec:

        https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01

        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::setCookies):

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

        [CMake] Add LibPSL::LibPSL target
        https://bugs.webkit.org/show_bug.cgi?id=205149

        Reviewed by Michael Catanzaro.

        Use LibPSL target.

        * platform/Curl.cmake:

2019-12-12  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/whitespace/simple-line-layout-tab-position.html
        https://bugs.webkit.org/show_bug.cgi?id=205160
        <rdar://problem/57876474>

        Reviewed by Antti Koivisto.

        Use the content box (and not the border box) as the start position when measuring text and also include
        the not-yet committed content.
        e.g. <pre style="padding: 100px;">text[tab character]</pre>
        When we measure the width of the [tab] character, the start position input to the text measuring is
        1. relative to the content box (0px vs 100px)
        2. includes the [text] not-yet committed content width

        This patch also ensures that we only fast-path the collapsible whitespace characters.

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):

2019-12-12  Antti Koivisto  <antti@apple.com>

        REGRESSION(r252979): Avoid unnecessary work when searching for the flow when constructing line layout iteratorAvoid unnecessary work when searching for the flow when constructing line layout iterator
        https://bugs.webkit.org/show_bug.cgi?id=205155
        <rdar://problem/57846936>

        Reviewed by Zalan Bujtas.

        We unecessarily searched the ancestor chain flow the RenderFlow. We can avoid this
        for now since we know only candidate it the direct parent.

        * rendering/line/LineLayoutTraversal.cpp:
        (WebCore::LineLayoutTraversal::lineLayoutSystemFlowForRenderer):
        (WebCore::LineLayoutTraversal::firstTextBoxFor):
        (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
        (WebCore::LineLayoutTraversal::elementBoxFor):
        (WebCore::LineLayoutTraversal::flowForText): Deleted.

2019-12-12  youenn fablet  <youenn@apple.com>

        Roll-out part of revision 253275 related to rotation handling
        https://bugs.webkit.org/show_bug.cgi?id=205156

        Unreviewed.

        These changes only work for a remote source, not a local one.
        Roll-them out until we have a proper fix.

        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::m_source):
        (WebCore::RealtimeVideoSource::sourceSettingsChanged):
        * platform/mediastream/RealtimeVideoSource.h:

2019-12-12  youenn fablet  <youenn@apple.com>

        Remove debug ASSERT in PeerConnectionBackend
        https://bugs.webkit.org/show_bug.cgi?id=205061

        Reviewed by Eric Carlson.

        Remove two wrong debug asserts.
        Move the isClosed check just before resolving/rejecting the promise since at resume time, a lot might happen,
        including closing the peer connection.
        Covered by tests no longer crashing.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::createOfferSucceeded):
        (WebCore::PeerConnectionBackend::createOfferFailed):
        (WebCore::PeerConnectionBackend::createAnswerSucceeded):
        (WebCore::PeerConnectionBackend::createAnswerFailed):
        (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
        (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
        (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
        (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
        (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
        (WebCore::PeerConnectionBackend::addIceCandidateFailed):

2019-12-11  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add a missing entry in EnumTraits<WebCore::DisplayList::ItemType>
        https://bugs.webkit.org/show_bug.cgi?id=205154
        <rdar://problem/57864862>

        Reviewed by Tim Horton.

        Add a missing `ItemType::SetCTM`. This will be tested in a future patch by enabling canvas layout tests with
        GPU process enabled.

        * platform/graphics/displaylists/DisplayListItems.h:

2019-12-11  Chris Dumez  <cdumez@apple.com>

        Trying to set toString / valueOf on a cross-origin Location object should throw a SecurityError
        https://bugs.webkit.org/show_bug.cgi?id=205143

        Reviewed by Ryosuke Niwa.

        Trying to set toString / valueOf on a cross-origin Location object should throw a SecurityError.
        We previously silently ignored those.

        No new tests, rebaselined existing test.

        fast/dom/Window/Location/location-override-toString.html also makes sure we still cannot override the
        value to location.toString (same origin).

        * bindings/js/JSLocationCustom.cpp:
        (WebCore::putCommon):

2019-12-11  Wenson Hsieh  <wenson_hsieh@apple.com>

        Implement DisplayListRecorder::Recorder::getCTM and DisplayListRecorder::Recorder::setCTM
        https://bugs.webkit.org/show_bug.cgi?id=205139

        Reviewed by Simon Fraser.

        Implements these two methods on Recorder, which are invoked from GraphicsContext::setCTM and
        GraphicsContext::getCTM, respectively. See below for more details.

        Additionally rebaselines displaylists/extent-includes-transforms.html.

        * platform/graphics/displaylists/DisplayList.h:

        Add a new type to represent the SetCTM display list item.

        (WebCore::DisplayList::Item::isStateItemType):
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::Item::sizeInBytes):
        (WebCore::DisplayList::SetCTM::SetCTM):
        (WebCore::DisplayList::SetCTM::apply const):
        (WebCore::DisplayList::operator<<):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::SetCTM::create):
        (WebCore::DisplayList::SetCTM::transform const):
        (WebCore::DisplayList::SetCTM::encode const):
        (WebCore::DisplayList::SetCTM::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):

        Add DisplayList::SetCTM, which represents a call to set the current transformation matrix on the graphics
        context. This is very similar to ConcatCTM.

        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        (WebCore::DisplayList::Recorder::setCTM):

        Set the current state's CTM to the new value. Additionally, update clipBounds by applying the inverse
        transformation matrix of the inverse of the original CTM, multiplied by the new CTM. This is because setting
        the CTM from to `B` from `A` is equivalent to multiplying `A` by `A_inverse * B`, so we want to map the clip
        rect through the inverse of this matrix, `(A_inverse * B)_inverse`.

        (WebCore::DisplayList::Recorder::getCTM):

        Return the current CTM by asking the topmost state on the stack, and ignore the IncludeDeviceScale flag for the
        time being.

        (WebCore::DisplayList::Recorder::ContextState::setCTM):
        * platform/graphics/displaylists/DisplayListRecorder.h:

2019-12-11  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add OpenJPEG find module
        https://bugs.webkit.org/show_bug.cgi?id=204657

        Reviewed by Michael Catanzaro.

        Use OpenJPEG target.

        * platform/ImageDecoders.cmake:

2019-12-11  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Combine AuthenticatorResponse and PublicKeyCredentialData
        https://bugs.webkit.org/show_bug.cgi?id=190783
        <rdar://problem/57781183>

        Reviewed by Brent Fulgham.

        This patch combines AuthenticatorResponse and PublicKeyCredentialData, and therefore renames
        PublicKeyCredentialData to AuthenticatorResponseData as well. The complexity of WebKit's CTAP
        implementation has reached the point that PublicKeyCredentialData is not appropriate to represent
        all the different type of responses from authenticators anymore. For example, authenticatorGetNextAssertion
        depends on the numberOfCredentials member from authenticatorGetAssertion response to function, but
        numberOfCredentials is not used anywhere else. Therefore, a polymorphic type is needed to
        represent different responses from authenticators instead of an uniform one, i.e., PublicKeyCredentialData.

        AuthenticatorResponse seems to be the best fit. However, there are some limitations:
        1) it is a WebIDL interface, and therefore is RefCounted. RefCounted objects cannot be serialized through
        IPC. To solve this, AuthenticatorResponseData (PublicKeyCredentialData) is kept as an intermediate type
        that is only used during IPC.
        2) it doesn't contain all the information from an actual authenticator response. To solve this, it
        has been enlarged to include all members from PublicKeyCredential. After this patch, PublicKeyCredential
        will be a thin wrapper on top of AuthenticatorResponse.

        Covered by existing tests.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Modules/webauthn/AuthenticationExtensionsClientOutputs.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
        * Modules/webauthn/AuthenticationExtensionsClientOutputs.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.idl.
        This is separated from PublicKeyCredential such that AuthenticatorResponse can include it.
        * Modules/webauthn/AuthenticatorAssertionResponse.cpp: Added.
        (WebCore::AuthenticatorAssertionResponse::create):
        (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
        (WebCore::AuthenticatorAssertionResponse::data const):
        * Modules/webauthn/AuthenticatorAssertionResponse.h:
        (WebCore::AuthenticatorAssertionResponse::create): Deleted.
        (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse): Deleted.
        * Modules/webauthn/AuthenticatorAttestationResponse.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h.
        (WebCore::AuthenticatorAttestationResponse::create):
        (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse):
        (WebCore::AuthenticatorAttestationResponse::data const):
        * Modules/webauthn/AuthenticatorAttestationResponse.h:
        (WebCore::AuthenticatorAttestationResponse::create): Deleted.
        (WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse): Deleted.
        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinator::create const):
        (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
        * Modules/webauthn/AuthenticatorCoordinatorClient.h:
        * Modules/webauthn/AuthenticatorResponse.cpp: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp.
        (WebCore::AuthenticatorResponse::tryCreate):
        (WebCore::AuthenticatorResponse::data const):
        (WebCore::AuthenticatorResponse::extensions const):
        (WebCore::AuthenticatorResponse::setClientDataJSON):
        (WebCore::AuthenticatorResponse::clientDataJSON const):
        (WebCore::AuthenticatorResponse::AuthenticatorResponse):
        * Modules/webauthn/AuthenticatorResponse.h:
        (WebCore::AuthenticatorResponse::rawId const):
        (WebCore::AuthenticatorResponse::setExtensions):
        (WebCore::AuthenticatorResponse::AuthenticatorResponse): Deleted.
        (WebCore::AuthenticatorResponse::clientDataJSON const): Deleted.
        * Modules/webauthn/AuthenticatorResponseData.h: Renamed from Source/WebCore/Modules/webauthn/PublicKeyCredentialData.h.
        (WebCore::AuthenticatorResponseData::encode const):
        (WebCore::AuthenticatorResponseData::decode):
        * Modules/webauthn/PublicKeyCredential.cpp:
        (WebCore::PublicKeyCredential::create):
        (WebCore::PublicKeyCredential::rawId const):
        (WebCore::PublicKeyCredential::getClientExtensionResults const):
        (WebCore::PublicKeyCredential::PublicKeyCredential):
        (WebCore::PublicKeyCredential::tryCreate): Deleted.
        * Modules/webauthn/PublicKeyCredential.h:
        * Modules/webauthn/PublicKeyCredential.idl:
        * Modules/webauthn/fido/DeviceResponseConverter.cpp:
        (fido::readCTAPMakeCredentialResponse):
        (fido::readCTAPGetAssertionResponse):
        * Modules/webauthn/fido/DeviceResponseConverter.h:
        A more appropriate derived type of AuthenticatorResponse is used to replace PublicKeyCredentialData.
        * Modules/webauthn/fido/U2fResponseConverter.cpp:
        (fido::readU2fRegisterResponse):
        (fido::readU2fSignResponse):
        * Modules/webauthn/fido/U2fResponseConverter.h:
        A more appropriate derived type of AuthenticatorResponse is used to replace PublicKeyCredentialData.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-12-11  Eric Carlson  <eric.carlson@apple.com>

        Add encoders for MediaPlayerEnum enums
        https://bugs.webkit.org/show_bug.cgi?id=205125
        <rdar://problem/57842985>

        Reviewed by Dean Jackson.

        No new tests, no functional change.

        * Modules/encryptedmedia/CDM.cpp:
        (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::setPrivateAndOpen):
        (WebCore::MediaSource::seekToTime):
        (WebCore::MediaSource::monitorSourceBuffers):
        (WebCore::MediaSource::streamEndedWithError):
        (WebCore::MediaSource::isTypeSupported):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removeCodedFrames):
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::parseAttribute):
        (WebCore::HTMLMediaElement::canPlayType const):
        (WebCore::HTMLMediaElement::selectMediaResource):
        (WebCore::HTMLMediaElement::loadResource):
        (WebCore::HTMLMediaElement::mediaLoadingFailedFatally):
        (WebCore::HTMLMediaElement::mediaLoadingFailed):
        (WebCore::HTMLMediaElement::setNetworkState):
        (WebCore::HTMLMediaElement::seekWithTolerance):
        (WebCore::HTMLMediaElement::movieLoadType const):
        (WebCore::HTMLMediaElement::preload const):
        (WebCore::HTMLMediaElement::selectNextSourceChild):
        (WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
        (WebCore::stringForNetworkState): Deleted.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::videoFullscreenGravity const):
        (WebCore::HTMLMediaElement::preloadValue const):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::effectivePreloadForElement const):
        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
        (WebCore::VideoFullscreenModelVideoElement::requestFullscreenMode):
        (WebCore::VideoFullscreenModelVideoElement::setVideoLayerGravity):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::bestMediaEngineForSupportParameters):
        (WebCore::MediaPlayer::supportsType):
        (WebCore::MediaPlayer::networkStateChanged):
        (WebCore::convertEnumerationToString):
        * platform/graphics/MediaPlayer.h:
        * platform/graphics/MediaPlayerEnums.h:
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::hasAvailableVideoFrame const):
        (WebCore::MediaPlayerPrivateInterface::movieLoadType const):
        * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
        (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
        (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
        (WebCore::MediaPlayerPrivateAVFoundation::load):
        (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay):
        (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup const):
        (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
        (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType const):
        (WebCore::MediaPlayerPrivateAVFoundation::setPreload):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        (WebCore::MediaPlayerPrivateAVFoundation::metaDataAvailable const):
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType const):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying const):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):
        * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
        (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
        (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::readyState const):
        (WebCore::SourceBufferPrivateAVFObjC::canSwitchToType):
        * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
        (WebCore::createMediaPlayerDecodingConfigurationCocoa):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
        (WebCore::MediaPlayerPrivateGStreamer::load):
        (WebCore::MediaPlayerPrivateGStreamer::cancelLoad):
        (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
        (WebCore::MediaPlayerPrivateGStreamer::play):
        (WebCore::MediaPlayerPrivateGStreamer::setPreload):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
        (WebCore::MediaPlayerPrivateGStreamer::supportsType):
        (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag):
        (WebCore::MediaPlayerPrivateGStreamer::movieLoadType const):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (dumpReadyState):
        (WebCore::MediaPlayerPrivateGStreamerMSE::load):
        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::setReadyState):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
        (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
        (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp:
        (WebCore::MediaPlayerPrivateHolePunch::supportsType):
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
        (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
        (WebCore::MediaPlayerPrivateMediaFoundation::load):
        (WebCore::MediaPlayerPrivateMediaFoundation::updateReadyState):
        (WebCore::MediaPlayerPrivateMediaFoundation::onSessionEnded):
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerLayer setVideoGravity:]):
        * platform/mac/VideoFullscreenInterfaceMac.mm:
        (-[WebVideoFullscreenInterfaceMacObjC setUpPIPForVideoView:withFrame:inWindow:]):
        (-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::MockMediaPlayerMediaSource::supportsType):
        (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
        * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
        (WebCore::MockMediaSourcePrivate::addSourceBuffer):
        (WebCore::MockMediaSourcePrivate::markEndOfStream):
        * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
        (WebCore::MockSourceBufferPrivate::readyState const):
        (WebCore::MockSourceBufferPrivate::canSwitchToType):

2019-12-11  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: Introduce WebIDBServer class
        https://bugs.webkit.org/show_bug.cgi?id=205095

        Reviewed by Alex Christensen.

        No behavior change.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::create):
        * Modules/indexeddb/server/IDBServer.h:

2019-12-11  Don Olmstead  <don.olmstead@sony.com>

        [CMake] Add HarfBuzz targets
        https://bugs.webkit.org/show_bug.cgi?id=205042

        Reviewed by Konstantin Tokarev.

        Use the HarfBuzz targets directly instead of HARFBUZZ_LIBRARIES and
        HARFBUZZ_INCLUDE_DIRS.

        * platform/FreeType.cmake:

2019-12-11  Chris Dumez  <cdumez@apple.com>

        [Bindings] Cross-origin checks happen too late for overloaded methods
        https://bugs.webkit.org/show_bug.cgi?id=205092

        Reviewed by Sam Weinig.

        Cross-origin checks happen too late for overloaded methods. We're supposed to do the security check
        and then find the right overload to call [1]. In our bindings, we first find the right overload body
        to call and then do the security check in the body of the chosen overload. This results in the wrong
        exception being thrown in some cases (TypeError due to missing arguments instead of a SecurityError).

        [1] https://heycam.github.io/webidl/#dfn-create-operation-function

        No new tests, updated existing tests.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateOperationBodyDefinition):
        (GenerateOperationDefinition):

2019-12-11  Wenson Hsieh  <wenson_hsieh@apple.com>

        Make incremental builds faster after modifying DisplayListItems.h
        https://bugs.webkit.org/show_bug.cgi?id=205032

        Reviewed by Tim Horton.

        Move the declaration of DisplayList::Item currently in DisplayListItems.h out into DisplayList.h, such that
        adding or modifying encoding and decoding logic in DisplayListItems.h dirties fewer source files when
        rebuilding.

        * Headers.cmake:
        * platform/graphics/displaylists/DisplayList.h:
        (WebCore::DisplayList::Item::type const):
        (WebCore::DisplayList::Item::isDrawingItem const):
        (WebCore::DisplayList::Item::isStateItem const):
        (WebCore::DisplayList::Item::isStateItemType):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::Item::type const): Deleted.
        (WebCore::DisplayList::Item::isDrawingItem const): Deleted.
        (WebCore::DisplayList::Item::isStateItem const): Deleted.
        (WebCore::DisplayList::Item::isStateItemType): Deleted.

2019-12-11  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: export some functions in WebCore
        https://bugs.webkit.org/show_bug.cgi?id=205081

        Reviewed by Alex Christensen.

        We will need these in https://bugs.webkit.org/show_bug.cgi?id=203690.

        No behavior change.

        * Modules/indexeddb/IDBKeyData.h:
        * Modules/indexeddb/IDBKeyRangeData.h:
        * Modules/indexeddb/IDBValue.h:
        * Modules/indexeddb/shared/IDBCursorInfo.h:
        * Modules/indexeddb/shared/IDBError.h:
        * Modules/indexeddb/shared/IDBGetAllRecordsData.h:
        * Modules/indexeddb/shared/IDBGetRecordData.h:
        * Modules/indexeddb/shared/IDBIterateCursorData.h:
        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
        * Modules/indexeddb/shared/IDBRequestData.h:
        * Modules/indexeddb/shared/IDBResourceIdentifier.h:
        * Modules/indexeddb/shared/IDBResultData.h:
        * Modules/indexeddb/shared/IDBTransactionInfo.h:

2019-12-11  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: remove LockHolder parameters
        https://bugs.webkit.org/show_bug.cgi?id=205076

        Reviewed by Alex Christensen.

        The LockHolder parameters were used to only ensure we have acquired a lock before using IDBBackingStore. To work
        toward https://bugs.webkit.org/show_bug.cgi?id=203690 we will not need these any more.

        No behavior change.

        * Modules/indexeddb/server/IDBBackingStore.h:
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
        (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
        (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
        (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
        (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
        (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
        (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
        (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
        (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
        (WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
        (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber):
        (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
        (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
        (WebCore::IDBServer::MemoryIDBBackingStore::infoForObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteBackingStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::close):
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
        (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::getAllRecords):
        (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::prefetchCursor):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::close):
        (WebCore::IDBServer::SQLiteIDBBackingStore::hasTransaction const):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::performStartVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performOpenCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::performActivateTransactionInBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransactionOnMainThread):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionOnMainThread):
        (WebCore::IDBServer::UniqueIDBDatabase::suspend):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-12-11  youenn fablet  <youenn@apple.com>

        (r252889) webrtc/peerconnection-page-cache.html is crashing on iOS Debug
        https://bugs.webkit.org/show_bug.cgi?id=205017
        <rdar://problem/57757026>

        Reviewed by Eric Carlson.

        HTMLMediaElement is scheduling some tasks using Timers that are not suspendable.
        This patch uses task enqueuing through the script execution context event loop which respects page cache suspend/resume logic
        for the update play state timer.
        Other timers should follow.

        Covered by tests no longer crashing in Debug mode.

        * dom/ScriptExecutionContext.h:
        (WebCore::ScriptExecutionContext::enqueueTaskForDispatcher):
        * dom/TaskSource.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::enqueueTaskForDispatcher):
        * html/HTMLMediaElement.h:
        * platform/DeferrableTask.h:
        (WebCore::DeferrableTask::DeferrableTask):
        * platform/GenericTaskQueue.h:
        (WebCore::TaskDispatcher::TaskDispatcher):
        (WebCore::TaskDispatcher::postTask):
        (WebCore::GenericTaskQueue::GenericTaskQueue):

2019-12-11  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/hyphenate-limit-lines.html
        https://bugs.webkit.org/show_bug.cgi?id=205115
        <rdar://problem/57837829>

        Reviewed by Antti Koivisto.

        Do not adjust the m_successiveHyphenatedLineCount unless it's the end of the line (either split or push).

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

2019-12-11  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move single whitespace measuring to TextUtil
        https://bugs.webkit.org/show_bug.cgi?id=205096
        <rdar://problem/57818442>

        Reviewed by Antti Koivisto.

        If the TextUtil::width() callsites pass in the InlineTextItem, we can fast-path the single whitespace
        character case (performance) and return width < 0 (correctness) when word-spacing is negative.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::inlineItemWidth):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::hyphenPositionBefore): Deleted.
        * layout/inlineformatting/text/TextUtil.h:

2019-12-11  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Partial trailing width should include the hyphen when applicable
        https://bugs.webkit.org/show_bug.cgi?id=205090
        <rdar://problem/57813491>

        Reviewed by Antti Koivisto.

        In order to properly text-align: justify the content, we need to know the final width of
        the trailing run including the injected hyphen.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):

2019-12-11  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer][MediaStream] Fix GStreamer capturer mock
        https://bugs.webkit.org/show_bug.cgi?id=205066

        - Presets where wrongly generated based on GStreamer capabilities
        - Audio capturer was not taking into account echo cancellation

        Reviewed by Philippe Normand.

        This fixes a few tests

        * platform/mediastream/RealtimeVideoCaptureSource.h:
        (WebCore::RealtimeVideoCaptureSource::canResizeVideoFrames const):
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
        * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeAudioSource::addHum):
        * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeVideoSource::presets):
        (WebCore::MockGStreamerVideoCaptureSource::generatePresets):
        * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h:
        * platform/mock/MockRealtimeVideoSource.h:

2019-12-11  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Invalid use of UTF-8 validation in ClearKey key data
        https://bugs.webkit.org/show_bug.cgi?id=205106

        Reviewed by Xabier Rodriguez-Calvar.

        media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html

        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
        (findAndSetKey): Mistakenly was using utf-8 conversions on binary
        data, which in some cases caused invalid key data being given to
        GCrypt.

2019-12-11  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Put all API related JS cells into IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205097

        Reviewed by Mark Lam.

        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::finishCreation):
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::JSDOMObject::JSDOMObject):
        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::setWindow):

2019-12-10  youenn fablet  <youenn@apple.com>

        TrackListBase does not need to be an ActiveDOMObject
        https://bugs.webkit.org/show_bug.cgi?id=205063

        Reviewed by Eric Carlson.

        Made TrackListBase a ContextDestructrionObserver instead of an ActiveDOMObject.
        No observable change of behavior.

        * html/track/AudioTrackList.cpp:
        (WebCore::AudioTrackList::activeDOMObjectName const): Deleted.
        * html/track/AudioTrackList.h:
        * html/track/AudioTrackList.idl:
        * html/track/TextTrackList.cpp:
        (WebCore::TextTrackList::activeDOMObjectName const): Deleted.
        * html/track/TextTrackList.h:
        * html/track/TextTrackList.idl:
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::TrackListBase):
        * html/track/TrackListBase.h:
        * html/track/VideoTrackList.cpp:
        (WebCore::VideoTrackList::activeDOMObjectName const): Deleted.
        * html/track/VideoTrackList.h:
        * html/track/VideoTrackList.idl:

2019-12-10  Cathie Chen  <cathiechen@igalia.com>

        Fixed Pattern.h compile error
        https://bugs.webkit.org/show_bug.cgi?id=205101

        Need to include "Image.h" to use ImageHandle.

        Unreviewed, fixed compile error.

        * platform/graphics/Pattern.h:

2019-12-10  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Win] Fix MSVC warning C4701: potentially uninitialized local variable 'x' used
        https://bugs.webkit.org/show_bug.cgi?id=205052

        Reviewed by Don Olmstead.

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::setLineCap): Zero-initialize a local variable cairoCap.
        (WebCore::Cairo::setLineJoin): Zero-initialize a local variable cairoJoin
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::shouldBlockCookies const): Added
        ASSERT_NOT_REACHED() and return false at the end of the function.

2019-12-10  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Calls to the device motion API should be done in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=204770

        Reviewed by Brent Fulgham.

        The device motion API on iOS is communicating with iohideventsystem. Since mach lookup to this daemon
        will be closed, the calls to this API should be moved from the WebContent process to the UI process.
        This patch implements forwarding of the device orientation requests to the UI process through the
        class, DeviceOrientationUpdateProvider, which is subclassed by WebDeviceOrientationUpdateProvider in
        modern WebKit. This class implements forwarding of the requests to the UI process, and receives
        device orientation updates from the UI process. An instance of this class will be shared by all
        device orientation clients on a page, and passed as part of the page configuration parameters. On
        the UI process side, the class WebDeviceOrientationUpdateProviderProxy attached to the Web page
        proxy is taking care of calling the device orientation API through the existing WebCoreMotionManager
        Objective-C class, and send device orientation updates back to the Web process. Also, use a weak
        hash set of clients in WebDeviceOrientationUpdateProvider.

        No new tests, covered by existing tests.

        * dom/Document.cpp:
        * platform/ios/DeviceMotionClientIOS.h:
        * platform/ios/DeviceMotionClientIOS.mm:
        (WebCore::DeviceMotionClientIOS::DeviceMotionClientIOS):
        (WebCore::DeviceMotionClientIOS::startUpdating):
        (WebCore::DeviceMotionClientIOS::stopUpdating):
        (WebCore::DeviceMotionClientIOS::deviceMotionControllerDestroyed):
        * platform/ios/DeviceOrientationClientIOS.mm:
        (WebCore::DeviceOrientationClientIOS::startUpdating):
        (WebCore::DeviceOrientationClientIOS::stopUpdating):
        (WebCore::DeviceOrientationClientIOS::deviceOrientationControllerDestroyed):
        * platform/ios/DeviceOrientationUpdateProvider.h:
        * platform/ios/MotionManagerClient.h:
        (WebCore::MotionManagerClient::orientationChanged):
        (WebCore::MotionManagerClient::motionChanged):
        * platform/ios/WebCoreMotionManager.h:
        * platform/ios/WebCoreMotionManager.mm:
        (-[WebCoreMotionManager addMotionClient:]):
        (-[WebCoreMotionManager removeMotionClient:]):
        (-[WebCoreMotionManager checkClientStatus]):
        (-[WebCoreMotionManager sendAccelerometerData:]):
        (-[WebCoreMotionManager sendMotionData:withHeading:]):

2019-12-10  Per Arne Vollan  <pvollan@apple.com>

        Make it possible to add regression tests for blocked XPC services
        https://bugs.webkit.org/show_bug.cgi?id=204967

        Reviewed by Brent Fulgham.

        On macOS and iOS, it should be possible to add regression tests for blocked mach services. Add a method
        to Internals, which checks whether a given process has access to mach lookup for a given global service
        name. Currently, the only supported process is the WebContent process since the PIDs of other processes
        are not readily available in Internals, but support for other processes will be added when needed.

        No new tests, since this patch is in preparation for adding regression tests for sandbox changes.

        * testing/Internals.cpp:
        (WebCore::Internals::hasSandboxMachLookupAccessToGlobalName):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-12-10  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: remove timer for completed operation in IDBTransaction
        https://bugs.webkit.org/show_bug.cgi?id=205043

        Reviewed by Brady Eidson.

        Using a zero-delay Timer is slower than executing task immediately, and there is no specific reason to use a 
        Timer here.

        Covered by existing tests.

        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::IDBTransaction):
        (WebCore::IDBTransaction::operationCompletedOnServer):
        (WebCore::IDBTransaction::handleOperationsCompletedOnServer):
        (WebCore::IDBTransaction::finishedDispatchEventForRequest):
        (WebCore::IDBTransaction::scheduleCompletedOperationTimer): Deleted.
        (WebCore::IDBTransaction::completedOperationTimerFired): Deleted.
        * Modules/indexeddb/IDBTransaction.h:

2019-12-10  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Deny mach lookup access to network extension services in the WebContent sandbox
        https://bugs.webkit.org/show_bug.cgi?id=203929

        Reviewed by Brent Fulgham.

        Add a global flag to NetworkExtensionContentFilter to indicate whether network extension sandbox extensions have
        been consumed. If the flag has been set, there is no need to check NEFilterSource.filterRequired, since the flag
        will tell if filtering is required. Checking NEFilterSource.filterRequired will lead to other mach lookups which
        we are trying to avoid.

        The test ContentFiltering.LazilyLoadPlatformFrameworks has been modified.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/cocoa/NetworkExtensionContentFilter.h:
        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::enabled):

2019-12-10  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r253321.
        https://bugs.webkit.org/show_bug.cgi?id=205084

        1% regression in RAMification (Requested by yusukesuzuki on
        #webkit).

        Reverted changeset:

        "[JSC] Put JSArray in IsoSubspace"
        https://bugs.webkit.org/show_bug.cgi?id=205049
        https://trac.webkit.org/changeset/253321

2019-12-10  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Call RenderText:text() to get the rendered content instead of ::originalText()
        https://bugs.webkit.org/show_bug.cgi?id=205079
        <rdar://problem/57804297>

        Reviewed by Antti Koivisto.

        It fixes the cases when the original text content is different from the rendered content (e.g. Yen symbol).

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

2019-12-10  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC][Painting] TextRuns always have 0 left offset
        https://bugs.webkit.org/show_bug.cgi?id=205071
        <rdar://problem/57801254>

        Reviewed by Antti Koivisto.

        As the comment indicates TextRun start with the left offset of 0.
        This patch also removes some FloatRect -> LayoutRect conversions (to match SLL's painting coordinates).

        * layout/displaytree/DisplayInlineContent.cpp:
        (WebCore::Display:: const):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::computeVisualOverflow):
        (WebCore::LayoutIntegration::LineLayout::collectOverflow):
        (WebCore::LayoutIntegration::LineLayout::paint):

2019-12-10  Antti Koivisto  <antti@apple.com>

        Remove behavior that makes <br> boxes 0-height in quirks mode
        https://bugs.webkit.org/show_bug.cgi?id=205004

        Reviewed by Zalan Bujtas.

        Implementation of the <br> quirk includes zeroing its height. This has no layout or rendering effects,
        it exists purely to maintain render tree dump output for tests.

        This patch removes this behavior but maintains the render tree dump output on the RenderTreeAsText
        level (thus avoiding giant test rebasing), and makes it easier to get the same output from all paths.

        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::logicalHeight const):
        (WebCore::InlineBox::baselinePosition const):
        (WebCore::InlineBox::lineHeight const):

        Remove the hack from line boxes.

        * rendering/RenderLineBreak.cpp:
        (WebCore::RenderLineBreak::boundingBoxForRenderTreeDump const):

        Add special bounding box code for this case.
        This can be removed in future with a test rebase.

        * rendering/RenderLineBreak.h:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        * rendering/SimpleLineLayoutResolver.cpp:
        (WebCore::SimpleLineLayout::RunResolver::Run::rect const):

        Remove the hack from simple lines.

        (WebCore::SimpleLineLayout::RunResolver::RunResolver):
        * rendering/SimpleLineLayoutResolver.h:
        (WebCore::SimpleLineLayout::RunResolver::Run::baselineOffset const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::atBegin const):
        * rendering/line/LineLayoutTraversal.h:
        (WebCore::LineLayoutTraversal::Box::baselineOffset const):
        (WebCore::LineLayoutTraversal::Box::isHorizontal const):
        (WebCore::LineLayoutTraversal::Box::useLineBreakBoxRenderTreeDumpQuirk const):
        * rendering/line/LineLayoutTraversalComplexPath.h:
        (WebCore::LineLayoutTraversal::ComplexPath::isHorizontal const):
        (WebCore::LineLayoutTraversal::ComplexPath::baselineOffset const):
        (WebCore::LineLayoutTraversal::ComplexPath::useLineBreakBoxRenderTreeDumpQuirk const):
        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::DisplayRunPath::baselineOffset const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::isHorizontal const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::useLineBreakBoxRenderTreeDumpQuirk const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::lineBox const):
        * rendering/line/LineLayoutTraversalSimplePath.h:
        (WebCore::LineLayoutTraversal::SimplePath::baselineOffset const):
        (WebCore::LineLayoutTraversal::SimplePath::isHorizontal const):
        (WebCore::LineLayoutTraversal::SimplePath::useLineBreakBoxRenderTreeDumpQuirk const):

2019-12-10  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Output hyphen strings
        https://bugs.webkit.org/show_bug.cgi?id=205058

        Reviewed by Zalan Bujtas.

        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::DisplayRunPath::hasHyphen const):

2019-12-10  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/simple-line-layout-hyphenation-constrains.html
        https://bugs.webkit.org/show_bug.cgi?id=205048
        <rdar://problem/57780425>

        Reviewed by Antti Koivisto.

        Remove this hack for now and come up with a more sensible fix later if it breaks some tests.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):

2019-12-10  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/basic/005.html
        https://bugs.webkit.org/show_bug.cgi?id=205047
        <rdar://problem/57780017>

        Reviewed by Antti Koivisto.

        Remove the code that triggers the assert on negative word-spacing.
        Trimming is safe with negative values (and any negative trimmed width special handing should be in LineBreaker).

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::TrimmableContent::append):

2019-12-10  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Put JSArray in IsoSubspace
        https://bugs.webkit.org/show_bug.cgi?id=205049

        Reviewed by Mark Lam.

        RuntimeArray is inheriting JSArray. We should have separate IsoSubspace for this.

        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WebCoreJSClientData.h:
        (WebCore::JSVMClientData::runtimeArraySpace):
        * bridge/runtime_array.cpp:
        (JSC::RuntimeArray::subspaceForImpl):
        * bridge/runtime_array.h:
        (JSC::RuntimeArray::create): Deleted.
        (JSC::RuntimeArray::getLength const): Deleted.
        (JSC::RuntimeArray::getConcreteArray const): Deleted.
        (JSC::RuntimeArray::createPrototype): Deleted.
        (JSC::RuntimeArray::createStructure): Deleted.

2019-12-09  Eric Carlson  <eric.carlson@apple.com>

        Rename media in the GPU process preference
        https://bugs.webkit.org/show_bug.cgi?id=205013
        <rdar://problem/57755319>

        Reviewed by Tim Horton.

        * page/Settings.yaml:

2019-12-09  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo] Add support of Unicode surrogate pair for simple texts
        https://bugs.webkit.org/show_bug.cgi?id=205003

        Reviewed by Don Olmstead.

        FontCache::systemFallbackForCharacters of Windows port was working
        only for BMP because it's using GetFontUnicodeRanges API which
        supports only BMP. Use GetCharacterPlacement API to get glyphs for
        non-BMP.

        GlyphPage::fill of WinCairo port was working only for BMP because
        it's using GetGlyphIndices API which supports only BMP. Use
        GetCharacterPlacement API to get glyphs for non-BMP.

        This change can be tested by pixel tests, but WinCairo port
        doesn't include -expected.png files yet. Tested manually.

        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::currentFontContainsCharacterNonBMP): Added.
        (WebCore::currentFontContainsCharacter): Changed to take a string
        instead of a 16bit character.
        (WebCore::FontCache::systemFallbackForCharacters):
        * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
        (WebCore::GlyphPage::fill): Use GetCharacterPlacement for non-BMP.

2019-12-09  Megan Gardner  <megan_gardner@apple.com>

        Fill HighlightRangeGroup and HighlightMap with values from JavaScript
        https://bugs.webkit.org/show_bug.cgi?id=204934
        rdar://problem/57686335

        Reviewed by Simon Fraser.

        Fillout HighlightMap and HighlightRangeGroup with the information that we're passed from
        the JavaScript side. Make sure that the javascript objects are filled out correctly.

        Test: highlight/highlight-map-and-group.html

        * Modules/highlight/HighlightMap.cpp:
        (WebCore::HighlightMap::synchronizeBackingMap):
        (WebCore::HighlightMap::setFromMapLike):
        (WebCore::HighlightMap::clear):
        (WebCore::HighlightMap::remove):
        (WebCore::HighlightMap::getGroupForStyle):
        (WebCore::HighlightMap::addHighlightGroup): Deleted.
        (WebCore::HighlightMap::namedItem const): Deleted.
        (WebCore::HighlightMap::setNamedItem): Deleted.
        (WebCore::HighlightMap::deleteNamedProperty): Deleted.
        * Modules/highlight/HighlightMap.h:
        (WebCore::HighlightMap::backingMap):
        (WebCore::HighlightMap::synchronizeBackingMap): Deleted.
        (WebCore::HighlightMap::clear): Deleted.
        * Modules/highlight/HighlightMap.idl:
        * Modules/highlight/HighlightRangeGroup.cpp:
        (WebCore::HighlightRangeGroup::HighlightRangeGroup):
        (WebCore::HighlightRangeGroup::initializeSetLike):
        (WebCore::HighlightRangeGroup::removeFromSetLike):
        (WebCore::HighlightRangeGroup::clearFromSetLike):
        (WebCore::HighlightRangeGroup::addToSetLike):
        (WebCore::HighlightRangeGroup::addRange): Deleted.
        (WebCore::HighlightRangeGroup::removeRange): Deleted.
        (WebCore::HighlightRangeGroup::Iterator::Iterator): Deleted.
        (WebCore::HighlightRangeGroup::Iterator::next): Deleted.
        * Modules/highlight/HighlightRangeGroup.h:
        (WebCore::HighlightRangeGroup::ranges const):
        (): Deleted.
        (WebCore::HighlightRangeGroup::createIterator): Deleted.
        * Modules/highlight/HighlightRangeGroup.idl:
        * dom/StaticRange.cpp:
        (WebCore::StaticRange::operator== const):
        * dom/StaticRange.h:

2019-12-09  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r253299.

        Casued 30+ imported/ test failures on Mac wk2

        Reverted changeset:

        "Throttling requestAnimationFrame should be controlled by
        RenderingUpdateScheduler"
        https://bugs.webkit.org/show_bug.cgi?id=204713
        https://trac.webkit.org/changeset/253299

2019-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Finish encoding/decoding support for DisplayList::SetState
        https://bugs.webkit.org/show_bug.cgi?id=205018

        Reviewed by Tim Horton.

        Finishes encoding and decoding support for the `SetState` display list item. See below for more details.

        * platform/graphics/Gradient.h:
        (WebCore::Gradient::ColorStop::encode const):
        (WebCore::Gradient::ColorStop::decode):
        (WebCore::Gradient::LinearData::encode const):
        (WebCore::Gradient::LinearData::decode):
        (WebCore::Gradient::RadialData::encode const):
        (WebCore::Gradient::RadialData::decode):
        (WebCore::Gradient::ConicData::encode const):
        (WebCore::Gradient::ConicData::decode):
        (WebCore::Gradient::encode const):
        (WebCore::Gradient::decode):

        Introduce encoding and decoding support for WebCore::Gradient, and all of its constituent data members.

        * platform/graphics/GraphicsContext.h:

        Remove ShadowColorChange, which was unused; instead, shadow color changes are indicated by the ShadowChange
        flag, which also encompasses shadow offset and blur.

        * platform/graphics/Image.h:

        Move DisplayList::ImageHandle to ImageHandle in Image.h, so that it can be referenced in the encode/decode
        methods of WebCore::Pattern.

        * platform/graphics/Pattern.h:
        (WebCore::Pattern::encode const):
        (WebCore::Pattern::decode):

        Introduce encoding and decoding support for WebCore::Pattern.

        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient):

        Implement encode and decode for FillRectWithGradient, now that we're able to encode and decode Gradients.

        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::SetState::encode const):
        (WebCore::DisplayList::SetState::decode):

        Encode the remaining data members of a GraphicsContextStateChange's state. These are: strokeGradient,
        strokePattern, fillGradient, fillPattern, shadowOffset, shadowBlur, shadowColor (which was not previously being
        encoded due to ShadowColorChange never being set), strokeThickness, textDrawingMode, strokeStyle, fillRule,
        compositeOperator, blendMode, imageInterpolationQuality, shouldAntialias, shouldSmoothFonts,
        shouldSubpixelQuantizeFonts and shadowsIgnoreTransforms.

        (WebCore::DisplayList::FillRectWithGradient::encode const):
        (WebCore::DisplayList::FillRectWithGradient::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):
        (WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient): Deleted.

2019-12-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for word-break: break-word (and overflow-wrap)
        https://bugs.webkit.org/show_bug.cgi?id=205024
        <rdar://problem/57766087>

        Reviewed by Antti Koivisto.

        isTextSplitAtArbitraryPositionAllowed() returns true if the text content can just split anywhere.
        word-break: break-word behaves like that unless the line already has breaking opportunity.
        See https://www.w3.org/TR/css-text-3/#word-break-property

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isTextContentWrappingAllowed):
        (WebCore::Layout::isContentSplitAllowed):
        (WebCore::Layout::isTextSplitAtArbitraryPositionAllowed):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::isContentWrappingAllowed): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:

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

        Stop active DOM objects in removedLastRef
        https://bugs.webkit.org/show_bug.cgi?id=204975

        Reviewed by Antti Koivisto.

        Always stop active DOM objects before reaching the destructor.

        * dom/Document.cpp:
        (WebCore::Document::~Document):
        (WebCore::Document::removedLastRef):
        (WebCore::Document::commonTeardown):
        (WebCore::Document::prepareForDestruction):

2019-12-09  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler
        https://bugs.webkit.org/show_bug.cgi?id=204713

        Reviewed by Simon Fraser.

        Test: fast/animation/request-animation-frame-throttling-outside-viewport.html

        requestAnimationFrame is throttled by a timer although its callback are
        serviced by the page RenderingUpdate. This led to excessive rAF firing
        which makes it more than the preferred frame per seconds.

        The solution is to have two throttling types:

        1) Page throttling (or full throttling) which slows down all the steps of
           RenderingUpdate for the main document and all the sub-documents.
        2) Document throttling (or partial throttling) which only slows down the
           rAF of a certain document.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::animationInterval const):
        (WebCore::DocumentTimeline::updateThrottlingState): Deleted.
        * animation/DocumentTimeline.h:
        There is no need to have DocumentTimeline throttling. It is throttled 
        when the page RenderingUpdate is throttled.

        * dom/Document.cpp:
        (WebCore::Document::requestAnimationFrame):
        (WebCore::Document::updateLastHandledUserGestureTimestamp):
        LowPowerMode throttling is now handled by the page. So remove its handling
        in the Document side.

        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::ScriptedAnimationController):
        (WebCore::ScriptedAnimationController::page const):
        (WebCore::ScriptedAnimationController::interval const):
        (WebCore::ScriptedAnimationController::isThrottled const):
        (WebCore::ScriptedAnimationController::registerCallback):
        (WebCore::ScriptedAnimationController::cancelCallback):
        (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
        (WebCore::ScriptedAnimationController::scheduleAnimation):
        (WebCore::throttlingReasonToString): Deleted.
        (WebCore::throttlingReasonsToString): Deleted.
        (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
        (WebCore::ScriptedAnimationController::animationTimerFired): Deleted.
        * dom/ScriptedAnimationController.h:
        (WebCore::ScriptedAnimationController::addThrottlingReason):
        (WebCore::ScriptedAnimationController::removeThrottlingReason):
        Get rid of the rAF throttling timer. Service the rAF callback only when
        the period from the current time stamp till the last service time stamp
        is greater than the preferred rAF interval .

        * page/FrameView.cpp:
        (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
        ThrottlingReason is now defined outside ScriptedAnimationController.

        * page/Page.cpp:
        (WebCore::Page::suspendScriptedAnimations):
        (WebCore::Page::resumeScriptedAnimations):
        Use forEachDocument().

        (WebCore::Page::preferredRenderingUpdateInterval const):
        Calculate the preferred RenderingUpdate interval from the throttling
        reasons.

        (WebCore::Page::setIsVisuallyIdleInternal):
        (WebCore::Page::handleLowModePowerChange):
        Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or 
        IsVisuallyIdle is toggled.

        (WebCore::updateScriptedAnimationsThrottlingReason): Deleted.
        * page/Page.h:
        (WebCore::Page::isRenderingUpdateThrottled const):
    
        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::adjustFramesPerSecond):
        (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
        Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the
        throttling is not aggressive e.g. 10_s. Otherwise use the timer.

        (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
        Call adjustFramesPerSecond() when DisplayRefreshMonitor is created.

        (WebCore::RenderingUpdateScheduler::startTimer):
        * page/RenderingUpdateScheduler.h:

        * platform/graphics/AnimationFrameRate.h: Added.
        (WebCore::preferredFrameInterval):
        (WebCore::preferredFramesPerSecond):
        * platform/graphics/DisplayRefreshMonitor.h:
        (WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond):
    
        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::monitorForClient):
        Rename createMonitorForClient() to monitorForClient() since it may return
        a cached DisplayRefreshMonitor.

        (WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond):
        (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
        (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
        No need to call registerClient(). This function was just ensuring the
        DisplayRefreshMonitor is created. scheduleAnimation() does the same thing.

        (WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted.
        (WebCore::DisplayRefreshMonitorManager::registerClient): Deleted.
        * platform/graphics/DisplayRefreshMonitorManager.h:
        (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted.

        * platform/graphics/GraphicsLayerUpdater.cpp:
        (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
        * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
        (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]):
        Set the preferredFramesPerSecond of the CADisplayLink.

2019-12-09  Per Arne Vollan  <pvollan@apple.com>

        Unreviewed, speculative tvOS build fix after r253231.

        * platform/ios/WebCoreMotionManager.mm:
        (-[WebCoreMotionManager sendMotionData:withHeading:]):

2019-12-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] fix fast/text/simple-lines-multiple-renderers-break.html
        https://bugs.webkit.org/show_bug.cgi?id=205014
        <rdar://problem/57756348>

        Reviewed by Antti Koivisto.

        When dealing with series of runs (<span>text</span><span>content</span>) a partial content does not
        necessarily mean partial runs. The content can actually be split right at a run boundary.
        In such cases we have a partial trailing content but not a partial trailing run.

        This patch also covers the case when the overflown run can't be split and
        we attempt to find a previous breakable run (in the list of candidate runs).
        Since it's guaranteed (with the FIXME of the extremely long hyphen) that all the previous runs fit the line,
        we just pass in an infinite available width to LineBreaker::tryBreakingTextRun indicating that we only look for the last breakable position.

        e.g. <span style="word-break: break-all">breakable</span><span>and</span><span>longandunbreakablecontent</span>
        [breakable][and][longandunbreakablecontent] <- we try to commit this continuous list of runs
        [longandunbreakablecontent] <- does not fit so let's go back to the previous runs to see if any of them can be split -> [breakableand].
        result:
        breakable
        andlongandunbreakablecontent

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        * layout/inlineformatting/LineLayoutContext.h:

2019-12-07  Darin Adler  <darin@apple.com>

        Streamline PODIntervalTree code and remove ValueToString
        https://bugs.webkit.org/show_bug.cgi?id=199782

        Reviewed by Anders Carlsson.

        * dom/Element.cpp: Updated includes.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests const): Moved this
        function out of line so we don't have to include PODIntervalTree.h in the header.
        But also, it's only used inside this file. Also updated for m_cueData.
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues): More of the same.
        (WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
        (WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.
        (WebCore::HTMLMediaElement::currentlyActiveCues const): Ditto.

        * html/HTMLMediaElement.h: Changed to not include PODIntervalTree.h, which in turn
        includes PODRedBlackTree.h, to significantly cut down how many times we have to
        compile those headers. Moved some functions out of line. Made m_cueData to hold the
        two cue-related objects so they don't have to be defined in the header. Also
        removed ValueToString specializations.

        * html/track/TextTrackCue.cpp:
        (WebCore::operator<<): Added debug-only overload of TextStream operator.
        (WebCore::TextTrackCue::debugString const): Deleted.
        * html/track/TextTrackCue.h: Updated for the above.

        * html/track/VTTCue.h: Added comments about the incorrect implementation of
        isType for VTTCue. Tweaked formatting a bit as well.

        * platform/LayoutUnit.h: Removed ValueToString specialization.

        * platform/PODInterval.h: Use #pragma once. Removed inaccurate comments
        saying this works only with POD. Use TextStream instead of ValueToString.
        Added overloads to the constructor so we can do move semantics instead of
        copy semantics, slightly better for WeakPtr. Removed the toString function
        and added an overload of operator<< with TextStream. Use "{ }" instead of
        "0" as the default value for user data.

        * platform/PODIntervalTree.h: Removed unneeded includes and unusual default
        argument types for the templates. Changed setNeedsFullOrderingComparisons
        and node updating to use template arguments instead of virtual functions
        and runtime setters. This allowed removal of the constructor and the init
        function since the defaults take care of both. Removed the overload of
        the allOverlaps function that uses an out argument. Removed unneeded use
        of WTF_MAKE_NONCOPYABLE. Use "{ }" instead of 0 for the default value
        for user data. Changed the createInterval function to use move semantics.
        Changed the nextIntervalAfter function to just take a point, not require
        and interval and use its high point. The PODIntervalTree::updateNode
        function is replaced with the PODIntervalNodeUpdater::update function.
        Removed the ValueToString use and the overriding as well and replaced
        with TextStream use.

        * platform/PODRedBlackTree.h: Updated comments to reflect the fact
        that this is not specific to POD and uses TextStream. Also that the
        needsFullOrderingComparisons technique is now a template argument.
        Use pragma once. Added FIXME about a few major improvements we should
        make.
        (WebCore::PODRedBlackTree::~PODRedBlackTree): Made non-virtual since
        we use template arguments for polymorphism and don't need virtual
        functions too.
        (WebCore::PODRedBlackTree::clear): Rewrote to use a non-recursive
        algorithm to delete the tree nodes.
        (WebCore::PODRedBlackTree::add): Added an overload that takes an
        rvalue reference for move semantics.
        (WebCore::PODRedBlackTree::visitInorder const): Deleted.
        (WebCore::PODRedBlackTree::size const): Deleted.
        (WebCore::PODRedBlackTree::isEmpty const): Replaced the inefficiently
        implemented size function with this much faster function. Could have
        also made a more efficient size function, but no client needs it.
        (WebCore::PODRedBlackTree::setNeedsFullOrderingComparisons): Deleted.
        (WebCore::PODRedBlackTree::checkInvariants const): Made non-virtual
        since there is no need for polymorphism.
        (WebCore::PODRedBlackTree::Node::Node): Use rvalue reference and
        move semantics.
        (WebCore::PODRedBlackTree::Node::copyFrom): Deleted.
        (WebCore::PODRedBlackTree::Node::moveDataFrom): Use move instead of
        copy. Also removed the gratuitous use of virtual.
        (WebCore::PODRedBlackTree::updateNode): Made non-virtual and instead
        call through the NodeUpdaterType (actually more like "traits").
        (WebCore::PODRedBlackTree::treeSearch const): Use template argument
        instead of data member.
        (WebCore::PODRedBlackTree::treeSuccessor): Made a static member function.
        (WebCore::PODRedBlackTree::treeMinimum): Ditto.
        (WebCore::PODRedBlackTree::treeSuccessorInPostOrder): Added. Useful
        when deleting the tree so we visit children before deleting the parent.
        (WebCore::PODRedBlackTree::deleteNode): Use moveDataFrom when moving
        the data from a node that we are about to delete.
        (WebCore::PODRedBlackTree::visitInorderImpl const): Deleted.
        (WebCore::PODRedBlackTree::markFree): Deleted.
        (WebCore::PODRedBlackTree::Counter): Deleted.
        (WebCore::PODRedBlackTree::dumpFromNode const): Use TextStream.

        * platform/graphics/FloatPolygon.cpp:
        (WebCore::FloatPolygon::FloatPolygon): Tweaked coding style a bit.
        (WebCore::FloatPolygon::overlappingEdges const): Changed to use a return
        value instead of an out argument. Also tweaked coding style a bit.
        (WebCore::FloatPolygonEdge::debugString const): Deleted.
        (WebCore::ooperator>>): Implemented TextStream overload.

        * platform/graphics/FloatPolygon.h: Updated for above, removed
        ValueToString specialization.

        * rendering/FloatingObjects.cpp:
        (WebCore::FloatingObject::debugString const): Deleted.
        (WebCore::operator<<): Implemented TextStream overload.
        * rendering/FloatingObjects.h: Ditto. Also removed include of
        PODIntervalTree.h and used a forward declaration instead.

        * rendering/RenderBlock.cpp: Updated includes.

        * rendering/RenderFragmentContainer.cpp:
        (WebCore::RenderFragmentContainer::debugString const): Deleted.
        (WebCore::operator<<): Implemented TextStream overload.
        * rendering/RenderFragmentContainer.h: Ditto.

        * rendering/RenderFragmentedFlow.cpp:
        (WebCore::RenderFragmentedFlow::FragmentSearchAdapter::FragmentSearchAdapter):
        Moved this class here from the header, moving the one function body that was
        already here up in the file.
        (WebCore::RenderFragmentedFlow::fragmentAtBlockOffset const): Refactored and
        tweaked code sequence a bit, did not change logic.
        (WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
        Tweaked code style a bit.

        * rendering/RenderFragmentedFlow.h: Moved FragmentSearchAdapter out of the
        header, and tweaked coding style a bit. Removed ValueToString specialization.

        * rendering/shapes/PolygonShape.cpp:
        (WebCore::PolygonShape::getExcludedInterval const): Updated to use the
        return value from the overlappingEdges function rather than an out argument.

        * rendering/updating/RenderTreeBuilder.cpp: Updated includes.
        * rendering/updating/RenderTreeBuilderFirstLetter.h: Updated forward declarations.
        * rendering/updating/RenderTreeBuilderMultiColumn.cpp: Updated includes.

        * rendering/updating/RenderTreePosition.h: Removed includes of
        RenderFragmentedFlow.h, RenderText.h, and RenderView.h, since none are
        needed by this header.

        * rendering/updating/RenderTreeUpdater.cpp: Updated includes.

2019-12-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Do not create PartialContent for a single character run when it does not fit.
        https://bugs.webkit.org/show_bug.cgi?id=205010
        <rdar://problem/57752705>

        Reviewed by Antti Koivisto.

        Use ContentWrappingRule::Keep instead of ContentWrappingRule::Split when dealing with single character overflown runs on empty lines.
        <div style="width: 0px; word-break: break-all">text</div> <- produces single character runs.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::left const):
        (WebCore::Layout::InlineTextItem::right const):

2019-12-09  youenn fablet  <youenn@apple.com>

        Add an option to capture audio in GPU process
        https://bugs.webkit.org/show_bug.cgi?id=205007

        Reviewed by Eric Carlson.

        Add JS console logging of error when trying to create a MediaStream.
        Test: fast/mediastream/captureAudioInGPUProcess.html

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        * platform/mediastream/RealtimeMediaSourceCenter.cpp:
        (WebCore::RealtimeMediaSourceCenter::createMediaStream):
        * platform/mediastream/RealtimeMediaSourceCenter.h:

2019-12-09  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Hit testing
        https://bugs.webkit.org/show_bug.cgi?id=205008

        Reviewed by Zalan Bujtas.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):
        (WebCore::LayoutIntegration::LineLayout::hitTest):

        Hit test LFC.

        * layout/integration/LayoutIntegrationLineLayout.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer):

        Add Layout::Box -> RenderObject map.

        * layout/layouttree/LayoutTreeBuilder.h:
        (WebCore::Layout::LayoutTreeContent::rendererForLayoutBox const):
        (WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer): Deleted.
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::hitTestInlineChildren):

        Call into LFC hit test function.

2019-12-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix fast/text/word-break.html
        https://bugs.webkit.org/show_bug.cgi?id=204999
        <rdar://problem/57736608>

        Reviewed by Antti Koivisto.

        Keep at least one character on the line when even the first character overflows and the line is empty.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::Content::firstTextRunIndex const):
        * layout/inlineformatting/InlineLineBreaker.h:

2019-12-09  youenn fablet  <youenn@apple.com>

        fast/mediastream/mediastreamtrack-video-clone.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=205006

        Reviewed by Eric Carlson.

        Covered by test no longer flaky.

        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::RealtimeVideoSource::clone):
        When cloning the source, clone its size in addition to its settings.

2019-12-09  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Crashes in MediaPlayerPrivateGStreamer::ensureGstGLContext
        https://bugs.webkit.org/show_bug.cgi?id=204848

        Reviewed by Michael Catanzaro.

        Make sure the GL video sink uses a valid WebKit shared GL context.

        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        (ensureGstGLContext):
        (webKitGLVideoSinkProbePlatform):

2019-12-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Add encoding and decoding support for more DisplayListItems
        https://bugs.webkit.org/show_bug.cgi?id=205001

        Reviewed by Tim Horton.

        Adds boilerplate code to encode and decode the following display list items: SetLineCap, SetLineDash,
        SetLineJoin, SetMiterLimit, ClearShadow, Clip, ClipOut, ClipOutToPath, ClipPath, BeginTransparencyLayer,
        EndTransparencyLayer, DrawLine, DrawLinesForText, DrawDotsForDocumentMarker, DrawEllipse, DrawFocusRingPath,
        DrawFocusRingRects, FillRectWithRoundedHole, FillEllipse, StrokeRect, StrokePath, StrokeEllipse,
        ApplyStrokePattern, ApplyFillPattern, ApplyDeviceScaleFactor, DrawTiledImage, DrawTiledScaledImage, and
        DrawPattern.

        * platform/graphics/GraphicsContext.h:
        (WebCore::DocumentMarkerLineStyle::encode const):
        (WebCore::DocumentMarkerLineStyle::decode):
        * platform/graphics/GraphicsTypes.h:
        * platform/graphics/WindRule.h:
        * platform/graphics/displaylists/DisplayListItems.cpp:

        Additionally make a few other WebCore classes and enums encodable and decodable.

        (WebCore::DisplayList::SetLineCap::SetLineCap):
        (WebCore::DisplayList::SetLineDash::SetLineDash):
        (WebCore::DisplayList::SetLineJoin::SetLineJoin):
        (WebCore::DisplayList::SetMiterLimit::SetMiterLimit):
        (WebCore::DisplayList::ClearShadow::ClearShadow):
        (WebCore::DisplayList::Clip::Clip):
        (WebCore::DisplayList::ClipOut::ClipOut):
        (WebCore::DisplayList::ClipOutToPath::ClipOutToPath):
        (WebCore::DisplayList::ClipPath::ClipPath):
        (WebCore::DisplayList::DrawLine::DrawLine):
        (WebCore::DisplayList::DrawLinesForText::DrawLinesForText):
        (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker):
        (WebCore::DisplayList::DrawEllipse::DrawEllipse):
        (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath):
        (WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects):
        (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole):
        (WebCore::DisplayList::FillEllipse::FillEllipse):
        (WebCore::DisplayList::StrokeRect::StrokeRect):
        (WebCore::DisplayList::StrokeEllipse::StrokeEllipse):
        (WebCore::DisplayList::StrokePath::StrokePath):

        Also remove m_blockLocation from StrokePath (this member variable was unused, and seems to have been copied over
        from other drawing items).

        (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer):
        (WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer):
        (WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern):
        (WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern):
        (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::SetLineCap::encode const):
        (WebCore::DisplayList::SetLineCap::decode):
        (WebCore::DisplayList::SetLineDash::encode const):
        (WebCore::DisplayList::SetLineDash::decode):
        (WebCore::DisplayList::SetLineJoin::encode const):
        (WebCore::DisplayList::SetLineJoin::decode):
        (WebCore::DisplayList::SetMiterLimit::encode const):
        (WebCore::DisplayList::SetMiterLimit::decode):
        (WebCore::DisplayList::ClearShadow::encode const):
        (WebCore::DisplayList::ClearShadow::decode):
        (WebCore::DisplayList::Clip::encode const):
        (WebCore::DisplayList::Clip::decode):
        (WebCore::DisplayList::ClipOut::encode const):
        (WebCore::DisplayList::ClipOut::decode):
        (WebCore::DisplayList::ClipOutToPath::encode const):
        (WebCore::DisplayList::ClipOutToPath::decode):
        (WebCore::DisplayList::ClipPath::encode const):
        (WebCore::DisplayList::ClipPath::decode):
        (WebCore::DisplayList::DrawTiledImage::encode const):
        (WebCore::DisplayList::DrawTiledImage::decode):
        (WebCore::DisplayList::DrawTiledScaledImage::encode const):
        (WebCore::DisplayList::DrawTiledScaledImage::decode):
        (WebCore::DisplayList::DrawPattern::DrawPattern):
        (WebCore::DisplayList::DrawPattern::encode const):
        (WebCore::DisplayList::DrawPattern::decode):
        (WebCore::DisplayList::BeginTransparencyLayer::encode const):
        (WebCore::DisplayList::BeginTransparencyLayer::decode):
        (WebCore::DisplayList::EndTransparencyLayer::encode const):
        (WebCore::DisplayList::EndTransparencyLayer::decode):
        (WebCore::DisplayList::DrawLine::encode const):
        (WebCore::DisplayList::DrawLine::decode):
        (WebCore::DisplayList::DrawLinesForText::encode const):
        (WebCore::DisplayList::DrawLinesForText::decode):
        (WebCore::DisplayList::DrawDotsForDocumentMarker::encode const):
        (WebCore::DisplayList::DrawDotsForDocumentMarker::decode):
        (WebCore::DisplayList::DrawEllipse::encode const):
        (WebCore::DisplayList::DrawEllipse::decode):
        (WebCore::DisplayList::DrawFocusRingPath::encode const):
        (WebCore::DisplayList::DrawFocusRingPath::decode):
        (WebCore::DisplayList::DrawFocusRingRects::encode const):
        (WebCore::DisplayList::DrawFocusRingRects::decode):
        (WebCore::DisplayList::FillRectWithRoundedHole::encode const):
        (WebCore::DisplayList::FillRectWithRoundedHole::decode):
        (WebCore::DisplayList::FillEllipse::encode const):
        (WebCore::DisplayList::FillEllipse::decode):
        (WebCore::DisplayList::StrokeRect::encode const):
        (WebCore::DisplayList::StrokeRect::decode):
        (WebCore::DisplayList::StrokePath::encode const):
        (WebCore::DisplayList::StrokePath::decode):
        (WebCore::DisplayList::StrokeEllipse::encode const):
        (WebCore::DisplayList::StrokeEllipse::decode):
        (WebCore::DisplayList::ApplyStrokePattern::encode const):
        (WebCore::DisplayList::ApplyStrokePattern::decode):
        (WebCore::DisplayList::ApplyFillPattern::encode const):
        (WebCore::DisplayList::ApplyFillPattern::decode):
        (WebCore::DisplayList::ApplyDeviceScaleFactor::encode const):
        (WebCore::DisplayList::ApplyDeviceScaleFactor::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):
        (WebCore::DisplayList::SetLineCap::SetLineCap): Deleted.
        (WebCore::DisplayList::SetLineDash::SetLineDash): Deleted.
        (WebCore::DisplayList::SetLineJoin::SetLineJoin): Deleted.
        (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): Deleted.
        (WebCore::DisplayList::ClearShadow::ClearShadow): Deleted.
        (WebCore::DisplayList::Clip::Clip): Deleted.
        (WebCore::DisplayList::ClipOut::ClipOut): Deleted.
        (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): Deleted.
        (WebCore::DisplayList::ClipPath::ClipPath): Deleted.
        (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): Deleted.
        (WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer): Deleted.
        (WebCore::DisplayList::DrawLine::DrawLine): Deleted.
        (WebCore::DisplayList::DrawLinesForText::DrawLinesForText): Deleted.
        (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): Deleted.
        (WebCore::DisplayList::DrawEllipse::DrawEllipse): Deleted.
        (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): Deleted.
        (WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): Deleted.
        (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): Deleted.
        (WebCore::DisplayList::FillEllipse::FillEllipse): Deleted.
        (WebCore::DisplayList::StrokeRect::StrokeRect): Deleted.
        (WebCore::DisplayList::StrokePath::StrokePath): Deleted.
        (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): Deleted.
        (WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern): Deleted.
        (WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern): Deleted.
        (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): Deleted.

2019-12-08  Ryosuke Niwa  <rniwa@webkit.org>

        There should be one MicrotaskQueue per EventLoop
        https://bugs.webkit.org/show_bug.cgi?id=204492
        <rdar://problem/57420645>

        Reviewed by Antti Koivisto.

        This patch makes microtask queue and the microtasks for mutation observers and custom elements
        specific to each event loop so that only similar origin windows share the same microtask queue
        and mutation observer's compound microtask or custom element's backup element queue.

        As a result, we can remove the workaround we added in r247222.

        Because microtasks for mutation observers and custom elements are shared across similar origin
        window agents, we can't use any one document's task group to schedule these. Instead, we create
        a new "perpetual" task group in WindowEventLoop which is never suspended or stopped. It's the
        responsibility of mutation observer and custom elements' code to deal with suspened or stopped
        documents as it has been the case.

        See also: https://dom.spec.whatwg.org/#queue-a-mutation-observer-compound-microtask
                  https://html.spec.whatwg.org/multipage/custom-elements.html#backup-element-queue

        Test: editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content.html

        * dom/CustomElementReactionQueue.cpp:
        (WebCore::CustomElementQueue::add): Renamed from CustomElementReactionQueue::ElementQueue to
        allow forward declaration in EventLoop.h.
        (WebCore::CustomElementQueue::invokeAll): Ditto.
        (WebCore::CustomElementQueue::processQueue): Ditto.
        (WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue):
        (WebCore::CustomElementReactionQueue::processBackupQueue):
        (WebCore::CustomElementReactionQueue::ensureBackupQueue): Deleted. Moved to WindowEventLoop.
        (WebCore::CustomElementReactionQueue::backupElementQueue): Ditto.
        * dom/CustomElementReactionQueue.h:
        (WebCore::CustomElementQueue): Renamed from CustomElementReactionQueue::ElementQueue to allow
        forward declaration in EventLoop.h.
        * dom/Document.cpp:
        (WebCore::Document::finishedParsing): Removed the workaround added in r247222.
        (WebCore::Document::eventLoop):
        (WebCore::Document::windowEventLoop): Added.
        * dom/Document.h:
        * dom/MutationObserver.cpp:
        (WebCore::activeMutationObservers): Deleted. Moved to WindowEventLoop.
        (WebCore::suspendedMutationObservers): Ditto.
        (WebCore::signalSlotList): Ditto.
        (WebCore::MutationObserver::queueMutationObserverCompoundMicrotask): Ditto.
        (WebCore::MutationObserver::enqueueMutationRecord):
        (WebCore::MutationObserver::enqueueSlotChangeEvent):
        (WebCore::MutationObserver::setHasTransientRegistration):
        (WebCore::MutationObserver::notifyMutationObservers): Now takes WindowEventLoop since various
        lists and hash maps are specific to each WindowEventLoop.
        * dom/MutationObserver.h:
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::WindowEventLoop): Create m_perpetualTaskGroupForSimilarOriginWindowAgents.
        (WebCore::WindowEventLoop::microtaskQueue):
        (WebCore::WindowEventLoop::queueMutationObserverCompoundMicrotask):
        (WebCore::WindowEventLoop::backupElementQueue):
        * dom/WindowEventLoop.h:
        * editing/markup.cpp:
        (WebCore::createPageForSanitizingWebContent): Removed the workaround added in r247222.
        * page/Page.h:
        (WebCore::Page::setIsForSanitizingWebContent): Ditto.
        (WebCore::Page::isForSanitizingWebContent const): Ditto.

2019-12-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Move WebCore::Path encoders and decoders into WebCore from WebCoreArgumentCoders
        https://bugs.webkit.org/show_bug.cgi?id=204993

        Reviewed by Tim Horton.

        Move encoding and decoding logic from WebCoreArgumentCoders into WebCore. The ability to encode or decode Paths
        is needed in order to encode or decode DisplayListItems that contain Paths; since these encoders live in
        WebCore, the encoders for Paths should live there as well.

        No change in behavior.

        * platform/graphics/Path.cpp:
        * platform/graphics/Path.h:

        Also fixes up the indentation of the Path class in this header, such that the class declaration isn't indented
        one level past the namespace.

        (WebCore::Path::isNull const):
        (WebCore::Path::platformPath const):
        (WebCore::Path::circleControlPoint):
        (WebCore::Path::encode const):
        (WebCore::Path::decode):

2019-12-08  youenn fablet  <youenn@apple.com>

        Do not use DOMGuarded for maplike
        https://bugs.webkit.org/show_bug.cgi?id=204879

        Reviewed by Darin Adler.

        Update maplike according setlike model where we support syncing at creation of the JS wrapper
        and syncing whenever setlike/maplike methods are called.
        Removing DOMGuardedObject makes implementation more lightweight, there is less things to implement on DOM side
        and it allows collecting the private map to free memory if needed.

        Covered by existing tests and rebased binding tests.

        * Modules/highlight/HighlightMap.cpp:
        (WebCore::HighlightMap::initializeMapLike):
        * Modules/highlight/HighlightMap.h:
        (WebCore::HighlightMap::synchronizeBackingMap): Deleted.
        (WebCore::HighlightMap::backingMap): Deleted.
        * Modules/mediastream/RTCStatsReport.h:
        (WebCore::RTCStatsReport::create):
        (WebCore::RTCStatsReport::initializeMapLike):
        (WebCore::RTCStatsReport::RTCStatsReport):
        (WebCore::RTCStatsReport::synchronizeBackingMap): Deleted.
        (WebCore::RTCStatsReport::backingMap): Deleted.
        (WebCore::RTCStatsReport::addStats): Deleted.
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::createStatsCollector):
        * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
        (WebCore::LibWebRTCStatsCollector::~LibWebRTCStatsCollector):
        (WebCore::initializeRTCStatsReportBackingMap):
        (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
        * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
        * bindings/js/JSDOMMapLike.cpp:
        (WebCore::getBackingMap):
        (WebCore::clearBackingMap):
        (WebCore::setToBackingMap):
        (WebCore::forwardAttributeGetterToBackingMap):
        (WebCore::forwardFunctionCallToBackingMap):
        (WebCore::forwardForEachCallToBackingMap):
        (WebCore::initializeBackingMap): Deleted.
        (WebCore::createBackingMap): Deleted.
        * bindings/js/JSDOMMapLike.h:
        (WebCore::DOMMapAdapter::DOMMapAdapter):
        (WebCore::DOMMapAdapter::set):
        (WebCore::DOMMapAdapter::clear):
        (WebCore::getAndInitializeBackingMap):
        (WebCore::forwardSizeToMapLike):
        (WebCore::forwardEntriesToMapLike):
        (WebCore::forwardKeysToMapLike):
        (WebCore::forwardValuesToMapLike):
        (WebCore::forwardClearToMapLike):
        (WebCore::forwardForEachToMapLike):
        (WebCore::forwardGetToMapLike):
        (WebCore::forwardHasToMapLike):
        (WebCore::forwardSetToMapLike):
        (WebCore::forwardDeleteToMapLike):
        (): Deleted.
        (WebCore::DOMMapLike::set): Deleted.
        (WebCore::synchronizeBackingMap): Deleted.
        * bindings/js/JSDOMSetLike.cpp:
        * bindings/js/JSDOMSetLike.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLike::finishCreation):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLike::finishCreation):
        * testing/InternalsMapLike.cpp:
        (WebCore::InternalsMapLike::initializeMapLike):
        (WebCore::InternalsMapLike::synchronizeBackingMap): Deleted.
        * testing/InternalsMapLike.h:
        (WebCore::InternalsMapLike::backingMap): Deleted.

2019-12-08  youenn fablet  <youenn@apple.com>

        Support different resolutions for video tracks captured from UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=204945

        Reviewed by Eric Carlson.

        Remove whether the a source is remote or not.
        Previously we were doing the distinction as resizing would happen in WebProcess and not in UIProcess.
        We are now moving away from doing resizing in WebProcess.
        Covered by existing tests.

        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeMediaSourceFactory.h:
        * platform/mediastream/RealtimeVideoCaptureSource.cpp:
        (WebCore::RealtimeVideoCaptureSource::adaptVideoSample):
        For remote tracks, we also update the size for observers.
        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::m_source):
        (WebCore::RealtimeVideoSource::sourceSettingsChanged):
        Update computation of size based on rotation.
        This makes sure we have resizing done right.
        * platform/mediastream/RealtimeVideoSource.h:
        * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
        (WebCore::DisplayCaptureSourceCocoa::emitFrame):

2019-12-08  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Collect overflow from lines
        https://bugs.webkit.org/show_bug.cgi?id=204994

        Reviewed by Zalan Bujtas.

        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::logicalRect const):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::computeVisualOverflow):
        (WebCore::LayoutIntegration::LineLayout::collectOverflow):
        * layout/integration/LayoutIntegrationLineLayout.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):

        Connect to LFC layout.

2019-12-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Switch over to float based types in inline layout
        https://bugs.webkit.org/show_bug.cgi?id=204995
        <rdar://problem/57733349>

        Reviewed by Antti Koivisto.

        Due to the relatively significant difference between float and LayoutUnit's precision, IFC
        is unable to produce matching layout under the same constraints.
        Let's switch over to float based types until after either CLL switches over to LayoutUnit
        or LayoutUnit gains high enough precision.

        See webkit.org/b/204986 for more info.

        * layout/LayoutUnits.h:
        (WebCore::Layout::maxInlineLayoutUnit):
        * layout/Verification.cpp:
        (WebCore::Layout::areEssentiallyEqual):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentHorizontally const):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        (WebCore::Layout::LineBuilder::halfLeadingMetrics):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::inlineItemWidth):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::fixedPitchWidth):
        (WebCore::Layout::TextUtil::split):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
        (WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
        (WebCore::LayoutIntegration::LineLayout::paint):

2019-12-07  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Make ColorSpace an enum class
        https://bugs.webkit.org/show_bug.cgi?id=204970

        Reviewed by Sam Weinig.

        So it can be encoded and decoded through the IPC messages.

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
        * html/CustomPaintCanvas.cpp:
        (WebCore::CustomPaintCanvas::copiedImage const):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createImageBuffer const):
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawTextInternal):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::drawPattern):
        * platform/graphics/Color.cpp:
        (WebCore::operator<<):
        * platform/graphics/Color.h:
        (WebCore::Color::Color):
        * platform/graphics/ColorSpace.h:
        (): Deleted.
        * platform/graphics/CustomPaintImage.cpp:
        (WebCore::CustomPaintImage::drawPattern):
        * platform/graphics/ExtendedColor.cpp:
        (WebCore::ExtendedColor::create):
        (WebCore::ExtendedColor::cssText const):
        * platform/graphics/ExtendedColor.h:
        * platform/graphics/GradientImage.cpp:
        (WebCore::GradientImage::drawPattern):
        * platform/graphics/ImageBuffer.cpp:
        (WebCore::ImageBuffer::transformColorSpace):
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::createCompatibleBuffer):
        * platform/graphics/cg/ColorCG.cpp:
        (WebCore::leakCGColor):
        * platform/graphics/cg/GraphicsContextCG.h:
        (WebCore::cachedCGColorSpace):
        * platform/graphics/filters/FEFlood.h:
        * platform/graphics/filters/FELighting.cpp:
        (WebCore::FELighting::drawLighting):
        * platform/graphics/filters/FETile.cpp:
        (WebCore::FETile::platformApplySoftware):
        * platform/graphics/filters/FilterEffect.h:
        * platform/graphics/filters/SourceGraphic.h:
        (WebCore::SourceGraphic::SourceGraphic):
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::createCompatibleBuffer):
        * platform/mac/ThemeMac.mm:
        (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
        * rendering/CSSFilter.cpp:
        (WebCore::CSSFilter::buildReferenceFilter):
        (WebCore::CSSFilter::build):
        (WebCore::CSSFilter::apply):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::patternForTouchAction):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintProgressBar):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
        * rendering/svg/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::buildPrimitives const):
        (WebCore::RenderSVGResourceFilter::applyResource):
        (WebCore::RenderSVGResourceFilter::postApplyResource):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::createMaskAndSwapContextForTextGradient):
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::applyResource):
        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::createTileImage const):
        * rendering/svg/SVGRenderingContext.cpp:
        (WebCore::SVGRenderingContext::bufferForeground):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::drawPatternForContainer):
        * svg/graphics/filters/SVGFEImage.cpp:
        (WebCore::FEImage::platformApplySoftware):

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Convert InlineLayoutUnit/Point/Rect to LayoutUnit/Point/Rect when crossing inline/block boundary
        https://bugs.webkit.org/show_bug.cgi?id=204991
        <rdar://problem/57730383>

        Reviewed by Sam Weinig.

        Float -> LayoutUnit requires explicit conversion due to precision loss. Use these functions when
        feeding inline box geometry information back to block layout.

        Implicit floor will do for now (might need to call round though).

        This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

        * layout/LayoutUnits.h:
        (WebCore::Layout::toLayoutUnit):
        (WebCore::Layout::toLayoutPoint):
        (WebCore::Layout::toLayoutRect):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/displaytree/DisplayInlineContent.cpp:
        (WebCore::Display:: const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):

2019-12-07  Ryosuke Niwa  <rniwa@webkit.org>

        Unique origin's window must get its own event loop
        https://bugs.webkit.org/show_bug.cgi?id=204978

        Reviewed by Antti Koivisto.

        This patch fixes the bug that unique origin documents and documents of the same registrable domains
        with different schemes / protocols were sharing the same event loop. Note that we continue to share
        the event loop across file URI documents.

        We now use the agent cluster key to looking up the event loop to better match the HTML5 spec:
        https://html.spec.whatwg.org/multipage/webappapis.html#obtain-agent-cluster-key

        Tests: fast/eventloop/data-uri-document-has-its-own-event-loop.html
               fast/eventloop/queue-task-across-frames-in-file-uri.html
               http/tests/eventloop/documents-with-different-protocols-do-not-share-event-loop.html

        * dom/Document.cpp:
        (WebCore::Document::eventLoop):
        * dom/EventLoop.h:
        (WebCore::EventLoopTaskGroup::hasSameEventLoopAs): Added for testing purposes.
        * dom/WindowEventLoop.cpp:
        (WebCore::agentClusterKeyOrNullIfUnique): Added.
        (WebCore::WindowEventLoop::eventLoopForSecurityOrigin): Replaced ensureForRegistrableDomain.
        (WebCore::WindowEventLoop::create): Added.
        (WebCore::WindowEventLoop::WindowEventLoop):
        (WebCore::WindowEventLoop::~WindowEventLoop):
        * dom/WindowEventLoop.h:
        * testing/Internals.cpp:
        (WebCore::Internals::hasSameEventLoopAs): Added for testing purposes.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Display::LineBox should adopt to InlineLayoutUnit
        https://bugs.webkit.org/show_bug.cgi?id=204990
        <rdar://problem/57730105>

        Reviewed by Sam Weinig.

        This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::logicalTopLeft const):
        (WebCore::Display::LineBox::setLogicalTopLeft):
        * layout/displaytree/DisplayRun.h:
        (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::moveVertically):
        (WebCore::Display::Run::moveHorizontally):
        (WebCore::Display::Run::expandVertically):
        (WebCore::Display::Run::expandHorizontally):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/inlineformatting/InlineFormattingContext.h:

2019-12-07  Andres Gonzalez  <andresg_22@apple.com>

        Implementation of additional attribute caching in the IsolatedTree.
        https://bugs.webkit.org/show_bug.cgi?id=204918

        Reviewed by Chris Fleizach.

        No new tests, no new functionality. Updated several tests to fixed
        expected output.

        - Implementation of around 200 methods in the AXIsolatedObject class.
        - The pending method implementations have an ASSERT_NOT_REACHED.
        - Support for dispatching to the main thread some
        WebAccessibilityObjectWrapper methods that cannot be run in the
        secondary thread.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::createIsolatedTreeHierarchy):
        (WebCore::AXObjectCache::generateIsolatedTree):
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::ariaLabeledByText const):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::actionVerb const):
        (WebCore::AccessibilityObject::datetimeAttributeValue const):
        (WebCore::AccessibilityObject::linkRelValue const):
        (WebCore::AccessibilityObject::isInlineText const):
        (WebCore::AccessibilityObject::identifierAttribute const):
        (WebCore::AccessibilityObject::documentURI const):
        (WebCore::AccessibilityObject::documentEncoding const):
        (WebCore::AccessibilityObject::sessionID const):
        (WebCore::AccessibilityObject::tagName const):
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityText::AccessibilityText):
        (WebCore::AccessibilityObject::actionVerb const):
        * accessibility/AccessibilityObjectInterface.h: Base implementation for
        several isXXX methods that rely on the object roleValue.
        (WebCore::AXCoreObject::isImageMap const):
        (WebCore::AXCoreObject::isWebArea const):
        (WebCore::AXCoreObject::isCheckbox const):
        (WebCore::AXCoreObject::isRadioButton const):
        (WebCore::AXCoreObject::isListBox const):
        (WebCore::AXCoreObject::isSpinButton const):
        (WebCore::AXCoreObject::isSwitch const):
        (WebCore::AXCoreObject::isToggleButton const):
        (WebCore::AXCoreObject::isTabList const):
        (WebCore::AXCoreObject::isTabItem const):
        (WebCore::AXCoreObject::isRadioGroup const):
        (WebCore::AXCoreObject::isComboBox const):
        (WebCore::AXCoreObject::isTree const):
        (WebCore::AXCoreObject::isTreeGrid const):
        (WebCore::AXCoreObject::isTreeItem const):
        (WebCore::AXCoreObject::isScrollbar const):
        (WebCore::AXCoreObject::isListItem const):
        (WebCore::AXCoreObject::isCheckboxOrRadio const):
        (WebCore::AXCoreObject::isScrollView const):
        (WebCore::AXCoreObject::isCanvas const):
        (WebCore::AXCoreObject::isPopUpButton const):
        (WebCore::AXCoreObject::isColorWell const):
        (WebCore::AXCoreObject::isSplitter const):
        (WebCore::AXCoreObject::isToolbar const):
        (WebCore::AXCoreObject::isSummary const):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::accessKey const):
        (WebCore::AccessibilityRenderObject::actionVerb const):
        * accessibility/AccessibilityRenderObject.h:
        * accessibility/AccessibilitySpinButton.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::setRootNode):
        (WebCore::AXIsolatedTree::setRoot): Renamed setRootNode.
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp: Implementation of
        around 200 methods in the AXIsolatedObject class. The methods that are
        pending, have a stub implemetation with an ASSERT_NOT_REACHED.
        (WebCore::AXIsolatedObject::AXIsolatedObject):
        (WebCore::AXIsolatedObject::create):
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::setMathscripts):
        (WebCore::AXIsolatedObject::setObjectVectorProperty):
        (WebCore::AXIsolatedObject::isDetached const):
        (WebCore::AXIsolatedObject::isDetachedFromParent):
        (WebCore::AXIsolatedObject::accessibilityText const):
        (WebCore::AXIsolatedObject::classList const):
        (WebCore::AXIsolatedObject::sessionID const):
        (WebCore::AXIsolatedObject::documentURI const):
        (WebCore::AXIsolatedObject::preventKeyboardDOMEventDispatch const):
        (WebCore::AXIsolatedObject::documentEncoding const):
        (WebCore::AXIsolatedObject::insertMathPairs):
        (WebCore::AXIsolatedObject::mathPrescripts):
        (WebCore::AXIsolatedObject::mathPostscripts):
        (WebCore::AXIsolatedObject::scrollBar):
        (WebCore::AXIsolatedObject::colorValue const):
        (WebCore::AXIsolatedObject::intPointAttributeValue const):
        (WebCore::AXIsolatedObject::vectorAttributeValue const):
        (WebCore::AXIsolatedObject::optionSetAttributeValue const):
        (WebCore::AXIsolatedObject::uint64AttributeValue const):
        (WebCore::AXIsolatedObject::urlAttributeValue const):
        (WebCore::AXIsolatedObject::colorAttributeValue const):
        (WebCore::AXIsolatedObject::floatAttributeValue const):
        (WebCore::AXIsolatedObject::fillChildrenVectorForProperty const):
        (WebCore::AXIsolatedObject::replaceTextInRange):
        (WebCore::AXIsolatedObject::insertText):
        (WebCore::AXIsolatedObject::press):
        (WebCore::AXIsolatedObject::performDefaultAction):
        (WebCore::AXIsolatedObject::isAccessibilityObject const):
        (WebCore::AXIsolatedObject::isAccessibilityNodeObject const):
        (WebCore::AXIsolatedObject::isAccessibilityRenderObject const):
        (WebCore::AXIsolatedObject::isAccessibilityScrollbar const):
        (WebCore::AXIsolatedObject::isAccessibilityScrollView const):
        (WebCore::AXIsolatedObject::isAccessibilitySVGRoot const):
        (WebCore::AXIsolatedObject::isAccessibilitySVGElement const):
        (WebCore::AXIsolatedObject::containsText const):
        (WebCore::AXIsolatedObject::isAttachmentElement const):
        (WebCore::AXIsolatedObject::isNativeImage const):
        (WebCore::AXIsolatedObject::isImageButton const):
        (WebCore::AXIsolatedObject::isContainedByPasswordField const):
        (WebCore::AXIsolatedObject::passwordFieldOrContainingPasswordField):
        (WebCore::AXIsolatedObject::isNativeTextControl const):
        (WebCore::AXIsolatedObject::isNativeListBox const):
        (WebCore::AXIsolatedObject::isListBoxOption const):
        (WebCore::AXIsolatedObject::isSliderThumb const):
        (WebCore::AXIsolatedObject::isInputSlider const):
        (WebCore::AXIsolatedObject::isLabel const):
        (WebCore::AXIsolatedObject::isDataTable const):
        (WebCore::AXIsolatedObject::isImageMapLink const):
        (WebCore::AXIsolatedObject::isNativeSpinButton const):
        (WebCore::AXIsolatedObject::isSpinButtonPart const):
        (WebCore::AXIsolatedObject::isMockObject const):
        (WebCore::AXIsolatedObject::isMediaObject const):
        (WebCore::AXIsolatedObject::isARIATextControl const):
        (WebCore::AXIsolatedObject::isNonNativeTextControl const):
        (WebCore::AXIsolatedObject::isBlockquote const):
        (WebCore::AXIsolatedObject::isLandmark const):
        (WebCore::AXIsolatedObject::isFigureElement const):
        (WebCore::AXIsolatedObject::isKeyboardFocusable const):
        (WebCore::AXIsolatedObject::isHovered const):
        (WebCore::AXIsolatedObject::isIndeterminate const):
        (WebCore::AXIsolatedObject::isLoaded const):
        (WebCore::AXIsolatedObject::isOnScreen const):
        (WebCore::AXIsolatedObject::isOffScreen const):
        (WebCore::AXIsolatedObject::isPressed const):
        (WebCore::AXIsolatedObject::isUnvisited const):
        (WebCore::AXIsolatedObject::isLinked const):
        (WebCore::AXIsolatedObject::isVisible const):
        (WebCore::AXIsolatedObject::isCollapsed const):
        (WebCore::AXIsolatedObject::isSelectedOptionActive const):
        (WebCore::AXIsolatedObject::hasBoldFont const):
        (WebCore::AXIsolatedObject::hasItalicFont const):
        (WebCore::AXIsolatedObject::hasMisspelling const):
        (WebCore::AXIsolatedObject::hasPlainText const):
        (WebCore::AXIsolatedObject::hasSameFont const):
        (WebCore::AXIsolatedObject::hasSameFontColor const):
        (WebCore::AXIsolatedObject::hasSameStyle const):
        (WebCore::AXIsolatedObject::isStaticText const):
        (WebCore::AXIsolatedObject::hasUnderline const):
        (WebCore::AXIsolatedObject::hasHighlighting const):
        (WebCore::AXIsolatedObject::element const):
        (WebCore::AXIsolatedObject::node const):
        (WebCore::AXIsolatedObject::renderer const):
        (WebCore::AXIsolatedObject::defaultObjectInclusion const):
        (WebCore::AXIsolatedObject::accessibilityIsIgnoredByDefault const):
        (WebCore::AXIsolatedObject::stepValueForRange const):
        (WebCore::AXIsolatedObject::selectedListItem):
        (WebCore::AXIsolatedObject::ariaActiveDescendantReferencingElements const):
        (WebCore::AXIsolatedObject::ariaControlsReferencingElements const):
        (WebCore::AXIsolatedObject::ariaDescribedByElements const):
        (WebCore::AXIsolatedObject::ariaDescribedByReferencingElements const):
        (WebCore::AXIsolatedObject::ariaDetailsReferencingElements const):
        (WebCore::AXIsolatedObject::ariaErrorMessageReferencingElements const):
        (WebCore::AXIsolatedObject::ariaFlowToReferencingElements const):
        (WebCore::AXIsolatedObject::ariaLabelledByElements const):
        (WebCore::AXIsolatedObject::ariaLabelledByReferencingElements const):
        (WebCore::AXIsolatedObject::ariaOwnsReferencingElements const):
        (WebCore::AXIsolatedObject::hasDatalist const):
        (WebCore::AXIsolatedObject::supportsHasPopup const):
        (WebCore::AXIsolatedObject::supportsPressed const):
        (WebCore::AXIsolatedObject::supportsChecked const):
        (WebCore::AXIsolatedObject::ignoredFromModalPresence const):
        (WebCore::AXIsolatedObject::isModalDescendant const):
        (WebCore::AXIsolatedObject::isModalNode const):
        (WebCore::AXIsolatedObject::elementAccessibilityHitTest const):
        (WebCore::AXIsolatedObject::firstChild const):
        (WebCore::AXIsolatedObject::lastChild const):
        (WebCore::AXIsolatedObject::previousSibling const):
        (WebCore::AXIsolatedObject::nextSibling const):
        (WebCore::AXIsolatedObject::nextSiblingUnignored const):
        (WebCore::AXIsolatedObject::previousSiblingUnignored const):
        (WebCore::AXIsolatedObject::parentObjectIfExists const):
        (WebCore::AXIsolatedObject::isDescendantOfBarrenParent const):
        (WebCore::AXIsolatedObject::isDescendantOfRole const):
        (WebCore::AXIsolatedObject::observableObject const):
        (WebCore::AXIsolatedObject::correspondingLabelForControlElement const):
        (WebCore::AXIsolatedObject::correspondingControlForLabelElement const):
        (WebCore::AXIsolatedObject::isPresentationalChildOfAriaRole const):
        (WebCore::AXIsolatedObject::ariaRoleHasPresentationalChildren const):
        (WebCore::AXIsolatedObject::inheritsPresentationalRole const):
        (WebCore::AXIsolatedObject::setAccessibleName):
        (WebCore::AXIsolatedObject::hasAttributesRequiredForInclusion const):
        (WebCore::AXIsolatedObject::accessibilityDescription const):
        (WebCore::AXIsolatedObject::title const):
        (WebCore::AXIsolatedObject::helpText const):
        (WebCore::AXIsolatedObject::isARIAStaticText const):
        (WebCore::AXIsolatedObject::stringValue const):
        (WebCore::AXIsolatedObject::text const):
        (WebCore::AXIsolatedObject::ariaLabeledByAttribute const):
        (WebCore::AXIsolatedObject::ariaDescribedByAttribute const):
        (WebCore::AXIsolatedObject::accessibleNameDerivesFromContent const):
        (WebCore::AXIsolatedObject::elementsFromAttribute const):
        (WebCore::AXIsolatedObject::axObjectCache const):
        (WebCore::AXIsolatedObject::anchorElement const):
        (WebCore::AXIsolatedObject::actionElement const):
        (WebCore::AXIsolatedObject::elementPath const):
        (WebCore::AXIsolatedObject::supportsPath const):
        (WebCore::AXIsolatedObject::textIteratorBehaviorForTextRange const):
        (WebCore::AXIsolatedObject::widget const):
        (WebCore::AXIsolatedObject::widgetForAttachmentView const):
        (WebCore::AXIsolatedObject::page const):
        (WebCore::AXIsolatedObject::document const):
        (WebCore::AXIsolatedObject::documentFrameView const):
        (WebCore::AXIsolatedObject::frame const):
        (WebCore::AXIsolatedObject::mainFrame const):
        (WebCore::AXIsolatedObject::topDocument const):
        (WebCore::AXIsolatedObject::scrollViewAncestor const):
        (WebCore::AXIsolatedObject::childrenChanged):
        (WebCore::AXIsolatedObject::textChanged):
        (WebCore::AXIsolatedObject::updateAccessibilityRole):
        (WebCore::AXIsolatedObject::addChildren):
        (WebCore::AXIsolatedObject::addChild):
        (WebCore::AXIsolatedObject::insertChild):
        (WebCore::AXIsolatedObject::shouldIgnoreAttributeRole const):
        (WebCore::AXIsolatedObject::canHaveChildren const):
        (WebCore::AXIsolatedObject::hasChildren const):
        (WebCore::AXIsolatedObject::setNeedsToUpdateChildren):
        (WebCore::AXIsolatedObject::setNeedsToUpdateSubtree):
        (WebCore::AXIsolatedObject::clearChildren):
        (WebCore::AXIsolatedObject::needsToUpdateChildren const):
        (WebCore::AXIsolatedObject::detachFromParent):
        (WebCore::AXIsolatedObject::shouldFocusActiveDescendant const):
        (WebCore::AXIsolatedObject::activeDescendant const):
        (WebCore::AXIsolatedObject::handleActiveDescendantChanged):
        (WebCore::AXIsolatedObject::handleAriaExpandedChanged):
        (WebCore::AXIsolatedObject::isDescendantOfObject const):
        (WebCore::AXIsolatedObject::isAncestorOfObject const):
        (WebCore::AXIsolatedObject::firstAnonymousBlockChild const):
        (WebCore::AXIsolatedObject::hasAttribute const):
        (WebCore::AXIsolatedObject::getAttribute const):
        (WebCore::AXIsolatedObject::hasTagName const):
        (WebCore::AXIsolatedObject::stringValueForMSAA const):
        (WebCore::AXIsolatedObject::stringRoleForMSAA const):
        (WebCore::AXIsolatedObject::nameForMSAA const):
        (WebCore::AXIsolatedObject::descriptionForMSAA const):
        (WebCore::AXIsolatedObject::roleValueForMSAA const):
        (WebCore::AXIsolatedObject::passwordFieldValue const):
        (WebCore::AXIsolatedObject::liveRegionAncestor const):
        (WebCore::AXIsolatedObject::hasContentEditableAttributeSet const):
        (WebCore::AXIsolatedObject::supportsReadOnly const):
        (WebCore::AXIsolatedObject::supportsAutoComplete const):
        (WebCore::AXIsolatedObject::supportsARIAAttributes const):
        (WebCore::AXIsolatedObject::scrollByPage const):
        (WebCore::AXIsolatedObject::scrollPosition const):
        (WebCore::AXIsolatedObject::scrollContentsSize const):
        (WebCore::AXIsolatedObject::scrollVisibleContentRect const):
        (WebCore::AXIsolatedObject::scrollToMakeVisible const):
        (WebCore::AXIsolatedObject::lastKnownIsIgnoredValue):
        (WebCore::AXIsolatedObject::setLastKnownIsIgnoredValue):
        (WebCore::AXIsolatedObject::notifyIfIgnoredValueChanged):
        (WebCore::AXIsolatedObject::isMathScriptObject const):
        (WebCore::AXIsolatedObject::isMathMultiscriptObject const):
        (WebCore::AXIsolatedObject::isAXHidden const):
        (WebCore::AXIsolatedObject::isDOMHidden const):
        (WebCore::AXIsolatedObject::isHidden const):
        (WebCore::AXIsolatedObject::overrideAttachmentParent):
        (WebCore::AXIsolatedObject::accessibilityIgnoreAttachment const):
        (WebCore::AXIsolatedObject::accessibilityPlatformIncludesObject const):
        (WebCore::AXIsolatedObject::hasApplePDFAnnotationAttribute const):
        (WebCore::AXIsolatedObject::ancestorAccessibilityScrollView const):
        (WebCore::AXIsolatedObject::setIsIgnoredFromParentData):
        (WebCore::AXIsolatedObject::clearIsIgnoredFromParentData):
        (WebCore::AXIsolatedObject::setIsIgnoredFromParentDataForChild):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added
        dispatching to the main thread some of the methods that cannot be run
        in the secondary thread.
        (performAccessibilityFunctionOnMainThread):
        (retrieveAccessibilityValueFromMainThread):
        (-[WebAccessibilityObjectWrapper attachmentView]):
        (-[WebAccessibilityObjectWrapper screenToContents:]):
        (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
        (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
        (-[WebAccessibilityObjectWrapper associatedPluginParent]):
        (-[WebAccessibilityObjectWrapper subrole]):
        (-[WebAccessibilityObjectWrapper scrollViewParent]):
        (-[WebAccessibilityObjectWrapper windowElement:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper _accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
        (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Initialize InlineLayoutUnit variables to 0
        https://bugs.webkit.org/show_bug.cgi?id=204989

        Reviewed by Antti Koivisto.

        This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::justifyRuns const):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        (WebCore::Layout::LineBuilder::TrimmableContent::trim):
        (WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
        * layout/inlineformatting/InlineLineBuilder.h:
        * layout/inlineformatting/text/TextUtil.h:

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Introduce InlineRect
        https://bugs.webkit.org/show_bug.cgi?id=204988
        <rdar://problem/57729049>

        Reviewed by Antti Koivisto.

        This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.

        * WebCore.xcodeproj/project.pbxproj:
        * layout/LayoutUnits.h:
        * layout/displaytree/DisplayInlineRect.h: Added.
        (WebCore::Display::InlineRect::expandHorizontally):
        (WebCore::Display::InlineRect::expandVertically):
        (WebCore::Display::InlineRect::invalidateTop):
        (WebCore::Display::InlineRect::invalidateLeft):
        (WebCore::Display::InlineRect::invalidateWidth):
        (WebCore::Display::InlineRect::invalidateHeight):
        (WebCore::Display::InlineRect::hasValidPosition const):
        (WebCore::Display::InlineRect::hasValidSize const):
        (WebCore::Display::InlineRect::hasValidGeometry const):
        (WebCore::Display::InlineRect::InlineRect):
        (WebCore::Display::InlineRect::invalidatePosition):
        (WebCore::Display::InlineRect::setHasValidPosition):
        (WebCore::Display::InlineRect::setHasValidSize):
        (WebCore::Display::InlineRect::top const):
        (WebCore::Display::InlineRect::left const):
        (WebCore::Display::InlineRect::bottom const):
        (WebCore::Display::InlineRect::right const):
        (WebCore::Display::InlineRect::topLeft const):
        (WebCore::Display::InlineRect::size const):
        (WebCore::Display::InlineRect::width const):
        (WebCore::Display::InlineRect::height const):
        (WebCore::Display::InlineRect::setTopLeft):
        (WebCore::Display::InlineRect::setTop):
        (WebCore::Display::InlineRect::setLeft):
        (WebCore::Display::InlineRect::setWidth):
        (WebCore::Display::InlineRect::setHeight):
        (WebCore::Display::InlineRect::moveHorizontally):
        (WebCore::Display::InlineRect::moveVertically):
        (WebCore::Display::InlineRect::expand):
        (WebCore::Display::InlineRect::operator InlineLayoutRect const):
        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::LineBox):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::logicalRect const):
        (WebCore::Display::Run::setLogicalLeft):
        (WebCore::Display::Run::Run):
        (WebCore::Display::Run::setLogicalRight): Deleted.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinousContent::close):
        (WebCore::Layout::LineBuilder::Run::Run):
        (WebCore::Layout::LineBuilder::initialize):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::logicalRect const):

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Introduce InlineLayoutUnit
        https://bugs.webkit.org/show_bug.cgi?id=204986
        <rdar://problem/57728333>

        Reviewed by Antti Koivisto.

        While IFC uses LayoutUnit type solely to compute inline geometry, complex line layout (CLL) has
        adopted several different types over time (int, float and LayoutUnit). These types all have different precisions.
        In order to match CLL's output (inline tree geometry) IFC needs to use a type that has
        roughly the same precision as what CLL uses.
        LayoutUnit currently does not have high enough precision (1/64) to produce matching results.
        This patch introduces InlineLayoutUnit. It is going to be mapped to 'float' for now (in a subsequent patch).
        It helps to keep one uniform type across the IFC codebase and we could also just re-map it to something
        more appropriate in the future. 

        * layout/LayoutUnits.h:
        * layout/displaytree/DisplayLineBox.h:
        (WebCore::Display::LineBox::Baseline::height const):
        (WebCore::Display::LineBox::logicalLeft const):
        (WebCore::Display::LineBox::logicalRight const):
        (WebCore::Display::LineBox::logicalTop const):
        (WebCore::Display::LineBox::logicalBottom const):
        (WebCore::Display::LineBox::logicalWidth const):
        (WebCore::Display::LineBox::logicalHeight const):
        (WebCore::Display::LineBox::setLogicalHeight):
        (WebCore::Display::LineBox::setLogicalWidth):
        (WebCore::Display::LineBox::moveHorizontally):
        (WebCore::Display::LineBox::expandHorizontally):
        (WebCore::Display::LineBox::shrinkHorizontally):
        (WebCore::Display::LineBox::expandVertically):
        (WebCore::Display::LineBox::shrinkVertically):
        (WebCore::Display::LineBox::LineBox):
        (WebCore::Display::LineBox::setLogicalHeightIfGreater):
        (WebCore::Display::LineBox::setBaselineOffsetIfGreater):
        (WebCore::Display::LineBox::setAscentIfGreater):
        (WebCore::Display::LineBox::setDescentIfGreater):
        (WebCore::Display::LineBox::baselineOffset const):
        (WebCore::Display::LineBox::Baseline::Baseline):
        (WebCore::Display::LineBox::Baseline::setAscent):
        (WebCore::Display::LineBox::Baseline::setDescent):
        (WebCore::Display::LineBox::Baseline::ascent const):
        (WebCore::Display::LineBox::Baseline::descent const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::shouldWrapFloatBox):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::LineBreaker::Content::append):
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::Content::width const):
        (WebCore::Layout::LineBreaker::Content::nonTrimmableWidth const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::justifyRuns const):
        (WebCore::Layout::LineBuilder::alignContentHorizontally const):
        (WebCore::Layout::LineBuilder::moveLogicalLeft):
        (WebCore::Layout::LineBuilder::moveLogicalRight):
        (WebCore::Layout::LineBuilder::append):
        (WebCore::Layout::LineBuilder::appendNonBreakableSpace):
        (WebCore::Layout::LineBuilder::appendInlineContainerStart):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendReplacedInlineBox):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::halfLeadingMetrics):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        (WebCore::Layout::LineBuilder::TrimmableContent::trim):
        (WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::availableWidth const):
        (WebCore::Layout::LineBuilder::trailingTrimmableWidth const):
        (WebCore::Layout::LineBuilder::Run::adjustLogicalTop):
        (WebCore::Layout::LineBuilder::Run::moveHorizontally):
        (WebCore::Layout::LineBuilder::Run::moveVertically):
        (WebCore::Layout::LineBuilder::Run::setLogicalHeight):
        (WebCore::Layout::LineBuilder::logicalTop const):
        (WebCore::Layout::LineBuilder::logicalBottom const):
        (WebCore::Layout::LineBuilder::logicalLeft const):
        (WebCore::Layout::LineBuilder::logicalRight const):
        (WebCore::Layout::LineBuilder::logicalWidth const):
        (WebCore::Layout::LineBuilder::logicalHeight const):
        (WebCore::Layout::LineBuilder::contentLogicalWidth const):
        (WebCore::Layout::LineBuilder::contentLogicalRight const):
        (WebCore::Layout::LineBuilder::baselineOffset const):
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalLeft const):
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalWidth const):
        (WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):
        (WebCore::Layout::LineBuilder::TrimmableContent::width const):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::createWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::width const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::inlineItemWidth):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::fixedPitchWidth):
        (WebCore::Layout::TextUtil::split):
        * layout/inlineformatting/text/TextUtil.h:

2019-12-07  Antti Koivisto  <antti@apple.com>

        [LFC][IFC] Move LineBox to Display namespace
        https://bugs.webkit.org/show_bug.cgi?id=204984

        Reviewed by Zalan Bujtas.

        It is a display type, like Display::Run.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/displaytree/DisplayInlineContent.cpp: Added.

        Also added a cpp for Display::InlineContent.

        (WebCore::Display:: const):
        * layout/displaytree/DisplayInlineContent.h:
        (WebCore::Display::InlineContent::lineBoxForRun const):
        (WebCore::Display:: const): Deleted.
        * layout/displaytree/DisplayLineBox.h: Renamed from Source/WebCore/layout/inlineformatting/InlineLineBox.h.
        (WebCore::Display::LineBox::LineBox):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineFormattingState.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::halfLeadingMetrics):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::lineBox const):
        * layout/inlineformatting/LineLayoutContext.h:

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for breaking at previous breaking opportunities when the overflown content is unbreakable
        https://bugs.webkit.org/show_bug.cgi?id=204985
        <rdar://problem/57727436>

        Reviewed by Antti Koivisto.

        <span>first</span><span style="word-break: break-all">second</span><span>third</span

        In case of multiple runs in one commit content [firstsecondthrid], if the overflown run [thrid] does not have
        a breaking opportunity, we need to backtrack the last breakable run [second] and break right there. ->

        "firstsecond
        third"

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isContentWrappingAllowed):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):

2019-12-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix css1/formatting_model/floating_elements.html
        https://bugs.webkit.org/show_bug.cgi?id=204983
        <rdar://problem/57727197>

        Reviewed by Antti Koivisto.

        Adjacent non-whitespace inline items are guaranteed to be on commit boundary when they both belong
        to the same layout box (<div>text-content</div> [text-][content] vs <div>textcontent</div> [textcontent]).

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::Content::isAtContentBoundary):

2019-12-07  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Layout test assert and crash fixes
        https://bugs.webkit.org/show_bug.cgi?id=204982

        Reviewed by Zalan Bujtas.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
        (WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):
        (WebCore::LayoutIntegration::LineLayout::textBoxesFor const):

        Don't 0-initialize Optional.

        * layout/integration/LayoutIntegrationLineLayout.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

        Remember to add line break renderer to the renderer->layout box map.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):

        Invalidate layout path with LFC.

        (WebCore::RenderBlockFlow::firstLineBaseline const):
        (WebCore::RenderBlockFlow::inlineBlockBaseline const):

        Call LFC baseline functions.

2019-12-07  Tim Horton  <timothy_horton@apple.com>

        Implement encoding for DrawImage and DrawRoundedRect display list items
        https://bugs.webkit.org/show_bug.cgi?id=204881

        Reviewed by Simon Fraser.

        Make InterpolationQuality an enum class.
        Make ImagePaintingOptions and all of its children encodable.
        Make DrawImage and DrawRoundedRect encodable.
        Add ImageHandle, which right now just wraps WebCore::Image, but
        later could carry identifiers. This allows us to implement image encoding
        in WebKit code, which can then use ShareableBitmap to A) decode the image
        in the Web Content process and B) use shared memory to transmit the
        decoded image data to the GPU process.

        * html/CanvasBase.cpp:
        * html/ImageBitmap.cpp:
        (WebCore::interpolationQualityForResizeQuality):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::smoothingToInterpolationQuality):
        (WebCore::CanvasRenderingContext2DBase::setImageSmoothingEnabled):
        * platform/graphics/DecodingOptions.h:
        * platform/graphics/GraphicsContext.h:
        (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
        * platform/graphics/GraphicsTypes.h:
        * platform/graphics/ImageOrientation.h:
        * platform/graphics/ImagePaintingOptions.h:
        (WebCore::ImagePaintingOptions::ImagePaintingOptions):
        (WebCore::ImagePaintingOptions::encode const):
        (WebCore::ImagePaintingOptions::decode):
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::paint):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawSurface):
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::GraphicsContext3D::paintToCanvas):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::convertInterpolationQuality):
        (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::FillRoundedRect::FillRoundedRect):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawImage::encode const):
        (WebCore::DisplayList::DrawImage::decode):
        (WebCore::DisplayList::FillRoundedRect::create):
        (WebCore::DisplayList::FillRoundedRect::encode const):
        (WebCore::DisplayList::FillRoundedRect::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):
        (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted.
        * platform/graphics/ios/IconIOS.mm:
        (WebCore::Icon::paint):
        * platform/graphics/texmap/BitmapTexture.cpp:
        (WebCore::BitmapTexture::updateContents):
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
        * platform/ios/wak/WAKView.mm:
        (toCGInterpolationQuality):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::imageBuffer const):
        * rendering/ImageQualityController.cpp:
        (WebCore::ImageQualityController::interpolationQualityFromStyle):
        (WebCore::ImageQualityController::chooseInterpolationQuality):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintIntoRect):

2019-12-07  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: REGRESSION (r251320): WebKit-native media controls do not respond to hover or click
        https://bugs.webkit.org/show_bug.cgi?id=204543
        <rdar://problem/57208621>

        Reviewed by Antoine Quint.

        Adopt pointer events for media controls, in order to make them input-device agnostic.

        * Modules/modern-media-controls/controls/auto-hide-controller.js:
        (AutoHideController):
        (AutoHideController.prototype.set fadesWhileIdle):
        (AutoHideController.prototype.handleEvent):
        (AutoHideController.prototype._autoHideTimerFired):
        Instead of tracking state in a single bit (_disableAutoHiding), keep track
        of sets of pointers that are active, for hover and for actual touch/click.

        * Modules/modern-media-controls/controls/slider.js:
        (Slider.prototype.handleEvent):
        (Slider.prototype._handlePointerdownEvent):
        (Slider.prototype._handlePointerupEvent):
        (Slider.prototype._handleMousedownEvent): Deleted.
        (Slider.prototype._handleTouchstartEvent): Deleted.
        (Slider.prototype._handleMouseupEvent): Deleted.
        (Slider.prototype._handleTouchendEvent): Deleted.
        Adopt pointer events.

        * Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js:
        (GestureRecognizer):
        (GestureRecognizer.prototype.get numberOfTouches):
        (GestureRecognizer.prototype.locationInElement):
        (GestureRecognizer.prototype.locationInClient):
        (GestureRecognizer.prototype.touchesBegan):
        (GestureRecognizer.prototype.handleEvent):
        (GestureRecognizer.prototype._updateBaseListeners):
        (GestureRecognizer.prototype._removeTrackingListeners):
        (GestureRecognizer.prototype._updateTargetTouches):
        (GestureRecognizer.prototype.locationOfTouchInElement): Deleted.
        Instead of keeping track of Touches, keep track of the currently-active set of PointerEvents.
        We just store events by pointerId, and update them when they change, so we can
        later retrieve e.g. points.
        Remove locationOfTouchInElement which seems to not be used.

        * html/RangeInputType.cpp:
        * html/RangeInputType.h:
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::dragFrom):
        (WebCore::SliderThumbElement::defaultEventHandler):
        * html/shadow/SliderThumbElement.h:
        Allow range inputs to accept mouse events everywhere.

        * WebCore.xcodeproj/project.pbxproj:
        Add some missing files to the project.

2019-12-07  Devin Rousso  <drousso@apple.com>

        Web Inspector: non-regex Local Overrides and Script Blackboxing shouldn't apply to scripts that just contain the URL
        https://bugs.webkit.org/show_bug.cgi?id=204954

        Reviewed by Joseph Pecoraro.

        If `isRegex` is false, add `^` and `$` to the beginning and end of the search string to
        ensure that the search string is exactly matched, not just contained within the potentially
        intercepted URL.

        This doesn't actually change functionality because the Web Inspector frontend wouldn't
        replace the network response for these containing matches, as the frontend JavaScript
        already correctly performed this logic, and would therefore `Network.interceptContinue`.

        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::shouldIntercept):

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::breakOnURLIfNeeded):
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::searchInResources):
        Use renamed `ContentSearchUtilities` function.

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

        [LFC][IFC] Rename ContentBreak to ContentWrappingRule and ContentBreak::wrap to ContentWrappingRule::push
        https://bugs.webkit.org/show_bug.cgi?id=204966
        <rdar://problem/57717049>

        Reviewed by Sam Weinig.

        Use the term "push" instead of "wrap" to move a run to the next line without breaking it.
        This is mainly to avoid spec term confusion.
        ContentWrappingRule::Keep -> keep the run (or continuous runs) on the current line.
        ContentWrappingRule::Split -> keep the run (or continuous runs) partially on the current line (see BreakingContext::PartialTrailingContent).
        ContentWrappingRule::Push -> move the run (or continuous runs) completely to the next line.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

2019-12-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r253218.
        https://bugs.webkit.org/show_bug.cgi?id=204968

        Broke the build (Requested by ap on #webkit).

        Reverted changeset:

        "Remove various .order files."
        https://bugs.webkit.org/show_bug.cgi?id=204959
        https://trac.webkit.org/changeset/253218

2019-12-06  Per Arne Vollan  <pvollan@apple.com>

        [iOS] Calls to device orientation API should be done in the UI process
        https://bugs.webkit.org/show_bug.cgi?id=204720

        Reviewed by Alex Christensen.

        The device orientation API on iOS is communicating with locationd. Since mach lookup to this daemon
        will be closed, the calls to this API should be moved from the WebContent process to the UI process.
        This patch implements forwarding of the device orientation requests to the UI process through a new
        class, DeviceOrientationUpdateProvider, which is subclassed by WebDeviceOrientationUpdateProvider in
        modern WebKit. This class implements forwarding of the requests to the UI process, and receives
        device orientation updates from the UI process. An instance of this class will be shared by all
        device orientation clients on a page, and passed as part of the page configuration parameters. On
        the UI process side, a new class WebDeviceOrientationUpdateProviderProxy attached to the Web page
        proxy is taking care of calling the device orientation API through the existing WebCoreMotionManager
        Objective-C class, and send device orientation updates back to the Web process. Also, use a weak
        hash set of orientation clients in WebCoreMotionManager.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/DeviceOrientationClient.h:
        * dom/Document.cpp:
        * page/Page.cpp:
        (WebCore::m_deviceOrientationUpdateProvider):
        (WebCore::m_applicationManifest): Deleted.
        * page/Page.h:
        (WebCore::Page::deviceOrientationUpdateProvider const):
        * page/PageConfiguration.h:
        * platform/ios/DeviceOrientationClientIOS.h:
        * platform/ios/DeviceOrientationClientIOS.mm:
        (WebCore::DeviceOrientationClientIOS::DeviceOrientationClientIOS):
        (WebCore::DeviceOrientationClientIOS::startUpdating):
        (WebCore::DeviceOrientationClientIOS::stopUpdating):
        (WebCore::DeviceOrientationClientIOS::deviceOrientationControllerDestroyed):
        * platform/ios/WebCoreMotionManager.h:
        * platform/ios/WebCoreMotionManager.mm:
        (-[WebCoreMotionManager addOrientationClient:]):
        (-[WebCoreMotionManager removeOrientationClient:]):
        (-[WebCoreMotionManager checkClientStatus]):
        (-[WebCoreMotionManager sendMotionData:withHeading:]):

2019-12-06  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: pass along error of IDBBackingStore::renameIndex
        https://bugs.webkit.org/show_bug.cgi?id=204900

        Reviewed by Brady Eidson.

        We ignored error of IDBBackingStore::renameIndex, so the operation may fail silently. This covered up two bugs 
        in our code as we were unaware of the failure.
        One was in MemoryIDBBackingStore that we did not update objectStoreInfo properly when createIndex/deleteIndex; 
        another was in IDBObjectStoreInfo that we did not copy its members correctly.

        Covered by existing test: storage/indexeddb//modern/index-rename-1-private.html

        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
        * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: If some index is deleted from IDBObjectStoreInfo, then
        m_maxIndexID could be bigger than maximum index ID in m_indexMap, because we don't decrease m_maxIndexID for
        deletion. Therefore, the assertion here is incorrect.
        (WebCore::IDBObjectStoreInfo::isolatedCopy const):

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

        [MathML] Should support conditional compilation
        https://bugs.webkit.org/show_bug.cgi?id=204958

        Reviewed by Ross Kirsling.

        No new tests. No change in behavior.

        Add missing checks for ENABLE_MATHML in the idl and cpp files.

        * bindings/js/JSElementCustom.cpp:
        (WebCore::createNewElementWrapper):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * mathml/MathMLElement.idl:
        * mathml/MathMLMathElement.idl:

2019-12-06  Devin Rousso  <drousso@apple.com>

        Web Inspector: add compiler UNLIKELY hints when checking if developer extras are enabled
        https://bugs.webkit.org/show_bug.cgi?id=204875

        Reviewed by Joseph Pecoraro.

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::consoleStartRecordingCanvas):
        (WebCore::InspectorInstrumentation::consoleStopRecordingCanvas): Added.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::frameWindowDiscardedImpl):
        (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
        (WebCore::InspectorInstrumentation::didFailLoadingImpl):
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
        (WebCore::InspectorInstrumentation::consoleCountImpl):
        (WebCore::InspectorInstrumentation::consoleCountResetImpl):
        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::consoleStopRecordingCanvasImpl): Added.

        * inspector/agents/WebConsoleAgent.cpp:
        (WebCore::WebConsoleAgent::frameWindowDiscarded):
        (WebCore::WebConsoleAgent::didReceiveResponse):
        (WebCore::WebConsoleAgent::didFailLoading):
        Remove the redundant check for whether developer extras are enabled since it's already
        checked by `InspectorInstrumentation`.

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::record):
        (WebCore::PageConsoleClient::recordEnd):
        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::consoleStopRecordingCanvas): Added.
        Add checks for `InspectorInstrumentation::hasFrontends()` to avoid doing extra work when Web
        Inspector isn't open.

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

        [LFC][IFC] Use explicit 0_lu value instead of LayoutUnit { }
        https://bugs.webkit.org/show_bug.cgi?id=204964
        <rdar://problem/57714095>

        Reviewed by Antti Koivisto.

        From geometry computation point of view, it is really the 0 value and not an empty value. 

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::resetDescent):
        (WebCore::Layout::LineBox::resetBaseline):
        (WebCore::Layout::LineBox::Baseline::reset):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::Content::reset):
        (WebCore::Layout::LineBreaker::Content::TrailingTrimmableContent::reset):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinousContent::close):
        (WebCore::Layout::LineBuilder::Run::Run):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        (WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const):
        (WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::TrimmableContent::reset):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::inlineItemWidth):
        * layout/inlineformatting/text/TextUtil.h:
        (WebCore::Layout::TextUtil::width): Deleted.

2019-12-06  Keith Miller  <keith_miller@apple.com>

        Remove various .order files.
        https://bugs.webkit.org/show_bug.cgi?id=204959

        Reviewed by Yusuke Suzuki.

        These files are all super out of date and likely don't do anything anymore.
        The signatures of the functions have changed thus the mangled name has changed.

        * WebCore.order: Removed.

2019-12-06  Jonathan Bedard  <jbedard@apple.com>

        Unreviewed, rolling out r253148.

        This caused fast/mediastream/stream-switch.html to timeout on
        Mac.

        Reverted changeset:

        "WPT test MediaStream-MediaElement-srcObject.https.html times
        out"
        https://bugs.webkit.org/show_bug.cgi?id=204762
        https://trac.webkit.org/changeset/253148

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

        [LFC][IFC] Paint partial trailing run with hyphen when needed
        https://bugs.webkit.org/show_bug.cgi?id=204953
        <rdar://problem/57705169>

        Reviewed by Antti Koivisto.

        When LineBreaker comes back with a partial content that needs hyphen, we need to make sure this information
        ends up in the final Display::Run so that the rendered content includes the hyphen string. Note that this only needs to
        be done when the content does _not_ have the hyphen already (opportunity vs. oppor-tunity).
        (This patch also renames trailingPartial to partialTrailing because the fact that it is partial run is more important than that it is trailing run.)

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::TextContext):
        (WebCore::Display::Run::TextContext::needsHyphen const):
        (WebCore::Display::Run::TextContext::setNeedsHyphen):
        (WebCore::Display::Run::textContext):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        * layout/inlineformatting/LineLayoutContext.h:
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::paint):

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

        Prevent synchronous XHR in beforeunload / unload event handlers
        https://bugs.webkit.org/show_bug.cgi?id=204912
        <rdar://problem/57676394>

        Reviewed by Darin Adler.

        Prevent synchronous XHR in beforeunload / unload event handlers. They are terrible for performance
        and the Beacon API (or Fetch keepalive) are more efficient & supported alternatives.

        In particular, this would cause hangs when trying to navigate away from a site or when closing
        attempt, which would result in terrible user experience.

        Chrome and Edge have expressed public support for this. Chrome has actually been testing this behavior
        for a while now:
        https://www.chromestatus.com/feature/4664843055398912

        I added this new behavior behind an experimental feature flag, enabled by default.

        Tests: http/tests/xmlhttprequest/sync-xhr-in-beforeunload.html
               http/tests/xmlhttprequest/sync-xhr-in-unload.html

        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
        * loader/FrameLoader.cpp:
        (WebCore::PageLevelForbidScope::PageLevelForbidScope):
        (WebCore::ForbidPromptsScope::ForbidPromptsScope):
        (WebCore::ForbidPromptsScope::~ForbidPromptsScope):
        (WebCore::ForbidSynchronousLoadsScope::ForbidSynchronousLoadsScope):
        (WebCore::ForbidSynchronousLoadsScope::~ForbidSynchronousLoadsScope):
        (WebCore::FrameLoader::dispatchUnloadEvents):
        (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
        * page/Page.cpp:
        (WebCore::Page::forbidSynchronousLoads):
        (WebCore::Page::allowSynchronousLoads):
        (WebCore::Page::areSynchronousLoadsAllowed):
        * page/Page.h:

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

        Support for resolving highlight pseudo element style
        https://bugs.webkit.org/show_bug.cgi?id=204937

        Reviewed by Simon Fraser.

        Test: highlight/highlight-pseudo-element-style.html

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):

        Returns always true when checked without pseudoId, so it gets added to the set of seen pseudo elements.
        Match argument with the provided highlight name otherwise.

        * css/SelectorChecker.h:
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumePseudo):
        * rendering/style/RenderStyle.h:
        * style/ElementRuleCollector.cpp:
        (WebCore::Style::ElementRuleCollector::ruleMatches):
        * style/ElementRuleCollector.h:
        (WebCore::Style::PseudoElementRequest::PseudoElementRequest):

        Add the requested highlight name.

        * style/StyleResolver.h:
        * style/StyleScope.h:
        * testing/Internals.cpp:
        (WebCore::Internals::highlightPseudoElementColor):

        Testing support.

        * testing/Internals.h:
        * testing/Internals.idl:

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

        [LFC][Integration] Fix DisplayRunPath offsets
        https://bugs.webkit.org/show_bug.cgi?id=204949

        Reviewed by Zalan Bujtas.

        Fixes output of tests like fast/text/system-font-zero-size.html with LFC integration enabled.

        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::DisplayRunPath::DisplayRunPath):
        (WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):

        Display::Run offsets are already local.

        (WebCore::LineLayoutTraversal::DisplayRunPath::length const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::runs const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::firstRun const): Deleted.

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

        Stop using reserveCapacity() / reserveInitialCapacity() in IPC decoders
        https://bugs.webkit.org/show_bug.cgi?id=204930
        <rdar://problem/57682737>

        Reviewed by Ryosuke Niwa.

        This is IPC hardening since the size we use to reserve the capacity is encoded over IPC
        and cannot be trusted in some cases.

        * page/csp/ContentSecurityPolicyResponseHeaders.h:
        (WebCore::ContentSecurityPolicyResponseHeaders::decode):

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

        [LFC][Integration] Wire line counting functions in RenderBlockFlow
        https://bugs.webkit.org/show_bug.cgi?id=204943

        Reviewed by Zalan Bujtas.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::lineCount const):
        * layout/integration/LayoutIntegrationLineLayout.h:
        * rendering/ComplexLineLayout.cpp:
        (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
        (WebCore::ComplexLineLayout::lineCount const):
        (WebCore::ComplexLineLayout::lineCountUntil const):

        Move complex path specific code to ComplexLineLayout.

        * rendering/ComplexLineLayout.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
        (WebCore::RenderBlockFlow::lineCount const):
        (WebCore::RenderBlockFlow::hasLines const):

        Support all paths.

        * rendering/RenderBlockFlow.h:

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

        [LFC][Integration] Support isLineBreak() in iterator
        https://bugs.webkit.org/show_bug.cgi?id=204941

        Reviewed by Zalan Bujtas.

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::isLineBreak const):
        * rendering/line/LineLayoutTraversalDisplayRunPath.h:
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):

        Also remove unneeded skipping of runs without text context. All runs generated from text nodes now have them.

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

        [LFC][IFC] Fix css1/basic/containment.html
        https://bugs.webkit.org/show_bug.cgi?id=204931
        <rdar://problem/57682871>

        Reviewed by Simon Fraser.

        moveToNextBreakablePosition jumped over all the positions that came back as the current position.
        e.g --- <- first 2 breakable positions are at: 1 2 but we skipped over the first one.

        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::moveToNextBreakablePosition):

2019-12-05  Megan Gardner  <megan_gardner@apple.com>

        Move member variable that should be private
        https://bugs.webkit.org/show_bug.cgi?id=204913

        Reviewed by Wenson Hsieh.

        These member variables should be in the correct section.

        No changing functionality, no tests needed.

        * page/EventHandler.h:

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

        Resource Load Statistics (experimental): Add fast mode for non-cookie website data deletion
        https://bugs.webkit.org/show_bug.cgi?id=204858
        <rdar://problem/57639851>

        Reviewed by Alex Christensen.

        This change adds two internal flags:
        - "Live-On Testing" with a one hour timeout instead of seven days.
        - "Repro Testing" with an instant timeout (bar ITP's regular delays) instead of seven days.

        These internal flags should be removed once testing is complete: <rdar://problem/57673418>

        No new tests. This change just adds new opt-in settings for manual testing.

        * page/Settings.yaml:
        * platform/network/NetworkStorageSession.h:
            The FirstPartyWebsiteDataRemovalMode enum now has two new values:
            - AllButCookiesLiveOnTestingTimeout
            - AllButCookiesReproTestingTimeout

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

        PageConfiguration::dragClient should use a smart pointer
        https://bugs.webkit.org/show_bug.cgi?id=204816

        Reviewed by Alex Christensen.

        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * page/DragClient.h:
        * page/DragController.cpp:
        (WebCore::DragController::DragController):
        (WebCore::DragController::~DragController):
        (WebCore::DragController::dragEnded):
        (WebCore::DragController::performDragOperation):
        (WebCore::DragController::delegateDragSourceAction):
        (WebCore::DragController::concludeEditDrag):
        (WebCore::DragController::startDrag):
        (WebCore::DragController::beginDrag):
        (WebCore::DragController::doSystemDrag):
        * page/DragController.h:
        (WebCore::DragController::client const):
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/PageConfiguration.cpp:
        * page/PageConfiguration.h:
        * page/mac/DragControllerMac.mm:
        (WebCore::DragController::declareAndWriteDragImage):

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

        [IPC] Fail BackForwardItemIdentifier decoding if the decoded integer is not a valid ID
        https://bugs.webkit.org/show_bug.cgi?id=204920
        <rdar://problem/57677453>

        Reviewed by Ryosuke Niwa.

        * history/BackForwardItemIdentifier.h:
        (WebCore::BackForwardItemIdentifier::decode):

2019-12-05  Sihui Liu  <sihui_liu@apple.com>

        Move InProcessIDBServer to WebKitLegacy
        https://bugs.webkit.org/show_bug.cgi?id=204896

        Reviewed by Brady Eidson.

        We only use InProcessIDBServer in WebKitLegacy now.

        No behavior change.

        * Headers.cmake:
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/shared/IDBRequestData.h:
        * Modules/indexeddb/shared/IDBTransactionInfo.h:
        * Modules/indexeddb/shared/InProcessIDBServer.h: Removed.
        * Modules/mediastream/MediaStreamTrack.cpp:
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/EmptyClients.cpp:
        * page/Page.cpp:

2019-12-05  Sihui Liu  <sihui_liu@apple.com>

        Rename IDBDatabaseIdentifier::debugString to IDBDatabaseIdentifier::loggingString
        https://bugs.webkit.org/show_bug.cgi?id=204898

        Reviewed by Brady Eidson.

        We use loggingString everywhere in IDB code but IDBDatabaseIdentifier, so rename it for consistency.

        No behavior change.

        * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
        (WebCore::IDBDatabaseIdentifier::loggingString const):
        (WebCore::IDBDatabaseIdentifier::debugString const): Deleted.
        * Modules/indexeddb/IDBDatabaseIdentifier.h:
        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
        (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
        (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::deleteDatabase):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):

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

        [LFC][IFC] Introduce InlineSoftLineBreakItem
        https://bugs.webkit.org/show_bug.cgi?id=204905
        <rdar://problem/57672472>

        Reviewed by Antti Koivisto.

        Preserved line breaks apparently require text-line inline boxes with position information.
        This patch provides this position information by introducing InlineSoftLineBreakItem.
        InlineSoftLineBreakItem is a non-text like subclass of InlineItem which is created when
        the text content has a preserved line break.
        
        <pre>text content
        </pre>
        -> [InlineTextItem(text)][InlineTextItem( )][InlineTextItem(content)][InlineSoftLineBreakItem]

        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineItem.cpp:
        * layout/inlineformatting/InlineItem.h:
        (WebCore::Layout::InlineItem::isLineBreak const):
        (WebCore::Layout::InlineItem::isSoftLineBreak const):
        (WebCore::Layout::InlineItem::isHardLineBreak const):
        (WebCore::Layout::InlineItem::isForcedLineBreak const): Deleted.
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
        (WebCore::Layout::LineBreaker::Content::append):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::append):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        (WebCore::Layout::LineBuilder::TrimmableContent::trim):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::isLineBreak const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isLineBreak const):
        (WebCore::Layout::LineBuilder::Run::isForcedLineBreak const): Deleted.
        (WebCore::Layout::LineBuilder::InlineItemRun::isForcedLineBreak const): Deleted.
        * layout/inlineformatting/InlineSoftLineBreakItem.h: Copied from Source/WebCore/layout/inlineformatting/InlineItem.cpp.
        (WebCore::Layout::InlineSoftLineBreakItem::position const):
        (WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem):
        (WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::createSegmentBreakItem): Deleted.
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::isWhitespace const):
        (WebCore::Layout::InlineTextItem::isCollapsible const):
        (WebCore::Layout::InlineTextItem::isSegmentBreak const): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayoutContext::placeInlineItem):

2019-12-05  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: Avoid using Runtime.executionContextCreated to figure out the iframe's contentDocument node.
        https://bugs.webkit.org/show_bug.cgi?id=122764
        <rdar://problem/15222136>

        Reviewed by Devin Rousso.

        Force execution context creation on frame navigation similar to what inspector already
        does for all known contexts when Runtime.enable is called. This is a prerequisite for
        the injected script to work.

        Test: inspector/runtime/execution-context-in-scriptless-page.html

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::frameNavigated):
        * inspector/agents/page/PageRuntimeAgent.h:

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

        MESSAGE_CHECK BackForwardItemIdentifier on incoming IPC from the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=204899

        Reviewed by Ryosuke Niwa.

        * Sources.txt:
        * history/BackForwardItemIdentifier.cpp: Added.
        (WebCore::BackForwardItemIdentifier::isValid const):
        * history/BackForwardItemIdentifier.h:
        (WebCore::operator!=):

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

        Fix inspector/css test assertions after r253158 
        https://bugs.webkit.org/show_bug.cgi?id=204924

        Reviewed by Devin Rousso.

        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::protocolValueForPseudoId):

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

        [LFC][IFC] Trim trailing letter-spacing at inline container boundary
        https://bugs.webkit.org/show_bug.cgi?id=204895
        <rdar://problem/57666898>

        Reviewed by Antti Koivisto.

        According to https://www.w3.org/TR/css-text-3/#letter-spacing-property, "An inline box only
        includes letter spacing between characters completely contained within that element".
        This patch enables this behavior by trimming the trailing letter spacing at [container end].

        <div>1<span style="letter-spacing: 100px;">2</span>3</div> ->
        [1][container start][2][container end][3]
        vs.
        [1][container start][2<-----100px----->][container end][3]

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::TrimmableContent::trim):
        (WebCore::Layout::LineBuilder::TrimmableContent::trimTrailingRun):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunPartiallyTrimmable const):

2019-12-05  youenn fablet  <youenn@apple.com>

        maplike should define a set method
        https://bugs.webkit.org/show_bug.cgi?id=204877

        Reviewed by Chris Dumez.

        maplike implementation was defining an add method instead of a set method.
        Update implementation to define and use a set method.
        Add an InternalsMapLike to allow testing.

        Test: js/dom/maplike.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/highlight/HighlightMap.cpp:
        (WebCore::HighlightMap::addFromMapLike):
        * Modules/highlight/HighlightMap.h:
        * Modules/highlight/HighlightMap.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMMapLike.h:
        (WebCore::DOMMapLike::set):
        (WebCore::forwardSetToMapLike):
        * bindings/scripts/IDLParser.pm:
        (parseMapLikeProperties):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::jsMapLikePrototypeFunctionSetBody):
        (WebCore::jsMapLikePrototypeFunctionSet):
        (WebCore::jsMapLikePrototypeFunctionAddBody): Deleted.
        (WebCore::jsMapLikePrototypeFunctionAdd): Deleted.
        * testing/Internals.cpp:
        (WebCore::Internals::createInternalsMapLike):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/InternalsMapLike.cpp: Added.
        * testing/InternalsMapLike.h: Added.
        * testing/InternalsMapLike.idl: Added.

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

        [LFC][Integration] Disable LFC when floats are present for now
        https://bugs.webkit.org/show_bug.cgi?id=204892

        Reviewed by Zalan Bujtas.

        Diasable until we start synthesizing the required structures.

        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::LineLayout::canUseFor):

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

        [LFC][IFC] Many render tree dump tests show 1px too narrow runs
        https://bugs.webkit.org/show_bug.cgi?id=204885

        Reviewed by Zalan Bujtas.

        Width measurement is currently clamping the measured (float) text widths to layout units. Use rounding instead.

        This doesn't solve the fundamental problem of loss of precision but it allows many more render tree dump
        based layout tests to pass.

        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::fixedPitchWidth):

2019-12-05  youenn fablet  <youenn@apple.com>

        inspector/page/overrideSetting-MockCaptureDevicesEnabled.html is failing after removal of internals.setMockMediaCaptureDevicesEnabled API
        https://bugs.webkit.org/show_bug.cgi?id=204849

        Reviewed by Eric Carlson.

        Add API and internals to check which center is used in WebProcess.
        Covered by updated test.

        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
        (WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
        (WebCore::MockRealtimeMediaSourceCenter::mockRealtimeMediaSourceCenterEnabled):
        * platform/mock/MockRealtimeMediaSourceCenter.h:
        * testing/Internals.cpp:
        (WebCore::Internals::isMockRealtimeMediaSourceCenterEnabled):
        * testing/Internals.h:
        * testing/Internals.idl:

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

        WPT test MediaStream-MediaElement-srcObject.https.html times out
        https://bugs.webkit.org/show_bug.cgi?id=204762
        <rdar://problem/57567671>

        Reviewed by youenn fablet.

        No new tests, these changes fix existing tests.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::prepareForLoad): Check hasMediaStreamSrcObject() instead of
        m_mediaStreamSrcObject so we behave correctly when a MediaStream is cleared by setting srcObject to null.
        (WebCore::HTMLMediaElement::loadResource): Ditto.
        (WebCore::HTMLMediaElement::seekWithTolerance): Return early if seeking isn't allowed.
        (WebCore::HTMLMediaElement::defaultPlaybackRate const): Check hasMediaStreamSrcObject() instead 
        of m_mediaStreamSrcObject.
        (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Ditto.
        (WebCore::HTMLMediaElement::playbackRate const): Ditto.
        (WebCore::HTMLMediaElement::setPlaybackRate): Ditto.
        (WebCore::HTMLMediaElement::ended const): Ditto.
        (WebCore::HTMLMediaElement::preload const): Ditto.
        (WebCore::HTMLMediaElement::setPreload): Ditto.
        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't send an 'ended' event for a MediaStream.
        (WebCore::HTMLMediaElement::clearMediaPlayer): Don't check m_settingMediaStreamSrcObject, it 
        is never set.
        * html/HTMLMediaElement.h:

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Add m_lastReportedTime.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::durationMediaTime const): Return last reported
        time after the stream ends.
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime const): Ditto. Set m_lastReportedTime.
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Don't return HaveNothing
        for an inactive stream. Return HaveMetadata for an stream that has either ended or is waiting
        for the first video frame.
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Send duration changed when
        a stream ends.

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

        [LFC][IFC] Move trailing trimming logic to LineBuilder::TrimmableContent
        https://bugs.webkit.org/show_bug.cgi?id=204872
        <rdar://problem/57652365>

        Reviewed by Antti Koivisto.

        Move trimming logic from LineBuilder::removeTrailingTrimmableContent to inside TrimmableContent.
        This is also in preparation for adding partial trimming at inline container boundary. 

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::TrimmableContent::TrimmableContent):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        (WebCore::Layout::LineBuilder::TrimmableContent::trim):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::isTrailingRunFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableContent::isTrailingRunFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableContent::reset):
        (WebCore::Layout::LineBuilder::isTrailingContentFullyTrimmable const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::isTrailingContentFullyTrimmable const): Deleted.
        (WebCore::Layout::LineBuilder::TrimmableContent::clear): Deleted.
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

2019-12-05  youenn fablet  <youenn@apple.com>

        getStats() promise never rejects nor resolves when peer connection state is closed.
        https://bugs.webkit.org/show_bug.cgi?id=204842
        <rdar://problem/57617107>

        Reviewed by Eric Carlson.

        Instead of closing and nulling the backend when closing the peer connection,
        we only close it. This allows calling getStats to retrieve the last gathered stats from the backend.
        Covered by updated test.

        * Modules/mediastream/PeerConnectionBackend.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::close):
        (WebCore::RTCPeerConnection::stop):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::close):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::close):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

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

        Remove DocumentEventQueue and WorkerEventQueue
        https://bugs.webkit.org/show_bug.cgi?id=204841

        Reviewed by Sam Weinig.

        Delete DocumentEventQueue and WorkerEventQueue since we don't use them after r252824.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.h:
        * dom/DocumentEventQueue.cpp: Removed.
        * dom/DocumentEventQueue.h: Removed.
        * page/VisualViewport.cpp:
        * rendering/RenderLayer.cpp:
        * rendering/RenderListBox.cpp:
        * workers/WorkerEventQueue.cpp: Removed.
        * workers/WorkerEventQueue.h: Removed.
        * worklets/WorkletGlobalScope.h:

2019-12-04  Jack Lee  <shihchieh_lee@apple.com>

        Nullptr crash in RenderLayoutState::pageLogicalHeight const via RenderGrid::computeIntrinsicLogicalWidths inside RenderMarquee::updateMarqueePosition
        https://bugs.webkit.org/show_bug.cgi?id=204527

        Reviewed by Ryosuke Niwa.

        Test: fast/table/crash-empty-layoutStateStack.html

        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::layout):
        (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):

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

        PageConfiguration::progressTrackerClient should use a smart pointer
        https://bugs.webkit.org/show_bug.cgi?id=204854

        Reviewed by Alex Christensen.

        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * loader/ProgressTracker.cpp:
        (WebCore::ProgressTracker::ProgressTracker):
        (WebCore::ProgressTracker::progressStarted):
        (WebCore::ProgressTracker::progressCompleted):
        (WebCore::ProgressTracker::finalProgressComplete):
        (WebCore::ProgressTracker::incrementProgress):
        (WebCore::ProgressTracker::~ProgressTracker): Deleted.
        * loader/ProgressTracker.h:
        (WebCore::ProgressTracker::client):
        * loader/ProgressTrackerClient.h:
        (WebCore::ProgressTrackerClient::progressTrackerDestroyed): Deleted.
        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/PageConfiguration.cpp:
        (WebCore::PageConfiguration::PageConfiguration):
        * page/PageConfiguration.h:

2019-12-04  Eric Carlson  <eric.carlson@apple.com>

        Make MediaPlayer::client() private
        https://bugs.webkit.org/show_bug.cgi?id=204856
        <rdar://problem/57633186>

        Reviewed by Jer Noble.
        
        Make MediaPlayer::client private and create accessors for all of the client methods
        that were being accessed directly. Also remove the MediaPlayer* parameters from
        the client methods since none of them were used.

        No new tests, no behavioral change.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerActiveSourceBuffersChanged):
        (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
        (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
        (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerMuteChanged):
        (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
        (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
        (WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
        (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
        (WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
        (WebCore::HTMLMediaElement::mediaPlayerRepaint):
        (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
        (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
        (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable):
        (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
        (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
        * html/HTMLMediaElement.h:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::loadWithNextMediaEngine):
        (WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
        (WebCore::MediaPlayer::networkStateChanged):
        (WebCore::MediaPlayer::readyStateChanged):
        (WebCore::MediaPlayer::volumeChanged):
        (WebCore::MediaPlayer::muteChanged):
        (WebCore::MediaPlayer::timeChanged):
        (WebCore::MediaPlayer::sizeChanged):
        (WebCore::MediaPlayer::repaint):
        (WebCore::MediaPlayer::durationChanged):
        (WebCore::MediaPlayer::rateChanged):
        (WebCore::MediaPlayer::playbackStateChanged):
        (WebCore::MediaPlayer::firstVideoFrameAvailable):
        (WebCore::MediaPlayer::characteristicChanged):
        (WebCore::MediaPlayer::keyNeeded):
        (WebCore::MediaPlayer::graphicsDeviceAdapter const):
        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
        (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
        (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
        (WebCore::MediaPlayerClient::mediaPlayerMuteChanged):
        (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
        (WebCore::MediaPlayerClient::mediaPlayerDurationChanged):
        (WebCore::MediaPlayerClient::mediaPlayerRateChanged):
        (WebCore::MediaPlayerClient::mediaPlayerPlaybackStateChanged):
        (WebCore::MediaPlayerClient::mediaPlayerSawUnsupportedTracks):
        (WebCore::MediaPlayerClient::mediaPlayerResourceNotSupported):
        (WebCore::MediaPlayerClient::mediaPlayerRepaint):
        (WebCore::MediaPlayerClient::mediaPlayerSizeChanged):
        (WebCore::MediaPlayerClient::mediaPlayerEngineUpdated):
        (WebCore::MediaPlayerClient::mediaPlayerFirstVideoFrameAvailable):
        (WebCore::MediaPlayerClient::mediaPlayerCharacteristicChanged):
        (WebCore::MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated):
        (WebCore::MediaPlayerClient::mediaPlayerRenderingModeChanged):
        (WebCore::MediaPlayerClient::mediaPlayerActiveSourceBuffersChanged):
        (WebCore::MediaPlayerClient::mediaPlayerGraphicsDeviceAdapter const):
        (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
        (WebCore::MediaPlayerClient::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
        (WebCore::MediaPlayer::renderingCanBeAccelerated const):
        (WebCore::MediaPlayer::renderingModeChanged const):
        (WebCore::MediaPlayer::acceleratedCompositingEnabled):
        (WebCore::MediaPlayer::activeSourceBuffersChanged):
        (WebCore::MediaPlayer::playerContentBoxRect const):
        (WebCore::MediaPlayer::playerContentsScale const):
        (WebCore::MediaPlayer::shouldUsePersistentCache const):
        (WebCore::MediaPlayer::mediaCacheDirectory const):
        (WebCore::MediaPlayer::isVideoPlayer const):
        (WebCore::MediaPlayer::mediaEngineUpdated):
        (WebCore::MediaPlayer::isLooping const):
        (WebCore::MediaPlayer::requestInstallMissingPlugins):
        (WebCore::MediaPlayer::client const):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const):
        (WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
        (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::notifyActiveSourceBuffersChanged):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::acceleratedRenderingStateChanged):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
        (WebCore::MediaPlayerPrivateGStreamer::acceleratedRenderingStateChanged):

2019-12-04  Alexey Shvayka  <shvaikalesh@gmail.com>

        Non-callable "handleEvent" property is silently ignored
        https://bugs.webkit.org/show_bug.cgi?id=200066

        Reviewed by Ryosuke Niwa.

        This patch prevents "handleEvent" property from being looked up on event handlers
        and also reports TypeError exception if "handleEvent" value is not callable.
        Web IDL spec: https://heycam.github.io/webidl/#call-a-user-objects-operation (step 10.4)

        Tests: fast/dom/exception-getting-event-handler.html
               imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html
               imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
               imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
               imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html
               imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-handleEvent-ignored.html
               imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/013.html
               imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.worker.html

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):

2019-12-04  Kate Cheney  <katherine_cheney@apple.com>

        Expose basic ITP data from the database for future API/SPI use
        https://bugs.webkit.org/show_bug.cgi?id=203432
        <rdar://problem/56085040>

        Reviewed John Wilander.

        Tests: http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html
               http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html
               http/tests/storageAccess/user-interface-data-with-storage-access-database.html
               http/tests/storageAccess/user-interface-data-with-storage-access.html

        Updated the toString() to report only if mostRecentUserInteractionTime
        was in the last 24 hours as opposed to reporting an actual time since 
        mostRecentUserInteractionTime changes with each test run.

        * loader/ResourceLoadStatistics.cpp:
        (WebCore::hasHadRecentUserInteraction):
        (WebCore::ResourceLoadStatistics::toString const):

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

        Add CSS parser support for the highlight pseudoelement
        https://bugs.webkit.org/show_bug.cgi?id=204902

        Reviewed by Antti Koivisto.

        Add basic CSS parsing support for ::highlight(), per
        https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::pseudoId):
        (WebCore::CSSSelector::parsePseudoElementType):
        * css/CSSSelector.h:
        * css/SelectorPseudoElementTypeMap.in:
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumePseudo):
        * rendering/style/RenderStyleConstants.h:

2019-12-04  Louie Livon-Bemel  <llivonbemel@apple.com>

        Add exclusion rule for text manipulation SPI to exclude based on element class
        https://bugs.webkit.org/show_bug.cgi?id=204754
        <rdar://problem/57398802>

        Reviewed by Ryosuke Niwa.

        Tests:  TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForClass
                TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForClassAndAttribute

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::ExclusionRule::match const):
            When matching a ClassRule, check that the element has at least one class, and that the classList contains
            the rule's class name. Checking it this way rather than checking if the ClassList contains the rule allows
            us to avoid mutating the element in this function.
        * editing/TextManipulationController.h:
            Add a new rule type for a ClassRule.
        (WebCore::TextManipulationController::ExclusionRule::ClassRule::encode const):
        (WebCore::TextManipulationController::ExclusionRule::ClassRule::decode):

2019-12-04  Kenneth Russell  <kbr@chromium.org>

        Enable WebGL's ASTC extension all the time
        https://bugs.webkit.org/show_bug.cgi?id=202836
        <rdar://problem/57627592>

        Reviewed by Dean Jackson.

        Remove the run-time flag - no longer necessary.

        * html/canvas/WebGLCompressedTextureASTC.cpp:
        (WebCore::WebGLCompressedTextureASTC::supported):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setWebGLCompressedTextureASTCSupportEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::webGLCompressedTextureASTCSupportEnabled const): Deleted.

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

        [LFC][Integration] Paint with TextPainter
        https://bugs.webkit.org/show_bug.cgi?id=204852

        Reviewed by Zalan Bujtas.

        Display::Painter is very rudimentary and turning it into a full painting implementation
        requires lot of refactoring. Instead, for now use separate painting code in the integration
        layer that invokes the existing render tree based painting helpers.

        This also enables writing reftests for intergrated LFC layout.

        Test: fast/layoutformattingcontext/flow-integration-basic-paint.html

        * layout/displaytree/DisplayInlineContent.h:
        (WebCore::Display:: const):
        * layout/integration/LayoutIntegrationLineLayout.cpp:
        (WebCore::LayoutIntegration::computeOverflow):
        (WebCore::LayoutIntegration::LineLayout::paint):

        Adopted from SimpleLineLayout::paintFlow with support for per-run style added.

        (WebCore::LayoutIntegration::LineLayout::debugTextShadow):
        * layout/integration/LayoutIntegrationLineLayout.h:

2019-12-04  Simon Fraser  <simon.fraser@apple.com>

        Implement the CSS clamp() function
        https://bugs.webkit.org/show_bug.cgi?id=203310
        <rdar://problem/56551088>

        Reviewed by Antti Koivisto.
        
        Implement the CSS clamp() function, of the form clamp(min, value, max):
        https://drafts.csswg.org/css-values-4/#funcdef-clamp

        This is a natural extension of min() and max(), the main difference being
        that it takes exactly three arguments.

        Tests: fast/css/calc-parsing.html
               web-platform-tests/css/css-values/clamp-length-computed-expected.txt:
               web-platform-tests/css/css-values/clamp-length-serialize-expected.txt:

        * css/CSSCalculationValue.cpp:
        (WebCore::functionFromOperator):
        (WebCore::determineCategory):
        (WebCore::resolvedTypeForMinOrMaxOrClamp):
        (WebCore::CSSCalcOperationNode::createMinOrMaxOrClamp):
        (WebCore::functionPrefixForOperator):
        (WebCore::CSSCalcOperationNode::evaluateOperator):
        (WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):
        (WebCore::createCSS):
        (WebCore::CSSCalcValue::isCalcFunction):
        (WebCore::resolvedTypeForMinOrMax): Deleted.
        (WebCore::CSSCalcOperationNode::createMinOrMax): Deleted.
        * css/CSSValueKeywords.in:
        * platform/CalculationValue.cpp:
        (WebCore::CalcExpressionOperation::evaluate const):
        (WebCore::operator<<):
        * platform/CalculationValue.h:

2019-12-04  youenn fablet  <youenn@apple.com>

        Move soft update handling to network process
        https://bugs.webkit.org/show_bug.cgi?id=204678

        Reviewed by Chris Dumez.

        * workers/WorkerScriptLoader.cpp:
        (WebCore::WorkerScriptLoader::validateResponse):
        (WebCore::WorkerScriptLoader::didReceiveResponse):
        * workers/WorkerScriptLoader.h:
        * workers/service/ServiceWorkerJobData.cpp:
        (WebCore::ServiceWorkerJobData::isEquivalent const):
        * workers/service/ServiceWorkerJobData.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
        * workers/service/ServiceWorkerRegistration.h:
        * workers/service/context/SWContextManager.cpp:
        * workers/service/context/SWContextManager.h:
        * workers/service/context/ServiceWorkerFetch.cpp:
        (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
        * workers/service/context/ServiceWorkerThread.cpp:
        * workers/service/context/ServiceWorkerThread.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::Connection::didResolveRegistrationPromise):
        (WebCore::SWServer::SWServer):
        (WebCore::SWServer::scheduleJob):
        (WebCore::SWServer::resolveRegistrationJob):
        (WebCore::originURL):
        (WebCore::SWServer::startScriptFetch):
        (WebCore::SWServer::scriptFetchFinished):
        (WebCore::SWServer::didResolveRegistrationPromise):
        (WebCore::SWServer::softUpdate):
        * workers/service/server/SWServer.h:
        (WebCore::SWServer::getRegistration):
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::runUpdateJob):
        * workers/service/server/SWServerJobQueue.h:
        (WebCore::SWServerJobQueue::enqueueJob):
        * workers/service/server/SWServerRegistration.cpp:
        (WebCore::SWServerRegistration::SWServerRegistration):
        (WebCore::SWServerRegistration::setUpdateViaCache):
        (WebCore::SWServerRegistration::softUpdate):
        (WebCore::SWServerRegistration::scheduleSoftUpdate):
        * workers/service/server/SWServerRegistration.h:
        (WebCore::SWServerRegistration::scopeURLWithoutFragment const):
        (WebCore::SWServerRegistration::scriptURL const):
        * workers/service/server/SWServerToContextConnection.h:

2019-12-04  Youenn Fablet  <youenn@apple.com>

        Add support for WebIDL setlike
        https://bugs.webkit.org/show_bug.cgi?id=159140

        Reviewed by Chris Dumez.

        Add preliminary support for https://heycam.github.io/webidl/#idl-setlike in the binding generator and IDL parser.
        A setlike JS wrapper owns a JSSet as a private slot that mirrors values owned by the wrapped object.
        forEach support is still missing.

        A DOM class implementing setlike must currently implement the following methods:
        - initializeSetLike
        - addFromSetLike
        - removeFromSetLike

        Added an internals class implementing setlike to test it.
        Also covered by binding tests.

        Test: js/dom/setlike.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMSetLike.cpp: Added.
        (WebCore::getBackingSet):
        (WebCore::clearBackingSet):
        (WebCore::addToBackingSet):
        (WebCore::forwardAttributeGetterToBackingSet):
        (WebCore::forwardFunctionCallToBackingSet):
        * bindings/js/JSDOMSetLike.h: Added.
        (WebCore::DOMSetAdapter::DOMSetAdapter):
        (WebCore::DOMSetAdapter::add):
        (WebCore::DOMSetAdapter::clear):
        (WebCore::DOMSetAdapter::globalObject const):
        (WebCore::getAndInitializeBackingSet):
        (WebCore::forwardSizeToSetLike):
        (WebCore::forwardEntriesToSetLike):
        (WebCore::forwardKeysToSetLike):
        (WebCore::forwardValuesToSetLike):
        (WebCore::forwardHasToSetLike):
        (WebCore::forwardClearToSetLike):
        (WebCore::forwardAddToSetLike):
        (WebCore::forwardDeleteToSetLike):
        * bindings/js/WebCoreBuiltinNames.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GetFullyQualifiedImplementationCallName):
        (AddAdditionalArgumentsForImplementationCall):
        (IsAcceleratedDOMAttribute):
        (PrototypeOperationCount):
        (GeneratePropertiesHashTable):
        (InterfaceNeedsIterator):
        (GenerateImplementation):
        (GenerateAttributeGetterBodyDefinition):
        (GenerateOperationBodyDefinition):
        (GetRuntimeEnabledStaticProperties):
        * bindings/scripts/IDLParser.pm:
        (cloneOperation):
        (applyTypedefs):
        (parseOperationOrReadWriteAttributeOrMaplike):
        (parseReadOnlyMember):
        (parseOperation):
        (parseSetLikeRest):
        (parseSetLikeProperties):
        (applyMemberList):
        * bindings/scripts/test/JS/JSReadOnlySetLike.cpp: Added.
        (WebCore::JSReadOnlySetLikePrototype::create):
        (WebCore::JSReadOnlySetLikePrototype::createStructure):
        (WebCore::JSReadOnlySetLikePrototype::JSReadOnlySetLikePrototype):
        (WebCore::JSReadOnlySetLikeConstructor::prototypeForStructure):
        (WebCore::JSReadOnlySetLikeConstructor::initializeProperties):
        (WebCore::JSReadOnlySetLikePrototype::finishCreation):
        (WebCore::JSReadOnlySetLike::JSReadOnlySetLike):
        (WebCore::JSReadOnlySetLike::finishCreation):
        (WebCore::JSReadOnlySetLike::createPrototype):
        (WebCore::JSReadOnlySetLike::prototype):
        (WebCore::JSReadOnlySetLike::getConstructor):
        (WebCore::JSReadOnlySetLike::destroy):
        (WebCore::IDLAttribute<JSReadOnlySetLike>::cast):
        (WebCore::IDLOperation<JSReadOnlySetLike>::cast):
        (WebCore::jsReadOnlySetLikeConstructor):
        (WebCore::setJSReadOnlySetLikeConstructor):
        (WebCore::jsReadOnlySetLikeSizeGetter):
        (WebCore::jsReadOnlySetLikeSize):
        (WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionHas):
        (WebCore::jsReadOnlySetLikePrototypeFunctionEntriesBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionEntries):
        (WebCore::jsReadOnlySetLikePrototypeFunctionKeysBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionKeys):
        (WebCore::jsReadOnlySetLikePrototypeFunctionValuesBody):
        (WebCore::jsReadOnlySetLikePrototypeFunctionValues):
        (WebCore::JSReadOnlySetLike::analyzeHeap):
        (WebCore::JSReadOnlySetLikeOwner::isReachableFromOpaqueRoots):
        (WebCore::JSReadOnlySetLikeOwner::finalize):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        (WebCore::JSReadOnlySetLike::toWrapped):
        * bindings/scripts/test/JS/JSReadOnlySetLike.h: Added.
        (WebCore::JSReadOnlySetLike::create):
        (WebCore::JSReadOnlySetLike::createStructure):
        (WebCore::wrapperOwner):
        (WebCore::wrapperKey):
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSSetLike.cpp: Added.
        (WebCore::JSSetLikePrototype::create):
        (WebCore::JSSetLikePrototype::createStructure):
        (WebCore::JSSetLikePrototype::JSSetLikePrototype):
        (WebCore::JSSetLikeConstructor::prototypeForStructure):
        (WebCore::JSSetLikeConstructor::initializeProperties):
        (WebCore::JSSetLikePrototype::finishCreation):
        (WebCore::JSSetLike::JSSetLike):
        (WebCore::JSSetLike::finishCreation):
        (WebCore::JSSetLike::createPrototype):
        (WebCore::JSSetLike::prototype):
        (WebCore::JSSetLike::getConstructor):
        (WebCore::JSSetLike::destroy):
        (WebCore::IDLAttribute<JSSetLike>::cast):
        (WebCore::IDLOperation<JSSetLike>::cast):
        (WebCore::jsSetLikeConstructor):
        (WebCore::setJSSetLikeConstructor):
        (WebCore::jsSetLikeSizeGetter):
        (WebCore::jsSetLikeSize):
        (WebCore::jsSetLikePrototypeFunctionHasBody):
        (WebCore::jsSetLikePrototypeFunctionHas):
        (WebCore::jsSetLikePrototypeFunctionEntriesBody):
        (WebCore::jsSetLikePrototypeFunctionEntries):
        (WebCore::jsSetLikePrototypeFunctionKeysBody):
        (WebCore::jsSetLikePrototypeFunctionKeys):
        (WebCore::jsSetLikePrototypeFunctionValuesBody):
        (WebCore::jsSetLikePrototypeFunctionValues):
        (WebCore::jsSetLikePrototypeFunctionAddBody):
        (WebCore::jsSetLikePrototypeFunctionAdd):
        (WebCore::jsSetLikePrototypeFunctionClearBody):
        (WebCore::jsSetLikePrototypeFunctionClear):
        (WebCore::jsSetLikePrototypeFunctionDeleteBody):
        (WebCore::jsSetLikePrototypeFunctionDelete):
        (WebCore::JSSetLike::analyzeHeap):
        (WebCore::JSSetLikeOwner::isReachableFromOpaqueRoots):
        (WebCore::JSSetLikeOwner::finalize):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        (WebCore::JSSetLike::toWrapped):
        * bindings/scripts/test/JS/JSSetLike.h: Added.
        (WebCore::JSSetLike::create):
        (WebCore::JSSetLike::createStructure):
        (WebCore::wrapperOwner):
        (WebCore::wrapperKey):
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::jsTestGlobalObjectTestReadOnlySetLikeConstructorGetter):
        (WebCore::jsTestGlobalObjectTestReadOnlySetLikeConstructor):
        (WebCore::setJSTestGlobalObjectTestReadOnlySetLikeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestReadOnlySetLikeConstructor):
        (WebCore::jsTestGlobalObjectTestSetLikeConstructorGetter):
        (WebCore::jsTestGlobalObjectTestSetLikeConstructor):
        (WebCore::setJSTestGlobalObjectTestSetLikeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSetLikeConstructor):
        * bindings/scripts/test/TestReadOnlySetLike.idl: Added.
        * bindings/scripts/test/TestSetLike.idl: Added.
        * testing/Internals.cpp:
        (WebCore::Internals::createInternalsSetLike):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/InternalsSetLike.cpp: Added.
        (WebCore::InternalsSetLike::InternalsSetLike):
        (WebCore::InternalsSetLike::initializeSetLike):
        * testing/InternalsSetLike.h: Added.
        (WebCore::InternalsSetLike::create):
        (WebCore::InternalsSetLike::clearFromSetLike):
        (WebCore::InternalsSetLike::removeFromSetLike):
        (WebCore::InternalsSetLike::items const):
        (WebCore::InternalsSetLike::addToSetLike):
        * testing/InternalsSetLike.idl: Added.

2019-12-04  Zan Dobersek  <zdobersek@igalia.com>  and  Chris Lord  <clord@igalia.com>

        Implement OffscreenCanvas.transferToImageBitmap
        https://bugs.webkit.org/show_bug.cgi?id=202572

        Reviewed by Antti Koivisto.

        No new tests. Covered by existing tests.

        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::setImageBuffer const):
        * html/CanvasBase.h:
        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::size const):
        (WebCore::OffscreenCanvas::setSize):
        (WebCore::requiresAcceleratedCompositingForWebGL):
        (WebCore::shouldEnableWebGL):
        (WebCore::OffscreenCanvas::isWebGLType):
        (WebCore::OffscreenCanvas::createContextWebGL):
        (WebCore::OffscreenCanvas::getContext):
        * html/OffscreenCanvas.h:
        * html/OffscreenCanvas.idl:

2019-12-04  Tim Horton  <timothy_horton@apple.com>

        Introduce a GPU process
        https://bugs.webkit.org/show_bug.cgi?id=204343

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig:
        Add ENABLE(GPU_PROCESS).

        * en.lproj/Localizable.strings:
        Add a string for the user-visible name of the GPU process.

2019-12-03  Ryosuke Niwa  <rniwa@webkit.org>

        Nullptr crash in Node::setTextContent via Document::setTitle if title element is removed before setTextContent call.
        https://bugs.webkit.org/show_bug.cgi?id=204332

        Added periods at the end of each comment added in r252667 as Simon pointed out.

        * dom/Document.cpp:
        (WebCore::Document::setTitle):

2019-12-04  Tim Horton  <timothy_horton@apple.com>

        Fix the build

        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawRect::decode):
        (WebCore::DisplayList::DrawPath::decode):
        (WebCore::DisplayList::FillRect::decode):
        (WebCore::DisplayList::FillRectWithColor::decode):
        (WebCore::DisplayList::FillCompositedRect::decode):
        (WebCore::DisplayList::FillPath::decode):
        (WebCore::DisplayList::ClearRect::decode):
        Some deleted stuff leaked into the patch.

2019-12-03  Daniel Bates  <dabates@apple.com>

        Remove unused DragController::client()
        https://bugs.webkit.org/show_bug.cgi?id=204837

        Reviewed by Wenson Hsieh.

        It has never been used since its inception in r19039. Moreover it exposes DragController's
        internals, which diminishes its encapsulation capabilities.

        * page/DragController.h:
        (WebCore::DragController::client const): Deleted.

2019-12-03  Megan Gardner  <megan_gardner@apple.com>

        Add disabled highlight API skeleton
        https://bugs.webkit.org/show_bug.cgi?id=204809

        Reviewed by Ryosuke Niwa.

        Beginning implementation of https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md
        Spec not written yet, starting from the explainer for now.

        Test: highlight/highlight-interfaces.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/highlight/HighlightMap.cpp: Added.
        (WebCore::HighlightMap::addHighlightGroup):
        (WebCore::HighlightMap::addFromMapLike):
        (WebCore::HighlightMap::remove):
        (WebCore::HighlightMap::namedItem const):
        (WebCore::HighlightMap::setNamedItem):
        (WebCore::HighlightMap::deleteNamedProperty):
        (WebCore::HighlightMap::set):
        * Modules/highlight/HighlightMap.h: Added.
        (WebCore::HighlightMap::create):
        (WebCore::HighlightMap::synchronizeBackingMap):
        (WebCore::HighlightMap::backingMap):
        (WebCore::HighlightMap::clear):
        * Modules/highlight/HighlightMap.idl: Added.
        * Modules/highlight/HighlightRangeGroup.cpp: Added.
        (WebCore::HighlightRangeGroup::HighlightRangeGroup):
        (WebCore::HighlightRangeGroup::create):
        (WebCore::HighlightRangeGroup::addRange):
        (WebCore::HighlightRangeGroup::removeRange):
        (WebCore::HighlightRangeGroup::Iterator::Iterator):
        (WebCore::HighlightRangeGroup::Iterator::next):
        * Modules/highlight/HighlightRangeGroup.h: Added.
        (WebCore::HighlightRangeGroup::createIterator):
        * Modules/highlight/HighlightRangeGroup.idl: Added.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * css/DOMCSSNamespace.cpp:
        (WebCore::DOMCSSNamespace::highlights):
        * css/DOMCSSNamespace.h:
        * css/DOMCSSNamespace.idl:
        * dom/Document.cpp:
        (WebCore::Document::highlightMap):
        * dom/Document.h:
        * dom/Range.idl:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setHighlightAPIEnabled):
        (WebCore::RuntimeEnabledFeatures::highlightAPIEnabled const):

2019-11-22  Ryosuke Niwa  <rniwa@webkit.org>

        Perform microtask checkpoint after each task as spec'ed
        https://bugs.webkit.org/show_bug.cgi?id=204546
        <rdar://problem/57449333>

        Reviewed by Chris Dumez.

        This patch makes EventLoop perform a microtask checkpoint after each task as spec'ed:
        https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model
        and removes the timer in MicrotaskQueue.

        Because we always perform a microtask checkpoint after executing JavaScript in
        JSExecState::didLeaveScriptContext, there isn't a good way of testing this code change
        from the existing API and the infrastructure. This patch, therefore, also introduces
        internals.queueMicrotaskInTask, which schedules a new task within which a new microtask
        to invoke the callback is scheduled.

        This patch also stops including Microtasks.h from most places as only event loop
        implementations need to access MicrotaskQueue object now after r252820.

        Test: http/tests/eventloop/perform-microtask-checkpoint-at-end-of-task.html

        * animation/DocumentTimeline.cpp:
        * animation/WebAnimation.cpp:
        * bindings/js/JSExecState.cpp:
        * dom/CustomElementReactionQueue.cpp:
        * dom/Document.cpp:
        * dom/EventLoop.cpp:
        (WebCore::EventLoop::queueMicrotask):
        (WebCore::EventLoop::run):
        * dom/Microtasks.cpp:
        (WebCore::MicrotaskQueue::MicrotaskQueue):
        (WebCore::MicrotaskQueue::append):
        (WebCore::MicrotaskQueue::timerFired): Deleted.
        * dom/Microtasks.h:
        * dom/MutationObserver.cpp:
        * testing/Internals.cpp:
        (WebCore::taskSourceFromString): Extracted from Internals::queueTask.
        (WebCore::Internals::queueTask):
        (WebCore::Internals::queueMicrotaskInTask): Added.
        * testing/Internals.h:
        * testing/Internals.idl:
        * workers/WorkerGlobalScope.cpp:
        * workers/service/SWClientConnection.cpp:

2019-12-03  Ryosuke Niwa  <rniwa@webkit.org>

        Replace customJavaScriptUserAgentAsSiteSpecificQuirks with customUserAgentAsSiteSpecificQuirks
        https://bugs.webkit.org/show_bug.cgi?id=204824

        Reviewed by Brent Fulgham.

        This patch renames customJavaScriptUserAgentAsSiteSpecificQuirks to customUserAgentAsSiteSpecificQuirks,
        and make it apply to network requests as well as JavaScript API.

        Tests: WebKit.WebsitePoliciesCustomUserAgentAsSiteSpecificQuirksDisabled
               WebKit.WebsitePoliciesCustomUserAgentAsSiteSpecificQuirks

        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setCustomUserAgentAsSiteSpecificQuirks): Renamed from setCustomJavaScriptUserAgentAsSiteSpecificQuirks.
        (WebCore::DocumentLoader::customUserAgentAsSiteSpecificQuirks const): Renamed from customJavaScriptUserAgentAsSiteSpecificQuirks.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::userAgent const):
        (WebCore::FrameLoader::userAgentForJavaScript const): Deleted.
        * loader/FrameLoader.h:
        * page/Navigator.cpp:
        (WebCore::Navigator::userAgent const):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldOpenAsAboutBlank const):

2019-12-03  Andres Gonzalez  <andresg_22@apple.com>

        Focus tracking support in the accessibility isolatedtree.
        https://bugs.webkit.org/show_bug.cgi?id=204535

        Reviewed by Chris Fleizach.

        The AXIsolatedTree focused object is now set during the tree generation.
        It is updated on handleFocusedUIElementChanged.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::focusedImageMapUIElement):
        (WebCore::AXObjectCache::focusedObject):
        (WebCore::AXObjectCache::isolatedTreeFocusedObject):
        (WebCore::AXObjectCache::setIsolatedTreeFocusedObject):
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::isolatedTreeRootObject):
        (WebCore::AXObjectCache::handleFocusedUIElementChanged):
        (WebCore::AXObjectCache::createIsolatedTreeHierarchy):
        (WebCore::AXObjectCache::generateIsolatedTree):
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::focusedUIElement const):

2019-12-03  Ryosuke Niwa  <rniwa@webkit.org>

        Use the event loop instead of DocumentEventQueue and WorkerEventQueue
        https://bugs.webkit.org/show_bug.cgi?id=204447

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::elementWasRemoved): Fixed a typo.

2019-12-03  John Wilander  <wilander@apple.com>

        Resource Load Statistics (experimental): Delete non-cookie website data after 7 days of no user interaction
        https://bugs.webkit.org/show_bug.cgi?id=204779
        <rdar://problem/57578989>

        Reviewed by Alex Christensen.

        Trackers are continuing to move cross-site tracking IDs into first-party storage.
        This change ages out script-writable non-cookie website data in alignment with the
        7-day cap on client-side cookies.

        Tests: http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction-database.html
               http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html
               http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction.html

        * page/Settings.yaml:
            New experimental feature, off by default.
        * platform/network/NetworkStorageSession.h:
            Added a boolean enum WebCore::FirstPartyWebsiteDataRemovalMode.

2019-12-03  Peng Liu  <peng.liu6@apple.com>

        The animation of returning to inline from PiP targets wrong destination rectangle
        https://bugs.webkit.org/show_bug.cgi?id=204819

        Reviewed by Jer Noble.

        We have to force AVPlayerViewController's view (which is hidden when it is returning to inline in another tab) to run layout
        after we set its target size and position to make sure all layers inside the view have the correct information.
        Otherwise, the return to inline animation will be incorrect.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (VideoFullscreenInterfaceAVKit::preparedToReturnToInline):

2019-12-03  Doug Kelly  <dougk@apple.com>

        Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end of run
        https://bugs.webkit.org/show_bug.cgi?id=204485

        Reviewed by Ryosuke Niwa.

        Comment out the assert for the default case when setting direction at
        the end of a bidirectional run.  The current algorithm may not fully
        support UAX #9, but this assert also isn't helpful in development.

        Test: fast/text/international/unicode-bidi-other-neutrals.html

        * platform/text/BidiResolver.h:
        (WebCore::DerivedClass>::createBidiRunsForLine):

2019-12-03  Jer Noble  <jer.noble@apple.com>

        Adopt AVContentKeyReportGroup
        https://bugs.webkit.org/show_bug.cgi?id=204765

        Reviewed by Eric Carlson.

        Adopt a new class, AVContentKeyReportGroup, which allows muliple MediaKeySessions to share
        an AVContentKeySession, while allowing independent expiration and persistent key usage
        tokens. However, this has to be runtime detected, so that existing usage of
        AVContentKeySession continues to work on platform versions without report group support.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (-[WebCoreFPSContentKeySessionDelegate initWithParent:]):
        (-[WebCoreFPSContentKeySessionDelegate contentKeySession:contentProtectionSessionIdentifierDidChangeForKeyGroup:]):
        (-[WebCoreFPSContentKeySessionDelegate contentKeySession:contentProtectionSessionIdentifierDidChangeForReportGroup:]):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::ensureSession):
        (WebCore::groupForRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequests):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRenewingRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvidePersistableRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didFailToProvideRequest):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::requestDidSucceed):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::shouldRetryRequestForReason):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionIdentifierChanged):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::groupSessionIdentifierChanged):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForGroup const):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::CDMInstanceSessionFairPlayStreamingAVFObjC):
        (WebCore::initTypeForRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::groupSessionIdentifierChanged):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSessionOrGroup):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession): Deleted.

2019-12-03  Eric Carlson  <eric.carlson@apple.com>

        Add a runtime setting for media in the GPU process
        https://bugs.webkit.org/show_bug.cgi?id=204801
        <rdar://problem/57596199>

        Reviewed by Jer Noble.

        * page/Settings.yaml:

2019-12-03  Jer Noble  <jer.noble@apple.com>

        Experimental support for HDR media query
        https://bugs.webkit.org/show_bug.cgi?id=204422
        <rdar://problem/56799662>

        Reviewed by Eric Carlson.

        Follow-up to r252762 for platforms that don't have MediaToolbox.framework.

        * platform/ios/PlatformScreenIOS.mm:
        (WebCore::screenSupportsHighDynamicRange):
        * platform/mac/PlatformScreenMac.mm:
        (WebCore::collectScreenProperties):
        (WebCore::screenSupportsHighDynamicRange):

2019-12-03  Simon Fraser  <simon.fraser@apple.com>

        calc() serialization doesn't match the spec
        https://bugs.webkit.org/show_bug.cgi?id=203442
        <rdar://problem/56639402>

        Reviewed by Dean Jackson.

        These changes implement the calc() simplification and serialization rules described in
        https://drafts.csswg.org/css-values-4/#calc-internal. They also make it easy to add the
        new math functions in future.
        
        The major changes are:

        1. Create Negate and Invert nodes to handle subtraction and division, so that
           Product and Sum are the only math operators that are tracked, which makes
           it possible to sort child nodes for simplification.

        2. After parsing, do a bottom-up simplification parse following
           <https://drafts.csswg.org/css-values-4/#calc-simplification>, which sorts child nodes
           according to <https://drafts.csswg.org/css-values-4/#sort-a-calculations-children>,
           combines child nodes where possible, and hoists child nodes up to their parents were
           possible. Simplification always preserves a calc-like function at the root.
           
           This simplification also does unit canonicalization (e.g. all absolute lengths get px units).
           To make unit conversion more explicit, pass a CSSUnitType into doubleValue() methods so that
           it's clear what units the resulting value is in.
           
        3. Serialize according to <https://drafts.csswg.org/css-values-4/#calc-serialize>
           which fixes bugs with nested parentheses.

        This patch does not completely implement the type checking and conversion rules described in <https://drafts.csswg.org/css-values-4/#calc-type-checking>
        and <https://drafts.css-houdini.org/css-typed-om-1/#numeric-typing>.

        Tests: fast/css/calc-parsing-limits.html
               fast/css/calc-parsing.html

        * css/CSSCalculationValue.cpp:
        (WebCore::calculationCategoryForCombination):
        (WebCore::canonicalUnitTypeForCalculationCategory):
        (WebCore::functionFromOperator):
        (WebCore::CSSCalcPrimitiveValueNode::isNumericValue const):
        (WebCore::CSSCalcPrimitiveValueNode::isNegative const):
        (WebCore::CSSCalcPrimitiveValueNode::negate):
        (WebCore::CSSCalcPrimitiveValueNode::invert):
        (WebCore::CSSCalcPrimitiveValueNode::add):
        (WebCore::CSSCalcPrimitiveValueNode::multiply):
        (WebCore::CSSCalcPrimitiveValueNode::convertToUnitType):
        (WebCore::CSSCalcPrimitiveValueNode::canonicalizeUnit):
        (WebCore::CSSCalcPrimitiveValueNode::doubleValue const):
        (WebCore::CSSCalcNegateNode::createCalcExpression const):
        (WebCore::CSSCalcNegateNode::dump const):
        (WebCore::CSSCalcInvertNode::createCalcExpression const):
        (WebCore::CSSCalcInvertNode::dump const):
        (WebCore::categoryForInvert):
        (WebCore::determineCategory):
        (WebCore::CSSCalcOperationNode::create):
        (WebCore::CSSCalcOperationNode::createSum):
        (WebCore::CSSCalcOperationNode::createProduct):
        (WebCore::CSSCalcOperationNode::hoistChildrenWithOperator):
        (WebCore::sortingCategoryForType):
        (WebCore::sortingCategory):
        (WebCore::primitiveTypeForCombination):
        (WebCore::conversionToAddValuesWithTypes):
        (WebCore::CSSCalcOperationNode::canCombineAllChildren const):
        (WebCore::CSSCalcOperationNode::combineChildren):
        (WebCore::CSSCalcOperationNode::simplify):
        (WebCore::CSSCalcOperationNode::simplifyRecursive):
        (WebCore::CSSCalcOperationNode::simplifyNode):
        (WebCore::CSSCalcOperationNode::primitiveType const):
        (WebCore::CSSCalcOperationNode::doubleValue const):
        (WebCore::CSSCalcOperationNode::computeLengthPx const):
        (WebCore::CSSCalcOperationNode::buildCSSText):
        (WebCore::functionPrefixForOperator):
        (WebCore::CSSCalcOperationNode::buildCSSTextRecursive):
        (WebCore::CSSCalcOperationNode::evaluateOperator):
        (WebCore::CSSCalcExpressionNodeParser::parseCalc):
        (WebCore::checkDepthAndIndex):
        (WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        (WebCore::CSSCalcExpressionNodeParser::parseCalcValue):
        (WebCore::CSSCalcExpressionNodeParser::parseCalcProduct):
        (WebCore::CSSCalcExpressionNodeParser::parseCalcSum):
        (WebCore::createCSS):
        (WebCore::CSSCalcValue::customCSSText const):
        (WebCore::CSSCalcValue::doubleValue const):
        (WebCore::CSSCalcValue::create):
        (WebCore::CSSCalcOperationNode::createSimplified): Deleted.
        (WebCore::CSSCalcOperationNode::buildCssText): Deleted.
        (WebCore::CSSCalcOperationNode::customCSSText const): Deleted.
        (WebCore::CSSCalcExpressionNodeParser::parseValueTerm): Deleted.
        (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression): Deleted.
        (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression): Deleted.
        (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression): Deleted.
        (WebCore::CSSCalcExpressionNodeParser::parseValueExpression): Deleted.
        * css/CSSCalculationValue.h:
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::unitTypeString):
        * css/CSSPrimitiveValue.h:
        * platform/CalculationValue.cpp:
        (WebCore::CalcExpressionNegation::evaluate const):
        (WebCore::CalcExpressionNegation::operator== const):
        (WebCore::CalcExpressionNegation::dump const):
        (WebCore::operator==):
        (WebCore::CalcExpressionInversion::evaluate const):
        (WebCore::CalcExpressionInversion::dump const):
        (WebCore::CalcExpressionInversion::operator== const):
        (WebCore::CalcExpressionOperation::evaluate const):
        (WebCore::operator<<):
        * platform/CalculationValue.h:

2019-12-03  Tim Horton  <timothy_horton@apple.com>

        Start adding encoding support for DisplayList and some DisplayListItems
        https://bugs.webkit.org/show_bug.cgi?id=204740

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::changesFromState const):
        * platform/graphics/GraphicsContext.h:
        Remove GraphicsContextState::NoChange, which is not needed with OptionSet
        and in fact causes assertions to fire.

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

        [Web Animations] Add a runtime flag for Web Animations composite operations
        https://bugs.webkit.org/show_bug.cgi?id=204718

        Reviewed by Dean Jackson.

        While we support parsing and output of composite modes via KeyframeEffect::getKeyframes(), we don't support them for blending properties.
        We now have a runtime flag for that feature so that we can continue working on it but not necessarily expose the feature by default.

        * animation/KeyframeEffect.cpp:
        (WebCore::processKeyframeLikeObject):
        (WebCore::processIterableKeyframes):
        (WebCore::processPropertyIndexedKeyframes):
        (WebCore::KeyframeEffect::getKeyframes):
        * animation/KeyframeEffect.idl:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setWebAnimationsCompositeOperationsEnabled):
        (WebCore::RuntimeEnabledFeatures::webAnimationsCompositeOperationsEnabled const):

2019-12-03  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove build warning below since r252987.
        warning: unused variable ‘currentTrack’ [-Wunused-variable]

        No new tests, no behavioral changes.

        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        (WebCore::LibWebRTCRtpSenderBackend::replaceTrack):

2019-12-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move trailing trimmable content logic to InlineItemRun
        https://bugs.webkit.org/show_bug.cgi?id=204798
        <rdar://problem/57593248>

        Reviewed by Antti Koivisto.

        Trailing letter spacing/fully trimmable whitespace logic should be internal to InlineItemRun.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const):
        (WebCore::Layout::LineBuilder::InlineItemRun::hasTrailingLetterSpacing const):
        (WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const):
        (WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):
        (WebCore::Layout::shouldPreserveTrailingContent): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::style const):
        (WebCore::Layout::LineBuilder::InlineItemRun::style const):

2019-12-03  Chris Dumez  <cdumez@apple.com>

        PageConfiguration::pluginClient should use a smart pointer
        https://bugs.webkit.org/show_bug.cgi?id=204780

        Reviewed by Anders Carlsson.

        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::~Page):
        * page/Page.h:
        (WebCore::Page::plugInClient const):
        * page/PageConfiguration.h:
        * page/PlugInClient.h:

2019-12-03  Dean Jackson  <dino@apple.com>

        Fix MacCatalyst build.

        * platform/graphics/GraphicsContext3D.h:

2019-12-03  Chris Dumez  <cdumez@apple.com>

        PageConfiguration::alternativeTextClient should use a smart pointer
        https://bugs.webkit.org/show_bug.cgi?id=204777

        Reviewed by Anders Carlsson.

        * page/AlternativeTextClient.h:
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::~Page):
        * page/Page.h:
        (WebCore::Page::alternativeTextClient const):
        * page/PageConfiguration.h:

2019-12-03  Tim Horton  <timothy_horton@apple.com>

        Start adding encoding support for DisplayList and some DisplayListItems
        https://bugs.webkit.org/show_bug.cgi?id=204740

        Reviewed by Simon Fraser.

        To be used in a later patch.

        Start encoding and decoding DisplayList, and its child items. We
        currently support only a subset of the item subclasses.

        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContextStateChange::changesFromState const):
        (WebCore::GraphicsContextStateChange::accumulate):
        (WebCore::GraphicsContextStateChange::apply const):
        * platform/graphics/GraphicsContext.h:
        Adopt OptionSet for GraphicsContextState::StateChangeFlags.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/Pattern.h:
        * platform/graphics/displaylists/DisplayList.h:
        (WebCore::DisplayList::DisplayList::encode const):
        (WebCore::DisplayList::DisplayList::decode):
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::Item::Item):
        (WebCore::DisplayList::DrawingItem::DrawingItem):
        (WebCore::DisplayList::Save::Save):
        (WebCore::DisplayList::Restore::Restore):
        (WebCore::DisplayList::Translate::Translate):
        (WebCore::DisplayList::Rotate::Rotate):
        (WebCore::DisplayList::Scale::Scale):
        (WebCore::DisplayList::SetState::SetState):
        (WebCore::DisplayList::DrawRect::DrawRect):
        (WebCore::DisplayList::DrawPath::DrawPath):
        (WebCore::DisplayList::FillRect::FillRect):
        (WebCore::DisplayList::FillRectWithColor::FillRectWithColor):
        (WebCore::DisplayList::FillCompositedRect::FillCompositedRect):
        (WebCore::DisplayList::FillPath::FillPath):
        (WebCore::DisplayList::ClearRect::ClearRect):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::Item::isStateItemType):
        (WebCore::DisplayList::Save::encode const):
        (WebCore::DisplayList::Save::decode):
        (WebCore::DisplayList::Restore::encode const):
        (WebCore::DisplayList::Restore::decode):
        (WebCore::DisplayList::Translate::encode const):
        (WebCore::DisplayList::Translate::decode):
        (WebCore::DisplayList::Rotate::encode const):
        (WebCore::DisplayList::Rotate::decode):
        (WebCore::DisplayList::Scale::encode const):
        (WebCore::DisplayList::Scale::decode):
        (WebCore::DisplayList::ConcatenateCTM::encode const):
        (WebCore::DisplayList::ConcatenateCTM::decode):
        (WebCore::DisplayList::SetState::create):
        (WebCore::DisplayList::SetState::encode const):
        (WebCore::DisplayList::SetState::decode):
        (WebCore::DisplayList::DrawRect::encode const):
        (WebCore::DisplayList::DrawRect::decode):
        (WebCore::DisplayList::DrawPath::encode const):
        (WebCore::DisplayList::DrawPath::decode):
        (WebCore::DisplayList::FillRect::encode const):
        (WebCore::DisplayList::FillRect::decode):
        (WebCore::DisplayList::FillRectWithColor::encode const):
        (WebCore::DisplayList::FillRectWithColor::decode):
        (WebCore::DisplayList::FillCompositedRect::encode const):
        (WebCore::DisplayList::FillCompositedRect::decode):
        (WebCore::DisplayList::FillPath::encode const):
        (WebCore::DisplayList::FillPath::decode):
        (WebCore::DisplayList::ClearRect::encode const):
        (WebCore::DisplayList::ClearRect::decode):
        (WebCore::DisplayList::Item::encode const):
        (WebCore::DisplayList::Item::decode):
        (WebCore::DisplayList::Item::Item): Deleted.
        (WebCore::DisplayList::DrawingItem::DrawingItem): Deleted.
        (WebCore::DisplayList::Save::Save): Deleted.
        (WebCore::DisplayList::Restore::Restore): Deleted.
        (WebCore::DisplayList::Translate::Translate): Deleted.
        (WebCore::DisplayList::Rotate::Rotate): Deleted.
        (WebCore::DisplayList::Scale::Scale): Deleted.
        (WebCore::DisplayList::SetState::SetState): Deleted.
        (WebCore::DisplayList::DrawRect::DrawRect): Deleted.
        (WebCore::DisplayList::DrawPath::DrawPath): Deleted.
        (WebCore::DisplayList::FillRect::FillRect): Deleted.
        (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): Deleted.
        (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): Deleted.
        (WebCore::DisplayList::FillPath::FillPath): Deleted.
        (WebCore::DisplayList::ClearRect::ClearRect): Deleted.
        * platform/graphics/displaylists/DisplayListRecorder.h:
        * platform/graphics/displaylists/DisplayListReplayer.h:
        (WebCore::DisplayList::Replayer::replay):

2019-12-03  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Rename RenderBlockFlowLineLayout and move it to LayoutIntegration namespace
        https://bugs.webkit.org/show_bug.cgi?id=204791

        Reviewed by Sam Weinig.

        Layout::RenderBlockFlowLineLayout -> LayoutIntegration::LineLayout

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/integration/LayoutIntegrationLineLayout.cpp: Renamed from Source/WebCore/layout/integration/RenderBlockFlowLineLayout.cpp.
        (WebCore::LayoutIntegration::LineLayout::LineLayout):
        (WebCore::LayoutIntegration::LineLayout::canUseFor):
        (WebCore::LayoutIntegration::LineLayout::layout):
        (WebCore::LayoutIntegration::LineLayout::prepareRootGeometryForLayout):
        (WebCore::LayoutIntegration::LineLayout::displayInlineContent const):
        (WebCore::LayoutIntegration::LineLayout::paint):
        (WebCore::LayoutIntegration::LineLayout::textBoxesFor const):
        (WebCore::LayoutIntegration::LineLayout::elementBoxFor const):
        (WebCore::LayoutIntegration::LineLayout::rootLayoutBox const):
        * layout/integration/RenderBlockFlowLineLayout.h: Removed.
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutInlineChildren):
        (WebCore::RenderBlockFlow::paintInlineChildren):
        (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
        (WebCore::RenderBlockFlow::layoutLFCLines):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::hasLayoutFormattingContextLineLayout const):
        (WebCore::RenderBlockFlow::layoutFormattingContextLineLayout const):
        (WebCore::RenderBlockFlow::layoutFormattingContextLineLayout):
        (WebCore::RenderBlockFlow::hasLFCLineLayout const): Deleted.
        (WebCore::RenderBlockFlow::lfcLineLayout const): Deleted.
        (WebCore::RenderBlockFlow::lfcLineLayout): Deleted.
        * rendering/line/LineLayoutTraversal.cpp:
        (WebCore::LineLayoutTraversal::firstTextBoxFor):
        (WebCore::LineLayoutTraversal::elementBoxFor):

2019-12-03  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Shorten feature flag name
        https://bugs.webkit.org/show_bug.cgi?id=204788

        Reviewed by Sam Weinig.

        LayoutFormattingContextRenderTreeIntegrationEnabled -> LayoutFormattingContextIntegrationEnabled

        * layout/integration/RenderBlockFlowLineLayout.cpp:
        (WebCore::Layout::RenderBlockFlowLineLayout::canUseFor):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setLayoutFormattingContextIntegrationEnabled):
        (WebCore::RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled const):
        (WebCore::RuntimeEnabledFeatures::setLayoutFormattingContextRenderTreeIntegrationEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::layoutFormattingContextRenderTreeIntegrationEnabled const): Deleted.

2019-12-03  youenn fablet  <youenn@apple.com>

        MediaRecorderPrivateWriter should not be destroyed until finishing its writing task completion handler is called
        https://bugs.webkit.org/show_bug.cgi?id=204789
        <rdar://problem/57561143>

        Reviewed by Eric Carlson.

        When stopping the recorder, we might stop recording the private writer without calling fetchData.
        In that case, we do not wait for the writing completion handler.
        Fix this by using the semaphore at the end of stopRecording.
        Covered by existing test.

        * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
        (WebCore::MediaRecorderPrivateWriter::stopRecording):
        (WebCore::MediaRecorderPrivateWriter::fetchData):

2019-12-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] TextUtil::width should not overflow when word/letter-spacing is larger than LayoutUnit::max
        https://bugs.webkit.org/show_bug.cgi?id=204782
        <rdar://problem/57580285>

        Reviewed by Antti Koivisto.

        LayoutUnit width = font.width(run) and width -= (font.spaceWidth() + font.wordSpacing()) could produce a negative width value.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::fixedPitchWidth):

2019-12-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Try to fit content on the current line when the line has trimmable trailing content
        https://bugs.webkit.org/show_bug.cgi?id=204781
        <rdar://problem/57580138>

        Reviewed by Antti Koivisto.

        Let's expand the available space when the line has trailing trimmable whitespace and we try to fit some empty inline containers.
        "text content <span style="padding: 1px"></span>" <- the <span></span> runs should fit after trimming the trailing whitespace.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::Content::hasNonContentRunsOnly const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

2019-12-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>

        Unreviewed, fix build warning.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        durationMediaTime should be marked as override.

2019-12-03  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed, rolling out r253020.

        It breaks WinCairo bots.

        Reverted changeset:

        "[MSVC] Add /experimental:newLambdaProcessor switch for better
        C++ conformance"
        https://bugs.webkit.org/show_bug.cgi?id=204443
        https://trac.webkit.org/changeset/253020

2019-12-03  youenn fablet  <youenn@apple.com>

        [Cocoa] Run camera capture in UIProcess by default in layout tests
        https://bugs.webkit.org/show_bug.cgi?id=204512

        Reviewed by Eric Carlson.

        Remove no longer useful internals API once we are moving capture to UIProcess.

        * platform/mediastream/RealtimeMediaSourceFactory.h:
        * testing/Internals.cpp:
        (WebCore::Internals::Internals):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-12-03  Antti Koivisto  <antti@apple.com>

        [LFC][Integration] Setup root box properties
        https://bugs.webkit.org/show_bug.cgi?id=204743

        Reviewed by Zalan Bujtas.

        Test: fast/layoutformattingcontext/flow-integration-basic.html

        Line layout needs to know about flow borders and padding so that boxes are offset correctly.

        * CMakeLists.txt:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        (WebCore::Layout::LayoutContext::layoutWithPreparedRootGeometry):

        Split setup and layout into separate functions.

        * layout/LayoutContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::displayBoxForLayoutRoot):
        * layout/LayoutState.h:
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        (WebCore::Display::Painter::paint):
        (WebCore::Display::Painter::paintInlineFlow):

        Avoid accessing tree root box properties when painting (since margins are not set up).

        * layout/integration/RenderBlockFlowLineLayout.cpp: Renamed from Source/WebCore/layout/RenderBlockFlowLineLayout.cpp.

        Moved to integration subdirectory.

        (WebCore::Layout::RenderBlockFlowLineLayout::layout):

        Drop the content size paramater, the caller is responsible of setting up the root display box.

        (WebCore::Layout::RenderBlockFlowLineLayout::prepareRootDisplayBoxForLayout):

        Setup padding and borders.

        (WebCore::Layout::RenderBlockFlowLineLayout::displayInlineContent const):
        (WebCore::Layout::RenderBlockFlowLineLayout::rootLayoutBox const):
        * layout/integration/RenderBlockFlowLineLayout.h: Renamed from Source/WebCore/layout/RenderBlockFlowLineLayout.h.
        (WebCore::Layout::RenderBlockFlowLineLayout::contentLogicalHeight const):

        Use a member to pass content height.

        * layout/layouttree/LayoutTreeBuilder.h:
        (WebCore::Layout::LayoutTreeContent::layoutBoxForRenderer const):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutLFCLines):

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

        Implement createImageBitmap(OffscreenCanvas)
        https://bugs.webkit.org/show_bug.cgi?id=183440

        Reviewed by Antti Koivisto.

        No new tests. Covered by existing tests.

        * html/ImageBitmap.cpp:
        (WebCore::ImageBitmap::createPromise):
        * html/ImageBitmap.h:
        * page/WindowOrWorkerGlobalScope.idl:

2019-12-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        WebDriver: handle elements of type file in send keys command
        https://bugs.webkit.org/show_bug.cgi?id=188514

        Reviewed by Brian Burg.

        Export symbols now used by WebKit::WebAutomationSessionProxy.

        * html/HTMLInputElement.h:

2019-12-03  Carlos Garcia Campos  <cgarcia@igalia.com>

        [PSON] Tooltips from previous page shown on new page
        https://bugs.webkit.org/show_bug.cgi?id=204735

        Reviewed by Chris Dumez.

        Remove Chrome::setToolTip() that is always called after Chrome::mouseDidMoveOverElement() and add the
        tooltip text and direction as parameters of Chrome::mouseDidMoveOverElement().

        * loader/EmptyClients.h:
        * page/Chrome.cpp:
        (WebCore::Chrome::mouseDidMoveOverElement):
        (WebCore::Chrome::getToolTip):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::mouseMoved):

2019-12-02  Sihui Liu  <sihui_liu@apple.com>

        Cross-thread version StorageQuotaManager
        https://bugs.webkit.org/show_bug.cgi?id=203971
        <rdar://problem/57290349>

        Reviewed by Chris Dumez.

        Implement a lock-based StorageQuotaManager so that quota check can be done on different threads.
        If space request is made on a background thread, it needs to hold a lock until it is finished, so no request
        from different threads can be performed at the same time.
        If space request is made on the main thread, we will dispatch it to a background thread and schedule a calllback
        to the main thread when result is available, so the main thread will not be blocked.

        Covered by existing quota related tests.

        * Headers.cmake:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::create):
        (WebCore::IDBServer::IDBServer::IDBServer):
        (WebCore::IDBServer::IDBServer::didPerformCloseAndDeleteDatabases):
        (WebCore::IDBServer::IDBServer::requestSpace):
        (WebCore::IDBServer::IDBServer::diskUsage):
        (WebCore::IDBServer::IDBServer::QuotaUser::QuotaUser): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::~QuotaUser): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::resetSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::computeSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::whenInitialized): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::initializeSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::ensureQuotaUser): Deleted.
        (WebCore::IDBServer::IDBServer::startComputingSpaceUsedForOrigin): Deleted.
        (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): Deleted.
        (WebCore::IDBServer::IDBServer::finishComputingSpaceUsedForOrigin): Deleted.
        (WebCore::IDBServer::IDBServer::resetSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::increaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::decreaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::increasePotentialSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::decreasePotentialSpaceUsed): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::initializeQuotaUser): Deleted.
        (): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::getCount):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::requestSpace): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::startSpaceIncreaseTask): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStoreAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStoreAfetQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndexAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::getRecordAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecordsAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::getCountAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecordAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::openCursorAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursorAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionAfterQuotaCheck): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::InProcessIDBServer::quotaManager):
        (WebCore::storageQuotaManagerSpaceRequester):
        (WebCore::InProcessIDBServer::InProcessIDBServer):
        (WebCore::storageQuotaManagerGetter): Deleted.
        * Modules/indexeddb/shared/InProcessIDBServer.h:
        * WebCore.xcodeproj/project.pbxproj:
        * storage/StorageQuotaManager.cpp:
        (WebCore::StorageQuotaManager::create):
        (WebCore::StorageQuotaManager::StorageQuotaManager):
        (WebCore::StorageQuotaManager::requestSpaceOnMainThread):
        (WebCore::StorageQuotaManager::requestSpaceOnBackgroundThread):
        (WebCore::StorageQuotaManager::tryGrantRequest):
        (WebCore::StorageQuotaManager::updateQuotaBasedOnUsage):
        (WebCore::StorageQuotaManager::resetQuotaUpdatedBasedOnUsageForTesting):
        (WebCore::StorageQuotaManager::resetQuotaForTesting):
        (WebCore::StorageQuotaManager::~StorageQuotaManager): Deleted.
        (WebCore::StorageQuotaManager::spaceUsage const): Deleted.
        (WebCore::StorageQuotaManager::updateQuotaBasedOnSpaceUsage): Deleted.
        (WebCore::StorageQuotaManager::initializeUsersIfNeeded): Deleted.
        (WebCore::StorageQuotaManager::askUserToInitialize): Deleted.
        (WebCore::StorageQuotaManager::addUser): Deleted.
        (WebCore::StorageQuotaManager::shouldAskForMoreSpace const): Deleted.
        (WebCore::StorageQuotaManager::removeUser): Deleted.
        (WebCore::StorageQuotaManager::requestSpace): Deleted.
        (WebCore::StorageQuotaManager::askForMoreSpace): Deleted.
        (WebCore::StorageQuotaManager::processPendingRequests): Deleted.
        * storage/StorageQuotaManager.h:
        (WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
        (WebCore::StorageQuotaManager::StorageQuotaManager): Deleted.
        (WebCore::StorageQuotaManager::resetQuota): Deleted.
        (WebCore::StorageQuotaManager::state const): Deleted.
        * storage/StorageQuotaUser.h: Removed.

2019-12-02  Fujii Hironori  <Hironori.Fujii@sony.com>

        [MSVC] Add /experimental:newLambdaProcessor switch for better C++ conformance
        https://bugs.webkit.org/show_bug.cgi?id=204443

        Reviewed by Alex Christensen.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess): Reverted MSVC workaround of r252726.

2019-12-02  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Crash when animating an enum attribute for multiple instances of an SVG element
        https://bugs.webkit.org/show_bug.cgi?id=204766

        Reviewed by Simon Fraser.

        Test: svg/animations/animated-enum-lengthAdjust-instances.svg

        All instances of SVG animated properties have to share a single animVal
        such that once its value is progressed, all the instances will see the
        change. This was not happening for SVGAnimatedDecoratedProperty. To do
        that we need to:

        -- Make SVGDecoratedProperty be RefCounted.
        -- Change the type of SVGAnimatedDecoratedProperty::m_baseVal to
           Ref<SVGDecoratedProperty<DecorationType>>.
        -- Change the type of SVGAnimatedDecoratedProperty::m_animVal to
           RefPtr<SVGDecoratedProperty<DecorationType>>. The master property
           creates it and all the instances hold references to the same pointer.
        -- Override the virtual methods instanceStartAnimation() and
           instanceStopAnimation() of SVGAnimatedDecoratedProperty.

        * svg/properties/SVGAnimatedDecoratedProperty.h:
        (WebCore::SVGAnimatedDecoratedProperty::create):
        (WebCore::SVGAnimatedDecoratedProperty::SVGAnimatedDecoratedProperty):
        (WebCore::SVGAnimatedDecoratedProperty::animVal const):
        (WebCore::SVGAnimatedDecoratedProperty::currentValue const):
        * svg/properties/SVGDecoratedEnumeration.h:
        (WebCore::SVGDecoratedEnumeration::create):
        * svg/properties/SVGDecoratedProperty.h:

2019-12-02  Tim Horton  <timothy_horton@apple.com>

        Fix the macCatalyst build.

        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayer::drawLayerContents):

2019-12-02  Zalan Bujtas  <zalan@apple.com>

        [LFC] Fix ASSERT while running fast/block/block-parent-with-zero-width-child.html
        https://bugs.webkit.org/show_bug.cgi?id=204768

        Reviewed by Antti Koivisto.

        1. FormattingState::displayInlineContent() returns nullptr in case of empty inline content.
        2. Typo in InlineItemRun::moveHorizontally

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):

2019-12-02  Yusuke Suzuki  <ysuzuki@apple.com>

        Document::setWindowAttributeEventListener should check `m_domWindow::frame()`
        https://bugs.webkit.org/show_bug.cgi?id=204759
        <rdar://problem/50098787>

        Reviewed by Mark Lam.

        JSLazyEventListener::create assumes that `m_domWindow::frame()` exists.
        But this check was removed at r196888 accidentally.
        This patch adds this check back to fix the crash.

        * dom/Document.cpp:
        (WebCore::Document::setWindowAttributeEventListener):

2019-12-02  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Adjust trailing runs horizontally while trimming content
        https://bugs.webkit.org/show_bug.cgi?id=204749
        <rdar://problem/57559163>

        Reviewed by Antti Koivisto.

        When trailing content is getting trimmed, we also need to adjust subsequent trailing runs e.g. <span>   </span> <- the [container end]'s run should be adjusted. 

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendTextContent): there's nothing to trim when the spacing is zero or negative.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):

2019-12-02  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] LineBuilder::InlineItemRun objects don't have vertical geometry
        https://bugs.webkit.org/show_bug.cgi?id=204752
        <rdar://problem/57560643>

        Reviewed by Antti Koivisto.

        Height and vertical position are computed when the InlineItemRun objects are merged and transformed into LineBuilder::Run objects.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinousContent::append):
        (WebCore::Layout::LineBuilder::ContinousContent::close):
        (WebCore::Layout::LineBuilder::Run::Run):
        (WebCore::Layout::LineBuilder::appendNonBreakableSpace):
        (WebCore::Layout::LineBuilder::appendInlineContainerStart):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        (WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth):
        (WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalLeft const):
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalWidth const):
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalRect const): Deleted.

2019-12-02  Simon Fraser  <simon.fraser@apple.com>

        Remove the confusing Value struct used for calc results
        https://bugs.webkit.org/show_bug.cgi?id=204751

        Reviewed by Tim Horton.

        Replace the Value* argument with a RefPtr<CSSCalcExpressionNode>&. Value just made things more
        confusing.

        * css/CSSCalculationValue.cpp:
        (WebCore::CSSCalcExpressionNodeParser::parseCalc):
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
        (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseValueExpression):

2019-12-02  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] TrimmableContent only needs to keep track of the first trimmable run index
        https://bugs.webkit.org/show_bug.cgi?id=204747
        <rdar://problem/57557732>

        Reviewed by Antti Koivisto.

        Every run after the first trimmable run should either also be trimmable (more whitespace) or skippable (</span>).

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::TrimmableContent::firstRunIndex):
        (WebCore::Layout::LineBuilder::TrimmableContent::isEmpty const):
        (WebCore::Layout::LineBuilder::TrimmableContent::clear):
        (WebCore::Layout::LineBuilder::TrimmableContent::runIndexes): Deleted.

2019-12-02  Alex Christensen  <achristensen@webkit.org>

        Incorrect association of the URL object with the value port
        https://bugs.webkit.org/show_bug.cgi?id=204414

        Reviewed by Sam Weinig.

        Setting a port should clear the port if it's not a numerical value.
        We now match the behavior of Chrome, Firefox, and the URL specification.
        Covered by a newly passing WPT!

        * html/URLUtils.h:
        (WebCore::URLUtils<T>::setPort):

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

        Build ANGLE as a dynamic library
        https://bugs.webkit.org/show_bug.cgi?id=204708
        rdar://57349384

        Reviewed by Tim Horton.

        Weak link against libANGLE.dylib rather than strong link to libANGLE.a.

        * Configurations/WebCore.xcconfig:
        * Configurations/WebCoreTestSupport.xcconfig:
        * platform/graphics/ANGLEWebKitBridge.cpp: Early returns if the library was not loaded.
        (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
        (WebCore::ANGLEWebKitBridge::cleanupCompilers):
        (WebCore::ANGLEWebKitBridge::compileShaderSource):
        (WebCore::ANGLEWebKitBridge::angleAvailable): Static method to detect
        if the library was loaded.
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: Early return if ANGLE was not
        loaded.
        (WebCore::GraphicsContext3D::GraphicsContext3D):

2019-12-02  youenn fablet  <youenn@apple.com>

        Simplify RealtimeOutgoingAudioSource and RealtimeOutgoingVideooSource observeSource/unobserveSource pattern
        https://bugs.webkit.org/show_bug.cgi?id=204570

        Reviewed by Eric Carlson.

        Previously, the outgoing source was observing/unobserving its track if sinks were added/removed.
        We made LibWebRTCRTCRtpSenderBackend stopping the observing in its destructor.
        This makes things complex and we are not always unobserving fast enough for all outgoing sources.

        To make it simpler, the outgoing source is no longer handling the observing/unobserving of its track.
        Instead, its LibWebRTCRtpSenderBackend is handling it directly.
        Observing starts when LibWebRTCRtpSenderBackend gets the track and unobserving happens either on LibWebRTCRtpSenderBackend destruction
        or when the LibWebRTCRtpSenderBackend is no longer interested in the track.
        This is slight less optimal as we might observe the track even if the source has no sink but this should not happen often in practice.

        Removed some unneeded methods.

        Covered by existing tests no longer failing a debug ASSERTION.

        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        (WebCore::LibWebRTCRtpSenderBackend::LibWebRTCRtpSenderBackend):
        (WebCore::LibWebRTCRtpSenderBackend::~LibWebRTCRtpSenderBackend):
        (WebCore::LibWebRTCRtpSenderBackend::startSource):
        (WebCore::LibWebRTCRtpSenderBackend::stopSource):
        (WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
        (WebCore::LibWebRTCRtpSenderBackend::audioSource):
        (WebCore::LibWebRTCRtpSenderBackend::videoSource):
        (WebCore::LibWebRTCRtpSenderBackend::hasSource const):
        (WebCore::LibWebRTCRtpSenderBackend::setSource):
        (WebCore::LibWebRTCRtpSenderBackend::takeSource):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
        * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
        (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
        (WebCore::RealtimeOutgoingAudioSource::observeSource):
        (WebCore::RealtimeOutgoingAudioSource::setSource):
        (WebCore::RealtimeOutgoingAudioSource::AddSink):
        (WebCore::RealtimeOutgoingAudioSource::RemoveSink):
        * platform/mediastream/RealtimeOutgoingAudioSource.h:
        (WebCore::RealtimeOutgoingAudioSource::start):
        * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
        (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
        (WebCore::RealtimeOutgoingVideoSource::observeSource):
        (WebCore::RealtimeOutgoingVideoSource::setSource):
        (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
        (WebCore::RealtimeOutgoingVideoSource::RemoveSink):
        * platform/mediastream/RealtimeOutgoingVideoSource.h:
        (WebCore::RealtimeOutgoingVideoSource::start):
        * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
        (WebCore::RealtimeOutgoingAudioSourceCocoa::~RealtimeOutgoingAudioSourceCocoa): Deleted.

2019-12-02  youenn fablet  <youenn@apple.com>

        SWServer::scriptFetchFinished does not need a Connection as parameter
        https://bugs.webkit.org/show_bug.cgi?id=204641

        Reviewed by Chris Dumez.

        No change of behavior, removing an unused parameter.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::Connection::finishFetchingScriptInServer):
        (WebCore::SWServer::startScriptFetch):
        (WebCore::SWServer::didResolveRegistrationPromise):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::scriptFetchFinished):
        * workers/service/server/SWServerJobQueue.h:

2019-12-02  youenn fablet  <youenn@apple.com>

        Service Worker should correctly set its document first party for cookies URL
        https://bugs.webkit.org/show_bug.cgi?id=204742

        Reviewed by Chris Dumez.

        Test: http/wpt/service-workers/third-party-cookie.html

        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::createPageForServiceWorker):
        Set document first party cookie for URL to the top origin.

2019-12-02  Simon Fraser  <simon.fraser@apple.com>

        Don't do range checking for calc() at parse time
        https://bugs.webkit.org/show_bug.cgi?id=204737

        Reviewed by Antti Koivisto.
        
        As specified in https://drafts.csswg.org/css-values-4/#calc-range, we should not do range checking for calc
        at parse time; the specified value can be a calc which results in a negative values; values are clamped
        at used value time (i.e. when building RenderStyle).
        
        So CSSCalculationValue doesn't need to have isInt(), isPositive(), isNegative(), and CSSCalcExpressionNode
        doesn't have to keep track of whether its value is an integer.
        
        Also do some cleanup of CSSPrimitiveValue, using categories to answer more isFoo type questions, and adding
        isZero(), isPositive() and isNegative() that return Optional<bool> for cases where parse-time range checking
        occurs.

        Tested by existing tests.

        * css/CSSCalculationValue.cpp:
        (WebCore::CSSCalcOperationNode::createSimplified):
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        (WebCore::createBlendHalf):
        (WebCore::createCSS):
        (WebCore::CSSCalcValue::isCalcFunction):
        (WebCore::isIntegerResult): Deleted.
        * css/CSSCalculationValue.h:
        (WebCore::CSSCalcExpressionNode::equals const):
        (WebCore::CSSCalcExpressionNode::category const):
        (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):
        (WebCore::CSSCalcExpressionNode::isInteger const): Deleted.
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::zoomAdjustedPixelValueForLength):
        (WebCore::percentageOrZoomAdjustedValue):
        (WebCore::autoOrZoomAdjustedValue):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor): I missed the Q unit here when I added it.
        (WebCore::CSSPrimitiveValue::isZero const):
        (WebCore::CSSPrimitiveValue::isPositive const):
        (WebCore::CSSPrimitiveValue::isNegative const):
        (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Deleted.
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::isAngle const): Deleted.
        * css/CSSUnits.cpp:
        (WebCore::unitCategory):
        (WebCore::canonicalUnitTypeForCategory):
        (WebCore::canonicalUnitType):
        * css/CSSUnits.h:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeColumnWidth):
        (WebCore::consumePerspective):
        (WebCore::consumeWebkitAspectRatio):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
        (WebCore::CSSPropertyParserHelpers::CalcParser::consumeInteger):
        (WebCore::CSSPropertyParserHelpers::consumeNumber):
        (WebCore::CSSPropertyParserHelpers::consumeSingleShadow): This parsing is a little tricky. The blur radius value is optional,
        but we need to distinguish between failing to parse it, and its value being negative, so an explicit check for calc is the easiest way
        to handlel that.
        (WebCore::CSSPropertyParserHelpers::CalcParser::consumePositiveIntegerRaw): Deleted. It was unused.
        (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw): Deleted.
        * css/parser/CSSPropertyParserHelpers.h:

2019-12-02  Rob Buis  <rbuis@igalia.com>

        [GTK] Fix some warnings
        https://bugs.webkit.org/show_bug.cgi?id=204739

        Reviewed by Frédéric Wang.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::connectionToServerLost):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):

2019-12-02  youenn fablet  <youenn@apple.com>

        Remove MediaStreamTrack event queue
        https://bugs.webkit.org/show_bug.cgi?id=204603

        Reviewed by Eric Carlson.

        Small refactoring to remove the track event queue and use ActiveDOMObject::queueTaskToDispatchEvent instead.
        Updated some #include as some include fixes were needed.
        No change of behavior.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::trackMutedChanged):
        * Modules/mediastream/MediaStreamTrack.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/mediastream/MediaStreamPrivate.h:

2019-12-02  Antti Koivisto  <antti@apple.com>

        [LFC][Render tree] Support LFC in LineLayoutTraversal
        https://bugs.webkit.org/show_bug.cgi?id=204727

        Reviewed by Zalan Bujtas.

        Add support for traversing LFC inline layout to TextBoxIterator and ElementBoxIterator.
        This makes render tree dumps and TextIterator work with LFC layout.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        * layout/RenderBlockFlowLineLayout.cpp:
        (WebCore::Layout::RenderBlockFlowLineLayout::layout):
        (WebCore::Layout::RenderBlockFlowLineLayout::inlineResults const):
        (WebCore::Layout::RenderBlockFlowLineLayout::textBoxesFor const):
        (WebCore::Layout::RenderBlockFlowLineLayout::elementBoxFor const):
        * layout/RenderBlockFlowLineLayout.h:
        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::layoutBox const):

        Replace style with layout box weak pointer. This allows finding runs for a given box.

        (WebCore::Display::Run::style const):

        Get style from the layout box.

        (WebCore::Display::Run::Run):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        (WebCore::Layout::InlineFormattingContext::invalidateFormattingState):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::results const):
        (WebCore::Layout::InlineFormattingState::clearResults):
        (WebCore::Layout::InlineFormattingState::ensureResults):
        (WebCore::Layout::InlineFormattingState::displayRuns const): Deleted.
        (WebCore::Layout::InlineFormattingState::displayRuns): Deleted.
        (WebCore::Layout::InlineFormattingState::lineBoxes const): Deleted.
        (WebCore::Layout::InlineFormattingState::lineBoxes): Deleted.
        (WebCore::Layout::InlineFormattingState::addLineBox): Deleted.
        (WebCore::Layout::InlineFormattingState::lineBoxForRun const): Deleted.
        (WebCore::Layout::InlineFormattingState::addDisplayRun): Deleted.
        (WebCore::Layout::InlineFormattingState::resetDisplayRuns): Deleted.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        * layout/displaytree/DisplayInlineContent.h: Copied from Source/WebCore/layout/RenderBlockFlowLineLayout.h.
        (WebCore::Display::InlineContent::lineBoxForRun const):

        Factor into a struct. Make it refcounted for safe access from line layout iterators.

        (WebCore::Layout::outputInlineRuns):
        * rendering/line/LineLayoutTraversal.cpp:
        (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutTraversal::flowForText):
        (WebCore::LineLayoutTraversal::firstTextBoxFor):
        (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
        (WebCore::LineLayoutTraversal::elementBoxFor):
        * rendering/line/LineLayoutTraversal.h:
        * rendering/line/LineLayoutTraversalDisplayRunPath.h: Added.
        (WebCore::LineLayoutTraversal::linePosition):
        (WebCore::LineLayoutTraversal::DisplayRunPath::DisplayRunPath):

        New path for traversing display runs.

        (WebCore::LineLayoutTraversal::DisplayRunPath::rect const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::logicalRect const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLeftToRightDirection const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::dirOverride const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::hasHyphen const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::text const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::length const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::isLast const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):
        (WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInTextOrder):
        (WebCore::LineLayoutTraversal::DisplayRunPath::operator== const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::atEnd const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::displayRuns const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::firstRun const):
        (WebCore::LineLayoutTraversal::DisplayRunPath::run const):

2019-12-01  Tim Horton  <timothy_horton@apple.com>

        Disable LocalCurrentGraphicsContext when doing DisplayList recording
        https://bugs.webkit.org/show_bug.cgi?id=204721

        Reviewed by Simon Fraser.

        * platform/mac/LocalCurrentGraphicsContext.mm:
        (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
        Since we don't have a platform context, we can't set the global
        graphics context. This means that anything depending on this downstream
        will break and need to be implemented a different way in
        the DisplayList case.

2019-12-01  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Trim trailing letter spacing.
        https://bugs.webkit.org/show_bug.cgi?id=204731
        <rdar://problem/57545763>

        Reviewed by Antti Koivisto.

        Refactor trailing trimmable content to support partial, non-whitespace trimmable content e.g. letter spacing.
        https://drafts.csswg.org/css-text-3/#letter-spacing-property -> UAs therefore must not append letter spacing to the right or trailing edge of a line.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::Content::append):
        (WebCore::Layout::LineBreaker::Content::reset):
        (WebCore::Layout::LineBreaker::Content::TrailingTrimmableContent::reset):
        (WebCore::Layout::LineBreaker::Content::hasNonWhitespaceOrInlineBox const): Deleted.
        (WebCore::Layout::LineBreaker::Content::trailingTrimmableWidth const): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::Content::isEmpty const):
        (WebCore::Layout::LineBreaker::Content::nonTrimmableWidth const):
        (WebCore::Layout::LineBreaker::Content::hasTrailingTrimmableContent const):
        (WebCore::Layout::LineBreaker::Content::isTrailingContentFullyTrimmable const):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        (WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::isTrailingContentFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableContent::isTrailingContentFullyTrimmable const):
        (WebCore::Layout::LineBuilder::TrimmableContent::clear):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):

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

        Rename CSSCalcPrimitiveValue to CSSCalcPrimitiveValueNode, and CSSCalcOperation to CSSCalcOperationNode
        https://bugs.webkit.org/show_bug.cgi?id=204730

        Reviewed by Dean Jackson.

        Pure rename. These are both subclasses of CSSCalcExpressionNode, so are better with Node in the name.

        * css/CSSCalculationValue.cpp:
        (WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const):
        (WebCore::CSSCalcPrimitiveValueNode::doubleValue const):
        (WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const):
        (WebCore::CSSCalcPrimitiveValueNode::collectDirectComputationalDependencies const):
        (WebCore::CSSCalcPrimitiveValueNode::collectDirectRootComputationalDependencies const):
        (WebCore::CSSCalcPrimitiveValueNode::equals const):
        (WebCore::CSSCalcPrimitiveValueNode::dump const):
        (WebCore::CSSCalcOperationNode::create):
        (WebCore::CSSCalcOperationNode::createMinOrMax):
        (WebCore::CSSCalcOperationNode::createSimplified):
        (WebCore::CSSCalcOperationNode::primitiveType const):
        (WebCore::CSSCalcOperationNode::createCalcExpression const):
        (WebCore::CSSCalcOperationNode::doubleValue const):
        (WebCore::CSSCalcOperationNode::computeLengthPx const):
        (WebCore::CSSCalcOperationNode::collectDirectComputationalDependencies const):
        (WebCore::CSSCalcOperationNode::collectDirectRootComputationalDependencies const):
        (WebCore::CSSCalcOperationNode::buildCssText):
        (WebCore::CSSCalcOperationNode::customCSSText const):
        (WebCore::CSSCalcOperationNode::dump const):
        (WebCore::CSSCalcOperationNode::equals const):
        (WebCore::CSSCalcOperationNode::evaluateOperator):
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
        (WebCore::createBlendHalf):
        (WebCore::createCSS):
        (WebCore::CSSCalcPrimitiveValue::createCalcExpression const): Deleted.
        (WebCore::CSSCalcPrimitiveValue::doubleValue const): Deleted.
        (WebCore::CSSCalcPrimitiveValue::computeLengthPx const): Deleted.
        (WebCore::CSSCalcPrimitiveValue::collectDirectComputationalDependencies const): Deleted.
        (WebCore::CSSCalcPrimitiveValue::collectDirectRootComputationalDependencies const): Deleted.
        (WebCore::CSSCalcPrimitiveValue::equals const): Deleted.
        (WebCore::CSSCalcPrimitiveValue::dump const): Deleted.
        (WebCore::CSSCalcOperation::create): Deleted.
        (WebCore::CSSCalcOperation::createMinOrMax): Deleted.
        (WebCore::CSSCalcOperation::createSimplified): Deleted.
        (WebCore::CSSCalcOperation::primitiveType const): Deleted.
        (WebCore::CSSCalcOperation::createCalcExpression const): Deleted.
        (WebCore::CSSCalcOperation::doubleValue const): Deleted.
        (WebCore::CSSCalcOperation::computeLengthPx const): Deleted.
        (WebCore::CSSCalcOperation::collectDirectComputationalDependencies const): Deleted.
        (WebCore::CSSCalcOperation::collectDirectRootComputationalDependencies const): Deleted.
        (WebCore::CSSCalcOperation::buildCssText): Deleted.
        (WebCore::CSSCalcOperation::customCSSText const): Deleted.
        (WebCore::CSSCalcOperation::dump const): Deleted.
        (WebCore::CSSCalcOperation::equals const): Deleted.
        (WebCore::CSSCalcOperation::evaluateOperator): Deleted.

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

        Add a Calc log channel, and support type traits for calc-related classes
        https://bugs.webkit.org/show_bug.cgi?id=204729

        Reviewed by Dean Jackson.

        Add type traits support for CalculationValue and CSSCalculationValue classes.
        
        Add a Calc logging channel and dump post-parsing values, and in some error cases.s

        * css/CSSCalculationValue.cpp:
        (WebCore::operator<<):
        (WebCore::prettyPrintNode):
        (WebCore::prettyPrintNodes):
        (WebCore::CSSCalcPrimitiveValue::dump const):
        (WebCore::CSSCalcOperation::create):
        (WebCore::CSSCalcOperation::createMinOrMax):
        (WebCore::CSSCalcOperation::dump const):
        (WebCore::CSSCalcExpressionNodeParser::parseCalc):
        (WebCore::createCSS):
        (WebCore::CSSCalcValue::dump const):
        (WebCore::CSSCalcValue::create):
        * css/CSSCalculationValue.h:
        * platform/CalculationValue.cpp:
        (WebCore::CalcExpressionNumber::operator== const):
        (WebCore::CalcExpressionOperation::operator== const):
        (WebCore::CalcExpressionLength::operator== const):
        (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
        (WebCore::CalcExpressionBlendLength::operator== const):
        * platform/CalculationValue.h:
        (WebCore::toCalcExpressionNumber): Deleted.
        (WebCore::toCalcExpressionLength): Deleted.
        (WebCore::toCalcExpressionOperation): Deleted.
        (WebCore::toCalcExpressionBlendLength): Deleted.
        * platform/Logging.h:

2019-12-01  Antti Koivisto  <antti@apple.com>

        Regression (r252893): loader/stateobjects/pushstate-size.html is crashing on mac debug
        https://bugs.webkit.org/show_bug.cgi?id=204725

        Unreviewed followup to r252893.

        * rendering/RenderElement.h:

        Increase bitfield size to fit the enum.

2019-12-01  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for word-spacing property
        https://bugs.webkit.org/show_bug.cgi?id=204723
        <rdar://problem/57541871>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::inlineItemWidth):

2019-11-30  Antoine Quint  <graouts@apple.com>

        [Web Animations] Implement Animation.commitStyles()
        https://bugs.webkit.org/show_bug.cgi?id=202193
        <rdar://problem/55697790>

        Reviewed by Dean Jackson.

        We implement the Animation.commitStyles() method following the spec to the letter. We fail a few tests still because we don't support animation
        composite operations and because of rounding errors when blending opacity styles.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::ensureEffectsAreSorted): Remove the animation sorting logic since it's now made available in WebAnimationUtilities.h.
        * animation/KeyframeEffectStack.h:
        (WebCore::KeyframeEffectStack::cssAnimationNames const): New function needed to call compareAnimationsByCompositeOrder() in WebAnimation::commitStyles().
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::commitStyles): Implement the spec steps as specified in https://drafts.csswg.org/web-animations-1/#commit-computed-styles. We use
        a CSSStyleDeclaration to copy the content of the existing inline "style" attribute, add the animated values and then serialize it into the "style" attribute.
        Even though it would have been more convenient to use StyledElement::setInlineStyleProperty(), we do this to ensure mutation observers get notified of such
        a change.
        * animation/WebAnimationUtilities.cpp: Added.
        (WebCore::compareAnimationsByCompositeOrder): Copied the animation sorting logic previously implemented in KeyframeEffectStack::ensureEffectsAreSorted().
        * animation/WebAnimationUtilities.h:

2019-11-30  Tim Horton  <timothy_horton@apple.com>

        Make CompositeOperator and BlendMode encodable
        https://bugs.webkit.org/show_bug.cgi?id=204722

        Reviewed by Eric Carlson.

        Make CompositeOperator an `enum class`, and fix the fallout.
        Add EnumTraits for CompositeOperator and BlendMode, so that they can be encoded.

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator CompositeOperator const):
        * dom/Document.cpp:
        (WebCore::Document::compositeOperatorForBackgroundColor const):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::parseAttribute):
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawTextInternal):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::State::State):
        (WebCore::CanvasRenderingContext2DBase::setGlobalCompositeOperation):
        (WebCore::CanvasRenderingContext2DBase::isFullCanvasCompositeMode):
        (WebCore::CanvasRenderingContext2DBase::fillInternal):
        (WebCore::CanvasRenderingContext2DBase::strokeInternal):
        (WebCore::CanvasRenderingContext2DBase::clearRect):
        (WebCore::CanvasRenderingContext2DBase::fillRect):
        (WebCore::CanvasRenderingContext2DBase::strokeRect):
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        (WebCore::CanvasRenderingContext2DBase::drawImageFromRect):
        (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
        * inspector/InspectorOverlay.cpp:
        (WebCore::drawOutlinedQuadWithClip):
        * platform/graphics/CrossfadeGeneratedImage.cpp:
        (WebCore::CrossfadeGeneratedImage::drawCrossfade):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties const):
        * platform/graphics/GraphicsTypes.cpp:
        (WebCore::parseCompositeAndBlendOperator):
        (WebCore::compositeOperatorName):
        * platform/graphics/GraphicsTypes.h:
        * platform/graphics/Image.cpp:
        (WebCore::Image::fillWithSolidColor):
        * platform/graphics/ImagePaintingOptions.h:
        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ShadowBlur::blurAndColorShadowBuffer):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawNativeImage):
        * platform/graphics/cairo/CairoOperations.h:
        * platform/graphics/cairo/CairoUtilities.cpp:
        (WebCore::toCairoCompositeOperator):
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::GraphicsContext3D::paintToCanvas):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::selectCGBlendMode):
        * platform/graphics/filters/FEBlend.cpp:
        (WebCore::FEBlend::platformApplySoftware):
        (WebCore::FEBlend::externalRepresentation const):
        * platform/graphics/filters/FEComposite.cpp:
        (WebCore::FEComposite::platformApplySoftware):
        * platform/graphics/filters/FEDropShadow.cpp:
        (WebCore::FEDropShadow::platformApplySoftware):
        * platform/graphics/filters/SourceAlpha.cpp:
        (WebCore::SourceAlpha::platformApplySoftware):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::paint):
        * platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp:
        (Nicosia::PaintingEngineBasic::paint):
        * platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
        (Nicosia::paintLayer):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::State::setCompositeOperation):
        * platform/graphics/win/Direct2DOperations.h:
        * platform/graphics/win/ImageCGWin.cpp:
        (WebCore::BitmapImage::getHBITMAPOfSize):
        * platform/graphics/win/ImageCairoWin.cpp:
        (WebCore::BitmapImage::getHBITMAPOfSize):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintMask):
        * rendering/InlineFlowBox.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintMaskImages):
        * rendering/RenderBox.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderBoxModelObject.h:
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintReplaced):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintIntoRect):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::supportsDirectlyCompositedBoxDecorations):
        * rendering/RenderTreeAsText.cpp:
        * rendering/RenderView.cpp:
        (WebCore::RenderView::paintBoxDecorations):
        * rendering/style/FillLayer.cpp:
        (WebCore::FillLayer::FillLayer):
        (WebCore::FillLayer::hasOpaqueImage const):
        * rendering/style/FillLayer.h:
        (WebCore::FillLayer::initialFillComposite):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::nativeImage):
        (WebCore::SVGImage::draw):

2019-11-30  Tim Horton  <timothy_horton@apple.com>

        Reimplement some PlatformCALayer methods using GraphicsContext instead of CGContextRef
        https://bugs.webkit.org/show_bug.cgi?id=204698

        Reviewed by Sam Weinig.

        In order to make PlatformCALayer-level DisplayList recording possible,
        reimplement a few methods in terms of WebCore::GraphicsContext instead
        of CGContextRef directly. Namely, collectRectsToPaint, drawLayerContents,
        and drawRepaintIndicator.

        In the drawLayerContents case, there are operations (like setting the
        AppKit global graphics context) that cannot be done without a platform
        context. In those cases, we skip that operation if we don't have a
        platform context.

        Anything depending on this downstream will break and need to be
        implemented a different way in the DisplayList case.

        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ca/PlatformCALayer.cpp:
        (WebCore::PlatformCALayer::drawRepaintIndicator):
        * platform/graphics/ca/PlatformCALayer.h:
        * platform/graphics/ca/TileGrid.cpp:
        (WebCore::TileGrid::platformCALayerPaintContents):
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayer::collectRectsToPaint):
        (WebCore::PlatformCALayer::drawLayerContents):
        (WebCore::PlatformCALayerCocoa::enumerateRectsBeingDrawn):
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (PlatformCALayer::collectRectsToPaint):
        * platform/graphics/mac/WebLayer.mm:
        (-[WebLayer drawInContext:]):

2019-11-30  youenn fablet  <youenn@apple.com>

        Simplify CoreAudioCaptureSource suspension logic
        https://bugs.webkit.org/show_bug.cgi?id=201720

        Reviewed by Eric Carlson.

        Instead of going through the source to suspend/resume the audio unit,
        we directly go to the shared unit, which nows notifies the clients that they are muted or unmuted.

        To simplify things, we no longer schedule tasks to resume/suspend/reconfigure.
        All of these orders are started from the main thread synchronously.

        No observable change of behavior.

        * platform/mediastream/mac/BaseAudioSharedUnit.cpp:
        (WebCore::BaseAudioSharedUnit::startProducingData):
        (WebCore::BaseAudioSharedUnit::reconfigure):
        (WebCore::BaseAudioSharedUnit::resume):
        (WebCore::BaseAudioSharedUnit::suspend):
        * platform/mediastream/mac/BaseAudioSharedUnit.h:
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioCaptureSourceFactory::beginInterruption):
        (WebCore::CoreAudioCaptureSourceFactory::endInterruption):
        (WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration):
        (WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
        (WebCore::CoreAudioCaptureSource::startProducingData):
        (WebCore::CoreAudioCaptureSource::stopProducingData):
        (WebCore::CoreAudioCaptureSource::settingsDidChange):
        (WebCore::CoreAudioCaptureSource::scheduleReconfiguration): Deleted.
        (WebCore::CoreAudioCaptureSource::beginInterruption): Deleted.
        (WebCore::CoreAudioCaptureSource::endInterruption): Deleted.
        * platform/mediastream/mac/CoreAudioCaptureSource.h:

2019-11-30  youenn fablet  <youenn@apple.com>

        Update RealtimeOutgoingAudioSourceCocoa::m_writeCount when sampleRate changes
        https://bugs.webkit.org/show_bug.cgi?id=204606

        Reviewed by Eric Carlson.

        Update m_writeCount to make sure our high/low buffer computation is done right.

        Test: webrtc/audio-samplerate-change.html

        * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
        (WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable):

2019-11-30  Antti Koivisto  <antti@apple.com>

        Move path implementation functions in LineLayoutTraversal to *Path classes
        https://bugs.webkit.org/show_bug.cgi?id=204714

        Reviewed by Sam Weinig.

        Simplify LineLayoutTraversal and make it easier to extend.

        - Turn SimplePath and ComplexPath structs into classes
        - Move them to separate files
        - Make path implementation functions class members, called via generic lambdas
        - Instead of inheriting Box/TextBox to iterators, make it a member variable.
        - Move the path variant to Box, avoiding use of templates.

        * WebCore.xcodeproj/project.pbxproj:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::writeTextBox):
        * rendering/line/LineLayoutTraversal.cpp:
        (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInVisualOrder):
        (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInTextOrder):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::atEnd const):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::atEnd const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const): Deleted.
        * rendering/line/LineLayoutTraversal.h:
        (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator* const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator-> const):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::operator* const):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::operator-> const):
        (WebCore::LineLayoutTraversal::Box::Box):
        (WebCore::LineLayoutTraversal::Box::rect const):
        (WebCore::LineLayoutTraversal::Box::logicalRect const):
        (WebCore::LineLayoutTraversal::Box::isLeftToRightDirection const):
        (WebCore::LineLayoutTraversal::Box::dirOverride const):
        (WebCore::LineLayoutTraversal::Box::isLineBreak const):
        (WebCore::LineLayoutTraversal::TextBox::hasHyphen const):
        (WebCore::LineLayoutTraversal::TextBox::TextBox):
        (WebCore::LineLayoutTraversal::TextBox::text const):
        (WebCore::LineLayoutTraversal::TextBox::localStartOffset const):
        (WebCore::LineLayoutTraversal::TextBox::localEndOffset const):
        (WebCore::LineLayoutTraversal::TextBox::length const):
        (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const):
        (WebCore::LineLayoutTraversal::TextBox::isLast const):
        (): Deleted.
        (WebCore::LineLayoutTraversal::Box<Iterator>::rect const): Deleted.
        (WebCore::LineLayoutTraversal::Box<Iterator>::logicalRect const): Deleted.
        (WebCore::LineLayoutTraversal::Box<Iterator>::isLeftToRightDirection const): Deleted.
        (WebCore::LineLayoutTraversal::Box<Iterator>::dirOverride const): Deleted.
        (WebCore::LineLayoutTraversal::Box<Iterator>::isLineBreak const): Deleted.
        (WebCore::LineLayoutTraversal::Box<Iterator>::iterator const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::hasHyphen const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::text const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::localStartOffset const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::localEndOffset const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::length const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLastOnLine const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLast const): Deleted.
        * rendering/line/LineLayoutTraversalComplexPath.h: Added.
        (WebCore::LineLayoutTraversal::ComplexPath::ComplexPath):
        (WebCore::LineLayoutTraversal::ComplexPath::rect const):
        (WebCore::LineLayoutTraversal::ComplexPath::logicalRect const):
        (WebCore::LineLayoutTraversal::ComplexPath::isLeftToRightDirection const):
        (WebCore::LineLayoutTraversal::ComplexPath::dirOverride const):
        (WebCore::LineLayoutTraversal::ComplexPath::isLineBreak const):
        (WebCore::LineLayoutTraversal::ComplexPath::hasHyphen const):
        (WebCore::LineLayoutTraversal::ComplexPath::text const):
        (WebCore::LineLayoutTraversal::ComplexPath::localStartOffset const):
        (WebCore::LineLayoutTraversal::ComplexPath::localEndOffset const):
        (WebCore::LineLayoutTraversal::ComplexPath::length const):
        (WebCore::LineLayoutTraversal::ComplexPath::isLastOnLine const):
        (WebCore::LineLayoutTraversal::ComplexPath::isLast const):
        (WebCore::LineLayoutTraversal::ComplexPath::traverseNextTextBoxInVisualOrder):
        (WebCore::LineLayoutTraversal::ComplexPath::traverseNextTextBoxInTextOrder):
        (WebCore::LineLayoutTraversal::ComplexPath::operator== const):
        (WebCore::LineLayoutTraversal::ComplexPath::atEnd const):
        (WebCore::LineLayoutTraversal::ComplexPath::inlineTextBox const):
        (WebCore::LineLayoutTraversal::ComplexPath::nextInlineTextBoxInTextOrder const):
        * rendering/line/LineLayoutTraversalSimplePath.h: Added.
        (WebCore::LineLayoutTraversal::SimplePath::SimplePath):
        (WebCore::LineLayoutTraversal::SimplePath::rect const):
        (WebCore::LineLayoutTraversal::SimplePath::logicalRect const):
        (WebCore::LineLayoutTraversal::SimplePath::isLeftToRightDirection const):
        (WebCore::LineLayoutTraversal::SimplePath::dirOverride const):
        (WebCore::LineLayoutTraversal::SimplePath::isLineBreak const):
        (WebCore::LineLayoutTraversal::SimplePath::hasHyphen const):
        (WebCore::LineLayoutTraversal::SimplePath::text const):
        (WebCore::LineLayoutTraversal::SimplePath::localStartOffset const):
        (WebCore::LineLayoutTraversal::SimplePath::localEndOffset const):
        (WebCore::LineLayoutTraversal::SimplePath::length const):
        (WebCore::LineLayoutTraversal::SimplePath::isLastOnLine const):
        (WebCore::LineLayoutTraversal::SimplePath::isLast const):
        (WebCore::LineLayoutTraversal::SimplePath::traverseNextTextBoxInVisualOrder):
        (WebCore::LineLayoutTraversal::SimplePath::traverseNextTextBoxInTextOrder):
        (WebCore::LineLayoutTraversal::SimplePath::operator== const):
        (WebCore::LineLayoutTraversal::SimplePath::atEnd const):

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

        [LFC][IFC] Add support for hyphenate-limit-lines
        https://bugs.webkit.org/show_bug.cgi?id=204712
        <rdar://problem/57536727>

        Reviewed by Antti Koivisto.

        Now IFC (hyphenation)feature matches SLL. 

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::setHyphenationDisabled):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::LineLayoutContext):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        * layout/inlineformatting/LineLayoutContext.h:

2019-11-30  Antoine Quint  <graouts@apple.com>

        [Web Animations] Forward-filling animations should not schedule updates while filling
        https://bugs.webkit.org/show_bug.cgi?id=204697
        <rdar://problem/57534005>

        Reviewed by Dean Jackson.

        Tests: webanimations/no-scheduling-while-filling-accelerated.html
               webanimations/no-scheduling-while-filling-non-accelerated.html

        For two different reasons, we would continuously schedule updates for animations in their "after" phase, ie. when they would have "fill: forwards"
        and be finished.

        In the case of non-accelerated animations, that was because we would also schedule an immedate update in DocumentTimeline::scheduleNextTick() provided
        we had relevant animations that weren't accelerated. But since animations in their "after" phase are still considered relevant, which means that they
        would override the base style with an animated value, this caused the unnecessary scheduled updates.

        To address this, we run WebAnimation::timeToNextTick() in DocumentTimeline::scheduleNextTick() for all relevant animations and we teach that function
        to schedule an immediate update only during the "active" phase, and to schedule a timed update only in the "before" phase computing the delay until
        the animation enters the "active" phase.

        While performing this work, we found a couple of other issues that weren't apparent until we had this more efficient scheduling in place.

        First, we would not allow any additional calls to DocumentTimeline::scheduleAnimationResolution() to actually schedule an update while we were in the
        process of updating animations. While this wasn't a problem before because the mere presence of relevant animations would cause an upadte, we now had
        to allow any animation changing timing properties as promises would resolve and events would be dispatched during the animation update to cause further
        animation updates to be scheduled. So we moved the "m_animationResolutionScheduled" flag reset earlier in DocumentTimeline::updateAnimationsAndSendEvents()
        before we actually run the animation update procedure.

        Following that change, we also had to make sure that timing changes made through the evaluation of the pending play and pause tasks would _not_ cause
        animations to be scheduled, which meant that an animation that became non-pending (ie. its first tick occured) would always schedule one immediate
        animation update. So now we have an extra "silent" flag to WebAnimation::timingDidChange() which is only set to true when called from either
        WebAnimation::runPendingPlayTask() or WebAnimation::runPendingPauseTask().

        Finally, one existing test showed that calling KeyframeEffect::setKeyframes() while running animations didn't cause an animation update to be scheduled
        since a call to WebAnimation::effectTimingDidChange() was lacking. This is now addressed.

        As for accelerated animations, the extraneous animation scheduling occured because we would get in a state where we would record an "accelerated action"
        to stop the accelerated animation but the accelerated animation had already completed and the renderer for the target element was no longer composited.
        This meant that KeyframeEffect::applyPendingAcceleratedActions() would not perform any work and the pending accelerated action would remain in the
        DocumentTimeline queue and cause an update to be scheduled to try again, endlessly.

        To address that, we first check in KeyframeEffect::addPendingAcceleratedAction() if the recorded action differs from the last recorded action, avoiding
        unnecessary work, and in KeyframeEffect::applyPendingAcceleratedActions(), if our last recorded action was "Stop" and the renderer was not composited,
        we discard all pending accelerated actions.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::scheduleNextTick):
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::setKeyframes):
        (WebCore::KeyframeEffect::addPendingAcceleratedAction):
        (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::timingDidChange):
        (WebCore::WebAnimation::runPendingPlayTask):
        (WebCore::WebAnimation::runPendingPauseTask):
        (WebCore::WebAnimation::timeToNextTick const):
        * animation/WebAnimation.h:

2019-11-30  youenn fablet  <youenn@apple.com>

        MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
        https://bugs.webkit.org/show_bug.cgi?id=204600
        <rdar://problem/57438874>

        Reviewed by Eric Carlson.

        MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
        If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
        and confuse the pipe.
        Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.

        Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.

        * platform/mediastream/mac/MockAudioSharedUnit.h:
        * platform/mediastream/mac/MockAudioSharedUnit.mm:
        (WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
        (WebCore::MockAudioSharedUnit::startInternal):

2019-11-30  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, follow-up to r252938, now fixing the MSE/EME build

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        supportsKeySystem needs to be public because it's referenced from
        the MSE MediaPlayerPrivate sub-class.

2019-11-30  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, GTK LTS build fix after r252950.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        supportsKeySystem can't be ifdeffed.

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

        [LFC][IFC] Add support for hyphenate-limit-before and hyphenate-limit-after
        https://bugs.webkit.org/show_bug.cgi?id=204710
        <rdar://problem/57535210>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):

2019-11-29  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r252944.
        https://bugs.webkit.org/show_bug.cgi?id=204709

        Broke Windows Build (Requested by aakashja_ on #webkit).

        Reverted changeset:

        "[Web Animations] Forward-filling animations should not
        schedule updates while filling"
        https://bugs.webkit.org/show_bug.cgi?id=204697
        https://trac.webkit.org/changeset/252944

2019-11-29  Charlie Turner  <cturner@igalia.com>

        [GStreamer] MediaPlayerPrivateGStreamer style cleanups
        https://bugs.webkit.org/show_bug.cgi?id=204617

        Reviewed by Xabier Rodriguez-Calvar.

        Follow-up commit to bug 204352 addressing style issues in the
        existing player code. The main issues addressed are naming
        violations, adding final to types not overridden and organizing
        better the scope of names in the classes.

        Covered by existing tests.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::initializeDebugCategory):
        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
        (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
        (WebCore::MediaPlayerPrivateGStreamer::play):
        (WebCore::MediaPlayerPrivateGStreamer::pause):
        (WebCore::MediaPlayerPrivateGStreamer::paused const):
        (WebCore::MediaPlayerPrivateGStreamer::doSeek):
        (WebCore::MediaPlayerPrivateGStreamer::seek):
        (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
        (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamer::setRate):
        (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
        (WebCore::MediaPlayerPrivateGStreamer::setPreload):
        (WebCore::MediaPlayerPrivateGStreamer::buffered const):
        (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
        (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
        (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
        (WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
        (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
        (WebCore::MediaPlayerPrivateGStreamer::isMuted const):
        (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
        (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
        (WebCore::MediaPlayerPrivateGStreamer::setMuted):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus):
        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
        (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
        (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData const):
        (WebCore::MediaPlayerPrivateGStreamer::acceleratedRenderingStateChanged):
        (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):
        (WebCore::MediaPlayerPrivateGStreamer::cancelRepaint):
        (WebCore::MediaPlayerPrivateGStreamer::paint):
        (WebCore::MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamer::nativeImageForCurrentTime):
        (WebCore::MediaPlayerPrivateGStreamer::movieLoadType const):
        (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
        (WebCore::MediaPlayerPrivateGStreamer::decodedFrameCount const):
        (WebCore::MediaPlayerPrivateGStreamer::droppedFrameCount const):
        (WebCore::MediaPlayerPrivateGStreamer::attemptToDecryptWithLocalInstance):
        (WebCore::MediaPlayerPrivateGStreamer::setWaitingForKey):
        (WebCore::MediaPlayerPrivateGStreamer::initializeDebugCategory): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::sizeChanged): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::muted const): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::pipeline const):
        (WebCore::MediaPlayerPrivateGStreamer::mediaPlayer const): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::isLiveStream const): Deleted.
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::pause):
        (WebCore::MediaPlayerPrivateGStreamerMSE::durationMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seeking const):
        (WebCore::MediaPlayerPrivateGStreamerMSE::waitForSeekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
        (WebCore::MediaPlayerPrivateGStreamerMSE::asyncStateChangeDone):
        (WebCore::MediaPlayerPrivateGStreamerMSE::maxMediaTimeSeekable const):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
        (WebCore::MediaSourceClientGStreamerMSE::flush):

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

        [LFC][IFC] Add support for simple hyphenation
        https://bugs.webkit.org/show_bug.cgi?id=204706
        <rdar://problem/57533803>

        Reviewed by Antti Koivisto.

        This is just -webkit-hyphens: auto, no limit-before/after/lines support yet.

        * layout/Verification.cpp:
        (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::split):

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

        [Web Animations] Enable WebAnimationsCSSIntegrationEnabled by default
        https://bugs.webkit.org/show_bug.cgi?id=204650
        <rdar://problem/45562752>

        Reviewed by Dean Jackson.

        * page/RuntimeEnabledFeatures.h:

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

        [Web Animations] Forward-filling animations should not schedule updates while filling
        https://bugs.webkit.org/show_bug.cgi?id=204697

        Reviewed by Dean Jackson.

        Tests: webanimations/no-scheduling-while-filling-accelerated.html
               webanimations/no-scheduling-while-filling-non-accelerated.html

        For two different reasons, we would continuously schedule updates for animations in their "after" phase, ie. when they would have "fill: forwards"
        and be finished.
        
        In the case of non-accelerated animations, that was because we would also schedule an immedate update in DocumentTimeline::scheduleNextTick() provided
        we had relevant animations that weren't accelerated. But since animations in their "after" phase are still considered relevant, which means that they
        would override the base style with an animated value, this caused the unnecessary scheduled updates.
        
        To address this, we run WebAnimation::timeToNextTick() in DocumentTimeline::scheduleNextTick() for all relevant animations and we teach that function
        to schedule an immediate update only during the "active" phase, and to schedule a timed update only in the "before" phase computing the delay until
        the animation enters the "active" phase.

        While performing this work, we found a couple of other issues that weren't apparent until we had this more efficient scheduling in place.
        
        First, we would not allow any additional calls to DocumentTimeline::scheduleAnimationResolution() to actually schedule an update while we were in the
        process of updating animations. While this wasn't a problem before because the mere presence of relevant animations would cause an upadte, we now had
        to allow any animation changing timing properties as promises would resolve and events would be dispatched during the animation update to cause further
        animation updates to be scheduled. So we moved the "m_animationResolutionScheduled" flag reset earlier in DocumentTimeline::updateAnimationsAndSendEvents()
        before we actually run the animation update procedure.

        Following that change, we also had to make sure that timing changes made through the evaluation of the pending play and pause tasks would _not_ cause
        animations to be scheduled, which meant that an animation that became non-pending (ie. its first tick occured) would always schedule one immediate
        animation update. So now we have an extra "silent" flag to WebAnimation::timingDidChange() which is only set to true when called from either
        WebAnimation::runPendingPlayTask() or WebAnimation::runPendingPauseTask().

        Finally, one existing test showed that calling KeyframeEffect::setKeyframes() while running animations didn't cause an animation update to be scheduled
        since a call to WebAnimation::effectTimingDidChange() was lacking. This is now addressed.

        As for accelerated animations, the extraneous animation scheduling occured because we would get in a state where we would record an "accelerated action"
        to stop the accelerated animation but the accelerated animation had already completed and the renderer for the target element was no longer composited.
        This meant that KeyframeEffect::applyPendingAcceleratedActions() would not perform any work and the pending accelerated action would remain in the
        DocumentTimeline queue and cause an update to be scheduled to try again, endlessly.

        To address that, we first check in KeyframeEffect::addPendingAcceleratedAction() if the recorded action differs from the last recorded action, avoiding
        unnecessary work, and in KeyframeEffect::applyPendingAcceleratedActions(), if our last recorded action was "Stop" and the renderer was not composited,
        we discard all pending accelerated actions.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::scheduleNextTick):
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::setKeyframes):
        (WebCore::KeyframeEffect::addPendingAcceleratedAction):
        (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::timingDidChange):
        (WebCore::WebAnimation::runPendingPlayTask):
        (WebCore::WebAnimation::runPendingPauseTask):
        (WebCore::WebAnimation::timeToNextTick const):
        * animation/WebAnimation.h:

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

        [LFC][IFC] Vector allocate LineBoxes and Display::Runs
        https://bugs.webkit.org/show_bug.cgi?id=204699

        Reviewed by Zalan Bujtas.

        Also rename inlineRuns -> displayRuns to match the type.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        * layout/RenderBlockFlowLineLayout.cpp:
        (WebCore::Layout::RenderBlockFlowLineLayout::layout):
        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        (WebCore::Layout::InlineFormattingContext::invalidateFormattingState):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::displayRuns const):
        (WebCore::Layout::InlineFormattingState::displayRuns):
        (WebCore::Layout::InlineFormattingState::addLineBox):
        (WebCore::Layout::InlineFormattingState::lineBoxForRun const):
        (WebCore::Layout::InlineFormattingState::addDisplayRun):
        (WebCore::Layout::InlineFormattingState::resetDisplayRuns):
        (WebCore::Layout::InlineFormattingState::inlineRuns const): Deleted.
        (WebCore::Layout::InlineFormattingState::inlineRuns): Deleted.
        (WebCore::Layout::InlineFormattingState::addInlineRun): Deleted.
        (WebCore::Layout::InlineFormattingState::resetInlineRuns): Deleted.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):

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

        [LFC][IFC] Trim trailing uncommitted content when needed
        https://bugs.webkit.org/show_bug.cgi?id=204655
        <rdar://problem/57511053>

        Reviewed by Antti Koivisto.

        When we try to fit the trailing inline runs on the line, we have to make sure trimmable trailing whitespace content is taken into account.

        <div style="float: left">text<span style="padding-right: 20px"> </span></div>
        <- As we compute the content width of floating box using shrink to fit, we trim the trailing whitespace at the end and
        the final width will include the following runs [text: 41px][container start: 0px][container end: 20px] -> 61px (it would be 65px with the whitespace content)
        As we place the inline content and we reach the final trailing content [ ][container end], the line has only 20px space left, while the content is 24px long.
        At this point we need to retry the available space check by taking both the line and the pending content's trimmable width into account.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
        (WebCore::Layout::LineBreaker::Content::append):
        (WebCore::Layout::LineBreaker::Content::hasNonWhitespaceOrInlineBox const):
        (WebCore::Layout::LineBreaker::Content::hasTextContentOnly const):
        (WebCore::Layout::LineBreaker::Content::trailingTrimmableWidth const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::shouldPreserveTrailingContent):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::shouldPreserveTrailingWhitespace):
        * layout/inlineformatting/text/TextUtil.h:

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

        [LFC][IFC] Move and rename LineLayoutContext::UncommittedContent
        https://bugs.webkit.org/show_bug.cgi?id=204693
        <rdar://problem/57523727>

        Reviewed by Antti Koivisto.

        LineBreaker::Content represents the amount of content we commit to line breaking at a time.
        Normally it holds only one InlineItem e.g [text][ ][content] <- we submit 3 entries to line breaking, but
        with (mostly)inline containers, it can hold a long list of InlineItems e.g
        <span>1</span>2<span>3</span>4<span>5</span>6
        [container start][1][container end][2][container start][3][container end][4][container start][5][container end][6]
        <- this is one entry to submit.
        This patch is also in preparation for fixing trailing trimmable content handling.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
        (WebCore::Layout::LineBreaker::Content::append):
        (WebCore::Layout::LineBreaker::Content::reset):
        (WebCore::Layout::LineBreaker::Content::trim):
        * layout/inlineformatting/InlineLineBreaker.h:
        (WebCore::Layout::LineBreaker::Content::runs):
        (WebCore::Layout::LineBreaker::Content::runs const):
        (WebCore::Layout::LineBreaker::Content::isEmpty const):
        (WebCore::Layout::LineBreaker::Content::size const):
        (WebCore::Layout::LineBreaker::Content::width const):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::placeInlineItem):
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::add): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::reset): Deleted.
        (WebCore::Layout::LineLayoutContext::shouldProcessUncommittedContent const): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::trim): Deleted.
        * layout/inlineformatting/LineLayoutContext.h:
        (WebCore::Layout::LineLayoutContext::UncommittedContent::runs): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::runs const): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::isEmpty const): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::size const): Deleted.
        (WebCore::Layout::LineLayoutContext::UncommittedContent::width const): Deleted.

2019-11-29  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, rolling out r252937.

        broke GTK/WPE builds and most likely media track notification
        support

        Reverted changeset:

        "[GStreamer] MediaPlayerPrivateGStreamer style cleanups"
        https://bugs.webkit.org/show_bug.cgi?id=204617
        https://trac.webkit.org/changeset/252937

2019-11-29  Charlie Turner  <cturner@igalia.com>

        [GStreamer] MediaPlayerPrivateGStreamer style cleanups
        https://bugs.webkit.org/show_bug.cgi?id=204617

        Reviewed by Xabier Rodriguez-Calvar.

        Follow-up commit to bug 204352 addressing style issues in the
        existing player code. The main issues addressed are naming
        violations, adding final to types not overridden and organizing
        better the scope of names in the classes.

        Covered by existing tests.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::initializeDebugCategory):
        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
        (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
        (WebCore::MediaPlayerPrivateGStreamer::play):
        (WebCore::MediaPlayerPrivateGStreamer::pause):
        (WebCore::MediaPlayerPrivateGStreamer::paused const):
        (WebCore::MediaPlayerPrivateGStreamer::doSeek):
        (WebCore::MediaPlayerPrivateGStreamer::seek):
        (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
        (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamer::setRate):
        (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
        (WebCore::MediaPlayerPrivateGStreamer::setPreload):
        (WebCore::MediaPlayerPrivateGStreamer::buffered const):
        (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
        (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
        (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
        (WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
        (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
        (WebCore::MediaPlayerPrivateGStreamer::isMuted const):
        (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
        (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
        (WebCore::MediaPlayerPrivateGStreamer::setMuted):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus):
        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
        (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
        (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData const):
        (WebCore::MediaPlayerPrivateGStreamer::acceleratedRenderingStateChanged):
        (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):
        (WebCore::MediaPlayerPrivateGStreamer::cancelRepaint):
        (WebCore::MediaPlayerPrivateGStreamer::paint):
        (WebCore::MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamer::nativeImageForCurrentTime):
        (WebCore::MediaPlayerPrivateGStreamer::movieLoadType const):
        (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
        (WebCore::MediaPlayerPrivateGStreamer::decodedFrameCount const):
        (WebCore::MediaPlayerPrivateGStreamer::droppedFrameCount const):
        (WebCore::MediaPlayerPrivateGStreamer::attemptToDecryptWithLocalInstance):
        (WebCore::MediaPlayerPrivateGStreamer::setWaitingForKey):
        (WebCore::MediaPlayerPrivateGStreamer::initializeDebugCategory): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::sizeChanged): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::muted const): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::pipeline const):
        (WebCore::MediaPlayerPrivateGStreamer::mediaPlayer const): Deleted.
        (WebCore::MediaPlayerPrivateGStreamer::isLiveStream const): Deleted.
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::pause):
        (WebCore::MediaPlayerPrivateGStreamerMSE::durationMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seeking const):
        (WebCore::MediaPlayerPrivateGStreamerMSE::waitForSeekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
        (WebCore::MediaPlayerPrivateGStreamerMSE::asyncStateChangeDone):
        (WebCore::MediaPlayerPrivateGStreamerMSE::maxMediaTimeSeekable const):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
        (WebCore::MediaSourceClientGStreamerMSE::flush):

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

        Remove ENABLE_KEYBOARD_CODE_ATTRIBUTE and ENABLE_KEYBOARD_KEY_ATTRIBUTE macros
        https://bugs.webkit.org/show_bug.cgi?id=204666

        Reviewed by Ross Kirsling and Don Olmstead.

        No behavior change.

        * Configurations/FeatureDefines.xcconfig:
        * dom/KeyboardEvent.cpp:
        (WebCore::KeyboardEvent::KeyboardEvent):
        (WebCore::KeyboardEvent::initKeyboardEvent):
        * dom/KeyboardEvent.h:
        * dom/KeyboardEvent.idl:
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        (WebCore::PlatformKeyboardEvent::keyIdentifier const):
        (WebCore::PlatformKeyboardEvent::key const):
        (WebCore::PlatformKeyboardEvent::code const):

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

        Element jumps to wrong position after perspective change on ancestor
        https://bugs.webkit.org/show_bug.cgi?id=202505
        <rdar://problem/55930710>

        Reviewed by Antti Koivisto.
        
        This modifies the fix in r252879 to be better-performing and to avoid a new call site for updateLayerPositions*.

        Style can change in a way that creates or destroys RenderLayers, but does not result in a layout; this can happen
        with changes of properties like opacity or perspective. When this happens, something needs to trigger a call to
        RenderLayer::updateLayerPositions() on the root of the changed subtree. This is best done after the style update,
        to avoid multiple updateLayerPositions traversals.

        Implement this by storing on RenderView the rootmost changed layer, and having FrameView::styleDidChange()
        call updateLayerPositionsAfterStyleChange() if we're after a style change with no pending layout.

        Test: compositing/geometry/layer-position-after-removing-perspective.html

        * page/FrameView.cpp:
        (WebCore::FrameView::styleDidChange):
        * page/FrameView.h:
        * platform/ScrollView.h:
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::didAttachChild):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::insertOnlyThisLayer):
        (WebCore::RenderLayer::removeOnlyThisLayer):
        (WebCore::findCommonAncestor):
        (WebCore::RenderLayer::commonAncestorWithLayer const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::createLayer):
        (WebCore::RenderLayerModelObject::styleDidChange):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::layerChildrenChangedDuringStyleChange):
        (WebCore::RenderView::takeStyleChangeLayerTreeMutationRoot):
        * rendering/RenderView.h:

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

        [LFC][IFC] Remove m_inlineRunToLineMap
        https://bugs.webkit.org/show_bug.cgi?id=204688

        Reviewed by Zalan Bujtas.

        Add line index to Display::Run and use it to locate the line it is on.

        This is 4-5% progression in PerformanceTests/Layout/line-layout-simple.html

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::lineIndex const):
        (WebCore::Display::Run::Run):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::lineBoxForRun const):
        (WebCore::Layout::InlineFormattingState::addInlineRun):
        (WebCore::Layout::InlineFormattingState::resetInlineRuns):

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

        [LFC][IFC] Vector allocate InlineItemRuns
        https://bugs.webkit.org/show_bug.cgi?id=204680

        Reviewed by Zalan Bujtas.

        Reduce heap allocations during inline layout.

        This is ~15% speedup in PerformanceTests/Layout/line-layout-simple.html with LFC-in-render-tree enabled.
        With other improvements it makes LFC path faster than simple line layout in this test.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::ContinousContent::ContinousContent):
        (WebCore::Layout::LineBuilder::ContinousContent::append):
        (WebCore::Layout::LineBuilder::ContinousContent::close):

        Move to LineBuilder namespace.

        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendNonBreakableSpace):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        (WebCore::Layout::LineBuilder::formattingContext const):
        (WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):
        (WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth):
        (WebCore::Layout::InlineItemRun::layoutBox const): Deleted.
        (WebCore::Layout::InlineItemRun::logicalRect const): Deleted.
        (WebCore::Layout::InlineItemRun::textContext const): Deleted.
        (WebCore::Layout::InlineItemRun::isText const): Deleted.
        (WebCore::Layout::InlineItemRun::isBox const): Deleted.
        (WebCore::Layout::InlineItemRun::isContainerStart const): Deleted.
        (WebCore::Layout::InlineItemRun::isContainerEnd const): Deleted.
        (WebCore::Layout::InlineItemRun::isForcedLineBreak const): Deleted.
        (WebCore::Layout::InlineItemRun::type const): Deleted.
        (WebCore::Layout::InlineItemRun::setIsCollapsed): Deleted.
        (WebCore::Layout::InlineItemRun::isCollapsed const): Deleted.
        (WebCore::Layout::InlineItemRun::isCollapsedToZeroAdvanceWidth const): Deleted.
        (WebCore::Layout::InlineItemRun::isCollapsible const): Deleted.
        (WebCore::Layout::InlineItemRun::isWhitespace const): Deleted.
        (WebCore::Layout::InlineItemRun::hasExpansionOpportunity const): Deleted.
        (WebCore::Layout::InlineItemRun::InlineItemRun): Deleted.
        (WebCore::Layout::InlineItemRun::setCollapsesToZeroAdvanceWidth): Deleted.

        Move InlineItemRun to header in LineBuilder namespace so we can use directly in m_inlineItemRuns vector.

        (WebCore::Layout::ContinousContent::canBeExpanded): Deleted.
        (WebCore::Layout::ContinousContent::canBeMerged const): Deleted.
        (WebCore::Layout::ContinousContent::ContinousContent): Deleted.
        (WebCore::Layout::ContinousContent::append): Deleted.
        (WebCore::Layout::ContinousContent::close): Deleted.
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::InlineItemRun::layoutBox const):
        (WebCore::Layout::LineBuilder::InlineItemRun::logicalRect const):
        (WebCore::Layout::LineBuilder::InlineItemRun::textContext const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isText const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isBox const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isContainerStart const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isContainerEnd const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isForcedLineBreak const):
        (WebCore::Layout::LineBuilder::InlineItemRun::type const):
        (WebCore::Layout::LineBuilder::InlineItemRun::setIsCollapsed):
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsed const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsedToZeroAdvanceWidth const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isCollapsible const):
        (WebCore::Layout::LineBuilder::InlineItemRun::isWhitespace const):
        (WebCore::Layout::LineBuilder::InlineItemRun::hasExpansionOpportunity const):
        (WebCore::Layout::LineBuilder::TrimmableContent::runIndexes):

        Make TrimmableContent collect indexes to InlineItemRun vector instead of pointer.
        We only ever append to the vector so the indexes stay valid for TrimmableContent lifetime.

        (WebCore::Layout::LineBuilder::TrimmableContent::isEmpty const):
        (WebCore::Layout::LineBuilder::TrimmableContent::clear):
        (WebCore::Layout::LineBuilder::TrimmableContent::runs): Deleted.

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

        Cache integer font metrics for performance
        https://bugs.webkit.org/show_bug.cgi?id=204668

        Reviewed by Zalan Bujtas.

        Line layout uses integer metrics and queries them a lot. Avoid repeated rounding.

        This is >10% speedup in PerformanceTests/Layout/line-layout-simple.html with LFC.

        * platform/graphics/FontMetrics.h:
        (WebCore::FontMetrics::floatAscent const):
        (WebCore::FontMetrics::setAscent):
        (WebCore::FontMetrics::floatDescent const):
        (WebCore::FontMetrics::setDescent):
        (WebCore::FontMetrics::floatLineGap const):
        (WebCore::FontMetrics::setLineGap):
        (WebCore::FontMetrics::floatLineSpacing const):
        (WebCore::FontMetrics::setLineSpacing):
        (WebCore::FontMetrics::hasCapHeight const):
        (WebCore::FontMetrics::floatCapHeight const):
        (WebCore::FontMetrics::setCapHeight):
        (WebCore::FontMetrics::ascent const):
        (WebCore::FontMetrics::descent const):
        (WebCore::FontMetrics::lineGap const):
        (WebCore::FontMetrics::lineSpacing const):
        (WebCore::FontMetrics::capHeight const):
        (WebCore::FontMetrics::reset):

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

        [LFC][IFC] Adjust the line's is-visually-empty status after trimming the trailing whitespace content
        https://bugs.webkit.org/show_bug.cgi?id=204660
        <rdar://problem/57513035>

        Reviewed by Antti Koivisto.

        We need to check if the line is still visually empty after trimming the trailing content.

        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::setIsConsideredEmpty):
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::appendTextContent):
        * layout/inlineformatting/InlineLineBuilder.h:

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

        [LFC][IFC] Re-introduce LineBuilder::isVisuallyNonEmpty function
        https://bugs.webkit.org/show_bug.cgi?id=204658
        <rdar://problem/57512248>

        Reviewed by Antti Koivisto.

        LineBuilder::isVisuallyNonEmpty() used to loop through the runs an check if the runs are visually empty or not.
        This time it takes the run as the parameter and decides whether this particular run is visually empty or not.
        This patch is in preparation for fixing the line's visually-empty state after trimming the trailing runs.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::append):
        (WebCore::Layout::LineBuilder::appendNonBreakableSpace):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
        * layout/inlineformatting/InlineLineBuilder.h:

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

        [LFC][IFC] adjustBaselineAndLineHeight should be called before resetting the line in quirk mode
        https://bugs.webkit.org/show_bug.cgi?id=204662
        <rdar://problem/57513178>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentVertically):

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

        [LFC][IFC] Fix LineLayoutContext::shouldProcessUncommittedContent logic
        https://bugs.webkit.org/show_bug.cgi?id=204656
        <rdar://problem/57511221>

        Reviewed by Antti Koivisto.

        Move the [text][text] and [ ][text] checks further down because we adjust the "lastUncomittedContent" by skipping [container start][container end] items.  
        (This was recently regressed at r252859)

        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::shouldProcessUncommittedContent const):

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

        [LFC] canUseSimplifiedTextMeasuring should check for FontCascade::Complex
        https://bugs.webkit.org/show_bug.cgi?id=204663
        <rdar://problem/57513642>

        Reviewed by Antti Koivisto.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::canUseSimplifiedTextMeasuring):

2019-11-28  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Convert GLVideoSink and WebKitWebSrc to WEBKIT_DEFINE_TYPE
        https://bugs.webkit.org/show_bug.cgi?id=204674

        Reviewed by Carlos Garcia Campos.

        This is mostly a refactoring, simplifying the code-base a bit.

        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
        (webKitGLVideoSinkConstructed):
        (webKitGLVideoSinkFinalize):
        (webkit_gl_video_sink_class_init):
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webkit_web_src_class_init):
        (webKitWebSrcConstructed):

2019-11-28  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Move GL video sink to its own GstBin sub-class
        https://bugs.webkit.org/show_bug.cgi?id=204624

        Reviewed by Xabier Rodriguez-Calvar.

        This reduces the MediaPlayerPrivate code-base and adds a good
        separation of responsibility regarding GL video rendering. The
        TextureCopier remains in the player because it's too specific.

        * platform/GStreamer.cmake:
        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: Added.
        (webkit_gl_video_sink_init):
        (webKitGLVideoSinkFinalize):
        (ensureGstGLContext):
        (requestGLContext):
        (webKitGLVideoSinkChangeState):
        (webkit_gl_video_sink_class_init):
        (webKitGLVideoSinkSetMediaPlayerPrivate):
        (webKitGLVideoSinkProbePlatform):
        * platform/graphics/gstreamer/GLVideoSinkGStreamer.h: Added.
        * platform/graphics/gstreamer/GStreamerCommon.cpp:
        (WebCore::initializeGStreamerAndRegisterWebKitElements):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::load):
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::createVideoSinkGL):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

        [LFC][IFC] Generate fewer InlineItems when new lines are not preserved
        https://bugs.webkit.org/show_bug.cgi?id=204653
        <rdar://problem/57510133>

        Reviewed by Antti Koivisto.

        This patch reduces the number of InlineItems by merging (non-preserved)new lines with neighboring whitespace characters.
        [text\n\n text] -> [text][   ][text]

        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::isWhitespaceCharacter):
        (WebCore::Layout::moveToNextNonWhitespacePosition):
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):

2019-11-27  Manuel Rego Casasnovas  <rego@igalia.com>

        Using char* instead of String for StyleProperties::getShorthandValue()
        https://bugs.webkit.org/show_bug.cgi?id=204644

        Reviewed by Darin Adler.

        This is follow-up patch for r252901. We don't need to create a String object
        just for the separator and can use char* instead.
        This was suggested by Darin Adler in webkit.org/b/204508.

        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getShorthandValue const):
        * css/StyleProperties.h:

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

        [LFC] Run layout on the root when InvalidationState is empty.
        https://bugs.webkit.org/show_bug.cgi?id=204651
        <rdar://problem/57509616>

        Reviewed by Antti Koivisto.

        InvalidationState captures style/tree mutation related changes. An empty InvalidationState indicates that the horizontal constraint changed
        and we need to initiate a layout on the ICB (and the layout logic will propagate the damage down on the tree). 

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        * layout/RenderBlockFlowLineLayout.cpp:
        (WebCore::Layout::RenderBlockFlowLineLayout::layout):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):

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

        REGRESSION(r252455): imported/w3c/web-platform-tests/dom/events/Event-dispatch-on-disabled-elements.html fails on iOS and WK1
        https://bugs.webkit.org/show_bug.cgi?id=204272
        <rdar://problem/57253742>

        Reviewed by Dean Jackson.

        Events for declarative animations are dispatched using a MainThreadGenericEventQueue which dispatches enqueued events asynchronously. When a declarative
        animation would be canceled, AnimationTimeline::cancelDeclarativeAnimation() would be called and would enqueue a "transitioncancel" or "animationcancel"
        event (depending on the animation type) by virtue of calling DeclarativeAnimation::cancelFromStyle(), and would also call AnimationTimeline::removeAnimation()
        right after. However, calling AnimationTimeline::removeAnimation() could have the side effect of removing the last reference to the DeclarativeAnimation
        object, which would destroy its attached MainThreadGenericEventQueue before it had the time to dispatch the queued "transitioncancel" or "animationcancel"
        event.

        The call to AnimationTimeline::removeAnimation() in AnimationTimeline::cancelDeclarativeAnimation() is actually unnecessary. Simply canceling the animation
        via DeclarativeAnimation::cancelFromStyle() will end up calling AnimationTimeline::removeAnimation() the next time animations are updated, which will leave
        time for the cancel events to be dispatched. So all we need to do is remove AnimationTimeline::cancelDeclarativeAnimation() and replace its call sites with
        simple calls to DeclarativeAnimation::cancelFromStyle().

        Making this change broke a test however: imported/w3c/web-platform-tests/css/css-animations/Document-getAnimations.tentative.html. We actually passed that
        test by chance without implementing the feature required to make it work. We now implement the correct way to track a global position for an animation by
        only setting one for declarative animations once they are disassociated with their owning element and have a non-idle play state.

        And a few other tests broke: animations/animation-shorthand-name-order.html, imported/w3c/web-platform-tests/css/css-animations/animationevent-types.html
        and webanimations/css-animations.html. The reason for those tests being broken was that not calling AnimationTimeline::removeAnimation() instantly as CSS
        Animations were canceled also meant that the KeyframeEffectStack for the targeted element wasn't updated. To solve this, we added the animationTimingDidChange()
        method on KeyframeEffect which is called whenever timing on the owning Animation changes, so for instance when cancel() is called as we cancel a CSS
        Animation. That way we ensure we add and remove KeyframeEffect instances from the KeyframeEffectStack as the animation becomes relevant, which is now
        an added condition checked by KeyframeEffectStack::addEffect().

        Finally, this revealed an issue in KeyframeEffectStack::ensureEffectsAreSorted() where we would consider CSSTransition and CSSAnimation objects to be
        representative of a CSS Transition or CSS Animation even after the relationship with their owning element had been severed. We now correctly check that
        relationship is intact and otherwise consider those animations just like any other animation.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationTimingDidChange):
        (WebCore::AnimationTimeline::updateGlobalPosition):
        (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement):
        (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
        (WebCore::AnimationTimeline::cancelDeclarativeAnimation): Deleted.
        * animation/AnimationTimeline.h:
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::setTimingProperties):
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::canHaveGlobalPosition):
        * animation/DeclarativeAnimation.h:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::getAnimations const):
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::animationTimelineDidChange):
        (WebCore::KeyframeEffect::animationTimingDidChange):
        (WebCore::KeyframeEffect::updateEffectStackMembership):
        (WebCore::KeyframeEffect::setAnimation):
        (WebCore::KeyframeEffect::setTarget):
        * animation/KeyframeEffect.h:
        * animation/KeyframeEffectStack.cpp:
        (WebCore::KeyframeEffectStack::addEffect):
        (WebCore::KeyframeEffectStack::ensureEffectsAreSorted):
        * animation/KeyframeEffectStack.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::timingDidChange):
        * animation/WebAnimation.h:
        (WebCore::WebAnimation::canHaveGlobalPosition):

2019-11-27  James Darpinian  <jdarpinian@chromium.org>

        Enable GPU switching with ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=203916

        This enables the same GPU switching code that we use with OpenGL on ANGLE
        contexts. ANGLE contexts can now be switched to the high power GPU.

        Reviewed by Dean Jackson.

        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/GraphicsContext3DManager.cpp:
        (WebCore::GraphicsContext3DManager::updateAllContexts):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::setGPUByRegistryID):
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::updateCGLContext):
        (WebCore::GraphicsContext3D::screenDidChange):

2019-11-27  Antti Koivisto  <antti@apple.com>

        [LFC][Render tree] PerformanceTests/Layout/line-layout-simple.html does not update properly with LFC enabled
        https://bugs.webkit.org/show_bug.cgi?id=204646

        Reviewed by Zalan Bujtas.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::invalidateLineLayoutPath):

        Destroy LFC layout here, for now. 

2019-11-27  Antti Koivisto  <antti@apple.com>

        [LFC][Render tree] RenderBlockFlow::ensureLineBoxes should work with lfc layout
        https://bugs.webkit.org/show_bug.cgi?id=204633

        Reviewed by Zalan Bujtas.

        We need to be able to switch to linebox layout when needed.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::deleteLines):
        (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
        (WebCore::RenderBlockFlow::ensureLineBoxes):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::hasLineLayout const):

        Also switch to using WTF::Monostate as empty state.

2019-11-27  Antti Koivisto  <antti@apple.com>

        [LFC] Make strings safe
        https://bugs.webkit.org/show_bug.cgi?id=204645

        Reviewed by Zalan Bujtas.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::TextContext):
        (WebCore::Display::Run::TextContext::content const):

        - Use String instead of StringView so the underlying StringImpl gets reffed.
        - Make it point the full content string instead of the current range so we don't create unncessary short strings.
        - Construct StringView on fly based on start/end.

        (WebCore::Display::Run::setTextContext):
        (WebCore::Display::Run::textContext const):
        (WebCore::Display::Run::TextContext::expand):
        (WebCore::Display::Run::textContext): Deleted.
        * layout/inlineformatting/InlineLineBuilder.cpp:
        (WebCore::Layout::InlineItemRun::textContext const):
        (WebCore::Layout::ContinousContent::close):
        (WebCore::Layout::LineBuilder::appendTextContent):
        * layout/inlineformatting/InlineLineBuilder.h:
        (WebCore::Layout::LineBuilder::Run::textContext const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::Box):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::textContext const):

        Use Optional<TextContext> since it is small

        * layout/layouttree/LayoutContainer.cpp:
        (WebCore::Layout::Container::Container):
        * layout/layouttree/TextContext.h:

        Use String instead of StringView so the underlying StringImpl gets reffed.

2019-11-27  Manuel Rego Casasnovas  <rego@igalia.com>

        [css-grid] Serialization of grid-area, grid-row and grid-column should include "/" separator
        https://bugs.webkit.org/show_bug.cgi?id=204508

        Reviewed by Javier Fernandez.

        Just use "/" separator instead of a white space when serializing the grid shorthands.
        There are still failures because serialization of grid shorthands still needs some extra work
        (see webkit.org/b/204611), however this change puts WebKit in the same status than Chromium
        regarding this topic.

        Several WPT test cases are passing thanks to this change.

        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getPropertyValue const):
        (WebCore::StyleProperties::getGridShorthandValue const):
        (WebCore::StyleProperties::getShorthandValue const):
        * css/StyleProperties.h:

2019-11-27  youenn fablet  <youenn@apple.com>

        Protect ServiceWorkerThreadProxy while being stopped
        https://bugs.webkit.org/show_bug.cgi?id=204610
        <rdar://problem/57476332>

        Reviewed by Chris Dumez.

        Reuse stop implementation in terminateWorker for stopAllServiceWorkers.
        Move the worker map value from RefPtr to Ref.
        Covered by existing tests no longer crashing.

        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::terminateWorker):
        (WebCore::SWContextManager::stopWorker):
        (WebCore::SWContextManager::forEachServiceWorkerThread):
        (WebCore::SWContextManager::stopAllServiceWorkers):
        * workers/service/context/SWContextManager.h:

2019-11-26  Chris Dumez  <cdumez@apple.com>

        Drop ActiveDOMObject::shouldPreventEnteringBackForwardCache_DEPRECATED()
        https://bugs.webkit.org/show_bug.cgi?id=204626

        Reviewed by Ryosuke Niwa.

        Drop ActiveDOMObject::shouldPreventEnteringBackForwardCache_DEPRECATED() now that it is no longer
        used.

        * dom/ActiveDOMObject.h:
        * dom/Document.h:
        (WebCore::Document::shouldPreventEnteringBackForwardCacheForTesting const):
        (WebCore::Document::preventEnteringBackForwardCacheForTesting):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::forEachActiveDOMObject const):
        (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForDocumentSuspension): Deleted.
        * dom/ScriptExecutionContext.h:
        * history/BackForwardCache.cpp:
        (WebCore::canCacheFrame):
        * testing/Internals.cpp:
        (WebCore::Internals::Internals):
        (WebCore::Internals::preventDocumentFromEnteringBackForwardCache):
        (WebCore::Internals::preventDocumentForEnteringBackForwardCache): Deleted.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-11-26  Antti Koivisto  <antti@apple.com>

        [LFC][Render tree] Add LFC line layout path to RenderBlockFlow
        https://bugs.webkit.org/show_bug.cgi?id=204613

        Reviewed by Zalan Bujtas.

        Add a basic LFC line layout implementation for RenderBlockFlow.
        It can layout lines and do simple painting but doesn't do anything else (like hit testing) yet.

        Add a new layoutFormattingContextRenderTreeIntegrationEnabled feature flag, default to false.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/RenderBlockFlowLineLayout.cpp: Added.
        (WebCore::Layout::RenderBlockFlowLineLayout::RenderBlockFlowLineLayout):
        (WebCore::Layout::RenderBlockFlowLineLayout::canUseFor):
        (WebCore::Layout::RenderBlockFlowLineLayout::layout):
        (WebCore::Layout::RenderBlockFlowLineLayout::height const):
        (WebCore::Layout::RenderBlockFlowLineLayout::paint):
        * layout/RenderBlockFlowLineLayout.h: Copied from Source/WebCore/layout/displaytree/DisplayPainter.h.
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::Painter::paintInlineFlow):
        * layout/displaytree/DisplayPainter.h:
        * layout/invalidation/InvalidationState.cpp:
        (WebCore::Layout::InvalidationState::markNeedsUpdate):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildLayoutTree):
        * layout/layouttree/LayoutTreeBuilder.h:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setLayoutFormattingContextRenderTreeIntegrationEnabled):
        (WebCore::RuntimeEnabledFeatures::layoutFormattingContextRenderTreeIntegrationEnabled const):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutInlineChildren):
        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
        (WebCore::RenderBlockFlow::paintInlineChildren):
        (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
        (WebCore::RenderBlockFlow::layoutSimpleLines):
        (WebCore::RenderBlockFlow::layoutLFCLines):
        (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::hasLFCLineLayout const):
        (WebCore::RenderBlockFlow::lfcLineLayout const):
        (WebCore::RenderBlockFlow::lfcLineLayout):
    
2019-11-26  Antti Koivisto  <antti@apple.com>

        Destroy linebox tree from ComplexLineLayout destructor
        https://bugs.webkit.org/show_bug.cgi?id=204620

        Reviewed by Zalan Bujtas.

        Make linebox tree destuction simpler and more robust.

        * rendering/ComplexLineLayout.cpp:
        (WebCore::ComplexLineLayout::~ComplexLineLayout):

        Destroy linebox tree.

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::deleteLines):

        Always destroy the line layout.

        (WebCore::RenderBlockFlow::layoutSimpleLines):
        (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout): Deleted.

        No need for special path, ComplexLineLayout destruction takes care of this now.

        * rendering/RenderBlockFlow.h:
        * rendering/RenderLineBreak.cpp:
        (WebCore::RenderLineBreak::deleteLineBoxesBeforeSimpleLineLayout): Deleted.

        No need for special path, InlineBox destruction clears the pointers in associated RenderLineBreaks and RenderTexts.

        * rendering/RenderLineBreak.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::deleteLineBoxesBeforeSimpleLineLayout): Deleted.
        * rendering/RenderText.h:
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::removeLineBoxFromRenderObject):

2019-11-26  youenn fablet  <youenn@apple.com>

        Update capturing document media state when entering b/f cache
        https://bugs.webkit.org/show_bug.cgi?id=204589

        Reviewed by Chris Dumez.

        Remove enqueuing the task in configureTrackRendering.
        This allows stopTrack to trigger the track rendering configuration and document media state computation.
        Covered by updated test.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::configureTrackRendering):
        (WebCore::MediaStreamTrack::suspend):
        (WebCore::MediaStreamTrack::stop): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:

2019-11-26  youenn fablet  <youenn@apple.com>

        Allow b/f cache in case of connected peer connections
        https://bugs.webkit.org/show_bug.cgi?id=204583

        Reviewed by Chris Dumez.

        Tests: webrtc/peerconnection-page-cache-long.html
               webrtc/peerconnection-page-cache.html

        Remove guards against b/f cache.
        When entering b/f cache, the packets are blocked which will trigger timeouts
        and a connection failure of the peer connection after a few seconds.

        * Modules/mediastream/RTCDTMFSender.cpp:
        * Modules/mediastream/RTCDTMFSender.h:
        * Modules/mediastream/RTCDataChannel.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        * Modules/mediastream/RTCPeerConnection.h:

2019-11-26  Antti Koivisto  <antti@apple.com>

        [LFC] Don't leak Boxes
        https://bugs.webkit.org/show_bug.cgi?id=204616

        Reviewed by Zalan Bujtas.

        Store Boxes to LayoutTreeContent instead of leaking them.
        
        This is probably not the final memory management model.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildTableStructure):
        (WebCore::Layout::TreeBuilder::buildSubTree):
        * layout/layouttree/LayoutTreeBuilder.h:
        (WebCore::Layout::LayoutTreeContent::addBox):

2019-11-26  Manuel Rego Casasnovas  <rego@igalia.com>

        [css-grid] Avoid serializing [] in grid-template-* specified values
        https://bugs.webkit.org/show_bug.cgi?id=204501

        Reviewed by Javier Fernandez.

        Based on Blink r699101 by <ericwilligers@chromium.org>.

        This patch discards empty list of line names when parsing grid-template-* properties.
        That way we avoid these empty lists "[]" during serialization.

        This was discussed at: https://github.com/w3c/csswg-drafts/issues/4173.

        Several WPT tests are passing thanks to this change.

        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeGridLineNames):
        (WebCore::consumeGridTrackList):

2019-11-26  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GStreamer] Cache the CString returned by String::utf8()
        https://bugs.webkit.org/show_bug.cgi?id=203553

        Reviewed by Philippe Normand.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):

2019-11-26  Ryosuke Niwa  <rniwa@webkit.org>

        Document::needsStyleRecalc() shouldn't return true for fragment scrolling (m_gotoAnchorNeededAfterStylesheetsLoad)
        https://bugs.webkit.org/show_bug.cgi?id=204593

        Reviewed by Antti Koivisto.

        After r252761, we no longer triggers a fragment scrolling as a part of style resolution.
        Consequently, there is no need for Document::needsStyleRecalc() to return true
        even when m_gotoAnchorNeededAfterStylesheetsLoad is set and there are no more pending stylesheets.

        No new tests since there shouldn't really be any observable behavior difference.

        * dom/Document.cpp:
        (WebCore::Document::needsStyleRecalc const):

2019-11-26  Antoine Quint  <graouts@apple.com>

        [Web Animations] Layout of children of element with forwards-filling opacity animation may be incorrect after removal
        https://bugs.webkit.org/show_bug.cgi?id=204602
        <rdar://problem/45311541>

        Reviewed by Antti Koivisto.

        Test: webanimations/child-layer-position-after-removal-of-animation-triggering-stacking-context-with-fill-forwards.html

        In the case where we animate a property that affects whether an element establishes a stacking context, for instance `opacity`, the animation code,
        specifically KeyframeEffect::apply(), forces a stacking context by setting setUsedZIndex(0) on the animated RenderStyle in case the element otherwise
        has an "auto" z-index. This is required by the Web Animations specification (https://w3c.github.io/web-animations/#side-effects-section).

        This means that a fill-forwards animation will still force the element to establish a stacking context after the animation is no longer "active". When
        we remove such an animation, it may go from having a z-index to not having one, unless it had an explicit z-index provided through style. When this change
        happens, RenderStyle::diff() will merely return "RepaintLayer" and thus will not foce a layout. However, updating the positions of child layers may be
        necessary as the animation being removed may mean that there may not be a RenderLayer associated with that element's renderer anymore, and if that RenderLayer
        had a position, then the position of child layers will no longer be correct.

        Now, in the case where we destroy a layer in RenderLayerModelObject::styleDidChange(), we check whether the layer had a position before it is removed, and
        update the position of child layers if it did.

        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::styleDidChange):

2019-11-26  youenn fablet  <youenn@apple.com>

        Queuing a task in EventLoop is not working with UserMediaRequest allow completion handler
        Queuing a task in EventLoop is not working with completion handlers
        https://bugs.webkit.org/show_bug.cgi?id=204565
        <rdar://problem/57466280>

        Reviewed by Ryosuke Niwa.

        Do not capture the completion handler in lambda passed to the event queue.
        Instead, keep it in UserMediqRequest and call it either when running the task or when destroying UserMediaRequest.
        Covered by existing tests failing the debug assertion.

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::~UserMediaRequest):
        (WebCore::UserMediaRequest::allow):
        * Modules/mediastream/UserMediaRequest.h:

2019-11-25  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] InternalFunction should be non-destructible
        https://bugs.webkit.org/show_bug.cgi?id=204556

        Reviewed by Mark Lam.

        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):

2019-11-25  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Win] Update KeyboardEvent as per the latest specification
        https://bugs.webkit.org/show_bug.cgi?id=202183

        Reviewed by Ross Kirsling.

        Add 'key' and 'code' properties of KeyboardEvent for Windows. The
        implementation is copied from Chromium for Windows.

        For implementing 'key' properties, ToUnicodeEx API is used to
        convert a virtual key code to a character information.
        Unfortunately, ToUnicodeEx alters the stored previous typed dead
        key in the driver, it can't be used for each key event. So,
        ToUnicodeEx is used to convert all virtual keys with all modifier
        combinations beforehand.

        This change turns on ENABLE_KEYBOARD_KEY_ATTRIBUTE and
        ENABLE_KEYBOARD_CODE_ATTRIBUTE macros for all ports. A follow-up
        patch will remove the macros.

        Existing tests covers.

        * PlatformWin.cmake:
        * platform/win/KeyEventWin.cpp:
        (WebCore::windowsKeyNames):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        * platform/win/WindowsKeyNames.cpp: Added.
        (hasControlAndAlt):
        (getModifierFlags):
        (nonPrintableVirtualKeyToDomKey):
        (WindowsKeyNames::WindowsKeyNames):
        (WindowsKeyNames::domKeyFromLParam):
        (singleCharacterString):
        (WindowsKeyNames::domKeyFromChar):
        (WindowsKeyNames::domCodeFromLParam):
        (WindowsKeyNames::updateLayout):
        * platform/win/WindowsKeyNames.h: Added.

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

        [LFC][IFC] Use FontCascade::spaceWidth to measure single or collapsed whitespace content
        https://bugs.webkit.org/show_bug.cgi?id=204594
        <rdar://problem/57478360>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):

2019-11-25  Antti Koivisto  <antti@apple.com>

        User Variant for RenderBlockFlow line layout
        https://bugs.webkit.org/show_bug.cgi?id=204591

        Reviewed by Zalan Bujtas.

        Move complex and simple line layout structures into a Variant to avoid wasting memory, and to allow easy expansion with an LFC path

        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::willBeDestroyed):
        (WebCore::RenderBlockFlow::layoutInlineChildren):
        (WebCore::RenderBlockFlow::styleDidChange):
        (WebCore::RenderBlockFlow::deleteLines):
        (WebCore::RenderBlockFlow::hitTestInlineChildren):
        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
        (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
        (WebCore::RenderBlockFlow::inlineSelectionGaps):
        (WebCore::RenderBlockFlow::paintInlineChildren):
        (WebCore::RenderBlockFlow::hasLines const):
        (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
        (WebCore::RenderBlockFlow::layoutSimpleLines):
        (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
        (WebCore::RenderBlockFlow::ensureLineBoxes):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::firstRootBox const):
        (WebCore::RenderBlockFlow::lastRootBox const):
        (WebCore::RenderBlockFlow::hasComplexLineLayout const):
        (WebCore::RenderBlockFlow::complexLineLayout const):
        (WebCore::RenderBlockFlow::complexLineLayout):
        (WebCore::RenderBlockFlow::hasSimpleLineLayout const):
        (WebCore::RenderBlockFlow::simpleLineLayout const):
        (WebCore::RenderBlockFlow::simpleLineLayout):

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

        [LFC] Do not run layout when setNeedsLayout is disabled
        https://bugs.webkit.org/show_bug.cgi?id=204586
        <rdar://problem/57475333>

        Reviewed by Antti Koivisto.

        setNeedsLayout is disabled while the content size is set on the ScrollView. It triggers a forced layout in WebkitLegacy.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):

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

        [LFC][IFC] Rename Line to LineBuilder
        https://bugs.webkit.org/show_bug.cgi?id=204584
        <rdar://problem/57474964>

        Reviewed by Antti Koivisto.

        It really is a line builder.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        * layout/inlineformatting/InlineLineBuilder.cpp: Renamed from Source/WebCore/layout/inlineformatting/InlineLine.cpp.
        (WebCore::Layout::InlineItemRun::layoutBox const):
        (WebCore::Layout::InlineItemRun::logicalRect const):
        (WebCore::Layout::InlineItemRun::textContext const):
        (WebCore::Layout::InlineItemRun::isText const):
        (WebCore::Layout::InlineItemRun::isBox const):
        (WebCore::Layout::InlineItemRun::isContainerStart const):
        (WebCore::Layout::InlineItemRun::isContainerEnd const):
        (WebCore::Layout::InlineItemRun::isForcedLineBreak const):
        (WebCore::Layout::InlineItemRun::type const):
        (WebCore::Layout::InlineItemRun::setIsCollapsed):
        (WebCore::Layout::InlineItemRun::isCollapsed const):
        (WebCore::Layout::InlineItemRun::isCollapsedToZeroAdvanceWidth const):
        (WebCore::Layout::InlineItemRun::isCollapsible const):
        (WebCore::Layout::InlineItemRun::isWhitespace const):
        (WebCore::Layout::InlineItemRun::hasExpansionOpportunity const):
        (WebCore::Layout::InlineItemRun::InlineItemRun):
        (WebCore::Layout::InlineItemRun::setCollapsesToZeroAdvanceWidth):
        (WebCore::Layout::ContinousContent::canBeExpanded):
        (WebCore::Layout::ContinousContent::canBeMerged const):
        (WebCore::Layout::ContinousContent::ContinousContent):
        (WebCore::Layout::ContinousContent::append):
        (WebCore::Layout::ContinousContent::close):
        (WebCore::Layout::LineBuilder::Run::Run):
        (WebCore::Layout::LineBuilder::Run::adjustExpansionBehavior):
        (WebCore::Layout::LineBuilder::Run::expansionBehavior const):
        (WebCore::Layout::LineBuilder::Run::setComputedHorizontalExpansion):
        (WebCore::Layout::LineBuilder::LineBuilder):
        (WebCore::Layout::LineBuilder::~LineBuilder):
        (WebCore::Layout::LineBuilder::initialize):
        (WebCore::Layout::shouldPreserveTrailingContent):
        (WebCore::Layout::shouldPreserveLeadingContent):
        (WebCore::Layout::LineBuilder::close):
        (WebCore::Layout::LineBuilder::alignContentVertically):
        (WebCore::Layout::LineBuilder::justifyRuns const):
        (WebCore::Layout::LineBuilder::alignContentHorizontally const):
        (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
        (WebCore::Layout::LineBuilder::moveLogicalLeft):
        (WebCore::Layout::LineBuilder::moveLogicalRight):
        (WebCore::Layout::LineBuilder::append):
        (WebCore::Layout::LineBuilder::appendNonBreakableSpace):
        (WebCore::Layout::LineBuilder::appendInlineContainerStart):
        (WebCore::Layout::LineBuilder::appendInlineContainerEnd):
        (WebCore::Layout::LineBuilder::appendTextContent):
        (WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendReplacedInlineBox):
        (WebCore::Layout::LineBuilder::appendLineBreak):
        (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
        (WebCore::Layout::LineBuilder::runContentHeight const):
        (WebCore::Layout::LineBuilder::TrimmableContent::append):
        (WebCore::Layout::LineBuilder::halfLeadingMetrics):
        (WebCore::Layout::LineBuilder::layoutState const):
        (WebCore::Layout::LineBuilder::formattingContext const):
        * layout/inlineformatting/InlineLineBuilder.h: Renamed from Source/WebCore/layout/inlineformatting/InlineLine.h.
        (WebCore::Layout::LineBuilder::isVisuallyEmpty const):
        (WebCore::Layout::LineBuilder::hasIntrusiveFloat const):
        (WebCore::Layout::LineBuilder::availableWidth const):
        (WebCore::Layout::LineBuilder::trailingTrimmableWidth const):
        (WebCore::Layout::LineBuilder::lineBox const):
        (WebCore::Layout::LineBuilder::setHasIntrusiveFloat):
        (WebCore::Layout::LineBuilder::Run::isText const):
        (WebCore::Layout::LineBuilder::Run::isBox const):
        (WebCore::Layout::LineBuilder::Run::isForcedLineBreak const):
        (WebCore::Layout::LineBuilder::Run::isContainerStart const):
        (WebCore::Layout::LineBuilder::Run::isContainerEnd const):
        (WebCore::Layout::LineBuilder::Run::layoutBox const):
        (WebCore::Layout::LineBuilder::Run::logicalRect const):
        (WebCore::Layout::LineBuilder::Run::textContext const):
        (WebCore::Layout::LineBuilder::Run::isCollapsedToVisuallyEmpty const):
        (WebCore::Layout::LineBuilder::Run::adjustLogicalTop):
        (WebCore::Layout::LineBuilder::Run::moveHorizontally):
        (WebCore::Layout::LineBuilder::Run::moveVertically):
        (WebCore::Layout::LineBuilder::Run::setLogicalHeight):
        (WebCore::Layout::LineBuilder::Run::hasExpansionOpportunity const):
        (WebCore::Layout::LineBuilder::Run::expansionOpportunityCount const):
        (WebCore::Layout::LineBuilder::logicalTop const):
        (WebCore::Layout::LineBuilder::logicalBottom const):
        (WebCore::Layout::LineBuilder::logicalLeft const):
        (WebCore::Layout::LineBuilder::logicalRight const):
        (WebCore::Layout::LineBuilder::logicalWidth const):
        (WebCore::Layout::LineBuilder::logicalHeight const):
        (WebCore::Layout::LineBuilder::contentLogicalWidth const):
        (WebCore::Layout::LineBuilder::contentLogicalRight const):
        (WebCore::Layout::LineBuilder::baselineOffset const):
        (WebCore::Layout::LineBuilder::isTextAlignJustify const):
        (WebCore::Layout::LineBuilder::TrimmableContent::width const):
        (WebCore::Layout::LineBuilder::TrimmableContent::runs):
        (WebCore::Layout::LineBuilder::TrimmableContent::isEmpty const):
        (WebCore::Layout::LineBuilder::TrimmableContent::clear):
        * layout/inlineformatting/LineLayoutContext.cpp:
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::commitPendingContent):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::placeInlineItem):
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        * layout/inlineformatting/LineLayoutContext.h:

2019-11-25  Zan Dobersek  <zdobersek@igalia.com>

        Support OffscreenCanvas as a CanvasImageSource type in CanvasDrawImage, CanvasFillStrokeStyles
        https://bugs.webkit.org/show_bug.cgi?id=182921

        Reviewed by Antti Koivisto.

        No new tests. Covered by existing tests.

        * bindings/js/CallTracerTypes.h:
        * html/canvas/CanvasDrawImage.idl:
        * html/canvas/CanvasFillStrokeStyles.idl:
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::size):
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        * html/canvas/CanvasRenderingContext2DBase.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::indexForData):
        (WebCore::InspectorCanvas::buildAction):
        * inspector/InspectorCanvas.h:

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

        [LFC][IFC] Rename LineLayout to LineLayoutContext
        https://bugs.webkit.org/show_bug.cgi?id=204582
        <rdar://problem/57474018>

        Reviewed by Antti Koivisto.

        LineLayoutContext is the context for the inline content and not just for a single line.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/LineLayoutContext.cpp: Renamed from Source/WebCore/layout/inlineformatting/InlineLineLayout.cpp.
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::add):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::reset):
        (WebCore::Layout::LineLayoutContext::LineLayoutContext):
        (WebCore::Layout::LineLayoutContext::layoutLine):
        (WebCore::Layout::LineLayoutContext::commitPendingContent):
        (WebCore::Layout::LineLayoutContext::close):
        (WebCore::Layout::LineLayoutContext::placeInlineItem):
        (WebCore::Layout::LineLayoutContext::processUncommittedContent):
        (WebCore::Layout::LineLayoutContext::shouldProcessUncommittedContent const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::trim):
        * layout/inlineformatting/LineLayoutContext.h: Renamed from Source/WebCore/layout/inlineformatting/InlineLineLayout.h.
        (WebCore::Layout::LineLayoutContext::formattingContext const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::runs):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::runs const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::isEmpty const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::size const):
        (WebCore::Layout::LineLayoutContext::UncommittedContent::width const):

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

        [LFC] Pass UsedHorizontal/VerticalValues in by const reference
        https://bugs.webkit.org/show_bug.cgi?id=204563
        <rdar://problem/57464129>

        Reviewed by Antti Koivisto.

        UsedHorizontal/VerticalValues have grown a bit so let's pass them in by reference.

        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

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

        [LFC][IFC] Construct only one LineLayout object per inline formatting context
        https://bugs.webkit.org/show_bug.cgi?id=204561
        <rdar://problem/57463666>

        Reviewed by Antti Koivisto.

        Let's construct only one LineLayout object per IFC.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::LineLayout::layout):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::LineInput::LineInput): Deleted.
        * layout/inlineformatting/InlineLineLayout.h:

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

        [LFC][IFC] Decouple LineLayout and Line
        https://bugs.webkit.org/show_bug.cgi?id=204560
        <rdar://problem/57463295>

        Reviewed by Antti Koivisto.

        This is in preparation for constructing only one LineLayout/Line object for an inline formatting context and not
        one per line.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::constraintsForLine):
        (WebCore::Layout::InlineFormattingContext::initialConstraintsForLine): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::initialize):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::hasIntrusiveFloat const):
        (WebCore::Layout::Line::setHasIntrusiveFloat):
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineInput::LineInput):
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::processUncommittedContent):
        (WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
        * layout/inlineformatting/InlineLineLayout.h:

2019-11-25  Zan Dobersek  <zdobersek@igalia.com>  and  Chris Lord  <clord@igalia.com>

        Basic OffscreenCanvas functionality
        https://bugs.webkit.org/show_bug.cgi?id=182686

        Reviewed by Antti Koivisto.

        Enable context creation and retrieval on OffscreenCanvas, and creation
        of OffscreenCanvas in a worker. To allow for Canvas fill/stroke
        styles in workers, parseColorWorkerSafe has been added, which relies
        on CSSParserFastPaths::parseColor. That function has also been given
        a CSSValuePool parameter, so that a value pool that is safe to use on
        the calling thread can be provided.

        No new tests. Covered by existing tests.

        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseColor):
        (WebCore::CSSParser::parseColorWorkerSafe):
        * css/parser/CSSParser.h:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::parseColor):
        (WebCore::parseCaretColor):
        (WebCore::CSSParserFastPaths::maybeParseValue):
        * css/parser/CSSParserFastPaths.h:
        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::drawingContext const):
        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::setSize):
        (WebCore::OffscreenCanvas::getContext):
        (WebCore::OffscreenCanvas::didDraw):
        (WebCore::OffscreenCanvas::cssValuePool):
        (WebCore::OffscreenCanvas::createImageBuffer const):
        (WebCore::OffscreenCanvas::reset):
        * html/OffscreenCanvas.h:
        * html/OffscreenCanvas.idl:
        * html/canvas/CanvasGradient.cpp:
        (WebCore::CanvasGradient::CanvasGradient):
        (WebCore::m_canvas):
        (WebCore::CanvasGradient::addColorStop):
        * html/canvas/CanvasGradient.h:
        (WebCore::CanvasGradient::create):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::setStrokeStyle):
        (WebCore::CanvasRenderingContext2DBase::setFillStyle):
        (WebCore::CanvasRenderingContext2DBase::setShadowColor):
        (WebCore::CanvasRenderingContext2DBase::setStrokeColor):
        (WebCore::CanvasRenderingContext2DBase::setFillColor):
        (WebCore::CanvasRenderingContext2DBase::setShadow):
        (WebCore::CanvasRenderingContext2DBase::createLinearGradient):
        (WebCore::CanvasRenderingContext2DBase::createRadialGradient):
        * html/canvas/CanvasStyle.cpp:
        (WebCore::isCurrentColorString):
        (WebCore::parseColor):
        (WebCore::currentColor):
        (WebCore::parseColorOrCurrentColor):
        (WebCore::CanvasStyle::createFromString):
        (WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
        * html/canvas/CanvasStyle.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::cssValuePool):
        * workers/WorkerGlobalScope.h:

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

        Enable legacy getUserMedia as a quirk
        https://bugs.webkit.org/show_bug.cgi?id=204403
        <rdar://problem/56421276>

        Reviewed by Eric Carlson.

        Add a shim for legacy getUserMedia to cover uses of this legacy API for existing web pages.
        Add a corresponding settings and quirk.
        Covered by manual test.

        * Modules/mediastream/NavigatorMediaDevices.idl:
        * bindings/js/JSDOMBindingInternals.js:
        * bindings/js/JSNavigatorCustom.cpp:
        (WebCore::JSNavigator::getUserMedia):
        * dom/Document.cpp:
        (WebCore::m_undoManager):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldEnableLegacyGetUserMedia const):
        * page/Quirks.h:
        * page/Settings.yaml:

2019-11-25  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Flatten MediaPlayerPrivateGStreamer into MediaPlayerPrivateGStreamerBase
        https://bugs.webkit.org/show_bug.cgi?id=204352

        Reviewed by Philippe Normand.

        The inheritance link between the base player and the private player no
        longer serves a purpose. The only user of the base class is the private
        player.

        Squashing these toghether makes it easy to do further refactorings,
        since everything can be seen in one place rather than being arbitrarily
        split into two classes and having to do derived-to-base conversions in
        your head for no gain in clarity elsewhere.

        Aside from merging the classes, the only other change here is switching
        to in-class initialization of many member variables, rather than a long
        list of initializations in the constructor that gets fiddly with
        -Wreorder.

        These classes are much too large and could use some redesign, this is
        only a first step toward that goal.

        This is a refactoring, hopefully well covered by our existing tests!

        * platform/GStreamer.cmake:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::greatestCommonDivisor):
        (WebCore::busMessageCallback):
        (WebCore::convertToInternalProtocol):
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::~GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::waitForCPUSync):
        (WebCore::GstVideoFrameHolder::size const):
        (WebCore::GstVideoFrameHolder::hasAlphaChannel const):
        (WebCore::GstVideoFrameHolder::flags const):
        (WebCore::GstVideoFrameHolder::textureID const):
        (WebCore::GstVideoFrameHolder::hasMappedTextures const):
        (WebCore::GstVideoFrameHolder::videoFrame const):
        (WebCore::GstVideoFrameHolder::updateTexture):
        (WebCore::GstVideoFrameHolder::platformLayerBuffer):
        (WebCore::MediaPlayerPrivateGStreamer::initializeDebugCategory):
        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
        (WebCore::MediaPlayerPrivateGStreamer::isAvailable):
        (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
        (WebCore::MediaPlayerPrivateGStreamer::load):
        (WebCore::MediaPlayerPrivateGStreamer::cancelLoad):
        (WebCore::MediaPlayerPrivateGStreamer::paused const):
        (WebCore::MediaPlayerPrivateGStreamer::doSeek):
        (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
        (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamer::setRate):
        (WebCore::MediaPlayerPrivateGStreamer::rate const):
        (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
        (WebCore::MediaPlayerPrivateGStreamer::setPreload):
        (WebCore::MediaPlayerPrivateGStreamer::buffered const):
        (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
        (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
        (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
        (WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
        (WebCore::MediaPlayerPrivateGStreamer::hasSingleSecurityOrigin const):
        (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
        (WebCore::MediaPlayerPrivateGStreamer::simulateAudioInterruption):
        (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider):
        (WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider):
        (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
        (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback):
        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
        (WebCore::MediaPlayerPrivateGStreamer::sourceSetupCallback):
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
        (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
        (WebCore::setSyncOnClock):
        (WebCore::MediaPlayerPrivateGStreamer::syncOnClock):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
        (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
        (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
        (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
        (WebCore::MediaPlayerPrivateGStreamer::newTextSampleCallback):
        (WebCore::MediaPlayerPrivateGStreamer::newTextSample):
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
        (WebCore::MediaPlayerPrivateGStreamer::loadStateChanged):
        (WebCore::MediaPlayerPrivateGStreamer::timeChanged):
        (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
        (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
        (WebCore::MediaPlayerPrivateGStreamer::audioSink const):
        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::clearTracks):
        (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::setPipeline):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::requestGLContext):
        (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext):
        (WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
        (WebCore::MediaPlayerPrivateGStreamer::setVolume):
        (WebCore::MediaPlayerPrivateGStreamer::volume const):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVolumeChange):
        (WebCore::MediaPlayerPrivateGStreamer::volumeChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::networkState const):
        (WebCore::MediaPlayerPrivateGStreamer::readyState const):
        (WebCore::MediaPlayerPrivateGStreamer::sizeChanged):
        (WebCore::MediaPlayerPrivateGStreamer::setMuted):
        (WebCore::MediaPlayerPrivateGStreamer::muted const):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfMute):
        (WebCore::MediaPlayerPrivateGStreamer::muteChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
        (WebCore::MediaPlayerPrivateGStreamer::updateMaxTimeLoaded):
        (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus):
        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
        (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks):
        (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks):
        (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks):
        (WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles):
        (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
        (WebCore::MediaPlayerPrivateGStreamer::mediaLocationChanged):
        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
        (WebCore::MediaPlayerPrivateGStreamer::getSupportedTypes):
        (WebCore::MediaPlayerPrivateGStreamer::supportsType):
        (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck const):
        (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData const):
        (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
        (WebCore::MediaPlayerPrivateGStreamer::acceleratedRenderingStateChanged):
        (WebCore::MediaPlayerPrivateGStreamer::platformLayer const):
        (WebCore::MediaPlayerPrivateGStreamer::swapBuffersIfNeeded):
        (WebCore::MediaPlayerPrivateGStreamer::proxy const):
        (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamer::repaint):
        (WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):
        (WebCore::MediaPlayerPrivateGStreamer::repaintCallback):
        (WebCore::MediaPlayerPrivateGStreamer::cancelRepaint):
        (WebCore::MediaPlayerPrivateGStreamer::repaintCancelledCallback):
        (WebCore::MediaPlayerPrivateGStreamer::newSampleCallback):
        (WebCore::MediaPlayerPrivateGStreamer::newPrerollCallback):
        (WebCore::MediaPlayerPrivateGStreamer::flushCurrentBuffer):
        (WebCore::MediaPlayerPrivateGStreamer::setSize):
        (WebCore::MediaPlayerPrivateGStreamer::paint):
        (WebCore::MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamer::nativeImageForCurrentTime):
        (WebCore::MediaPlayerPrivateGStreamer::setVideoSourceOrientation):
        (WebCore::MediaPlayerPrivateGStreamer::updateTextureMapperFlags):
        (WebCore::MediaPlayerPrivateGStreamer::supportsFullscreen const):
        (WebCore::MediaPlayerPrivateGStreamer::movieLoadType const):
        (WebCore::MediaPlayerPrivateGStreamer::createGLAppSink):
        (WebCore::MediaPlayerPrivateGStreamer::createVideoSinkGL):
        (WebCore::MediaPlayerPrivateGStreamer::ensureGLVideoSinkContext):
        (WebCore::setRectangleToVideoSink):
        (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient):
        (WebCore::MediaPlayerPrivateGStreamer::createHolePunchVideoSink):
        (WebCore::MediaPlayerPrivateGStreamer::pushNextHolePunchBuffer):
        (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
        (WebCore::MediaPlayerPrivateGStreamer::setStreamVolumeElement):
        (WebCore::MediaPlayerPrivateGStreamer::decodedFrameCount const):
        (WebCore::MediaPlayerPrivateGStreamer::droppedFrameCount const):
        (WebCore::MediaPlayerPrivateGStreamer::audioDecodedByteCount const):
        (WebCore::MediaPlayerPrivateGStreamer::videoDecodedByteCount const):
        (WebCore::MediaPlayerPrivateGStreamer::initializationDataEncountered):
        (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached):
        (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached):
        (WebCore::MediaPlayerPrivateGStreamer::attemptToDecryptWithInstance):
        (WebCore::MediaPlayerPrivateGStreamer::attemptToDecryptWithLocalInstance):
        (WebCore::MediaPlayerPrivateGStreamer::handleProtectionEvent):
        (WebCore::MediaPlayerPrivateGStreamer::setWaitingForKey):
        (WebCore::MediaPlayerPrivateGStreamer::waitingForKey const):
        (WebCore::MediaPlayerPrivateGStreamer::supportsKeySystem):
        (WebCore::MediaPlayerPrivateGStreamer::extendedSupportsType):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::mediaPlayer const):
        (WebCore::MediaPlayerPrivateGStreamer::pipeline const):
        (WebCore::MediaPlayerPrivateGStreamer::isLiveStream const):
        (WebCore::MediaPlayerPrivateGStreamer::configurePlaySink):
        (WebCore::MediaPlayerPrivateGStreamer::gstGLContext const):
        (WebCore::MediaPlayerPrivateGStreamer::gstGLDisplay const):
        (WebCore::MediaPlayerPrivateGStreamer::videoSink const):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Removed.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Removed.

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

        Crash in WebCore::ServiceWorkerRegistrationKey::hash() const
        https://bugs.webkit.org/show_bug.cgi?id=204497
        <rdar://problem/57348603>

        Reviewed by Alex Christensen.

        Update ServiceWorkerContainer::jobResolvedWithRegistration to handle the case of a
        ServiceWorkerContainer that might have a job whose promise is not related to the same context.
        In that case, the ServiceWorkerContainer might get stopped, thus its m_ongoingSettledRegistrations be cleared.
        But the promise may get settled shortly after since its context is not stopped and will then retrieve an empty registration data key.
        This is difficult to test given we do not control when the resolvedWithRegistration task is posted to the client.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
        * workers/service/ServiceWorkerRegistrationKey.h:
        (WebCore::ServiceWorkerRegistrationKey::encode const):
        Add release asserts to make sure we do not store/transfer empty registration keys.

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

        Use SWClientConnection instead of hopping to main thread in ServiceWorkerContainer
        https://bugs.webkit.org/show_bug.cgi?id=204499

        Reviewed by Chris Dumez.

        Make use of SWClientConnection instead of callOnMainThread.
        This removes the callOnMainThread call if we are already on the main thread.
        No observable change of behavior.
        Remove failedFetchingScript since it is just a call to finishFetchingScriptInServer.

        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::startScriptFetchForServer):
        * workers/service/SWClientConnection.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::notifyRegistrationIsSettled):
        (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
        (WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):
        * workers/service/ServiceWorkerFetchResult.h:
        (WebCore::serviceWorkerFetchError):

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

        REGRESSION (Safari 13): WebSocket payload is truncated when x-webkit-deflate-frame is used
        https://bugs.webkit.org/show_bug.cgi?id=202401
        <rdar://problem/55922632>

        Reviewed by Alex Christensen.

        Test: http/tests/websocket/tests/hybi/deflate-extension.html

        * Modules/websockets/WebSocketDeflater.cpp:
        (WebCore::WebSocketDeflater::finish):
        Make sure to continue calling deflate until all output data is flushed.

2019-11-24  Sunny He  <sunny_he@apple.com>

        Ensure SpeechSynthesis::cancel() correctly clears m_currentSpeechUtterance
        https://bugs.webkit.org/show_bug.cgi?id=204429
        <rdar://57072704>

        Reviewed by Chris Fleizach.

        Currently it is possible for the utterance that is in the process of
        being spoken to be garbage collected. In this case, the pointer held
        by SpeechSynthesis (m_currentSpeechUtterance) won't be properly
        cleared on cancel(). This change ensures that cancel() nulls out the
        current utterance and SpeechSynthesis takes a Ref for the utterance.

        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::cancel):
        * Modules/speech/SpeechSynthesis.h:

2019-11-23  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Allow multiple third-party cookie blocking settings
        https://bugs.webkit.org/show_bug.cgi?id=204389
        <rdar://problem/57344054>

        Reviewed by Brent Fulgham.

        This change introduces an enum ThirdPartyCookieBlockingMode for how third-party
        cookie blocking should be carried out. It then uses the set mode in 
        NetworkStorageSession::shouldBlockCookies().

        The reason for supporting three different modes is that what is now named
        OnlyAccordingToPerDomainPolicy is shipping, AllOnSitesWithoutUserInteraction is
        in beta, and All is behind an experimental flag.

        Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html

        * page/Settings.yaml:
            Flipped the isThirdPartyCookieBlockingEnabled flag to on by default.
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::shouldBlockCookies const):
        (WebCore::NetworkStorageSession::setThirdPartyCookieBlockingMode):
        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingEnabled): Deleted.

2019-11-23  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r252805.
        https://bugs.webkit.org/show_bug.cgi?id=204553

        Caused test failures and ASan crashes (Requested by ap on
        #webkit).

        Reverted changeset:

        "Cross-thread version StorageQuotaManager"
        https://bugs.webkit.org/show_bug.cgi?id=203971
        https://trac.webkit.org/changeset/252805

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

        [LFC][IFC] Replace redundant Line::isVisuallyEmpty() with LineBox::isConsideredEmpty()
        https://bugs.webkit.org/show_bug.cgi?id=204551
        <rdar://problem/57454620>

        Reviewed by Antti Koivisto.

        It turns out the we already cache the visually empty status in LineBox.

        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::isEmpty const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::isInlineContainerConsideredEmpty): Deleted.
        (WebCore::Layout::Line::isVisuallyEmpty const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::hasContent const): Deleted.
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::processUncommittedContent):

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

        [LFC][IFC] Defer run height/baseline adjustment computation until Line::close
        https://bugs.webkit.org/show_bug.cgi?id=204550
        <rdar://problem/57454497>

        Reviewed by Antti Koivisto.

        Currently we measure run height and adjust the line's baseline/height on every append.
        We could do all that in Line::close after we've merged the neighboring runs.
        ([text][ ][content] vs. [text content])
        This is about ~5% win on line-layout-simple.html

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::alignContentVertically):
        (WebCore::Layout::Line::append):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendLineBreak):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::runContentHeight const):
        (WebCore::Layout::Line::alignContentVertically const): Deleted.
        (WebCore::Layout::Line::inlineItemContentHeight const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::setLogicalHeight):

2019-11-23  Andres Gonzalez  <andresg_22@apple.com>

        Run LayoutTests/accessibility/mac/primary-screen-height.html on secondary accessibility thread.
        https://bugs.webkit.org/show_bug.cgi?id=204391

        Reviewed by Chris Fleizach.

        LayoutTests/accessibility/mac/primary-screen-height.html tests this
        change when isolated tree is enabled.

        Use ASSERT(!isMainThread()) instead of HIServices call to detect
        whether not running in the secondary thread during LayoutTests.

        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::children):
        (WebCore::AXIsolatedObject::updateBackingStore):

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

        [LFC][IFC] Remove unnecessary Line::hasContent() calls in LineLayout::placeInlineItem
        https://bugs.webkit.org/show_bug.cgi?id=204540
        <rdar://problem/57443500>

        Reviewed by Antti Koivisto.

        LineLayout::placeInlineItem is hot. This shaves off ~3% on line-layout-simple.html 

        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::placeInlineItem):
        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
        (WebCore::FrameViewLayoutContext::layout):
        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::attachToRenderElementInternal):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2019-11-23  Antti Koivisto  <antti@apple.com>

        Media queries in img sizes attribute don't evaluate dynamically
        https://bugs.webkit.org/show_bug.cgi?id=204521

        Reviewed by Simon Fraser.

        Tests: fast/images/sizes-dynamic-001.html
               fast/images/sizes-dynamic-002.html

        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::evaluateForChanges const):

        Add a helper function for evaluating dynamic results for changes.

        * css/MediaQueryEvaluator.h:
        (WebCore::MediaQueryDynamicResults::isEmpty const):
        * css/parser/SizesAttributeParser.cpp:
        (WebCore::SizesAttributeParser::SizesAttributeParser):
        (WebCore::SizesAttributeParser::mediaConditionMatches):

        Gather MediaQueryDynamicResults

        * css/parser/SizesAttributeParser.h:
        * dom/Document.cpp:
        (WebCore::Document::updateElementsAffectedByMediaQueries):
        (WebCore::Document::addDynamicMediaQueryDependentImage):
        (WebCore::Document::removeDynamicMediaQueryDependentImage):

        Replace viewport/appearance specific mechanism with a unified one (they were all invoked together anyway).
        Make it about HTMLImageElement rather than HTMLPictureElement since that is the only client in this patch.

        (WebCore::Document::checkViewportDependentPictures): Deleted.
        (WebCore::Document::checkAppearanceDependentPictures): Deleted.
        (WebCore::Document::addViewportDependentPicture): Deleted.
        (WebCore::Document::removeViewportDependentPicture): Deleted.
        (WebCore::Document::addAppearanceDependentPicture): Deleted.
        (WebCore::Document::removeAppearanceDependentPicture): Deleted.
        * dom/Document.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::~HTMLImageElement):
        (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
        (WebCore::HTMLImageElement::evaluateDynamicMediaQueryDependencies):
        (WebCore::HTMLImageElement::selectImageSource):

        Gather MediaQueryDynamicResults from all paths.

        (WebCore::HTMLImageElement::didMoveToNewDocument):
        * html/HTMLImageElement.h:
        * html/HTMLPictureElement.cpp:
        (WebCore::HTMLPictureElement::~HTMLPictureElement):
        (WebCore::HTMLPictureElement::didMoveToNewDocument):
        (WebCore::HTMLPictureElement::viewportChangeAffectedPicture const): Deleted.
        (WebCore::HTMLPictureElement::appearanceChangeAffectedPicture const): Deleted.

        Move the media query dependency code to HTMLImageElement since thats where it is actually needed.

        * html/HTMLPictureElement.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::setImageDevicePixelRatio):

        Update rendering also if only the pixel ratio changes.

        * rendering/RenderImage.h:
        (WebCore::RenderImage::setImageDevicePixelRatio): Deleted.

2019-11-21  Ryosuke Niwa  <rniwa@webkit.org>

        Use the event loop instead of DocumentEventQueue and WorkerEventQueue
        https://bugs.webkit.org/show_bug.cgi?id=204447
        <rdar://problem/57420691>

        Reviewed by Antti Koivisto.

        This patch replaces every use of DocumentEventQueue and WorkerEventQueue by the integration
        with the event loop.

        Because this changes the order by which some of the affected events fire and tasks run,
        this patch also makes WindowEventLoop::scheduleToRun use a Timer instead of callOnMainThread
        in order to avoid introducing new test failures.

        In addition, WebSQL needed a code change to scheudle tasks via the event loop after moving
        to the event loop as callOnMainThread could run before or after a 0s timer fires depending
        on whether it was called during another timer or not; meaning that it could change the order
        of operations with respect to other tasks scheduled via event loops in some cases.

        Finally, added the links to various specifications where appropriate.

        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::connectionToServerLost):
        (WebCore::IDBDatabase::fireVersionChangeEvent):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::enqueueEvent):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::enqueueEvent):
        (WebCore::IDBTransaction::dispatchEvent):
        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::scheduleDispatchEvent):
        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::scheduleTransactionCallback): Schedule a task on the event loop once
        we're in the main thread as the order of operation could change with respect to other tasks
        scheduled via the event loop otherwise.
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::notifyDatabaseThreadIsShuttingDown): Ditto.
        * dom/Document.cpp:
        (WebCore::Document::visibilityStateChanged):
        (WebCore::Document::prepareForDestruction):
        (WebCore::Document::enqueueWindowEvent): Deleted.
        (WebCore::Document::queueTaskToDispatchEvent): Added.
        (WebCore::Document::enqueueDocumentEvent): Deleted.
        (WebCore::Document::queueTaskToDispatchEventOnWindow): Added.
        (WebCore::Document::enqueueOverflowEvent):
        (WebCore::Document::enqueueSecurityPolicyViolationEvent):
        (WebCore::Document::enqueueHashchangeEvent): Rewritten. Keep the target node alive until
        the overflow event fires.
        fired on an overflow element 
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * dom/TaskSource.h:
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::WindowEventLoop):
        (WebCore::WindowEventLoop::scheduleToRun):
        * dom/WindowEventLoop.h:
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::languagesChanged):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::elementWasRemoved):
        * page/PointerLockController.cpp:
        (WebCore::PointerLockController::enqueueEvent):
        * storage/StorageEventDispatcher.cpp:
        (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
        (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
        (WebCore::WorkerGlobalScope::eventQueue const): Deleted.
        * workers/WorkerGlobalScope.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::WorkletGlobalScope):
        * worklets/WorkletGlobalScope.h:

2019-11-22  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (r252792?): 6 inspector/canvas tests crashing
        https://bugs.webkit.org/show_bug.cgi?id=204542

        Reviewed by Devin Rousso.

        Copy the list of identifiers to a Vector before iterating over it
        since m_identifierToInspectorCanvas could be mutated meanwhile.

        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::recordCanvasAction):

2019-11-21  Ryosuke Niwa  <rniwa@webkit.org>

        Associate each microtask with a task group and remove ActiveDOMCallbackMicrotask
        https://bugs.webkit.org/show_bug.cgi?id=204491

        Reviewed by Antti Koivisto.

        This patch associates each microtask with a EventLoopTaskGroup by making MicrotaskQueue
        use EventLoopTaskGroup in place of Microtask, eliminating the latter.

        This allows microtasks associated with each script execution context's test group to be
        suspsned or stopped along with the script execution context without having to wrap each
        microtask in ActiveDOMCallbackMicrotask, which is now redundant and therefore deleted.

        No new tests since there should be no observable behavioral change here.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::queueMicrotaskToEventLoop):
        * bindings/js/JSWorkerGlobalScopeBase.cpp:
        (WebCore::JSWorkerGlobalScopeBase::queueMicrotaskToEventLoop):
        * dom/ActiveDOMCallbackMicrotask.cpp: Removed.
        * dom/ActiveDOMCallbackMicrotask.h: Removed.
        * dom/EventLoop.cpp:
        (WebCore::EventLoop::queueTask):
        (WebCore::EventLoop::queueMicrotask):
        (WebCore::EventLoopTaskGroup::queueMicrotask):
        (WebCore::EventLoopTaskGroup::queueMicrotaskCallback): Deleted.
        * dom/EventLoop.h:
        * dom/Microtasks.cpp:
        (WebCore::Microtask::removeSelfFromQueue): Deleted.
        (WebCore::MicrotaskQueue::append):
        (WebCore::MicrotaskQueue::remove): Deleted.
        (WebCore::MicrotaskQueue::performMicrotaskCheckpoint): Like EventLoop::run, skip any task
        associated with a stopped group (script execution context) and add back any task associated
        with a suspened group; these are tasks which used to return Microtask::Result::KeepInQueue.
        * dom/Microtasks.h:
        (WebCore::Microtask): Deleted.
        (WebCore::Microtask::~Microtask): Deleted.
        * dom/TaskSource.h:
        (WebCore::TaskSource): Added Microtask as a new task source.
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::recordCanvasAction):
        * testing/Internals.cpp:
        (WebCore::Internals::queueMicroTask):

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

        [LFC][IFC] Text content is not exactly rare data.
        https://bugs.webkit.org/show_bug.cgi?id=204539
        <rdar://problem/57442263>

        Reviewed by Antti Koivisto.

        If it turns out to be a memory consumption issue, we can always subclass Layout::Box. Let's go with the m_textContext member for now.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::ContinousContent::close):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::setTextContext): Deleted.
        (WebCore::Layout::Box::hasTextContent const): Deleted.
        (WebCore::Layout::Box::textContext const): Deleted.
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::hasTextContent const):
        (WebCore::Layout::Box::textContext const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputLayoutBox):

2019-11-22  Chris Dumez  <cdumez@apple.com>

        HTTPHeaderMap's operator== is not fully correct
        https://bugs.webkit.org/show_bug.cgi?id=204361

        Reviewed by Alex Christensen.

        If headers are added in a different order, HTTPHeaderMap's operator==() would wrongly
        return false because it is using a Vector internally to store the headers. Also, it
        would incorrectly return false if the case of the headers did not match.

        * platform/network/HTTPHeaderMap.cpp:
        (WebCore::HTTPHeaderMap::get const):
        (WebCore::HTTPHeaderMap::getUncommonHeader const):
        * platform/network/HTTPHeaderMap.h:
        (WebCore::HTTPHeaderMap::operator==):

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

        [LFC][IFC] Merge "insert inline runs" and "setup display runs" loops in InlineFormattingContext::setDisplayBoxesForLine
        https://bugs.webkit.org/show_bug.cgi?id=204537
        <rdar://problem/57440394>

        Reviewed by Antti Koivisto.

        Let's loop the new Line::Run list only once.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

2019-11-22  Chris Dumez  <cdumez@apple.com>

        Bindings generator fails to add includes for iterable<> key / value types
        https://bugs.webkit.org/show_bug.cgi?id=204530

        Reviewed by Ryosuke Niwa.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateIterableDefinition):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfacePrototype::finishCreation):
        (WebCore::jsTestInterfacePrototypeFunctionEntriesCaller):
        (WebCore::jsTestInterfacePrototypeFunctionEntries):
        (WebCore::jsTestInterfacePrototypeFunctionKeysCaller):
        (WebCore::jsTestInterfacePrototypeFunctionKeys):
        (WebCore::jsTestInterfacePrototypeFunctionValuesCaller):
        (WebCore::jsTestInterfacePrototypeFunctionValues):
        (WebCore::jsTestInterfacePrototypeFunctionForEachCaller):
        (WebCore::jsTestInterfacePrototypeFunctionForEach):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        * bindings/scripts/test/JS/JSTestNode.cpp:
        * bindings/scripts/test/TestInterface.idl:

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

        [LFC][IFC] Line::Run::expand should take a range of runs to merge
        https://bugs.webkit.org/show_bug.cgi?id=204514
        <rdar://problem/57428139>

        Reviewed by Antti Koivisto.

        As part of Line::close, we iterate through the runs and merge them if possible.
        e.g [text][ ][content][ ][and][         ][more] -> [text content and ][more] (note the whitespace collapsing)
        Instead of taking and expanding the runs one by one, let's collect the continuous neighboring runs first
        and expand the current run with the continuous range in one go. This shaves off ~2% on line-layout-simple.html.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::ContinousContent::isEmpty const):
        (WebCore::Layout::ContinousContent::length const):
        (WebCore::Layout::ContinousContent::width const):
        (WebCore::Layout::ContinousContent::hasTrailingExpansionOpportunity const):
        (WebCore::Layout::ContinousContent::expansionOpportunityCount const):
        (WebCore::Layout::ContinousContent::ContinousContent):
        (WebCore::Layout::ContinousContent::append):
        (WebCore::Layout::ContinousContent::canMergeRuns):
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:

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

        [Cocoa] Rename some internal names for system fonts
        https://bugs.webkit.org/show_bug.cgi?id=204486

        Reviewed by Simon Fraser.

        designSystemUI -> systemDesign (because https://developer.apple.com/documentation/appkit/nsfontdescriptorsystemdesign?language=objc)
        SystemFontDatabaseCoreText::ClientUse -> SystemFontKind
        ForSystemUI -> SystemUI (because https://drafts.csswg.org/css-fonts-4/#system-ui-def)
        ForSystemUISerif -> UISerif (because https://drafts.csswg.org/css-fonts-4/#ui-serif-def)
        ForSystemUIMonospace -> UIMonospace (because https://drafts.csswg.org/css-fonts-4/#ui-monospace-def)
        ForSystemUIRounded -> UIRounded (because https://drafts.csswg.org/css-fonts-4/#ui-rounded-def)
        ForTextStyle -> TextStyle (because CTFontDescriptorCreateWithTextStyle())

        No new tests because there is no behavior change.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::fontWithFamilySpecialCase):
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::matchSystemFontUse):
        (WebCore::systemFontCascadeList):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::createSystemDesignFont):
        (WebCore::SystemFontDatabaseCoreText::cascadeList):
        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
        (WebCore::SystemFontDatabaseCoreText::createDesignSystemUIFont): Deleted.
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

2019-11-22  Sihui Liu  <sihui_liu@apple.com>

        Cross-thread version StorageQuotaManager
        https://bugs.webkit.org/show_bug.cgi?id=203971
        <rdar://problem/57290349>

        Reviewed by Chris Dumez.

        Implement a lock-based StorageQuotaManager so that quota check can be done on different threads.
        If space request is made on a background thread, it needs to hold a lock until it is finished, so no request
        from different threads can be performed at the same time.
        If space request is made on the main thread, we will dispatch it to a background thread and schedule a calllback
        to the main thread when result is available, so the main thread will not be blocked.

        Covered by existing quota related tests.

        * Headers.cmake:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::create):
        (WebCore::IDBServer::IDBServer::IDBServer):
        (WebCore::IDBServer::IDBServer::didPerformCloseAndDeleteDatabases):
        (WebCore::IDBServer::IDBServer::requestSpace):
        (WebCore::IDBServer::IDBServer::diskUsage):
        (WebCore::IDBServer::IDBServer::QuotaUser::QuotaUser): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::~QuotaUser): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::resetSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::computeSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::whenInitialized): Deleted.
        (WebCore::IDBServer::IDBServer::QuotaUser::initializeSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::ensureQuotaUser): Deleted.
        (WebCore::IDBServer::IDBServer::startComputingSpaceUsedForOrigin): Deleted.
        (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): Deleted.
        (WebCore::IDBServer::IDBServer::finishComputingSpaceUsedForOrigin): Deleted.
        (WebCore::IDBServer::IDBServer::resetSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::increaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::decreaseSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::increasePotentialSpaceUsed): Deleted.
        (WebCore::IDBServer::IDBServer::decreasePotentialSpaceUsed): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::initializeQuotaUser): Deleted.
        (): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::getCount):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::requestSpace): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::startSpaceIncreaseTask): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStoreAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStoreAfetQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndexAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::getRecordAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecordsAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::getCountAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecordAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::openCursorAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursorAfterQuotaCheck): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionAfterQuotaCheck): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::InProcessIDBServer::quotaManager):
        (WebCore::storageQuotaManagerSpaceRequester):
        (WebCore::InProcessIDBServer::InProcessIDBServer):
        (WebCore::storageQuotaManagerGetter): Deleted.
        * Modules/indexeddb/shared/InProcessIDBServer.h:
        * WebCore.xcodeproj/project.pbxproj:
        * storage/StorageQuotaManager.cpp:
        (WebCore::StorageQuotaManager::create):
        (WebCore::StorageQuotaManager::StorageQuotaManager):
        (WebCore::StorageQuotaManager::requestSpaceOnMainThread):
        (WebCore::StorageQuotaManager::requestSpaceOnBackgroundThread):
        (WebCore::StorageQuotaManager::tryGrantRequest):
        (WebCore::StorageQuotaManager::updateQuotaBasedOnUsage):
        (WebCore::StorageQuotaManager::resetQuotaUpdatedBasedOnUsageForTesting):
        (WebCore::StorageQuotaManager::resetQuotaForTesting):
        (WebCore::StorageQuotaManager::~StorageQuotaManager): Deleted.
        (WebCore::StorageQuotaManager::spaceUsage const): Deleted.
        (WebCore::StorageQuotaManager::updateQuotaBasedOnSpaceUsage): Deleted.
        (WebCore::StorageQuotaManager::initializeUsersIfNeeded): Deleted.
        (WebCore::StorageQuotaManager::askUserToInitialize): Deleted.
        (WebCore::StorageQuotaManager::addUser): Deleted.
        (WebCore::StorageQuotaManager::shouldAskForMoreSpace const): Deleted.
        (WebCore::StorageQuotaManager::removeUser): Deleted.
        (WebCore::StorageQuotaManager::requestSpace): Deleted.
        (WebCore::StorageQuotaManager::askForMoreSpace): Deleted.
        (WebCore::StorageQuotaManager::processPendingRequests): Deleted.
        * storage/StorageQuotaManager.h:
        (WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
        (WebCore::StorageQuotaManager::StorageQuotaManager): Deleted.
        (WebCore::StorageQuotaManager::resetQuota): Deleted.
        (WebCore::StorageQuotaManager::state const): Deleted.
        * storage/StorageQuotaUser.h: Removed.

2019-11-22  Eric Carlson  <eric.carlson@apple.com>

        ( r251737 ) media/remoteplayback-prompt.html is a flakey timeout
        https://bugs.webkit.org/show_bug.cgi?id=204362
        <rdar://problem/57327870>

        Reviewed by Jer Noble.

        No new tests, this fixes a flakey test.

        * platform/mock/MediaPlaybackTargetPickerMock.cpp:
        (WebCore::MediaPlaybackTargetPickerMock::MediaPlaybackTargetPickerMock):
        (WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
        (WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets):
        (WebCore::MediaPlaybackTargetPickerMock::setState):
        (WebCore::MediaPlaybackTargetPickerMock::timerFired): Deleted.
        * platform/mock/MediaPlaybackTargetPickerMock.h:

2019-11-22  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: adjust `InspectorCanvasAgent::recordCanvasAction` to actually check that the `CanvasRenderingContext` still exists
        https://bugs.webkit.org/show_bug.cgi?id=204395
        <rdar://problem/57347504>

        Reviewed by Ryosuke Niwa.

        The microtask we create to handle marking the end of a frame for a detached canvas doesn't
        actually check that the `CanvasRenderingContext` still exists, such as if it gets GCd during
        a recording.

        Instead of creating a microtask per-canvas, create a microtask per-`InspectorCanvasAgent`
        and save a list of `canvasId` that are actively recording, which can then be iterated to
        handle marking the end of a frame for each once the microtask fires. If the `canvasId` can't
        be re-found, then the related `CanvasRenderingContext` must have been removed.

        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::recordCanvasAction):
        (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
        (WebCore::InspectorCanvasAgent::reset):

2019-11-22  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: lock-based implementation of suspension
        https://bugs.webkit.org/show_bug.cgi?id=204379

        Reviewed by Geoffrey Garen.

        Covered by existing 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:
        (WebCore::IDBServer::IDBServer::addDatabase):
        (WebCore::IDBServer::IDBServer::removeDatabase):
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
        (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
        (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
        (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
        (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
        (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
        (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
        (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
        (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
        (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
        (WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
        (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber):
        (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
        (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
        (WebCore::IDBServer::MemoryIDBBackingStore::infoForObjectStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::deleteBackingStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::close):
        (WebCore::IDBServer::MemoryIDBBackingStore::databaseSize const): Deleted.
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
        (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::getAllRecords):
        (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::prefetchCursor):
        (WebCore::IDBServer::SQLiteIDBBackingStore::infoForObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::close):
        (WebCore::IDBServer::SQLiteIDBBackingStore::hasTransaction const):
        (WebCore::IDBServer::SQLiteIDBBackingStore::databaseSize const): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::performStartVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::performOpenCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::performActivateTransactionInBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransactionOnMainThread):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransactionOnMainThread):
        (WebCore::IDBServer::UniqueIDBDatabase::suspend):
        (WebCore::IDBServer::UniqueIDBDatabase::resume):
        (WebCore::IDBServer::UniqueIDBDatabase::finishActiveTransactions): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-11-22  Chris Lord  <clord@igalia.com>

        Make CSSValuePool constructable
        https://bugs.webkit.org/show_bug.cgi?id=204520

        Reviewed by Antti Koivisto.

        No new tests, no new functionality.

        * css/CSSInheritedValue.h:
        * css/CSSRevertValue.h:
        * css/CSSUnsetValue.h:
        * css/CSSValuePool.cpp:
        (WebCore::CSSValuePool::singleton):
        (WebCore::CSSValuePool::CSSValuePool):
        * css/CSSValuePool.h:

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

        Try to fix build on an old MacOS version

        Unreviewed.

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

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

        [LFC][IFC] Line::inlineItemContentHeight should only call FormattingContext::geometryForBox when needed
        https://bugs.webkit.org/show_bug.cgi?id=204516
        <rdar://problem/57429153>

        Reviewed by Antti Koivisto.

        Line::inlineItemContentHeight is hot and geometryForBox() is a hash lookup. Let's not call it unless we need to.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::inlineItemContentHeight const):

2019-11-22  Carlos Garcia Campos  <cgarcia@igalia.com>

        File input should fire an 'input' event before the 'change' event
        https://bugs.webkit.org/show_bug.cgi?id=204292

        Reviewed by Wenson Hsieh.

        "Queue a task to first update the element's selected files so that it represents the user's selection, then fire
        an event named input at the input element, with the bubbles attribute initialized to true, and finally fire an
        event named change at the input element, with the bubbles attribute initialized to true."
        https://html.spec.whatwg.org/#file-upload-state-(type=file):event-input

        This will also fix WebDriver test imported/w3c/webdriver/tests/element_send_keys/events.py::test_file_upload in
        safari driver.

        Test: fast/forms/file/file-input-user-selection-events.html

        * html/FileInputType.cpp:
        (WebCore::FileInputType::setFiles):

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

        Experimental support for HDR media query
        https://bugs.webkit.org/show_bug.cgi?id=204422

        Reviewed by Eric Carlson.

        Test: fast/media/mq-highdynamicrange-live-update.html

        Add support for the dynamic-range: media query.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSValueKeywords.in:
        * css/MediaFeatureNames.h:
        * css/MediaQueryEvaluator.cpp:
        (WebCore::dynamicRangeEvaluate):
        * css/MediaQueryExpression.cpp:
        (WebCore::featureWithValidIdent):
        * page/Chrome.cpp:
        (WebCore::Chrome::windowScreenDidChange):
        * page/Settings.yaml:
        * page/SettingsBase.h:
        * platform/PlatformScreen.h:
        * platform/ScreenProperties.h:
        (WebCore::ScreenData::encode const):
        (WebCore::ScreenData::decode):
        * platform/ios/PlatformScreenIOS.mm:
        (WebCore::screenSupportsHighDynamicRange):
        * platform/mac/PlatformScreenMac.mm:
        (WebCore::collectScreenProperties):
        (WebCore::screenSupportsHighDynamicRange):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::forcedSupportsHighDynamicRangeValue const):
        (WebCore::InternalSettings::setForcedSupportsHighDynamicRangeValue):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-11-21  Ryosuke Niwa  <rniwa@webkit.org>

        Scrolling to fragment shouldn't happen as a part of updating style
        https://bugs.webkit.org/show_bug.cgi?id=203982

        Reviewed by Simon Fraser.

        Don't scroll to the current URL's fragment at the end of resolveStyle. Instead, schedule a task
        to scroll to the current URL's fragment when all pending stylesheets have finished loading.

        This patch also moves the code which sets a Document's m_gotoAnchorNeededAfterStylesheetsLoadflag
        from FrameView to FrameLoader as FrameView shouldn't be relying on the states of pending stylesheets.

        * dom/Document.cpp:
        (WebCore::Document::resolveStyle): Removed the code to scroll to the current URL's fragment.
        (WebCore::Document::didRemoveAllPendingStylesheet): Added a code to schedule a task to scoll.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::scrollToFragmentWithParentBoundary): Moved the code to trigger the code
        in didRemoveAllPendingStylesheet from FrameView.
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollToFragment):
        (WebCore::FrameView::scrollToFragmentInternal): Renamed from scrollToAnchor since this function sets
        the current anchor. Also removed the code which defers the scrolling based on pending stylesheets'
        states since such a code doesn't belong in FrameView.
        * page/FrameView.h:

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

        Remove font-variant @font-face descriptor
        https://bugs.webkit.org/show_bug.cgi?id=203179

        Reviewed by Simon Fraser.

        As per https://github.com/w3c/csswg-drafts/issues/2531

        Deleted relevant tests.

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::font):
        (WebCore::CSSFontFace::setVariantLigatures): Deleted.
        (WebCore::CSSFontFace::setVariantPosition): Deleted.
        (WebCore::CSSFontFace::setVariantCaps): Deleted.
        (WebCore::CSSFontFace::setVariantNumeric): Deleted.
        (WebCore::CSSFontFace::setVariantAlternates): Deleted.
        (WebCore::CSSFontFace::setVariantEastAsian): Deleted.
        * css/CSSFontFace.h:
        * css/CSSFontFaceSource.cpp:
        (WebCore::CSSFontFaceSource::load):
        (WebCore::CSSFontFaceSource::font):
        * css/CSSFontFaceSource.h:
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule):
        * css/FontFace.cpp:
        (WebCore::FontFace::create):
        (WebCore::FontFace::setVariant): Deleted.
        (WebCore::FontFace::variant const): Deleted.
        * css/FontFace.h:
        * css/FontFace.idl:
        * loader/cache/CachedFont.cpp:
        (WebCore::CachedFont::createFont):
        (WebCore::CachedFont::platformDataFromCustomData):
        * loader/cache/CachedFont.h:
        * loader/cache/CachedSVGFont.cpp:
        (WebCore::CachedSVGFont::createFont):
        (WebCore::CachedSVGFont::platformDataFromCustomData):
        * loader/cache/CachedSVGFont.h:
        * platform/graphics/FontCache.cpp:
        (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
        (WebCore::FontPlatformDataCacheKey::operator== const):
        (WebCore::FontPlatformDataCacheKeyHash::hash):
        (WebCore::FontCache::getCachedFontPlatformData):
        (WebCore::FontCache::fontForFamily):
        * platform/graphics/FontCache.h:
        (WebCore::FontCache::fontForFamily):
        (WebCore::FontCache::getCachedFontPlatformData):
        (WebCore::FontCache::createFontPlatformDataForTesting):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::preparePlatformFont):
        (WebCore::fontWithFamily):
        (WebCore::FontCache::createFontPlatformData):
        (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):
        * platform/graphics/mac/FontCustomPlatformData.h:

2019-11-21  Peng Liu  <peng.liu6@apple.com>

        Ignore the requests to enter/exit video fullscreen/picture-in-picture if the requesting mode is the same as the current mode
        https://bugs.webkit.org/show_bug.cgi?id=204461

        Reviewed by Jer Noble.

        Change the order of enum VideoPresentationMode and add some log messages regarding presentation mode change.
        Those changes make the debugging easier.

        Covered by existing test cases.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::enterFullscreen):
        (WebCore::HTMLMediaElement::didBecomeFullscreenElement):
        (WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
        (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::webkitSetPresentationMode):
        (WebCore::HTMLVideoElement::setFullscreenMode):
        (WebCore::HTMLVideoElement::fullscreenModeChanged):
        * html/HTMLVideoElement.h:
        * html/HTMLVideoElement.idl:

2019-11-21  Justin Fan  <justin_fan@apple.com>

        [WebGL] Fix framebufferTexture2D with DEPTH_STENCIL_ATTACHMENT on ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=204433

        Reviewed by Dean Jackson.

        ANGLE expects requests for DEPTH_STENCIL_ATTACHMENT to not be split into two calls, as previous WebGL 1 backend required.

        No new tests. Prevents conformance/extensions/webgl-depth-texture.html regression when run with the ANGLE backend.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::framebufferTexture2D):

2019-11-21  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Cache trailing trimmable width.
        https://bugs.webkit.org/show_bug.cgi?id=204466
        <rdar://problem/57403888>

        Reviewed by Antti Koivisto.

        Line::trailingTrimmableWidth() is called every time we pass a run to the line breaker because their accumulated widths are part of the "available width context".

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::TrimmableContent::append):
        (WebCore::Layout::Line::trailingTrimmableWidth const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::TrimmableContent::width const):
        (WebCore::Layout::Line::TrimmableContent::runs):
        (WebCore::Layout::Line::TrimmableContent::isEmpty const):
        (WebCore::Layout::Line::TrimmableContent::clear):

2019-11-21  Chris Fleizach  <cfleizach@apple.com>

        AX: support more attributes for AXIsolatedTreeNode
        https://bugs.webkit.org/show_bug.cgi?id=204241
        <rdar://problem/57237606>

        Reviewed by Zalan Bujtas.

        Add more attributes to the accessibility isolated tree model.

        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:

2019-11-21  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Web process crashes when attempting to request document context in a textarea
        https://bugs.webkit.org/show_bug.cgi?id=204455
        <rdar://problem/57383975>

        Reviewed by Tim Horton.

        Make `WebCore::rangesOverlap` robust in the case where the ranges' container nodes are in different tree scopes.
        Currently, `compareBoundaryPoints` returns an exception in this scenario, which `rangesOverlap` does not expect.
        As a result, we crash when releasing the return value after boundary point comparison. To fix this, just upgrade
        the `ownerDocument` check in `rangesOverlap` to check for tree scopes instead, via the
        `areNodesConnectedInSameTreeScope` helper function.

        Test: WebKit.DocumentEditingContextSpatialRequestInTextField

        * dom/Range.cpp:
        (WebCore::rangesOverlap):

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

        Tighten ScrollingTreeNode tree mutations
        https://bugs.webkit.org/show_bug.cgi?id=204451

        Reviewed by Simon Fraser.

        - Use plain Vector instead of std::unique_ptr<Vector> for children
        - Use Vector<Ref> instead of Vector<RefPtr>
        - Remove non-const ScrollingTreeNode::children() accessor
        - Add relase assert that all mutations happen during ScrollingTree::commitTreeState

        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitTreeState):
        (WebCore::ScrollingTree::updateTreeFromStateNode):
        (WebCore::ScrollingTree::applyLayerPositionsRecursive):
        (WebCore::ScrollingTree::notifyRelatedNodesRecursive):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::inCommitTreeState const):
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::appendChild):
        (WebCore::ScrollingTreeNode::removeChild):
        (WebCore::ScrollingTreeNode::removeAllChildren):

        Encapsulate mutations to these functions.

        (WebCore::ScrollingTreeNode::dump const):
        (WebCore::ScrollingTreeNode::scrollingNodeForPoint const):
        * page/scrolling/ScrollingTreeNode.h:
        (WebCore::ScrollingTreeNode::children const):
        (WebCore::ScrollingTreeNode::children): Deleted.

2019-11-21  Kenneth Russell  <kbr@chromium.org>

        Implement accelerated video-to-texture upload path for ANGLE backend for WebGL on desktop
        https://bugs.webkit.org/show_bug.cgi?id=200904

        Support GPU-accelerated video uploads to WebGL textures with ANGLE.

        Uses the IOSurface path, as the CVOpenGLTextureCache seems to have
        been disabled at the OS level, even on top-of-tree WebKit without
        using ANGLE.

        Uses the EGL_ANGLE_iosurface_client_buffer extension to import
        IOSurfaces; reuses all of the existing shader and OpenGL code.

        Necessary other fixes to GraphicsContext3D's ANGLE backend: supporting
        context sharing, and querying the selected EGLConfig.

        Covered by WebGL conformance tests. Verified speedup with
        "Animating textures in WebGL" MDN article.

        Reviewed by Dean Jackson.

        * platform/graphics/GraphicsContext3D.h:
        (WebCore::GraphicsContext3D::platformDisplay const):
        (WebCore::GraphicsContext3D::platformConfig const):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::VideoTextureCopierCV::initializeContextObjects):
        (WebCore::VideoTextureCopierCV::initializeUVContextObjects):
        (WebCore::VideoTextureCopierCV::attachIOSurfaceToTexture):
        (WebCore::VideoTextureCopierCV::detachIOSurfaceFromTexture):
        (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
        (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
        * platform/graphics/cv/VideoTextureCopierCV.h:

2019-11-21  Youenn Fablet  <youenn@apple.com>

        Regression (r252660): Layout Test platform/ios/mediastream/audio-muted-in-background-tab.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=204408
        <rdar://problem/57364353>

        Reviewed by Eric Carlson.

        Covered by no longer failing test.

        * platform/mediastream/mac/CoreAudioCaptureSource.h:
        * platform/mock/MockRealtimeMediaSourceCenter.cpp:
        Now that we are using CoreAudioCaptureSource, we need to use its factory to interrupt/uninterrupt the active source.

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

        MediaQueryEvaluator shouldn't know about style resolver
        https://bugs.webkit.org/show_bug.cgi?id=204449

        Reviewed by Zalan Bujtas.

        Gather dynamic dependencies from MediaQueryEvaluator into a struct rather than writing them directly to a resolver.

        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::evaluate const):

        Delete a duplicate version of evaluate() that returned partial dependencies.

        * css/MediaQueryEvaluator.h:
        (WebCore::MediaQueryDynamicResults::append):
        * css/parser/SizesAttributeParser.cpp:
        (WebCore::SizesAttributeParser::mediaConditionMatches):

        This doesn't need resolver, the picture element implementation takes care of the media query dependencies.

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
        * html/HTMLPictureElement.cpp:
        (WebCore::HTMLPictureElement::viewportChangeAffectedPicture const):
        (WebCore::HTMLPictureElement::appearanceChangeAffectedPicture const):

        Store MediaQueryDynamicResults struct instead of individual vectors.

        * style/RuleSet.cpp:
        (WebCore::Style::RuleSet::addChildRules):
        (WebCore::Style::RuleSet::addRulesFromSheet):
        * style/RuleSet.h:
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::appendAuthorStyleSheets):
        (WebCore::Style::Resolver::addMediaQueryDynamicResults):
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByViewportChange const):
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByAccessibilitySettingsChange const):
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByAppearanceChange const):
        (WebCore::Style::Resolver::addViewportDependentMediaQueryResult): Deleted.
        (WebCore::Style::Resolver::addAccessibilitySettingsDependentMediaQueryResult): Deleted.
        (WebCore::Style::Resolver::addAppearanceDependentMediaQueryResult): Deleted.

        Store MediaQueryDynamicResults struct instead of individual vectors.

        * style/StyleResolver.h:
        (WebCore::Style::Resolver::hasViewportDependentMediaQueries const):
        (WebCore::Style::Resolver::hasAccessibilitySettingsDependentMediaQueries const):
        (WebCore::Style::Resolver::hasAppearanceDependentMediaQueries const):
        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
        (WebCore::Style::ScopeRuleSets::initializeUserStyle):
        (WebCore::Style::ScopeRuleSets::collectRulesFromUserStyleSheets):
        (WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):
        * style/StyleScopeRuleSets.h:

2019-11-21  Zalan Bujtas  <zalan@apple.com>

        [LFC] Add support for LFC layout only.
        https://bugs.webkit.org/show_bug.cgi?id=204441
        <rdar://problem/57382929>

        Reviewed by Antti Koivisto.

        Clean up the render tree state when RenderView::layout is not called.

        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2019-11-21  Andres Gonzalez  <andresg_22@apple.com>

        Support boundingBoxRect and elementRect in AXIsolatedObject.
        https://bugs.webkit.org/show_bug.cgi?id=204431

        Reviewed by Chris Fleizach.

        - Implementation of boundingBoxRect and elementRect in AXIsolatedObject.
        - Templatized rectAttributeValue generalize retrieval of cached rects for different types of rects.

        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AXCoreObject::pixelSnappedBoundingBoxRect const): Moved from AccessibilityObject.
        (WebCore::AXCoreObject::size const): Moved from AccessibilityObject.
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData): Caching of boundingBox and element rects.
        (WebCore::AXIsolatedObject::rectAttributeValue const): Templatized version.
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:

2019-11-20  Conrad Shultz  <conrad_shultz@apple.com>

        Crash at com.apple.WebCore: -[WebRevealHighlight revealContext:drawRectsForItem:]
        https://bugs.webkit.org/show_bug.cgi?id=204434

        Reviewed by Megan Gardner.

        _attributedString was not retained, leading to a potential use-after-dealloc. Fix
        this by wrapping it in a RetainPtr. While we're here, remove explicit ivars and
        property synthesis and copy the string during assignment.

        Reveal functionality is currently not testable.

        * editing/cocoa/DictionaryLookup.mm:
        (SOFT_LINK_CLASS_OPTIONAL):
        (-[WebRevealHighlight initWithHighlightRect:useDefaultHighlight:attributedString:]):

2019-11-20  Fujii Hironori  <Hironori.Fujii@sony.com>

        [MSVC] error C2039: 'weakPtrFactory': is not a member of 'WebCore::DocumentStorageAccess::requestStorageAccess::<lambda_3f2cfd7704f93d8fe19d5b5f064f8add>'
        https://bugs.webkit.org/show_bug.cgi?id=204437

        Unreviewed build fix.

        MSVC has a bug of a outer lambda's captured 'this' can't be used as
        a lambda capture initializer of a inner lambda.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess): Replaced '*this' in the lambda capture initializer with '*weakThis'.

2019-11-20  Simon Fraser  <simon.fraser@apple.com>

        getComputedStyle returns "auto" for zIndex property even after it has been set, on non-positioned elements
        https://bugs.webkit.org/show_bug.cgi?id=15562

        Reviewed by Antti Koivisto.

        The computed value of z-index should be the specified value, but Style::Adjuster::adjust() set z-index
        to auto on non-positioned elements, so we reported the incorrect computed value.

        Fix by storing the specified value in RenderStyle as "zIndex", and the used value as "effectiveZIndex", and
        converting all rendering code to use the "effective" variants. getComputedStyle reads "zIndex".

        Style::Adjuster::adjust() copies zIndex to effectiveZIndex for positioned elements.

        Tests: fast/css/getComputedStyle/getComputedStyle-zIndex-auto.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::apply):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSProperties.json:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::createInnerTextStyle):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::animate):
        * rendering/RenderBox.cpp:
        (WebCore::isCandidateForOpaquenessTest):
        * rendering/RenderBox.h:
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange):
        * rendering/RenderFullScreen.cpp:
        (WebCore::createFullScreenStyle):
        * rendering/RenderLayer.cpp:
        (WebCore::canCreateStackingContext):
        (WebCore::RenderLayer::shouldBeCSSStackingContext const):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::logLayerInfo):
        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::styleWillChange):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeRequiresLayerRepaint const):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::specifiedZIndex const):
        (WebCore::RenderStyle::hasAutoSpecifiedZIndex const):
        (WebCore::RenderStyle::setSpecifiedZIndex):
        (WebCore::RenderStyle::setHasAutoSpecifiedZIndex):
        (WebCore::RenderStyle::usedZIndex const):
        (WebCore::RenderStyle::hasAutoUsedZIndex const):
        (WebCore::RenderStyle::setUsedZIndex):
        (WebCore::RenderStyle::setHasAutoUsedZIndex):
        (WebCore::RenderStyle::hasAutoZIndex const): Deleted.
        (WebCore::RenderStyle::setHasAutoZIndex): Deleted.
        (WebCore::RenderStyle::zIndex const): Deleted.
        (WebCore::RenderStyle::setZIndex): Deleted.
        * rendering/style/StyleBoxData.cpp:
        (WebCore::StyleBoxData::StyleBoxData):
        (WebCore::StyleBoxData::operator== const):
        * rendering/style/StyleBoxData.h:
        (WebCore::StyleBoxData::specifiedZIndex const):
        (WebCore::StyleBoxData::hasAutoSpecifiedZIndex const):
        (WebCore::StyleBoxData::usedZIndex const):
        (WebCore::StyleBoxData::hasAutoUsedZIndex const):
        (WebCore::StyleBoxData::zIndex const): Deleted.
        (WebCore::StyleBoxData::hasAutoZIndex const): Deleted.
        * style/StyleAdjuster.cpp:
        (WebCore::Style::Adjuster::adjust const):

2019-11-19  Ryosuke Niwa  <rniwa@webkit.org>

        MicrotaskQueue should be accessed via EventLoop
        https://bugs.webkit.org/show_bug.cgi?id=204397

        Reviewed by Antti Koivisto.

        This patch refactors the existing code so that a microtask is always queued via EventLoopTaskGroup.
        It preserves all other (broken) semantics and behavior like all origins sharing a single microtask queue.

        The singleton MicrotaskQueue for the main thread has been moved from MicrotaskQueue::mainThreadQueue
        to WindowEventLoop, and an instance of MicrotaskQueue for each worker has been moved from WorkerGlobalScope
        to WorkerEventLoop.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::updateFinishedState):
        * bindings/js/JSDOMGlobalObjectTask.cpp:
        (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::queueMicrotaskToEventLoop): Renamed from queueTaskToEventLoop.
        * bindings/js/JSDOMWindowBase.h:
        * bindings/js/JSExecState.cpp:
        (WebCore::JSExecState::didLeaveScriptContext):
        * bindings/js/JSRemoteDOMWindowBase.cpp:
        * bindings/js/JSWorkerGlobalScopeBase.cpp:
        (WebCore::JSWorkerGlobalScopeBase::queueMicrotaskToEventLoop): Renamed from queueTaskToEventLoop.
        * bindings/js/JSWorkerGlobalScopeBase.h:
        * bindings/js/JSWorkletGlobalScopeBase.cpp:
        * bindings/js/JSWorkletGlobalScopeBase.h:
        * dom/CustomElementReactionQueue.cpp:
        (WebCore::BackupElementQueueMicrotask): Deleted.
        (WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue):
        (WebCore::CustomElementReactionQueue::ensureBackupQueue):
        * dom/CustomElementReactionQueue.h:
        * dom/Document.cpp:
        (WebCore::Document::finishedParsing):
        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess):
        * dom/EventLoop.cpp:
        (WebCore::EventLoop::queueMicrotask): Added.
        (WebCore::EventLoop::performMicrotaskCheckpoint): Added.
        (WebCore::EventLoopTaskGroup::queueMicrotaskCallback): Added.
        (WebCore::EventLoopTaskGroup::queueMicrotask): Added.
        (WebCore::EventLoopTaskGroup::performMicrotaskCheckpoint): Added.
        * dom/EventLoop.h:
        (WebCore::EventLoopTaskGroup::microtaskQueue):
        * dom/Microtasks.cpp:
        (WebCore::MicrotaskQueue::mainThreadQueue): Deleted.
        (WebCore::MicrotaskQueue::contextQueue): Deleted.
        * dom/Microtasks.h:
        * dom/MutationObserver.cpp:
        (WebCore::MutationObserverMicrotask): Deleted.
        (WebCore::MutationObserver::queueMutationObserverCompoundMicrotask): Made this a member function
        so that it can call notifyMutationObservers in its lambda.
        (WebCore::MutationObserver::enqueueMutationRecord):
        (WebCore::MutationObserver::enqueueSlotChangeEvent):
        (WebCore::MutationObserver::setHasTransientRegistration):
        * dom/MutationObserver.h:
        * dom/MutationObserverRegistration.cpp:
        (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::microtaskQueue):
        * dom/WindowEventLoop.h:
        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
        * html/parser/HTMLScriptRunner.cpp:
        (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
        (WebCore::HTMLScriptRunner::runScript):
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::recordCanvasAction):
        * testing/Internals.cpp:
        (WebCore::Internals::queueMicroTask):
        * workers/WorkerEventLoop.cpp:
        (WebCore::WorkerEventLoop::~WorkerEventLoop):
        (WebCore::WorkerEventLoop::microtaskQueue):
        (WebCore::WorkerEventLoop::clearMicrotaskQueue):
        * workers/WorkerEventLoop.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
        (WebCore::WorkerGlobalScope::prepareForTermination):
        * workers/WorkerGlobalScope.h:
        (WebCore::WorkerGlobalScope::microtaskQueue const): Deleted.

2019-11-20  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, remove an unnecessary null check after r252561
        https://bugs.webkit.org/show_bug.cgi?id=204287

        Address post-review feedback.

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::writeText):

2019-11-20  ChangSeok Oh  <changseok@webkit.org>

        [GTK] Add ANGLE backend to GTK port
        https://bugs.webkit.org/show_bug.cgi?id=199060

        Reviewed by Žan Doberšek.

        This change aims to bring ANGLE support for WebGL to GTK port. The port
        wants to have a gl context for texture mapper and a gles/egl context for webgl
        simultaneously, we adopt the readPixel-copyToTexture approach for now because
        sharing textures between the two different contextes is not a feasible direction.
        Also, to avoid conflicts between gl and gles calls, we use non-prototype functions
        of ANGLE for WebGL context (i.e., GraphicsContext3D). Although many combinations
        of graphic configurations exist, only default configuration (Nicosia layers
        running on ANGLE + GLX is supported. Other combinations like ANGLE + GLES or WPE
        will be covered by following patches.

        No new tests since no functionality changed.

        * Headers.cmake:
        * PlatformGTK.cmake:
        * SourcesGTK.txt:
        * platform/TextureMapper.cmake:
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/GLContext.cpp:
        * platform/graphics/GLContext.h:
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/OpenGLShims.cpp:
        (WebCore::initializeOpenGLShims):
        * platform/graphics/OpenGLShims.h:
        * platform/graphics/PlatformDisplay.cpp:
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::prepareTexture):
        * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: Added.
        (Nicosia::GC3DANGLELayer::ANGLEContext::errorString):
        (Nicosia::GC3DANGLELayer::ANGLEContext::lastErrorString):
        (Nicosia::GC3DANGLELayer::ANGLEContext::createContext):
        (Nicosia::GC3DANGLELayer::ANGLEContext::ANGLEContext):
        (Nicosia::GC3DANGLELayer::ANGLEContext::~ANGLEContext):
        (Nicosia::GC3DANGLELayer::ANGLEContext::makeContextCurrent):
        (Nicosia::GC3DANGLELayer::ANGLEContext::platformContext):
        (Nicosia::GC3DANGLELayer::GC3DANGLELayer):
        (Nicosia::GC3DANGLELayer::~GC3DANGLELayer):
        (Nicosia::GC3DANGLELayer::makeContextCurrent):
        (Nicosia::GC3DANGLELayer::platformContext):
        * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: Copied from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h.
        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
        (Nicosia::GC3DLayer::GC3DLayer):
        (Nicosia::GC3DLayer::swapBuffersIfNeeded):
        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
        * platform/graphics/texmap/BitmapTextureGL.cpp:
        (WebCore::BitmapTextureGL::setPendingContents):
        (WebCore::BitmapTextureGL::updatePendingContents):
        * platform/graphics/texmap/BitmapTextureGL.h:
        * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
        (WebCore::GraphicsContext3D::create):
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
        (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
        (WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer):

2019-11-20  Zalan Bujtas  <zalan@apple.com>

        Flexbox sizing logic triggers full repaint on the flex items.
        https://bugs.webkit.org/show_bug.cgi?id=204380
        <rdar://problem/57236404>

        Reviewed by Simon Fraser.

        RenderFlexibleBox::applyStretchAlignmentToChild explicitly sets the child renderer's height to 0 before issuing layout on it.
        This confuses the child's repaint logic and could trigger unnecessary repaints on complete subtrees.

        Many ::layout functions plant a LayoutRepainter stack object to track and report paint invalidations.
        It works as long as the renderer's geometry change happens within the scope of this LayoutRepainter.
        When the parent (RenderFlexibleBox) mutates the renderer's geometry, the LayoutRepainter object sees
        this already mutated state as the initial state and will happily issue repaints even when the final
        geometry remains the same.

        This patch addresses the redundant repaint by pushing the height reset from the parent down to the child, inside the LayoutRepainter scope.

        * rendering/RenderBlock.h: Restrict it to RenderBlock level for now. It might need to go all the way up to RenderBox.
        (WebCore::RenderBlock::shouldResetChildLogicalHeightBeforeLayout const):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutBlock):
        * rendering/RenderBlockFlow.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::resetLogicalHeightBeforeLayoutIfNeeded):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::shouldResetLogicalHeightBeforeLayout const):
        * rendering/RenderDeprecatedFlexibleBox.cpp:
        (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutBlock):
        (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
        * rendering/RenderFlexibleBox.h:
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::layoutBlock):
        * rendering/RenderGrid.h:
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::layout):
        * rendering/RenderTable.h:

2019-11-20  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] Add ui-sans-serif as a sibling to ui-serif, ui-monospace, and ui-rounded
        https://bugs.webkit.org/show_bug.cgi?id=204188

        Reviewed by Simon Fraser.

        As per https://github.com/w3c/csswg-drafts/commit/cd0059a32a74c5a48630ce7c77292642dac70fd9#diff-dd2d54c50c872e1e303daebd4794d642

        Test: fast/text/design-system-ui-sans-serif.html

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::fontWithFamilySpecialCase):
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::matchSystemFontUse):

2019-11-19  Brian Burg  <bburg@apple.com>

        [Cocoa] Add _WKRemoteWebInspectorViewController SPI to set diagnostic logging delegate
        https://bugs.webkit.org/show_bug.cgi?id=204371

        Reviewed by Devin Rousso.

        Expose whether a diagnostic logging delegate has been configured for the frontend's WKWebView.
        In a later patch, WI.DiagnosticController will start and stop recording as availability changes.

        * inspector/InspectorFrontendClient.h:
        (WebCore::InspectorFrontendClient::diagnosticLoggingAvailable):
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::diagnosticLoggingAvailable):
        * inspector/InspectorFrontendHost.h:

2019-11-20  Simon Fraser  <simon.fraser@apple.com>

        Turn off antialiasing when rendering with Ahem, for testing
        https://bugs.webkit.org/show_bug.cgi?id=204197
        <rdar://problem/57190712>

        Reviewed by Myles C. Maxfield.

        If the font family name matches "Ahem", turn off antialiasing when rendering text,
        because many CSS tests assume that Ahem glyphs can be compared with positioned elements
        in ref tests.

        Since Ahem is a font only used for testing, I don't think this behavior needs to be
        controlled by a setting.

        * platform/graphics/Font.cpp:
        (WebCore::Font::Font):
        * platform/graphics/Font.h:
        (WebCore::Font::allowsAntialiasing const):
        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::FontCascade::drawGlyphs):
        * platform/graphics/cocoa/FontCocoa.mm:
        (WebCore::isAhemFont):
        (WebCore::Font::platformInit):

2019-11-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Cache InlinteTextItem width when possible
        https://bugs.webkit.org/show_bug.cgi?id=204412
        <rdar://problem/57359366>

        Reviewed by Antti Koivisto.

        This helps when subsequent inline layouts use the same set of InlineTextItems and they would
        keep re-measuring them on each layout frame (e.g. view resize).

        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::createWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createSegmentBreakItem):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        (WebCore::Layout::InlineTextItem::left const):
        (WebCore::Layout::InlineTextItem::right const):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::width const):
        * layout/inlineformatting/text/TextUtil.h:
        (WebCore::Layout::TextUtil::width):

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

        HTML5 audio .ended event not fired when app in background or phone screen is off
        https://bugs.webkit.org/show_bug.cgi?id=173332
        <rdar://problem/32757402>

        Reviewed by Eric Carlson.

        Test: media/audio-background-playback-playlist.html

        In addition to the necessary WebKit part of this patch, there are behaviors which prevent
        websites from enqueuing new playback while in the background. Namely, the platform will
        prevent background playback from any application which is not currently the "Now Playing"
        application, so in order to allow pages to switch sources, we must ensure we do not give
        up "Now Playing" status. To do so, we will change the implementation of canProduceAudio()
        to include any media element which previously could produce audio but currently has no
        source.

        Also, MediaElementSession::canShowControlsManager() will be modified to only check for
        a RequireUserGestureToControlControlsManager restriction if the purpose passed in is
        is "ControlsManager" and not "NowPlaying".

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::canProduceAudio const):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::canShowControlsManager const):

2019-11-20  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r252161): box-shadow with inset and rounded borders is clipped
        https://bugs.webkit.org/show_bug.cgi?id=204348

        Reviewed by Zalan Bujtas.

        r252161 introduced a bug for inset shadows where we passed the wrong rect to areaCastingShadowInHole().
        Clean the code up a little, and make the xOffset stuff more similar to the outset shadow path.
        We could still do a better job of pixel snapping here.

        Test: fast/box-shadow/inset-box-shadow.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintBoxShadow):

2019-11-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] TextUtil::width should use FontCascade::widthForSimpleText when applicable
        https://bugs.webkit.org/show_bug.cgi?id=204393
        <rdar://problem/57347144>

        Reviewed by Antti Koivisto.

        This is one of reasons why simple line layout performs better than complex line layout.

        * WebCore.xcodeproj/project.pbxproj:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::moveToNextNonWhitespacePosition):
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::fixedPitchWidth):
        * layout/inlineformatting/text/TextUtil.h:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::Box):
        (WebCore::Layout::Box::setTextContext):
        (WebCore::Layout::Box::hasTextContent const):
        (WebCore::Layout::Box::textContext const):
        (WebCore::Layout::Box::setTextContent): Deleted.
        (WebCore::Layout::Box::textContent const): Deleted.
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::canUseSimplifiedTextMeasuring):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::outputLayoutBox):

2019-11-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOM.highlightSelector should work for "div, div::before"
        https://bugs.webkit.org/show_bug.cgi?id=204306

        Reviewed by Brian Burg.

        In r252436, the implementation of `DOM.highlightSelector` was changed from just calling
        `document.querySelectorAll` to actually attempting to mimic what the CSS selector matching
        engine does. Basically, this meant adding logic to walk the entire DOM tree and for each
        node test each `CSSSelector` of the given `selector` string to see if it matched.

        At the time, I had incorrectly assumed that once a selector was found that matched the
        current node, it wouldn't need to be checked against ever again. This would be a fine
        assumption if we didn't care about `:before`/`:after`, but since `DOM.highlightSelector`
        also wants to match those, it is necessary to test every `CSSSelector` in case a later one
        in the given `selector` string matches a pseudo-element (e.g. `div, div:before`).

        The fix is simply to change `break` to `continue` and to ensure that every item in the
        generated `NodeList` is unique (otherwise the overlay for a node may be drawn twice).

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::highlightSelector):

2019-11-19  Youenn Fablet  <youenn@apple.com>

        getUserMedia echoCancellation constraint has no affect
        https://bugs.webkit.org/show_bug.cgi?id=179411

        Reviewed by Eric Carlson.

        Update implementation to properly report echoCancellation is supported and can take true or false.
        Update CoreAudioCaptureSource to initialize its state in constructor from the audio unit.
        This allows getUserMedia constraints to kick in after construction and update the source parameters.
        Audio unit parameters will then be set when the source will be asked to produce data.

        To enable testing, the mock audio is now adding a high frequency hum when echo cancellation is off.

        Covered by updated test.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::capabilityStringVector):
        (WebCore::capabilityBooleanVector):
        * platform/mediastream/RealtimeMediaSourceCenter.cpp:
        (WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
        * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
        * platform/mediastream/mac/MockAudioSharedUnit.mm:
        (WebCore::MockAudioSharedUnit::reconfigure):
        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):

2019-11-19  Peng Liu  <peng.liu6@apple.com>

        Assertion failure in HTMLMediaElement::enterFullscreen()
        https://bugs.webkit.org/show_bug.cgi?id=204376

        Reviewed by Eric Carlson.

        Test: media/video-set-presentation-mode-to-inline.html

        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::setFullscreenMode):

2019-11-19  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: pass along error of IDBBackingStore operations
        https://bugs.webkit.org/show_bug.cgi?id=204381

        Reviewed by Brady Eidson.

        Covered by existing tests.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):

2019-11-19  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: overflow of KeyGenerator in MemoryIDBBackingStore
        https://bugs.webkit.org/show_bug.cgi?id=204366

        Reviewed by Brady Eidson.

        Do not set KeyGenerator if it is key is bigger than 2^53.

        Test: storage/indexeddb/key-generator-private.html

        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber):

2019-11-19  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: update m_objectStoresByName after renaming object store
        https://bugs.webkit.org/show_bug.cgi?id=204373

        Reviewed by Brady Eidson.

        Tests: storage/indexeddb/put-after-objectstore-rename-private.html
               storage/indexeddb/put-after-objectstore-rename.html

        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):

2019-11-19  Sunny He  <sunny_he@apple.com>

        Nullptr crash in Node::setTextContent via Document::setTitle if title element is removed before setTextContent call.
        https://bugs.webkit.org/show_bug.cgi?id=204332

        Reviewed by Ryosuke Niwa.

        Test: fast/dom/Document/title-property-set-with-dom-event.html

        * dom/Document.cpp:
        (WebCore::Document::setTitle):

2019-11-19  Youenn Fablet  <youenn@apple.com>

        Introduce a mock implementation of CoreAudioSharedUnit
        https://bugs.webkit.org/show_bug.cgi?id=204290

        Reviewed by Eric Carlson.

        Introduce BaseAudioSharedUnit as a base class to CoreAudioSharedUnit.
        Make CoreAudioCaptureSource use either CoreAudioSharedUnit singleton or an override.
        Implement a MockAudioSharedUnit and use the override to implement mock audio capture sources.

        Remove some code from CoreAudioCaptureSource related to reference data, which is not used currently.

        Covered by existing tests.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/mac/BaseAudioSharedUnit.cpp: Added.
        (WebCore::BaseAudioSharedUnit::addClient):
        (WebCore::BaseAudioSharedUnit::removeClient):
        (WebCore::BaseAudioSharedUnit::forEachClient const):
        (WebCore::BaseAudioSharedUnit::clearClients):
        (WebCore::BaseAudioSharedUnit::startProducingData):
        (WebCore::BaseAudioSharedUnit::resume):
        (WebCore::BaseAudioSharedUnit::prepareForNewCapture):
        (WebCore::BaseAudioSharedUnit::captureFailed):
        (WebCore::BaseAudioSharedUnit::stopProducingData):
        (WebCore::BaseAudioSharedUnit::suspend):
        (WebCore::BaseAudioSharedUnit::audioSamplesAvailable):
        * platform/mediastream/mac/BaseAudioSharedUnit.h: Added.
        (WebCore::BaseAudioSharedUnit::delaySamples):
        (WebCore::BaseAudioSharedUnit::isSuspended const):
        (WebCore::BaseAudioSharedUnit::volume const):
        (WebCore::BaseAudioSharedUnit::sampleRate const):
        (WebCore::BaseAudioSharedUnit::enableEchoCancellation const):
        (WebCore::BaseAudioSharedUnit::setVolume):
        (WebCore::BaseAudioSharedUnit::setSampleRate):
        (WebCore::BaseAudioSharedUnit::setEnableEchoCancellation):
        (WebCore::BaseAudioSharedUnit::sampleRateCapacities const):
        (WebCore::BaseAudioSharedUnit::hasClients const):
        (WebCore::BaseAudioSharedUnit::setSuspended):
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::unit):
        (WebCore::CoreAudioSharedUnit::CoreAudioSharedUnit):
        (WebCore::CoreAudioSharedUnit::setupAudioUnit):
        (WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
        (WebCore::CoreAudioSharedUnit::configureSpeakerProc):
        (WebCore::CoreAudioSharedUnit::provideSpeakerData):
        (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
        (WebCore::initializeCoreAudioCaptureSource):
        (WebCore::CoreAudioCaptureSource::create):
        (WebCore::CoreAudioCaptureSource::createForTesting):
        (WebCore::CoreAudioCaptureSource::unit):
        (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
        (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
        (WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
        (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
        (WebCore::CoreAudioCaptureSource::startProducingData):
        (WebCore::CoreAudioCaptureSource::stopProducingData):
        (WebCore::CoreAudioCaptureSource::capabilities):
        (WebCore::CoreAudioCaptureSource::settingsDidChange):
        (WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
        (WebCore::CoreAudioCaptureSource::beginInterruption):
        (WebCore::CoreAudioCaptureSource::endInterruption):
        (WebCore::CoreAudioCaptureSource::interrupted const):
        (WebCore::CoreAudioCaptureSource::delaySamples):
        * platform/mediastream/mac/CoreAudioCaptureSource.h:
        * platform/mediastream/mac/MockAudioSharedUnit.h: Added.
        * platform/mediastream/mac/MockAudioSharedUnit.mm: Added.
        (WebCore::MockRealtimeAudioSource::create):
        (WebCore::MockAudioSharedUnit::singleton):
        (WebCore::MockAudioSharedUnit::MockAudioSharedUnit):
        (WebCore::MockAudioSharedUnit::hasAudioUnit const):
        (WebCore::MockAudioSharedUnit::setCaptureDevice):
        (WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
        (WebCore::MockAudioSharedUnit::cleanupAudioUnit):
        (WebCore::MockAudioSharedUnit::startInternal):
        (WebCore::MockAudioSharedUnit::stopInternal):
        (WebCore::MockAudioSharedUnit::isProducingData const):
        (WebCore::MockAudioSharedUnit::tick):
        (WebCore::MockAudioSharedUnit::delaySamples):
        (WebCore::MockAudioSharedUnit::reconfigure):
        (WebCore::MockAudioSharedUnit::emitSampleBuffers):
        (WebCore::MockAudioSharedUnit::render):
        * platform/mediastream/mac/MockRealtimeAudioSourceMac.h: Removed.

2019-11-19  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed non-unified build fixes.

        * Modules/async-clipboard/ClipboardItem.cpp:
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
        * Modules/async-clipboard/ClipboardItemDataSource.h:
        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
        * animation/WebAnimation.cpp:
        * html/canvas/WebGLRenderingContextBase.cpp:
        * xml/parser/XMLDocumentParserLibxml2.cpp:

2019-11-19  Brady Eidson  <beidson@apple.com>

        Fix null deref when a DocumentLoader's policy decision is delivered.
        <rdar://problem/54847830> and https://bugs.webkit.org/show_bug.cgi?id=204378

        Reviewed by Ryosuke Niwa.

        Definitely a required null check, as all async entries into DocumentLoader should (and most do!)
        
        No new tests, as no steps to reproduce are known.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::continueAfterContentPolicy): Null check m_frame.

2019-11-19  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, follow-up after r252642
        https://bugs.webkit.org/show_bug.cgi?id=204346

        * Modules/indexeddb/IDBActiveDOMObject.h:
        * Modules/indexeddb/client/TransactionOperation.h:
        (WebCore::IDBClient::TransactionOperation::~TransactionOperation):
        (WebCore::IDBClient::TransactionOperation::perform):
        (WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread):
        (WebCore::IDBClient::TransactionOperation::transitionToComplete):
        (WebCore::IDBClient::TransactionOperation::doComplete):
        * platform/Supplementable.h:
        (WebCore::Supplementable::provideSupplement):
        (WebCore::Supplementable::removeSupplement):
        (WebCore::Supplementable::requireSupplement):
        * platform/Timer.cpp:
        (WebCore::TimerBase::~TimerBase):
        (WebCore::TimerBase::start):
        (WebCore::TimerBase::stop):
        (WebCore::TimerBase::setNextFireTime):

2019-11-19  Daniel Bates  <dabates@apple.com>

        ASSERTION FAILURE: useDownstream ? (result > vp) : (result < vp) in WebCore::nextSentenceBoundaryInDirection()
        https://bugs.webkit.org/show_bug.cgi?id=204370
        <rdar://problem/57332559>

        Reviewed by Wenson Hsieh.

        Only positions whose anchor nodes are in a document and in the same tree scope can be
        compared using the operator< overload. Otherwise, the result is non-deterministic by
        spec. <https://dom.spec.whatwg.org/#dom-node-comparedocumentposition> (13 November 2019):

                6. If node1 or node2 is null, or node1's root is not node2's root, then return the result of
                adding DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, and either
                DOCUMENT_POSITION_PRECEDING or DOCUMENT_POSITION_FOLLOWING, with the constraint that this is
                to be consistent, together.

                NOTE: Whether to return DOCUMENT_POSITION_PRECEDING or DOCUMENT_POSITION_FOLLOWING is typically
                implemented via pointer comparison. In JavaScript implementations a cached Math.random()
                value can be used.

        * dom/Node.cpp:
        (WebCore::areNodesConnectedInSameTreeScope): Added; extracted from compareDocumentPosition().
        (WebCore::Node::compareDocumentPosition): Write in terms of areNodesConnectedInSameTreeScope().
        * dom/Node.h:
        * editing/VisiblePosition.cpp:
        (WebCore::areVisiblePositionsInSameTreeScope): Added. Write in terms of areNodesConnectedInSameTreeScope().
        * editing/VisiblePosition.h:
        * editing/VisibleUnits.cpp:
        (WebCore::nextSentenceBoundaryInDirection): Update assert. We can only compare positions
        if areVisiblePositionsInSameTreeScope() returns true.

2019-11-18  Ryosuke Niwa  <rniwa@webkit.org>

        Rename AbstractEventLoop to EventLoop and move to its own cpp file
        https://bugs.webkit.org/show_bug.cgi?id=204335

        Reviewed by Antti Koivisto.

        This patch renames AbstractEventLoop to EventLoop and move to its own cpp file since
        r252607 consolidated the event loop implementations in WindowEventLoop and WorkerEventLoop.

        * Modules/cache/DOMCache.cpp:
        * Modules/cache/DOMCacheStorage.cpp:
        * Modules/encryptedmedia/MediaKeySession.cpp:
        * Modules/encryptedmedia/MediaKeys.cpp:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/WebAnimation.cpp:
        * bindings/js/JSDOMPromiseDeferred.h:
        * css/FontFaceSet.cpp:
        * dom/ActiveDOMObject.cpp:
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * dom/WindowEventLoop.cpp:
        (WebCore::AbstractEventLoop::queueTask): Deleted.
        (WebCore::AbstractEventLoop::resumeGroup): Deleted.
        (WebCore::AbstractEventLoop::stopGroup): Deleted.
        (WebCore::AbstractEventLoop::scheduleToRunIfNeeded): Deleted.
        (WebCore::AbstractEventLoop::run): Deleted.
        (WebCore::AbstractEventLoop::clearAllTasks): Deleted.
        (WebCore::EventLoopFunctionDispatchTask::EventLoopFunctionDispatchTask): Deleted.
        (WebCore::EventLoopTaskGroup::queueTask): Deleted.
        * dom/WindowEventLoop.h:
        * fileapi/FileReader.cpp:
        * testing/Internals.cpp:
        * workers/WorkerEventLoop.h:
        * workers/service/ServiceWorkerContainer.cpp:

2019-11-19  Yusuke Suzuki  <ysuzuki@apple.com>

        [IndexedDB] IndexedDB's threading assertion should respect Web thread
        https://bugs.webkit.org/show_bug.cgi?id=204346

        Reviewed by Daniel Bates.

        Previously we are doing pointer-comparison between Thread::current() and origin-thread to
        assert the thread affinity. But this does not respect Web thread: we can create an object
        in Web Thread, and touch it in the main thread if web thread lock is correctly held.

        This patch replaces pointer-comparison with WTF::canAccessThreadLocalDataForThread helper
        function which appropriately respects Web thread status.

        No behavior change.

        * Modules/indexeddb/IDBActiveDOMObject.h:
        (WebCore::IDBActiveDOMObject::performCallbackOnOriginThread):
        (WebCore::IDBActiveDOMObject::callFunctionOnOriginThread):
        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::IDBCursor):
        (WebCore::IDBCursor::~IDBCursor):
        (WebCore::IDBCursor::sourcesDeleted const):
        (WebCore::IDBCursor::transaction const):
        (WebCore::IDBCursor::update):
        (WebCore::IDBCursor::advance):
        (WebCore::IDBCursor::continueFunction):
        (WebCore::IDBCursor::uncheckedIterateCursor):
        (WebCore::IDBCursor::deleteFunction):
        (WebCore::IDBCursor::setGetResult):
        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::~IDBDatabase):
        (WebCore::IDBDatabase::hasPendingActivity const):
        (WebCore::IDBDatabase::name const):
        (WebCore::IDBDatabase::version const):
        (WebCore::IDBDatabase::objectStoreNames const):
        (WebCore::IDBDatabase::renameObjectStore):
        (WebCore::IDBDatabase::renameIndex):
        (WebCore::IDBDatabase::createObjectStore):
        (WebCore::IDBDatabase::transaction):
        (WebCore::IDBDatabase::deleteObjectStore):
        (WebCore::IDBDatabase::close):
        (WebCore::IDBDatabase::connectionToServerLost):
        (WebCore::IDBDatabase::maybeCloseInServer):
        (WebCore::IDBDatabase::activeDOMObjectName const):
        (WebCore::IDBDatabase::stop):
        (WebCore::IDBDatabase::startVersionChangeTransaction):
        (WebCore::IDBDatabase::didStartTransaction):
        (WebCore::IDBDatabase::willCommitTransaction):
        (WebCore::IDBDatabase::didCommitTransaction):
        (WebCore::IDBDatabase::willAbortTransaction):
        (WebCore::IDBDatabase::didAbortTransaction):
        (WebCore::IDBDatabase::didCommitOrAbortTransaction):
        (WebCore::IDBDatabase::fireVersionChangeEvent):
        (WebCore::IDBDatabase::dispatchEvent):
        (WebCore::IDBDatabase::didCreateIndexInfo):
        (WebCore::IDBDatabase::didDeleteIndexInfo):
        * Modules/indexeddb/IDBIndex.cpp:
        (WebCore::IDBIndex::IDBIndex):
        (WebCore::IDBIndex::~IDBIndex):
        (WebCore::IDBIndex::name const):
        (WebCore::IDBIndex::setName):
        (WebCore::IDBIndex::objectStore):
        (WebCore::IDBIndex::keyPath const):
        (WebCore::IDBIndex::unique const):
        (WebCore::IDBIndex::multiEntry const):
        (WebCore::IDBIndex::rollbackInfoForVersionChangeAbort):
        (WebCore::IDBIndex::doOpenCursor):
        (WebCore::IDBIndex::doOpenKeyCursor):
        (WebCore::IDBIndex::doCount):
        (WebCore::IDBIndex::doGet):
        (WebCore::IDBIndex::doGetKey):
        (WebCore::IDBIndex::doGetAll):
        (WebCore::IDBIndex::doGetAllKeys):
        (WebCore::IDBIndex::markAsDeleted):
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::IDBObjectStore):
        (WebCore::IDBObjectStore::~IDBObjectStore):
        (WebCore::IDBObjectStore::name const):
        (WebCore::IDBObjectStore::setName):
        (WebCore::IDBObjectStore::keyPath const):
        (WebCore::IDBObjectStore::indexNames const):
        (WebCore::IDBObjectStore::transaction):
        (WebCore::IDBObjectStore::autoIncrement const):
        (WebCore::IDBObjectStore::doOpenCursor):
        (WebCore::IDBObjectStore::doOpenKeyCursor):
        (WebCore::IDBObjectStore::get):
        (WebCore::IDBObjectStore::getKey):
        (WebCore::IDBObjectStore::putOrAdd):
        (WebCore::IDBObjectStore::doDelete):
        (WebCore::IDBObjectStore::clear):
        (WebCore::IDBObjectStore::createIndex):
        (WebCore::IDBObjectStore::index):
        (WebCore::IDBObjectStore::deleteIndex):
        (WebCore::IDBObjectStore::doCount):
        (WebCore::IDBObjectStore::doGetAll):
        (WebCore::IDBObjectStore::doGetAllKeys):
        (WebCore::IDBObjectStore::markAsDeleted):
        (WebCore::IDBObjectStore::rollbackForVersionChangeAbort):
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::~IDBOpenDBRequest):
        (WebCore::IDBOpenDBRequest::onError):
        (WebCore::IDBOpenDBRequest::versionChangeTransactionDidFinish):
        (WebCore::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
        (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
        (WebCore::IDBOpenDBRequest::dispatchEvent):
        (WebCore::IDBOpenDBRequest::onSuccess):
        (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
        (WebCore::IDBOpenDBRequest::onDeleteDatabaseSuccess):
        (WebCore::IDBOpenDBRequest::requestCompleted):
        (WebCore::IDBOpenDBRequest::requestBlocked):
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::~IDBRequest):
        (WebCore:: const):
        (WebCore::IDBRequest::setSource):
        (WebCore::IDBRequest::setVersionChangeTransaction):
        (WebCore::IDBRequest::transaction const):
        (WebCore::IDBRequest::sourceObjectStoreIdentifier const):
        (WebCore::IDBRequest::sourceIndexIdentifier const):
        (WebCore::IDBRequest::requestedObjectStoreRecordType const):
        (WebCore::IDBRequest::requestedIndexRecordType const):
        (WebCore::IDBRequest::eventTargetInterface const):
        (WebCore::IDBRequest::activeDOMObjectName const):
        (WebCore::IDBRequest::hasPendingActivity const):
        (WebCore::IDBRequest::stop):
        (WebCore::IDBRequest::enqueueEvent):
        (WebCore::IDBRequest::dispatchEvent):
        (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
        (WebCore::IDBRequest::setResult):
        (WebCore::IDBRequest::setResultToStructuredClone):
        (WebCore::IDBRequest::setResultToUndefined):
        (WebCore::IDBRequest::resultCursor):
        (WebCore::IDBRequest::willIterateCursor):
        (WebCore::IDBRequest::didOpenOrIterateCursor):
        (WebCore::IDBRequest::completeRequestAndDispatchEvent):
        (WebCore::IDBRequest::onError):
        (WebCore::IDBRequest::onSuccess):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::IDBTransaction):
        (WebCore::IDBTransaction::~IDBTransaction):
        (WebCore::IDBTransaction::objectStoreNames const):
        (WebCore::IDBTransaction::db):
        (WebCore::IDBTransaction::error const):
        (WebCore::IDBTransaction::objectStore):
        (WebCore::IDBTransaction::abortDueToFailedRequest):
        (WebCore::IDBTransaction::transitionedToFinishing):
        (WebCore::IDBTransaction::abort):
        (WebCore::IDBTransaction::internalAbort):
        (WebCore::IDBTransaction::abortOnServerAndCancelRequests):
        (WebCore::IDBTransaction::activeDOMObjectName const):
        (WebCore::IDBTransaction::hasPendingActivity const):
        (WebCore::IDBTransaction::stop):
        (WebCore::IDBTransaction::isActive const):
        (WebCore::IDBTransaction::isFinishedOrFinishing const):
        (WebCore::IDBTransaction::addRequest):
        (WebCore::IDBTransaction::removeRequest):
        (WebCore::IDBTransaction::scheduleOperation):
        (WebCore::IDBTransaction::trySchedulePendingOperationTimer):
        (WebCore::IDBTransaction::pendingOperationTimerFired):
        (WebCore::IDBTransaction::operationCompletedOnServer):
        (WebCore::IDBTransaction::scheduleCompletedOperationTimer):
        (WebCore::IDBTransaction::completedOperationTimerFired):
        (WebCore::IDBTransaction::commit):
        (WebCore::IDBTransaction::commitOnServer):
        (WebCore::IDBTransaction::finishAbortOrCommit):
        (WebCore::IDBTransaction::didStart):
        (WebCore::IDBTransaction::notifyDidAbort):
        (WebCore::IDBTransaction::didAbort):
        (WebCore::IDBTransaction::didCommit):
        (WebCore::IDBTransaction::fireOnComplete):
        (WebCore::IDBTransaction::fireOnAbort):
        (WebCore::IDBTransaction::enqueueEvent):
        (WebCore::IDBTransaction::dispatchEvent):
        (WebCore::IDBTransaction::createObjectStore):
        (WebCore::IDBTransaction::createObjectStoreOnServer):
        (WebCore::IDBTransaction::didCreateObjectStoreOnServer):
        (WebCore::IDBTransaction::renameObjectStore):
        (WebCore::IDBTransaction::renameObjectStoreOnServer):
        (WebCore::IDBTransaction::didRenameObjectStoreOnServer):
        (WebCore::IDBTransaction::createIndex):
        (WebCore::IDBTransaction::createIndexOnServer):
        (WebCore::IDBTransaction::didCreateIndexOnServer):
        (WebCore::IDBTransaction::renameIndex):
        (WebCore::IDBTransaction::renameIndexOnServer):
        (WebCore::IDBTransaction::didRenameIndexOnServer):
        (WebCore::IDBTransaction::requestOpenCursor):
        (WebCore::IDBTransaction::doRequestOpenCursor):
        (WebCore::IDBTransaction::openCursorOnServer):
        (WebCore::IDBTransaction::didOpenCursorOnServer):
        (WebCore::IDBTransaction::iterateCursor):
        (WebCore::IDBTransaction::iterateCursorOnServer):
        (WebCore::IDBTransaction::didIterateCursorOnServer):
        (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
        (WebCore::IDBTransaction::requestGetAllIndexRecords):
        (WebCore::IDBTransaction::getAllRecordsOnServer):
        (WebCore::IDBTransaction::didGetAllRecordsOnServer):
        (WebCore::IDBTransaction::requestGetRecord):
        (WebCore::IDBTransaction::requestGetValue):
        (WebCore::IDBTransaction::requestGetKey):
        (WebCore::IDBTransaction::requestIndexRecord):
        (WebCore::IDBTransaction::getRecordOnServer):
        (WebCore::IDBTransaction::didGetRecordOnServer):
        (WebCore::IDBTransaction::requestCount):
        (WebCore::IDBTransaction::getCountOnServer):
        (WebCore::IDBTransaction::didGetCountOnServer):
        (WebCore::IDBTransaction::requestDeleteRecord):
        (WebCore::IDBTransaction::deleteRecordOnServer):
        (WebCore::IDBTransaction::didDeleteRecordOnServer):
        (WebCore::IDBTransaction::requestClearObjectStore):
        (WebCore::IDBTransaction::clearObjectStoreOnServer):
        (WebCore::IDBTransaction::didClearObjectStoreOnServer):
        (WebCore::IDBTransaction::requestPutOrAdd):
        (WebCore::IDBTransaction::putOrAddOnServer):
        (WebCore::IDBTransaction::didPutOrAddOnServer):
        (WebCore::IDBTransaction::deleteObjectStore):
        (WebCore::IDBTransaction::deleteObjectStoreOnServer):
        (WebCore::IDBTransaction::didDeleteObjectStoreOnServer):
        (WebCore::IDBTransaction::deleteIndex):
        (WebCore::IDBTransaction::deleteIndexOnServer):
        (WebCore::IDBTransaction::didDeleteIndexOnServer):
        (WebCore::IDBTransaction::operationCompletedOnClient):
        (WebCore::IDBTransaction::establishOnServer):
        (WebCore::IDBTransaction::activate):
        (WebCore::IDBTransaction::deactivate):
        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
        (WebCore::IDBClient::removeItemsMatchingCurrentThread):
        (WebCore::IDBClient::setMatchingItemsContextSuspended):
        * Modules/indexeddb/client/TransactionOperation.h:
        (WebCore::IDBClient::TransactionOperation::~TransactionOperation):
        (WebCore::IDBClient::TransactionOperation::perform):
        (WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread):
        (WebCore::IDBClient::TransactionOperation::transitionToComplete):
        (WebCore::IDBClient::TransactionOperation::doComplete):
        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::~ActiveDOMObject):
        * platform/Supplementable.h:
        (WebCore::Supplementable::provideSupplement):
        (WebCore::Supplementable::removeSupplement):
        (WebCore::Supplementable::requireSupplement):
        * platform/Timer.cpp:
        (WebCore::TimerBase::~TimerBase):
        (WebCore::TimerBase::start):
        (WebCore::TimerBase::stop):
        (WebCore::TimerBase::setNextFireTime):

2019-11-19  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Count third-party script loads under top frame
        https://bugs.webkit.org/show_bug.cgi?id=204262
        <rdar://problem/57244945>

        Reviewed by Alex Christensen.

        Third-party scripts running in the first-party context are a significant privacy
        and security risk. This change captures the number of such script loads which will
        allow ITP to take action.

        Tests: http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html
               http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html
               http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html
               http/tests/resourceLoadStatistics/count-third-party-script-loads.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadResourceSynchronously):
            Now sends the ResourceLoadObserver::FetchDestinationIsScriptLike parameter to
            ResourceLoadObserver::logSubresourceLoading().
        * loader/ResourceLoadObserver.h:
        (WebCore::ResourceLoadObserver::logSubresourceLoading):
            Now takes a FetchDestinationIsScriptLike parameter.
        * loader/ResourceLoadStatistics.cpp:
        (WebCore::ResourceLoadStatistics::encode const):
        (WebCore::ResourceLoadStatistics::decode):
        (WebCore::ResourceLoadStatistics::toString const):
            Output of the new topFrameLoadedThirdPartyScripts category.
            Removed the lastSeen output since it may differ between test runs.
        (WebCore::ResourceLoadStatistics::merge):
            Handling of the new topFrameLoadedThirdPartyScripts category.
        * loader/ResourceLoadStatistics.h:
            Added the new topFrameLoadedThirdPartyScripts category.
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::willSendRequestInternal):
            Now sends the ResourceLoadObserver::FetchDestinationIsScriptLike parameter to
            ResourceLoadObserver::logSubresourceLoading().

2019-11-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Display::Run:TextContext should use StringView
        https://bugs.webkit.org/show_bug.cgi?id=204356
        <rdar://problem/57323695>

        Reviewed by Antti Koivisto.

        We could just use StringView instead of String here (though this is all temporary until We figure out the relationship
        between the layout and the display trees e.g. how to reference content from the display tree). 

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::TextContext):
        (WebCore::Display::Run::TextContext::content const):
        (WebCore::Display::Run::TextContext::expand):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::appendTextContent):

2019-11-19  Antti Koivisto  <antti@apple.com>

        Rename CSSDefaultStyleSheets to UserAgentStyle
        https://bugs.webkit.org/show_bug.cgi?id=204357

        Reviewed by Zalan Bujtas.

        Also move it to Style namespace and directory, along with InspectorCSSOMWrappers.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/ProcessWarming.cpp:
        (WebCore::ProcessWarming::prewarmGlobally):
        * style/ElementRuleCollector.cpp:
        (WebCore::Style::ElementRuleCollector::matchUARules):
        * style/InspectorCSSOMWrappers.cpp: Renamed from Source/WebCore/css/InspectorCSSOMWrappers.cpp.
        (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
        (WebCore::Style::InspectorCSSOMWrappers::collectScopeWrappers):
        * style/InspectorCSSOMWrappers.h: Renamed from Source/WebCore/css/InspectorCSSOMWrappers.h.
        * style/PageRuleCollector.cpp:
        (WebCore::Style::PageRuleCollector::matchAllPageRules):
        * style/RuleData.h:
        * style/RuleSet.h:
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::Resolver):
        (WebCore::Style::Resolver::styleForElement):
        * style/StyleScopeRuleSets.cpp:
        (WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
        (WebCore::Style::ScopeRuleSets::collectFeatures const):
        * style/StyleScopeRuleSets.h:
        (WebCore::Style::ScopeRuleSets::features const):
        (WebCore::Style::ScopeRuleSets::mutableFeatures):
        * style/StyleSharingResolver.h:
        * style/UserAgentStyle.cpp: Renamed from Source/WebCore/css/CSSDefaultStyleSheets.cpp.
        (WebCore::Style::UserAgentStyle::initDefaultStyle):
        (WebCore::Style::UserAgentStyle::addToDefaultStyle):
        (WebCore::Style::UserAgentStyle::loadFullDefaultStyle):
        (WebCore::Style::UserAgentStyle::loadSimpleDefaultStyle):
        (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
        * style/UserAgentStyle.h: Renamed from Source/WebCore/css/CSSDefaultStyleSheets.h.

2019-11-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Assign inlineCapacity to various inline run vectors.
        https://bugs.webkit.org/show_bug.cgi?id=204354
        <rdar://problem/57322347>

        Reviewed by Antti Koivisto.

        Inline capacity values are mainly based off of the equivalent simple line layout vectors.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingState.h:
        * layout/inlineformatting/InlineLine.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle): Apparently 'newStyle' is moved out at this point.

2019-11-19  Sihui Liu  <sihui_liu@apple.com>

        Update expectations for bufferedAmount-unchanged-by-sync-xhr.any.worker.html
        https://bugs.webkit.org/show_bug.cgi?id=204313

        Reviewed by Alex Christensen.

        Add some logging to help debug the flaky timeout of bufferedAmount-unchanged-by-sync-xhr.any.worker.html on 
        commit-queue bot.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::fail):
        (WebCore::WebSocketChannel::didFailSocketStream):
        * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
        (WebCore::SocketStreamHandleImpl::scheduleStreams):
        (WebCore::SocketStreamHandleImpl::readStreamCallback):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::restoreTo):Remove a duplicate setting.

2019-11-19  Eric Carlson  <eric.carlson@apple.com>

        OverConstrainedError is missing 'name' property
        https://bugs.webkit.org/show_bug.cgi?id=204069

        Reviewed by Youenn Fablet.

        No new tests, existing test and results updated.

        * Modules/mediastream/OverconstrainedError.h:
        (WebCore::OverconstrainedError::name const):
        * Modules/mediastream/OverconstrainedError.idl:

2019-11-19  Chris Dumez  <cdumez@apple.com>

        Unreviewed iOS build fix.

        * style/StyleAdjuster.cpp:

2019-11-19  Antti Koivisto  <antti@apple.com>

        Move RuleData to a file of its own
        https://bugs.webkit.org/show_bug.cgi?id=204351

        Reviewed by Anders Carlsson.
    
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * style/RuleData.cpp: Added.
        (WebCore::Style::computeMatchBasedOnRuleHash):
        (WebCore::Style::selectorCanMatchPseudoElement):
        (WebCore::Style::isCommonAttributeSelectorAttribute):
        (WebCore::Style::computeContainsUncommonAttributeSelector):
        (WebCore::Style::determinePropertyWhitelistType):
        (WebCore::Style::RuleData::RuleData):
        * style/RuleData.h: Added.
        (WebCore::Style::RuleData::position const):
        (WebCore::Style::RuleData::rule const):
        (WebCore::Style::RuleData::selector const):
        (WebCore::Style::RuleData::selectorIndex const):
        (WebCore::Style::RuleData::selectorListIndex const):
        (WebCore::Style::RuleData::canMatchPseudoElement const):
        (WebCore::Style::RuleData::matchBasedOnRuleHash const):
        (WebCore::Style::RuleData::containsUncommonAttributeSelector const):
        (WebCore::Style::RuleData::linkMatchType const):
        (WebCore::Style::RuleData::propertyWhitelistType const):
        (WebCore::Style::RuleData::descendantSelectorIdentifierHashes const):
        (WebCore::Style::RuleData::disableSelectorFiltering):
        * style/RuleSet.cpp:
        (WebCore::Style::computeMatchBasedOnRuleHash): Deleted.
        (WebCore::Style::selectorCanMatchPseudoElement): Deleted.
        (WebCore::Style::isCommonAttributeSelectorAttribute): Deleted.
        (WebCore::Style::computeContainsUncommonAttributeSelector): Deleted.
        (WebCore::Style::determinePropertyWhitelistType): Deleted.
        (WebCore::Style::RuleData::RuleData): Deleted.
        * style/RuleSet.h:
        (WebCore::Style::RuleData::position const): Deleted.
        (WebCore::Style::RuleData::rule const): Deleted.
        (WebCore::Style::RuleData::selector const): Deleted.
        (WebCore::Style::RuleData::selectorIndex const): Deleted.
        (WebCore::Style::RuleData::selectorListIndex const): Deleted.
        (WebCore::Style::RuleData::canMatchPseudoElement const): Deleted.
        (WebCore::Style::RuleData::matchBasedOnRuleHash const): Deleted.
        (WebCore::Style::RuleData::containsUncommonAttributeSelector const): Deleted.
        (WebCore::Style::RuleData::linkMatchType const): Deleted.
        (WebCore::Style::RuleData::propertyWhitelistType const): Deleted.
        (WebCore::Style::RuleData::descendantSelectorIdentifierHashes const): Deleted.
        (WebCore::Style::RuleData::disableSelectorFiltering): Deleted.

2019-11-19  Antti Koivisto  <antti@apple.com>

        Move ElementRuleCollector to Style namespace
        https://bugs.webkit.org/show_bug.cgi?id=204329

        Reviewed by Sam Weinig.

        Also move PageRuleCollector.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/CallTracerTypes.h:
        * css/DOMCSSRegisterCustomProperty.cpp:
        (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
        * dom/Document.cpp:
        (WebCore::Document::styleForElementIgnoringPendingStylesheets):
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setFont):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::toStyleVariant):
        (WebCore::CanvasRenderingContext2DBase::strokeStyle const):
        (WebCore::CanvasRenderingContext2DBase::setStrokeStyle):
        (WebCore::CanvasRenderingContext2DBase::fillStyle const):
        (WebCore::CanvasRenderingContext2DBase::setFillStyle):

        Rename CanvasRenderingContext2DBase::Style to StyleVariant to avoid name conflicts.

        (WebCore::toStyle): Deleted.
        * html/canvas/CanvasRenderingContext2DBase.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::buildAction):
        * page/FrameView.cpp:
        (WebCore::FrameView::styleHidesScrollbarWithOrientation const):
        (WebCore::FrameView::updateScrollCorner):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::getCachedPseudoStyle const):
        (WebCore::RenderElement::getUncachedPseudoStyle const):
        (WebCore::RenderElement::selectionPseudoStyle const):
        * rendering/RenderElement.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderObject.h:
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::getScrollbarPseudoStyle const):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::pseudoStyleCacheIsInvalid):
        * style/ElementRuleCollector.cpp: Renamed from Source/WebCore/css/ElementRuleCollector.cpp.
        (WebCore::Style::MatchRequest::MatchRequest):
        (WebCore::Style::ElementRuleCollector::ElementRuleCollector):
        (WebCore::Style::ElementRuleCollector::addMatchedRule):
        (WebCore::Style::ElementRuleCollector::collectMatchingRules):
        (WebCore::Style::ElementRuleCollector::transferMatchedRules):
        (WebCore::Style::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
        (WebCore::Style::ElementRuleCollector::matchHostPseudoClassRules):
        (WebCore::Style::ElementRuleCollector::matchSlottedPseudoElementRules):
        (WebCore::Style::ElementRuleCollector::matchPartPseudoElementRulesForScope):
        (WebCore::Style::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
        (WebCore::Style::ElementRuleCollector::matchUARules):
        (WebCore::Style::ElementRuleCollector::ruleMatches):
        (WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):
        (WebCore::Style::ElementRuleCollector::matchAllRules):
        (WebCore::Style::ElementRuleCollector::hasAnyMatchingRules):
        (WebCore::Style::ElementRuleCollector::addMatchedProperties):
        * style/ElementRuleCollector.h: Renamed from Source/WebCore/css/ElementRuleCollector.h.
        (WebCore::Style::PseudoElementRequest::PseudoElementRequest):
        (WebCore::Style::ElementRuleCollector::setPseudoElementRequest):
        (WebCore::Style::ElementRuleCollector::styleRelations const):
        (WebCore::Style::ElementRuleCollector::transferMatchedRules):
        * style/PageRuleCollector.cpp: Renamed from Source/WebCore/css/PageRuleCollector.cpp.
        (WebCore::Style::PageRuleCollector::matchPageRules):
        * style/PageRuleCollector.h: Renamed from Source/WebCore/css/PageRuleCollector.h.
        (WebCore::Style::PageRuleCollector::PageRuleCollector):
        * style/StyleResolver.cpp:
        (WebCore::Style::Resolver::pseudoStyleForElement):
        (WebCore::Style::Resolver::pseudoStyleRulesForElement):
        * style/StyleResolver.h:

2019-11-19  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Add support for Clipboard.readText()
        https://bugs.webkit.org/show_bug.cgi?id=204310
        <rdar://problem/57292754>

        Reviewed by Ryosuke Niwa.

        Implements readText; see below for more detail.

        Tests: editing/async-clipboard/clipboard-do-not-read-text-from-platform-if-text-changes.html
               editing/async-clipboard/clipboard-read-text-from-platform.html
               editing/async-clipboard/clipboard-read-text-same-origin.html
               editing/async-clipboard/clipboard-read-text.html

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::readText):

        Implement the method. This works similarly to Clipboard::read, but immediately reads text data for the first
        clipboard item with data for "text/plain", instead of exposing a list of clipboard items.

        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::commitToPasteboard):

        If the custom pasteboard data object is empty, then don't bother trying to write it to the platform pasteboard.
        This avoids hitting an assertion in WebDragClient::beginDrag that checks to make sure there's no data on the
        pasteboard right before beginning a drag in the UI process which was getting hit because we'd otherwise end up
        writing just the pasteboard data origin; it also has an added bonus of avoiding an unnecessary sync IPC message.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::write):

        Write the custom data type ("com.apple.WebKit.custom-pasteboard-data") when writing PasteboardCustomData to the
        pasteboard on macOS, even when the custom pasteboard data only contains an origin. This allows DOM paste
        requests to automatically accept when exchanging text data between the same origin via the async clipboard API.

2019-11-19  Chris Dumez  <cdumez@apple.com>

        http/tests/navigation/page-cache-mediastream.html is a flaky crash
        https://bugs.webkit.org/show_bug.cgi?id=204321

        Reviewed by Eric Carlson.

        Make sure the MediaStreamTrack stays alive if there is a pending ended event to dispatch.

        No new tests, covered by existing test.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::hasPendingActivity const):

2019-11-19  Thibault Saunier  <tsaunier@igalia.com>

        REGRESSION(r249428): [GStreamer] VP9 video rendered green
        https://bugs.webkit.org/show_bug.cgi?id=201422

        Reviewed by Philippe Normand.

        Avoid forcing a video conversion in software we end up and make
        it happen in GL with a sensibly simpler pipeline, this is possible as
        `glcolorconvert` properly setups the converted GL buffers.

        Without that patch we are getting "random" not negotiated issues with
        MediaStream sources related to the `GLMemory` caps feature during
        renegotiation between the software `videoconvert` and our sink.

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

2019-11-18  John Wilander  <wilander@apple.com>

        Check if ITP is on before applying third-party cookie blocking
        https://bugs.webkit.org/show_bug.cgi?id=204322
        <rdar://problem/57120772>

        Reviewed by Chris Dumez and Alexey Proskuryakov.

        This change makes sure WebCore::NetworkStorageSession knows
        whether ITP is on or off and checks that first thing in
        WebCore::NetworkStorageSession::shouldBlockCookies().

        This check was never needed before since if ITP was off,
        there would be no classified domains and thus the function
        would always return false. However,
        https://trac.webkit.org/changeset/251353/webkit introduced
        full third-party cookie blocking for websites without user
        interaction and that rule is checked before checking domain
        classification. The effect was unconditional third-party
        cookie blocking if ITP is off. This changes fixes that bug.

        Note that this patch already landed as branch-specific in
        https://trac.webkit.org/changeset/252549/webkit

        Test: http/tests/resourceLoadStatistics/no-third-party-cookie-blocking-when-itp-is-off.html

        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
        (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor const):
        (WebCore::NetworkStorageSession::shouldBlockCookies const):
            Now checks whether ITP is on or off.
        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::setResourceLoadStatisticsEnabled):

2019-11-18  Simon Fraser  <simon.fraser@apple.com>

        -webkit-font-smoothing: none leaves subsequent elements unantialiased
        https://bugs.webkit.org/show_bug.cgi?id=204334

        Reviewed by Myles C. Maxfield.

        FontCascade::drawGlyphs() never called context.setShouldAntialias(true) for the
        FontSmoothingMode::AutoSmoothing state, leaving it off for later elements.

        Fix this function to save and restore antialiasing and smoothing in similar ways, and rather
        than handle FontSmoothingMode::AutoSmoothing as "do nothing and let the platform decide"
        (which caused this bug), explicitly treat it as equivalent to
        FontSmoothingMode::SubpixelAntialiased. Note that FontSmoothingMode::SubpixelAntialiased
        does not render with subpixel antialiasing on macOS Mojave and later.

        Test: fast/text/font-antialiasing-save-restore.html

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

2019-11-18  Zalan Bujtas  <zalan@apple.com>

        Flex layout triggers excessive layout on height percentage descendants
        https://bugs.webkit.org/show_bug.cgi?id=204319
        <rdar://problem/57236652>

        Reviewed by Simon Fraser.

        This is very similar to r252562, except in this case the layout is explicitly triggered by the flex layout logic.
        The patch ensures that we don't try to lay out percent height descendants with out-of-flow ancestors (see r252562 or webkit.org/b/204255 for more info).
        (Unfortunately this is not testable but the subsequent repaint fix will include a test which would fail if we regressed this.)

        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::hasPercentHeightDescendants const):
        (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
        * rendering/RenderFlexibleBox.h:

2019-11-18  Devin Rousso  <drousso@apple.com>

        Web Inspector: Local Resource Overrides: allow substitution based on a url pattern
        https://bugs.webkit.org/show_bug.cgi?id=202375

        Reviewed by Brian Burg.

        Test: http/tests/inspector/network/local-resource-override-isRegex.html

        Often, websites will load content with a timestamp-based URL query parameter for
        cache-busting or logging purposes. If a developer is trying to override these resources (or
        is trying to have an existing override also match these resources), they'd need to edit the
        local override's URL to match in addition to editing the resource that loads it (e.g. change
        the <script> in an HTML file), which can sometimes be tricky of the content is dynamically
        loaded (e.g. an XHR with a non-hardcoded URL).

        Allowing for local overrides to be set using a regular expression pattern would help resolve
        this limitation.

        * inspector/agents/InspectorNetworkAgent.h:
        (WebCore::InspectorNetworkAgent::Intercept): Added.
        (WebCore::InspectorNetworkAgent::Intercept::operator== const): Added.
        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::disable):
        (WebCore::InspectorNetworkAgent::shouldIntercept): Added.
        (WebCore::InspectorNetworkAgent::addInterception):
        (WebCore::InspectorNetworkAgent::removeInterception):
        (WebCore::InspectorNetworkAgent::willInterceptRequest):
        (WebCore::InspectorNetworkAgent::shouldInterceptResponse):

2019-11-18  Andres Gonzalez  <andresg_22@apple.com>

        Run AccessibilityController::rootElement on secondary thread to simulate HIServices during LayoutTests.
        https://bugs.webkit.org/show_bug.cgi?id=204226

        Reviewed by Chris Fleizach.

        No new tests, no new functionality.

        Added AXObjectCahce::canUseSecondaryAXThread to support
        WTR::AccessibilityController spawning of a secondary thread to simulate
        execution of isolated tree code.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::canUseSecondaryAXThread):
        * accessibility/AXObjectCache.h:

2019-11-15  Ryosuke Niwa  <rniwa@webkit.org>

        Share more code between WindowEventLoop and WorkerEventLoop by introducing EventLoopTaskGroup
        https://bugs.webkit.org/show_bug.cgi?id=204263

        Reviewed by Antti Koivisto.

        This patch abstracts the logic in WindowEventLoop to deal with a set of tasks associated with
        a particular documents all suspending, resuming, or stopping at the same time using a new abstraction
        called EventLoopTaskGroup in order to group tasks for media code and elsewhere.

        Each task is now represented as an instance of a concrete subclass of EventLoopTask, which has
        a pure virtual execute() member function. Its primary purpose is to know EventLoopTaskGroup to which
        each task belongs. One of subclasss, EventLoopFunctionDispatchTask, is used to store a callback function
        and another subclass, ActiveDOMObjectEventDispatchTask, is used to dispatch an async event.

        ScriptExecutionContext's eventLoop() method now returns EventLoopTaskGroup. Because this group is
        specific to a given ScriptExecutionContext, we no longer have to pass the ScriptExecutionContext
        in each call to queueTask everywhere in our codebase.

        For now, I kept all the code in WindowEventLoop.cpp to make the patch reviewable. My plan is to create
        a new cpp file (e.g. AbstractEventLoop.cpp) and move most of code there instead as a follow up.

        No new tests since there should be no observable behavior change.

        * Modules/encryptedmedia/MediaKeys.cpp:
        (WebCore::MediaKeys::setServerCertificate):
        * Modules/entriesapi/FileSystemDirectoryEntry.cpp:
        (WebCore::FileSystemDirectoryEntry::getEntry):
        * Modules/entriesapi/FileSystemDirectoryReader.cpp:
        (WebCore::FileSystemDirectoryReader::readEntries):
        * Modules/entriesapi/FileSystemEntry.cpp:
        (WebCore::FileSystemEntry::getParent):
        * Modules/entriesapi/FileSystemFileEntry.cpp:
        (WebCore::FileSystemFileEntry::file):
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::scheduleDeferredTask):
        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::queueTask):
        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::runTransaction):
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::openDatabase):
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::callErrorCallbackDueToInterruption):
        (WebCore::SQLTransaction::deliverTransactionErrorCallback):
        (WebCore::SQLTransaction::deliverSuccessCallback):
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::DeferredPromise::callFunction):
        (WebCore::DeferredPromise::whenSettled):
        * dom/AbstractEventLoop.h:
        (WebCore::EventLoopTask): Added.
        (WebCore::EventLoopTask::taskSource): Added.
        (WebCore::EventLoopTask::group const): Added.
        (WebCore::EventLoopTask::EventLoopTask): Added.
        (WebCore::EventLoopTaskGroup): Added. This class represents a group of tasks. For now, each group is
        a distinct ScriptExecutionContext.
        (WebCore::EventLoopTaskGroup::matchesTask const): Added.
        (WebCore::EventLoopTaskGroup::startRunning): Added.
        (WebCore::EventLoopTaskGroup::stopAndDiscardAllTasks): Added.
        (WebCore::EventLoopTaskGroup::suspend): Added.
        (WebCore::EventLoopTaskGroup::resume): Added.
        (WebCore::EventLoopTaskGroup::isStoppedPermanently): Added.
        (WebCore::EventLoopTaskGroup::isSuspended): Added.
        (WebCore::EventLoopTaskGroup::hasScheduledTasks const): Added.
        (WebCore::EventLoopTaskGroup::queueTask): Added.
        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::queueTaskInEventLoop):
        (WebCore::ActiveDOMObjectEventDispatchTask): Added; A subclass of EventLoopTask to dispatch an async event.
        (WebCore::ActiveDOMObjectEventDispatchTask::ActiveDOMObjectEventDispatchTask): Added.
        (WebCore::ActiveDOMObjectEventDispatchTask::~ActiveDOMObjectEventDispatchTask): Added.
        (WebCore::ActiveDOMObject::queueTaskToDispatchEventInternal): Added.
        * dom/ActiveDOMObject.h:
        * dom/Document.cpp:
        (WebCore::Document::suspendActiveDOMObjects):
        (WebCore::Document::resumeActiveDOMObjects):
        (WebCore::Document::stopActiveDOMObjects):
        (WebCore::Document::eventLoop): Creates EventLoopTaskGroup for this document.
        * dom/Document.h:
        * dom/IdleCallbackController.cpp:
        (WebCore::IdleCallbackController::queueTaskToStartIdlePeriod):
        (WebCore::IdleCallbackController::queueTaskToInvokeIdleCallbacks):
        * dom/ScriptExecutionContext.h:
        * dom/WindowEventLoop.cpp:
        (WebCore::AbstractEventLoop::queueTask): The implementation moved from WindowEventLoop to AbstractEventLoop.
        (WebCore::AbstractEventLoop::suspend): Removed.
        (WebCore::AbstractEventLoop::resumeGroup): Ditto.
        (WebCore::AbstractEventLoop::stopGroup): Ditto.
        (WebCore::WindowEventLoop::scheduleToRun): Renamed from WindowEventLoop::scheduleToRunIfNeeded.
        (WebCore::AbstractEventLoop::scheduleToRunIfNeeded): Extracted from WindowEventLoop::scheduleToRunIfNeeded.
        (WebCore::WindowEventLoop::isContextThread const): Added.
        (WebCore::AbstractEventLoop::run): The implementation moved from WindowEventLoop to AbstractEventLoop.
        (WebCore::AbstractEventLoop::clearAllTasks): Added.
        (WebCore::EventLoopFunctionDispatchTask): Added; A subclass of EventLoopTask to call a function.
        (WebCore::EventLoopFunctionDispatchTask::EventLoopFunctionDispatchTask): Added.
        (WebCore::EventLoopTaskGroup::queueTask): Added.
        * dom/WindowEventLoop.h:
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::enqueueTask):
        * testing/Internals.cpp:
        (WebCore::Internals::queueTask):
        * workers/WorkerEventLoop.cpp:
        (WebCore::WorkerEventLoop::WorkerEventLoop):
        (WebCore::WorkerEventLoop::queueTask): Deleted.
        (WebCore::WorkerEventLoop::activeDOMObjectName const): Deleted.
        (WebCore::WorkerEventLoop::suspend): Deleted.
        (WebCore::WorkerEventLoop::resume): Deleted.
        (WebCore::WorkerEventLoop::stop): Deleted.
        (WebCore::WorkerEventLoop::scheduleToRun): Extracted from scheduleToRunIfNeeded.
        (WebCore::WorkerEventLoop::scheduleToRunIfNeeded): Deleted.
        (WebCore::WorkerEventLoop::run): Deleted.
        (WebCore::WorkerEventLoop::isContextThread const): Added.
        * workers/WorkerEventLoop.h:
        (WebCore::WorkerEventLoop): This class is no longer an active DOM object. WorkerGlobalScope and WorkerGlobalScope
        manually stop the task group associated with it.
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::eventLoop): Create the default task group for this script execution context.
        (WebCore::WorkerGlobalScope::prepareForTermination): Stop the default task group.
        * workers/WorkerGlobalScope.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::prepareForDestruction): Similar to WorkerGlobalScope::prepareForTermination.
        (WebCore::WorkletGlobalScope::eventLoop): Similar to WorkerGlobalScope::eventLoop.
        * worklets/WorkletGlobalScope.h:

2019-11-18  Antti Koivisto  <antti@apple.com>

        Move RuleSet to Style namespace
        https://bugs.webkit.org/show_bug.cgi?id=204307

        Reviewed by Zalan Bujtas.

        Also move RuleFeature.
        Move to style/ directory.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSDefaultStyleSheets.cpp:
        (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
        (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
        * css/CSSDefaultStyleSheets.h:
        * css/CSSStyleRule.cpp:
        (WebCore::CSSStyleRule::setSelectorText):
        * css/ElementRuleCollector.cpp:
        (WebCore::MatchRequest::MatchRequest):
        (WebCore::ElementRuleCollector::ElementRuleCollector):
        (WebCore::ElementRuleCollector::addMatchedRule):
        (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
        (WebCore::ElementRuleCollector::matchUARules):
        (WebCore::ElementRuleCollector::ruleMatches):
        (WebCore::ElementRuleCollector::collectMatchingRulesForList):
        (WebCore::ElementRuleCollector::hasAnyMatchingRules):
        * css/ElementRuleCollector.h:
        * css/PageRuleCollector.cpp:
        (WebCore::PageRuleCollector::matchPageRules):
        * css/PageRuleCollector.h:
        * css/StyleSheetContents.cpp:
        (WebCore::StyleSheetContents::parserAppendRule):
        (WebCore::StyleSheetContents::wrapperInsertRule):
        * style/RuleFeature.cpp: Renamed from Source/WebCore/css/RuleFeature.cpp.
        * style/RuleFeature.h: Renamed from Source/WebCore/css/RuleFeature.h.
        * style/RuleSet.cpp: Renamed from Source/WebCore/css/RuleSet.cpp.
        (WebCore::Style::computeContainsUncommonAttributeSelector):
        (WebCore::Style::RuleData::RuleData):
        (WebCore::Style::RuleSet::addChildRules):
        (WebCore::Style::RuleSet::addRulesFromSheet):
        * style/RuleSet.h: Renamed from Source/WebCore/css/RuleSet.h.
        * style/StyleInvalidator.h:

2019-11-18  Alex Christensen  <achristensen@webkit.org>

        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
        https://bugs.webkit.org/show_bug.cgi?id=204159
        <rdar://problem/45894288>

        Reviewed by Darin Adler.

        * platform/network/cocoa/ResourceResponseCocoa.mm:
        (WebCore::ResourceResponse::platformCertificateInfo const):

2019-11-18  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Fix getTotalLength() and getPointAtLength() for optimized rect and ellipse renderers
        https://bugs.webkit.org/show_bug.cgi?id=204213

        Reviewed by Simon Fraser.

        If the renderer does not create a Path to draw the shape, we need to create
        a temporary Path from the SVGElement then use it to answer the questions
        of these functions and finally delete it.

        * platform/graphics/Path.cpp:
        (WebCore::Path::traversalStateAtLength const):
        (WebCore::Path::pointAtLength const):
        No need for the 'success'. It is never used.

        (WebCore::Path::normalAngleAtLength const): Deleted.
        This function is not used.

        * platform/graphics/Path.h:
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::updateShapeFromElement):
        Creating the Path from the SVGELement is moved to createPath().

        (WebCore::RenderSVGShape::getTotalLength const):
        (WebCore::RenderSVGShape::getPointAtLength const):
        Create a temporary Path if the renderer draws the shape without creating
        the Path.

        (WebCore::RenderSVGShape::createPath const):
        * rendering/svg/RenderSVGShape.h:

        * rendering/svg/SVGTextLayoutEngine.cpp:
        (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::buildTransformForProgress):
        Use PathTraversalState.success() to check instead of getting the same
        value through an argument to traversalStateAtLength().

2019-11-18  Zalan Bujtas  <zalan@apple.com>

        Block layout invalidation logic triggers excessive layout on height percentage descendants
        https://bugs.webkit.org/show_bug.cgi?id=204255
        rdar://problem/57236490

        Reviewed by Simon Fraser.

        This patch attempts to optimize the height percentage invalidation logic by skipping boxes with out-of-flow ancestors.

        The normal box invalidation logic works at the parent-child level (a.k.a when the parent is dirty it walks its direct
        children list and marks them dirty if needed). However percent height values require containing block-child type of invalidation
        which atm we manage using RenderBlock's percentHeightDescendantsMap (this map contains all the height percentage descendants).
        As part of this extra invalidation logic, the block container always marks all of these height descendants dirty.
        In certain cases, this leads to excessive and unnecessary layouts, since the
        "walk the ancestor chain and mark boxes dirty all the way to the RenderView" code ends up descending back to these height percentage boxes
        marking entire subtrees dirty.

        We could optimize it slightly by checking if there's a height percentage containing block in the ancestor chain.
        In such cases, we know that the descendant's height used value computation will eventually stop at this out-of-flow containing block.

        Test: fast/block/height-percentage-descendants-with-absolute-pos-containingblock.html

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

2019-11-18  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Add support for Clipboard.writeText()
        https://bugs.webkit.org/show_bug.cgi?id=204287
        <rdar://problem/57270440>

        Reviewed by Tim Horton.

        Implements the `writeText` method on Clipboard.

        Tests: editing/async-clipboard/clipboard-write-text-requires-user-gesture.html
               editing/async-clipboard/clipboard-write-text.html

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::shouldProceedWithClipboardWrite):

        Move this helper function further up the file.

        (WebCore::Clipboard::writeText):

        Implement the API, by populating a single PasteboardCustomData and writing it to the system clipboard.

2019-11-18  Antoine Quint  <graouts@apple.com>

        Return value of CSSPropertyAnimation::blendProperties() isn't used anywhere
        https://bugs.webkit.org/show_bug.cgi?id=204299

        Reviewed by Dean Jackson.

        There is no code calling CSSPropertyAnimation::blendProperties() that uses its returen value, so we change
        that function to return void. Also, since this function contains the only call site to
        CSSPropertyBlendingClient::isAccelerated(), we delete that function too.

        * animation/CSSPropertyBlendingClient.h:
        * animation/KeyframeEffect.h:
        (WebCore::KeyframeEffect::isAccelerated const):
        * page/animation/AnimationBase.h:
        (WebCore::AnimationBase::isAccelerated const):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::CSSPropertyAnimation::blendProperties):
        * page/animation/CSSPropertyAnimation.h:

2019-11-18  Antti Koivisto  <antti@apple.com>

        Rename DocumentRuleSets to Style::ScopeRuleSets
        https://bugs.webkit.org/show_bug.cgi?id=204301

        Reviewed by Zalan Bujtas.

        The current name is misleading, these objects are per style scope, not per document.
        Also switch to Style namespace and directory.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ElementRuleCollector):
        * css/ElementRuleCollector.h:
        * css/PageRuleCollector.h:
        (WebCore::PageRuleCollector::PageRuleCollector):
        * style/AttributeChangeInvalidation.h:
        * style/ClassChangeInvalidation.h:
        * style/StyleInvalidationFunctions.h:
        * style/StyleResolver.h:
        (WebCore::Style::Resolver::ruleSets):
        (WebCore::Style::Resolver::ruleSets const):
        * style/StyleScopeRuleSets.cpp: Renamed from Source/WebCore/css/DocumentRuleSets.cpp.
        (WebCore::Style::ScopeRuleSets::ScopeRuleSets):
        (WebCore::Style::ScopeRuleSets::~ScopeRuleSets):
        (WebCore::Style::ScopeRuleSets::userAgentMediaQueryStyle const):
        (WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
        (WebCore::Style::ScopeRuleSets::userStyle const):
        (WebCore::Style::ScopeRuleSets::initializeUserStyle):
        (WebCore::Style::ScopeRuleSets::collectRulesFromUserStyleSheets):
        (WebCore::Style::ScopeRuleSets::resetAuthorStyle):
        (WebCore::Style::ScopeRuleSets::resetUserAgentMediaQueryStyle):
        (WebCore::Style::ScopeRuleSets::appendAuthorStyleSheets):
        (WebCore::Style::ScopeRuleSets::collectFeatures const):
        (WebCore::Style::ScopeRuleSets::classInvalidationRuleSets const):
        (WebCore::Style::ScopeRuleSets::attributeInvalidationRuleSets const):
        (WebCore::Style::ScopeRuleSets::hasComplexSelectorsForStyleAttribute const):
        * style/StyleScopeRuleSets.h: Renamed from Source/WebCore/css/DocumentRuleSets.h.
        (WebCore::Style::ScopeRuleSets::features const):
        (WebCore::Style::ScopeRuleSets::mutableFeatures):
        * style/StyleSharingResolver.cpp:
        (WebCore::Style::SharingResolver::SharingResolver):
        * style/StyleSharingResolver.h:

2019-11-18  Benjamin Nham  <nham@apple.com>

        Delete unused visually non-empty methods from FrameView
        https://bugs.webkit.org/show_bug.cgi?id=204303

        Reviewed by Zalan Bujtas.

        FrameView's updateIsVisuallyNonEmpty and updateSignificantRenderedTextMilestoneIfNeeded
        methods are in its header, but aren't implemented or used. Remove them.

        * page/FrameView.h:

2019-11-18  Simon Fraser  <simon.fraser@apple.com>

        Fix alpha value rounding to match the CSS Color spec
        https://bugs.webkit.org/show_bug.cgi?id=203597
        <rdar://problem/56728546>

        Reviewed by Tim Horton.
        
        The serialization of CSS color alpha values is described at https://drafts.csswg.org/cssom/#serializing-css-values,
        so implement that. Use 255 as the multiplication factor for float alpha values in the fast and slow
        parser code paths.
        
        Based on Chromium commit 13a86c2faeebcbc12dd4a7e8dea54318da635c19.

        Tested by WPT and fast/css tests.

        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::parseColorIntOrPercentage):
        (WebCore::parseAlphaValue):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
        * platform/graphics/Color.cpp:
        (WebCore::Color::cssText const):
        * rendering/shapes/Shape.cpp:
        (WebCore::Shape::createRasterShape): Alpha rounding for shapes has to match alpha rounding for colors.

2019-11-18  Antti Koivisto  <antti@apple.com>

        Move StyleResolver to Style namespace
        https://bugs.webkit.org/show_bug.cgi?id=204294

        Reviewed by Zalan Bujtas.

        Most subparts are already in Style namespace.

        Also rename it to Style::Resolver and move files to WebCore/style subdirectory.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::updateBlendingKeyframes):
        * css/DOMCSSRegisterCustomProperty.cpp:
        (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
        * css/DocumentRuleSets.cpp:
        (WebCore::DocumentRuleSets::DocumentRuleSets):
        (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
        (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
        * css/DocumentRuleSets.h:
        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::evaluate const):
        * css/MediaQueryEvaluator.h:
        * css/PageRuleCollector.h:
        (WebCore::PageRuleCollector::PageRuleCollector):
        * css/RuleSet.cpp:
        (WebCore::RuleSet::addChildRules):
        (WebCore::RuleSet::addRulesFromSheet):
        * css/RuleSet.h:
        * dom/Document.cpp:
        (WebCore::Document::userAgentShadowTreeStyleResolver):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::styleResolver):
        (WebCore::Element::resolveStyle):
        (WebCore::Element::resolveCustomStyle):
        * dom/Element.h:
        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::mergeStyleFromRules):
        (WebCore::EditingStyle::removeStyleFromRulesAndContext):
        (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::focusedOrActiveStateChanged):
        * html/shadow/SliderThumbElement.cpp:
        (WebCore::SliderThumbElement::resolveCustomStyle):
        (WebCore::SliderContainerElement::resolveCustomStyle):
        * html/shadow/SliderThumbElement.h:
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::TextControlInnerContainer::resolveCustomStyle):
        (WebCore::TextControlInnerElement::resolveCustomStyle):
        (WebCore::TextControlInnerTextElement::resolveCustomStyle):
        (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
        * html/shadow/TextControlInnerElements.h:
        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
        (WebCore::InspectorCSSAgent::buildObjectForRule):
        (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
        * inspector/agents/InspectorCSSAgent.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::getMatchedCSSRules const):
        * page/Page.cpp:
        (WebCore::Page::updateStyleAfterChangeInEnvironment):
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::animate):
        * rendering/RenderTheme.h:
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::changeRequiresLayerRepaint const):
        * rendering/style/RenderStyle.h:
        * style/StyleResolver.cpp: Renamed from Source/WebCore/css/StyleResolver.cpp.
        (WebCore::Style::Resolver::Resolver):
        (WebCore::Style::Resolver::addCurrentSVGFontFaceRules):
        (WebCore::Style::Resolver::appendAuthorStyleSheets):
        (WebCore::Style::Resolver::addKeyframeStyle):
        (WebCore::Style::Resolver::~Resolver):
        (WebCore::Style::Resolver::State::State):
        (WebCore::Style::Resolver::State::setStyle):
        (WebCore::Style::Resolver::State::setParentStyle):
        (WebCore::Style::Resolver::builderContext):
        (WebCore::Style::Resolver::styleForElement):
        (WebCore::Style::Resolver::styleForKeyframe):
        (WebCore::Style::Resolver::isAnimationNameValid):
        (WebCore::Style::Resolver::keyframeStylesForAnimation):
        (WebCore::Style::Resolver::pseudoStyleForElement):
        (WebCore::Style::Resolver::styleForPage):
        (WebCore::Style::Resolver::defaultStyleForElement):
        (WebCore::Style::Resolver::styleRulesForElement):
        (WebCore::Style::Resolver::pseudoStyleRulesForElement):
        (WebCore::Style::Resolver::invalidateMatchedDeclarationsCache):
        (WebCore::Style::Resolver::clearCachedDeclarationsAffectedByViewportUnits):
        (WebCore::Style::Resolver::applyMatchedProperties):
        (WebCore::Style::Resolver::addViewportDependentMediaQueryResult):
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByViewportChange const):
        (WebCore::Style::Resolver::addAccessibilitySettingsDependentMediaQueryResult):
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByAccessibilitySettingsChange const):
        (WebCore::Style::Resolver::addAppearanceDependentMediaQueryResult):
        (WebCore::Style::Resolver::hasMediaQueriesAffectedByAppearanceChange const):
        * style/StyleResolver.h: Renamed from Source/WebCore/css/StyleResolver.h.
        (WebCore::Style::ElementStyle::ElementStyle):
        (WebCore::Style::Resolver::hasSelectorForAttribute const):
        (WebCore::Style::Resolver::hasSelectorForId const):
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::resolver):
        (WebCore::Style::Scope::resolverIfExists):
        (WebCore::Style::Scope::analyzeStyleSheetChange):
        (WebCore::Style::invalidateHostAndSlottedStyleIfNeeded):
        (WebCore::Style::Scope::updateActiveStyleSheets):
        (WebCore::Style::Scope::updateResolver):
        (WebCore::Style::Scope::scheduleUpdate):
        (WebCore::Style::Scope::evaluateMediaQueriesForViewportChange):
        (WebCore::Style::Scope::evaluateMediaQueriesForAccessibilitySettingsChange):
        (WebCore::Style::Scope::evaluateMediaQueriesForAppearanceChange):
        (WebCore::Style::Scope::updateStyleResolver): Deleted.
        * style/StyleScope.h:
        * style/StyleSharingResolver.cpp:
        (WebCore::Style::elementHasDirectionAuto):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::Scope::Scope):
        (WebCore::Style::TreeResolver::Scope::~Scope):
        (WebCore::Style::TreeResolver::styleForElement):
        (WebCore::Style::TreeResolver::resolveElement):
        (WebCore::Style::TreeResolver::resolvePseudoStyle):
        (WebCore::Style::TreeResolver::resolve):
        * style/StyleTreeResolver.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::resolveCustomStyle):
        * svg/SVGElement.h:
        
2019-11-18  Chris Dumez  <cdumez@apple.com>

        REGRESSION (r252497): Multiple mediacapturefromelement tests are crashing on mac debug
        https://bugs.webkit.org/show_bug.cgi?id=204267
        <rdar://problem/57248130>

        Reviewed by Eric Carlson.

        No new tests, covered by fast/mediacapturefromelement/CanvasCaptureMediaStream-creation.html.

        * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
        (WebCore::CanvasCaptureMediaStreamTrack::activeDOMObjectName const):
        (WebCore::CanvasCaptureMediaStreamTrack::clone):
        We were failing to call suspendIfNeeded() on the track after constructing it.

        * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
        * Modules/mediastream/MediaStreamTrack.h:

        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::assertSuspendIfNeededWasCalled const):
        Add logging when the suspendIfNeeded assertion fails to facilitate debugging such issues
        in the future.

2019-11-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Force rebuild layout tree on tree mutation
        https://bugs.webkit.org/show_bug.cgi?id=204295
        <rdar://problem/57283650>

        Reviewed by Antti Koivisto.

        This should evolve into a fine grained tree invalidation. 

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::attachToRenderElementInternal):
        (WebCore::RenderTreeBuilder::detachFromRenderElement):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2019-11-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Do not collect inline items multiple times
        https://bugs.webkit.org/show_bug.cgi?id=204296
        <rdar://problem/57283761>

        Reviewed by Antti Koivisto.

        When inline layout is preceded by preferred width computation, we don't need to re-collect the inline items again. 

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded):
        (WebCore::Layout::InlineFormattingContext::collectInlineContent): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:

2019-11-18  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, fix build (again) for a11y disabled, after r252417.

        * accessibility/AXObjectCache.h:
        (WebCore::AXObjectCache::rootObject):

2019-11-17  Ryosuke Niwa  <rniwa@webkit.org>

        Focusing a shadow host which delegates focus should skip inner shadow hosts which delegate focus
        https://bugs.webkit.org/show_bug.cgi?id=203869

        Reviewed by Antti Koivisto.

        Fixed the bug that WebKit doesn't skip a shadow host with delegatesFocus set when looking for
        the first programatically focusable element.

        Test: imported/w3c/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html

        * dom/Element.cpp:
        (WebCore::shadowRootWithDelegatesFocus): Added.
        (WebCore::isProgramaticallyFocusable): Updated to return false on a shadow host with delegatesFocus.
        (WebCore::Element::focus): Don't move the focus if the shadow host only contains a focused element
        per https://github.com/w3c/webcomponents/issues/840.

2019-11-17  Zalan Bujtas  <zalan@apple.com>

        [LFC] Move layout state initialization out of LayoutContext
        https://bugs.webkit.org/show_bug.cgi?id=204285
        <rdar://problem/57262858>

        Reviewed by Antti Koivisto.

        Move layout initialization to FrameViewLayoutContext::layoutUsingFormattingContext. This is now pretty close to
        what the final initialization will look like.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::initializeLayoutState): Deleted.
        (WebCore::Layout::LayoutContext::runLayout): Deleted.
        (WebCore::Layout::LayoutContext::runLayoutAndVerify): Deleted.
        (WebCore::Layout::LayoutContext::createLayoutState): Deleted.
        * layout/LayoutContext.h:
        (WebCore::Layout::LayoutContext::layoutState):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::LayoutState):
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::root const):
        (WebCore::Layout::LayoutState::rootRenderer const):
        (WebCore::Layout::LayoutState::setQuirksMode):
        (WebCore::Layout::LayoutState::layoutBoxForRenderer const): Deleted.
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::LayoutTreeContent::LayoutTreeContent):
        (WebCore::Layout::TreeBuilder::buildLayoutTree):
        (WebCore::Layout::TreeBuilder::buildTree):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * layout/layouttree/LayoutTreeBuilder.h:
        (WebCore::Layout::LayoutTreeContent::rootLayoutBox const):
        (WebCore::Layout::LayoutTreeContent::rootLayoutBox):
        (WebCore::Layout::LayoutTreeContent::rootRenderer const):
        (WebCore::Layout::LayoutTreeContent::layoutBoxForRenderer):
        (WebCore::Layout::LayoutTreeContent::addLayoutBoxForRenderer):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
        (WebCore::FrameViewLayoutContext::invalidateLayoutTreeContent):
        * page/FrameViewLayoutContext.h:
        (WebCore::FrameViewLayoutContext::layoutTreeContent const):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2019-11-17  Zalan Bujtas  <zalan@apple.com>

        [LFC] Pass in the content area to LayoutContext::layout
        https://bugs.webkit.org/show_bug.cgi?id=204284
        <rdar://problem/57262690>

        Reviewed by Antti Koivisto.

        Note that we never layout the root box. It has to have an already computed geometry (in case of ICB, it's the view geometry).

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        (WebCore::Layout::LayoutContext::runLayout):
        (WebCore::Layout::LayoutContext::runLayoutAndVerify):
        * layout/LayoutContext.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):

2019-11-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][Out-of-flow] Collect out-of-flow boxes lazily
        https://bugs.webkit.org/show_bug.cgi?id=204282
        <rdar://problem/57259302>

        Reviewed by Antti Koivisto.

        Eventually we need to turn it into a register-self as boxes are being inserted.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        (WebCore::Layout::FormattingContext::collectOutOfFlowDescendantsIfNeeded):
        * layout/FormattingContext.h:
        * layout/LayoutContext.cpp:
        (WebCore::Layout::initializeLayoutState):

2019-11-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Add support for simple inline invalidation
        https://bugs.webkit.org/show_bug.cgi?id=204268
        <rdar://problem/57248995>

        Reviewed by Antti Koivisto.

        Eventually invalidateFormattingState() will take care of cleaning up the state based on the current InvalidationState.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::invalidateFormattingState):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::resetInlineRuns):

2019-11-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Optimize Line::isVisuallyEmpty for the most common inline content.
        https://bugs.webkit.org/show_bug.cgi?id=204259
        <rdar://problem/57243610>

        Reviewed by Antti Koivisto.

        Move the check on text content to the front.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::isVisuallyEmpty const):

2019-11-16  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] [UIWKDocumentContext] Add the ability to request all marked text rects
        https://bugs.webkit.org/show_bug.cgi?id=204278
        <rdar://problem/56527803>

        Reviewed by Tim Horton.

        Mark a constructor as WEBCORE_EXPORT. See WebKit ChangeLog for more details.

        * editing/TextIterator.h:

2019-11-16  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, rolling out r252526.

        broke iOS and mac builds

        Reverted changeset:

        "Unreviewed, rolling out r252455."
        https://bugs.webkit.org/show_bug.cgi?id=204272
        https://trac.webkit.org/changeset/252526

2019-11-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r252455.
        https://bugs.webkit.org/show_bug.cgi?id=204272

        Broke a layout-test on iOS (Requested by aakashja_ on
        #webkit).

        Reverted changeset:

        "[Web Animations] Retargeted transitions targeting accelerated
        properties do not stop the original transition"
        https://bugs.webkit.org/show_bug.cgi?id=204116
        https://trac.webkit.org/changeset/252455

2019-11-15  Chris Dumez  <cdumez@apple.com>

        REGRESSION (r252497): Multiple mediacapturefromelement tests are crashing on mac debug
        https://bugs.webkit.org/show_bug.cgi?id=204267
        <rdar://problem/57248130>

        Reviewed by Alexey Proskuryakov.

        Make sure the CanvasCaptureMediaStreamTrack factory function calls suspendIfNeeded()
        since the class inhehits ActiveDOMObject.

        * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
        (WebCore::CanvasCaptureMediaStreamTrack::create):

2019-11-15  Eric Carlson  <eric.carlson@apple.com>

        Don't use AVCapture on watchOS and tvOS
        https://bugs.webkit.org/show_bug.cgi?id=204254
        <rdar://problem/45508044>

        Reviewed by Youenn Fablet.

        * Configurations/FeatureDefines.xcconfig:

2019-11-15  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Audio capture fails when a track is unmuted
        https://bugs.webkit.org/show_bug.cgi?id=204202
        <rdar://problem/57005820>

        Reviewed by Jer Noble.

        No new tests, this fixes an API test broken by r252470.

        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::setMuted):

2019-11-15  Myles C. Maxfield  <mmaxfield@apple.com>

        [Apple] Enable variation fonts on all Apple platforms
        https://bugs.webkit.org/show_bug.cgi?id=198100

        Reviewed by Simon Fraser.

        * Configurations/FeatureDefines.xcconfig:

2019-11-15  Chris Fleizach  <cfleizach@apple.com>

        AX: Update style of lambda in isolated tree
        https://bugs.webkit.org/show_bug.cgi?id=204233
        <rdar://problem/57232085>

        Reviewed by Darin Adler.

        Remove unnecessary & capture and Optional<AXID>.

        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::objectAttributeValue const):
        (WebCore::AXIsolatedObject::rectAttributeValue const):
        (WebCore::AXIsolatedObject::doubleAttributeValue const):
        (WebCore::AXIsolatedObject::unsignedAttributeValue const):
        (WebCore::AXIsolatedObject::boolAttributeValue const):
        (WebCore::AXIsolatedObject::stringAttributeValue const):
        (WebCore::AXIsolatedObject::intAttributeValue const):

2019-11-15  Jer Noble  <jer.noble@apple.com>

        CRASH in SourceBuffer::removeCodedFrames()
        https://bugs.webkit.org/show_bug.cgi?id=204248

        Reviewed by Eric Carlson.

        Speculative fix for rare crash. It's possible that the startTime and endTime inputs to
        removeCodedFrames() are out-of-order, which could lead to iterating off the end of the
        SampleMap. Verify that startTime < endTime and bail out early if not true.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removeCodedFrames):

2019-11-14  Ryosuke Niwa  <rniwa@webkit.org>

        JS wrappers of scroll event targets can get prematurely collected by GC
        https://bugs.webkit.org/show_bug.cgi?id=204219

        Reviewed by Keith Miller.

        This patch addresses the bug that the JS wrappers of the pending scroll event targets can be
        collected by GC before scroll events are fired. This bug has always existed but it's worse after
        r252205 because there is more of a time delay between an element is scrolled in RenderLayer sense
        and when the corresponding scroll event is fired on the element.

        Fixed the bug by using GCReachableRef to store the pending scroll event targets introduced in r252205
        to keep the JS wrappers of those elements & document alive.

        Test: fast/scrolling/scrolling-event-target-gc.html

        * dom/Document.cpp:
        (WebCore::Document::PendingScrollEventTargetList): Added. Wraps Vector<GCReachableRef<ContainerNode>>
        to avoid including GCReachableRef.h in Document.h.
        (WebCore::Document::commonTeardown): Clear m_pendingScrollEventTargetList to avoid document leaks.
        (WebCore::Document::addPendingScrollEventTarget):
        (WebCore::Document::runScrollSteps):
        * dom/Document.h:

2019-11-15  Jer Noble  <jer.noble@apple.com>

        Unreviewed Mojave build fix after r252501; wrap calls to AVContentKeyRequest.options in
        ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN / ALLOW_NEW_API_WITHOUT_GUARDS_END.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::initTypeForRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):

2019-11-15  Jer Noble  <jer.noble@apple.com>

        REGRESSION(r251895) - 'sinf' init data flow generates 'cenc' style encrypted messages
        https://bugs.webkit.org/show_bug.cgi?id=204239
        <rdar://problem/57166445>

        Reviewed by Eric Carlson.

        Track what kind of initialization data was used for a given AVContentKeyRequest, and
        generate that initialiazation data type of MediaKeySession message.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::keyIDsForRequest):
        (WebCore::initTypeForRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestDidSucceed):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::nextRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::lastKeyRequest const):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyStatuses const):

2019-11-15  Chris Dumez  <cdumez@apple.com>

        Regression: http/tests/navigation/page-cache-getUserMedia-pending-promise.html is crashing in Debug
        https://bugs.webkit.org/show_bug.cgi?id=204232

        Reviewed by Eric Carlson.

        No new tests, covered by http/tests/navigation/page-cache-getUserMedia-pending-promise.html.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::create):
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        Call suspendIfNeeded() in the factory and not in the constructor. It is never safe to call
        suspendIfNeeded() from inside the constructor because it may call the suspend() method, which
        may ref |this|.

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        Queue a task on the HTML event loop when the user media request is approved. This way, if the
        page is suspended when this happens, we delay constructing the media stream (among other things)
        until the page actually resumes.

2019-11-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Reuse FrameViewLayoutContext::m_layoutState for incremental layout
        https://bugs.webkit.org/show_bug.cgi?id=204225
        <rdar://problem/57227259>

        Reviewed by Antti Koivisto.

        Let's rely on the invalidation logic instead of reconstructing the layout state on each layout frame. 

        * layout/LayoutContext.cpp:
        (WebCore::Layout::initializeLayoutState):
        (WebCore::Layout::LayoutContext::runLayoutAndVerify):
        (WebCore::Layout::LayoutContext::createLayoutState):
        * layout/LayoutContext.h:
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::rootRenderer const):
        * layout/Verification.cpp:
        (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
        * page/FrameViewLayoutContext.h:
        (WebCore::FrameViewLayoutContext::layoutFormattingState const):
        (WebCore::FrameViewLayoutContext::initialLayoutState const): Deleted.
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2019-11-15  Simon Fraser  <simon.fraser@apple.com>

        The image is flashing if falls out and has an animation transform: rotate
        https://bugs.webkit.org/show_bug.cgi?id=203613

        Reviewed by Antti Koivisto.
        
        Code added in r218735 that maps the animation extent through the current animating transform
        worked for translations, but not rotation where anchor point matters. This matrix
        needs to take anchor point into account.

        Shared some code that applies anchor point to a matrix.

        Test: compositing/backing/backing-store-attachment-with-rotation.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::layerTransform const):
        (WebCore::GraphicsLayerCA::transformByApplyingAnchorPoint const):
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
        * platform/graphics/ca/GraphicsLayerCA.h:

2019-11-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Introduce LayoutBox::updateStyle
        https://bugs.webkit.org/show_bug.cgi?id=204224
        <rdar://problem/57226354>

        Reviewed by Antti Koivisto.

        This is in preparation for being able to do incremental layouts on partial style change (currently we re-build the tree on each layout frame).

        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::layoutBoxForRenderer const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::updateStyle):
        * layout/layouttree/LayoutBox.h:
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRendererStyle):

2019-11-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Add a temporary RenderObject to Layout::Box map
        https://bugs.webkit.org/show_bug.cgi?id=204218
        <rdar://problem/57215201>

        Reviewed by Antti Koivisto.

        LayoutTreeContent::renderObjectToLayoutBox map enables us to find the associated Layout::Box when style changes on a renderer.
        This is temporary until after we implement fully integrate LFC with the style system.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::runLayoutAndVerify):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::LayoutState):
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::root const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::buildLayoutTree):
        (WebCore::Layout::LayoutTreeContent::LayoutTreeContent):
        (WebCore::Layout::TreeBuilder::TreeBuilder):
        (WebCore::Layout::TreeBuilder::buildTree):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::TreeBuilder::buildTableStructure):
        (WebCore::Layout::TreeBuilder::buildSubTree):
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        (WebCore::Layout::TreeBuilder::createLayoutTree): Deleted.
        (WebCore::Layout::TreeBuilder::createTableStructure): Deleted.
        (WebCore::Layout::TreeBuilder::createSubTree): Deleted.
        * layout/layouttree/LayoutTreeBuilder.h:

2019-11-15  Rob Buis  <rbuis@igalia.com>

        IDL: remove [PrimaryGlobal]
        https://bugs.webkit.org/show_bug.cgi?id=180469

        Reviewed by Sam Weinig.

        Remove support for [PrimaryGlobal] from the code
        generator and the existing IDL.

        * bindings/scripts/CodeGeneratorJS.pm:
        (IsGlobalOrPrimaryGlobalInterface):
        * page/DOMWindow.idl:
        * page/RemoteDOMWindow.idl:

2019-11-14  Wenson Hsieh  <wenson_hsieh@apple.com>

        Crash when setting HTMLInputElement.checked for a disconnected radio button in a shadow root
        https://bugs.webkit.org/show_bug.cgi?id=204208
        <rdar://problem/57045830>

        Reviewed by Tim Horton.

        r251110 refactored logic in RadioButtonGroup::updateCheckedState, such that it assumes that m_nameToGroupMap
        always contains an entry for the given input element's name. Prior to r251110, it would bail if m_nameToGroupMap
        didn't exist. In this particular case, a named input element is added to a shadow root that is disconnected from
        the document. This means that in HTMLInputElement::didFinishInsertingNode(), we will avoid adding the element to
        the radio button group, even though it has a tree scope due to the `isConnected()` check.

        Later, when we try to set the `checked` attribute, we invoke updateCheckedState which sees that we have a tree
        scope and assumes that we must have previously added the input element to the radio button map; this leads to a
        nullptr deref, as the map is empty. Thus, to fix this, we change the `isConnected()` check to `isInTreeScope()`.

        Test: fast/forms/radio-input-in-shadow-root-crash.html

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::didFinishInsertingNode):

2019-11-14  Jiewen Tan  <jiewen_tan@apple.com>

        Unreviewed, update the feature status of WebAuthn

        * features.json:

2019-11-07  Youenn Fablet  <youenn@apple.com> and Thibault Saunier <tsaunier@igalia.com>

        Update libwebrtc to M78
        https://bugs.webkit.org/show_bug.cgi?id=203897

        Reviewed by Eric Carlson.

        Update include paths and binding code.
        Covered by existing tests.

        * Modules/mediastream/RTCStatsReport.idl:
        Removed no longer standard codec stat.
        * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
        * Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
        (WebCore::fillInboundRTPStreamStats):
        (WebCore::fillOutboundRTPStreamStats):
        (WebCore::fillRTCCodecStats):
        * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
        * platform/mediastream/RealtimeIncomingAudioSource.h:
        * platform/mediastream/RealtimeIncomingVideoSource.h:
        * platform/mediastream/RealtimeOutgoingAudioSource.h:
        * platform/mediastream/RealtimeOutgoingVideoSource.h:
        * platform/mediastream/gstreamer/GStreamerCapturer.cpp:
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
        * platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.h:
        * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
        * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
        * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::BasicPacketSocketFactory::CreateClientTcpSocket):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
        * testing/MockLibWebRTCPeerConnection.cpp:
        * testing/MockLibWebRTCPeerConnection.h:

2019-11-14  Eric Carlson  <eric.carlson@apple.com>

        [iOS] Audio capture fails when a track is unmuted
        https://bugs.webkit.org/show_bug.cgi?id=204202
        <rdar://problem/57005820>

        Reviewed by Youenn Fablet.

        Tested manually.

        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::canProduceAudioChanged): Remove unused "client" parameter.
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged): Ditto.
        * platform/audio/PlatformMediaSessionManager.h:

        * platform/audio/cocoa/MediaSessionManagerCocoa.h:
        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
        (MediaSessionManagerCocoa::sessionCanProduceAudioChanged): Ditto.

        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::setMuted): Change m_muted before calling start/stop so the
        muted method will return the correct value.

        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::startInternal): Call sessionCanProduceAudioChanged before
        starting the audio unit so the audio session category is set correctly. ASSERT if the
        audio session category is incorrect.
        
        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::startProducingData): Ditto.

2019-11-14  Said Abou-Hallawa  <sabouhallawa@apple.com>

        The CSSParser should not consume negative or unit-less lengths for the SVG properties 'r', 'rx' and 'ry'
        https://bugs.webkit.org/show_bug.cgi?id=204200

        Reviewed by Simon Fraser.

        Both the CSSParser and SVGElement::parseAttribute() should be consistent
        when parsing these properties.

        The type of these properties is <length-percentage>, which requires specifying
        the unit for the length: https://www.w3.org/TR/css-values/#length-value.

        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::isSimpleLengthPropertyID):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeRxOrRy):
        (WebCore::CSSPropertyParser::parseSingleValue):

2019-11-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Skip non-dirty out-of-flow boxes.
        https://bugs.webkit.org/show_bug.cgi?id=204196

        Reviewed by Antti Koivisto.

        Use the InvalidationState to decide whether the current out-of-flow box needs layout.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):

2019-11-14  Antoine Quint  <graouts@apple.com>

        [Web Animations] Accelerated transitions do not always remove their backing accelerated animation
        https://bugs.webkit.org/show_bug.cgi?id=204198
        <rdar://problem/45847205>

        Reviewed by Dean Jackson.

        Test: webanimations/accelerated-animation-removal-upon-transition-completion.html

        There could be several calls to KeyframeEffect::updateAcceleratedAnimationState() made after an animation had completed but
        before any pending accelerated actions would be processed during the next animation frame. In the first call, we would correctly
        set add Accelerated::Stop to the list of pending accelerated actions, but on a further call, wrongly assuming that the fact that
        we'd already recorded an Accelerated::Stop action meant that it had been committed, we would clear that action and the animation
        would never be explicitly removed.

        Additionally, we would schedule animation resolution on the DocumentTimeline in the wrong function, we now do that in the function
        where animations with an effect pending accelerated actions is added rather than in the function where we track which elements have
        accelerated animations.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::animationAcceleratedRunningStateDidChange):
        (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::updateAcceleratedAnimationState):

2019-11-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Use InvalidationState to populate LayoutQueue
        https://bugs.webkit.org/show_bug.cgi?id=204191
        <rdar://problem/57179614>

        Reviewed by Antti Koivisto.

        Start using the InvalidationState in BlockFormattingContext::layoutInFlowContent() to filter out
        non-dirty boxes (currently InvalidationState returns true for every box).

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h: InvalidationState should not be const as we keep adding additional dirty boxes during layout.
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        * layout/LayoutContext.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/invalidation/InvalidationState.cpp:
        (WebCore::Layout::InvalidationState::needsLayout const):
        * layout/invalidation/InvalidationState.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        * layout/tableformatting/TableFormattingContext.h:

2019-11-14  Chris Fleizach  <cfleizach@apple.com>

        AX: Implement isolated tree support for math objects
        https://bugs.webkit.org/show_bug.cgi?id=204056
        <rdar://problem/57054644>

        Reviewed by Zalan Bujtas.

        Implement isolated tree support for math objects.
        Add a method for setting and getting objects.

        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::AXIsolatedObject):
        (WebCore::AXIsolatedObject::create):
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::setObjectProperty):
        (WebCore::AXIsolatedObject::objectAttributeValue const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:

2019-11-14  Antoine Quint  <graouts@apple.com>

        [Web Animations] Retargeted transitions targeting accelerated properties do not stop the original transition
        https://bugs.webkit.org/show_bug.cgi?id=204116
        <rdar://problem/57116961>

        Reviewed by Dean Jackson.

        Test: webanimations/css-transition-in-flight-reversal-accelerated.html

        There were two problems with the reversal of in-flight transitions targeting accelerated properties. The first issue
        was that the animated value for the accelerated property would be missing from the before-change style since animating
        acceelerated properties do not update RenderStyle while running. As such, we would not detect the need to reverse a
        transition, but rather simply cancel the initial transition with no new transition to reverse its effect, since the
        value in the before-change and after-change styles were the same. We now fix this by figuring out whether the running
        transition for that property is accelerated in AnimationTimeline::updateCSSTransitionsForElementAndProperty() and
        applying the animated value to the before-change style.

        The second issue was that canceling an accelerated transition had no visible effect since the accelerated animation
        was not stopped. We now have a new AnimationEffect::animationWasCanceled() virtual method which KeyframeEffect overrides
        to add AcceleratedAction::Stop to the list of pending acceleration actions for this effect. We also ensure that the document
        timeline knows to run DocumentTimeline::updateAnimationsAndSendEvents() if there are pending accelerated actions, even if
        there aren't any animations waiting to be resolved, since a single canceled transition would prevent this method from
        completing.

        * animation/AnimationEffect.h:
        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::removeAnimation):
        (WebCore::DocumentTimeline::scheduleAnimationResolution):
        (WebCore::DocumentTimeline::shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState const):
        (WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
        (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
        * animation/DocumentTimeline.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::animationWasCanceled):
        * animation/KeyframeEffect.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::cancel):

2019-11-13  Nikolas Zimmermann  <nzimmermann@igalia.com>

        Fix GTK/WPE builds after enabling POINTER_EVENTS support
        https://bugs.webkit.org/show_bug.cgi?id=204164

        Reviewed by Žan Doberšek.

        Our g++ 8.3.0 yields "error: call to non-constexpr function
        WTFReportAssertionFailure" when compiling rendering/EventRegion.cpp
        since r252366.

        Turn both toTouchAction() / toIndex() into static inline instead of
        constexpr functions to appease g++ 8.3.0.

        * rendering/EventRegion.cpp:
        (WebCore::toIndex):
        (WebCore::toTouchAction):

2019-11-13  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Add support for Clipboard.write()
        https://bugs.webkit.org/show_bug.cgi?id=204078
        <rdar://problem/57087756>

        Reviewed by Ryosuke Niwa.

        This patch adds support for the write() method on Clipboard, forgoing sanitization for now (this will be added
        in the next patch). See below for more details.

        Tests: editing/async-clipboard/clipboard-change-data-while-writing.html
               editing/async-clipboard/clipboard-write-basic.html
               editing/async-clipboard/clipboard-write-items-twice.html

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::~Clipboard):
        (WebCore::shouldProceedWithClipboardWrite):
        (WebCore::Clipboard::write):

        Implement this method by creating a new ItemWriter and loading data from all the ClipboardItems that are being
        written. If the previous writer is still in progress, make sure that we invalidate it first (rejecting the
        promise) before proceeding.

        (WebCore::Clipboard::didResolveOrReject):
        (WebCore::Clipboard::ItemWriter::ItemWriter):
        (WebCore::Clipboard::ItemWriter::write):
        (WebCore::Clipboard::ItemWriter::invalidate):
        (WebCore::Clipboard::ItemWriter::setData):
        (WebCore::Clipboard::ItemWriter::didSetAllData):
        (WebCore::Clipboard::ItemWriter::reject):

        Introduce a private helper class to collect clipboard data for writing from a list of ClipboardItems, and
        resolve or reject the given promise when finished.

        * Modules/async-clipboard/Clipboard.h:
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::createItemProviderRegistrationList):

        Fix a stray bug where the empty string could not be read back as plain text or URLs from the platform pasteboard
        on iOS. This is exercised by the new layout test clipboard-write-basic.html.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::write):

        Address another issue where we would sometimes try and declare the empty string as a pasteboard type when
        writing to the platform pasteboard. While benign in a real NSPasteboard, there's no reason to include it in this
        list of declared pasteboard types.

2019-11-13  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2] Add the 'orient' property of the interface SVGMarkerElement
        https://bugs.webkit.org/show_bug.cgi?id=203646

        Reviewed by Simon Fraser.

        This patch does the following:

        1. Adding the 'orient' property of the interface SVGMarkerElement:
           The specs link is:
           https://www.w3.org/TR/SVG2/painting.html#InterfaceSVGMarkerElement

        2. Keeping the pair properties <orientAngle, orientType> in sync when
           when one of them changes to keep them in consistent state.

        3. Setting the value of SVGMarkerOrientAutoStartReverse: The specs
           https://www.w3.org/TR/SVG2/painting.html#__svg__SVGMarkerElement__orient
           says that when setting the 'orient' attribute to "auto-start-reverse",
           the value of orientType should be SVG_MARKER_ORIENT_UNKNOWN. Therefore
           SVGMarkerOrientAutoStartReverse has to be equal to SVGMarkerOrientUnknown.

        * svg/SVGAngle.h:
        (WebCore::SVGAngle::unitType const):
        (WebCore::SVGAngle::valueForBindings const):
        (WebCore::SVGAngle::valueInSpecifiedUnits const):
        (WebCore::SVGAngle::unitType): Deleted.
        (WebCore::SVGAngle::valueForBindings): Deleted.
        (WebCore::SVGAngle::valueInSpecifiedUnits): Deleted.
        Make these functions const.

        * svg/SVGElement.cpp:
        (WebCore::SVGElement::commitPropertyChange):
        Calling SVGPropertyRegistry::setAnimatedPropertDirty() to set the dirty
        flag of the animated  property through its accessor.

        * svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::orient const):
        (WebCore::SVGMarkerElement::setOrient):
        Add the new property handlers.

        (WebCore::SVGMarkerElement::setOrientToAuto):
        (WebCore::SVGMarkerElement::setOrientToAngle):
        Fix the bug of not setting the unitType of the SVGAngle in orientAngle.

        * svg/SVGMarkerElement.h:
        Delete unused enum value SVG_MARKER_ORIENT_AUTOSTARTREVERSE.

        * svg/SVGMarkerElement.idl:

        * svg/SVGMarkerTypes.h:
        (WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue):
        (WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue): Deleted.
        Fix the value of SVGMarkerOrientAutoStartReverse. No need for 
        highestExposedEnumValue() since all the enum values are now exposed.

        * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
        Keep the pair properties <orientAngle, orientType> in sync.

        * svg/properties/SVGMemberAccessor.h:
        (WebCore::SVGMemberAccessor::setDirty const):
        This is what SVGElement::commitPropertyChange() used to do for all properties.

        * svg/properties/SVGPropertyOwnerRegistry.h:
        * svg/properties/SVGPropertyRegistry.h:

2019-11-13  Jer Noble  <jer.noble@apple.com>

        Link mediaDataLoadsAutomatically setting to AutoplayPolicy
        https://bugs.webkit.org/show_bug.cgi?id=201738
        <rdar://problem/55315194>

        Reviewed by Eric Carlson.

        This change has two effects: on Mac, when the embedding app sets an AutoplayPolicy to
        deny autoplay, this will also deny the ability to load media data beyond "preload"; on iOS
        when the embedding app sets an AutoplayPolicy to allow autoplay, this will also allow media
        data to load beyond "preload".

        * dom/Document.cpp:
        (WebCore::Document::mediaDataLoadsAutomatically const):
        * dom/Document.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::finishInitialization):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::allowsAutomaticMediaDataLoading const):

2019-11-13  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOM.highlightSelector should work for "a:visited"
        https://bugs.webkit.org/show_bug.cgi?id=146161
        <rdar://problem/21467303>

        Reviewed by Antti Koivisto.

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::highlightSelector):
        Rather than use `document.querySelectorAll`, which doesn't match pseudo-selectors, attempt
        to mimic how CSS actually matches nodes.

        * rendering/style/RenderStyleConstants.h:
        (WebCore::PseudoIdSet::remove): Added.

2019-11-13  Myles C. Maxfield  <mmaxfield@apple.com>

        [Mac] Fix build
        https://bugs.webkit.org/show_bug.cgi?id=204136

        Reviewed by Alex Christensen.

        Remove deprecation warnings.

        * platform/ios/ScrollViewIOS.mm:
        (WebCore::ScrollView::platformSetCanBlitOnScroll):
        (WebCore::ScrollView::platformCanBlitOnScroll const):
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::platformSetCanBlitOnScroll):
        (WebCore::ScrollView::platformCanBlitOnScroll const):
        * platform/mac/WidgetMac.mm:
        (WebCore::Widget::paint):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const):
        (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const):
        (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const):
        (WebCore::RenderThemeMac::systemColor const):
        (WebCore::paintAttachmentTitleBackground):

2019-11-13  Benjamin Nham  <nham@apple.com>

        VeryHigh priority loads are actually loading at VeryLow priority
        https://bugs.webkit.org/show_bug.cgi?id=203423
        <rdar://problem/56621789>

        Reviewed by Antti Koivisto.

        There are two issues with the way we translate ResourceLoadPriority to
        CFURLRequestPriority:

        1. We call _CFNetworkHTTPConnectionCacheSetLimit and set 1 too few
        priority levels. This means VeryHigh priority loads are actually out
        of bounds, which causes CFNetwork to set the priority level back to 0
        in HTTPConnectionCacheEntry::_prepareNewRequest. After this patch we'll
        call _CFNetworkHTTPConnectionCacheSetLimit with the correct number of
        levels.

        2. _CFNetworkHTTPConnectionCacheSetLimit doesn't work for NSURLSession
        right now (<rdar://problem/56621205>), so we have to map to the default
        number of CFURLRequestPriority levels, which is 4. Right now we have 5
        ResourceLoadPriority levels, so there will be some aliasing involved.
        After this patch VeryLow gets a priority of -1 and Low gets a priority
        of 0, but due to the aforementioned clamping behavior both VeryLow and
        Low will effectively both have a CFURLRequestPriority of 0.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::initializeMaximumHTTPConnectionCountPerHost):
        (WebCore::initializeHTTPConnectionSettingsOnStartup):
        * platform/network/cf/ResourceRequestCFNet.h:
        (WebCore::toResourceLoadPriority):
        (WebCore::toPlatformRequestPriority):

2019-11-13  Dean Jackson  <dino@apple.com>

        Fix some WebGPU demos
        https://bugs.webkit.org/show_bug.cgi?id=204167
        <rdar://problem/57160316>

        Reviewed by Myles C. Maxfield.

        Add a note referencing a bug I detected while fixing this demo.
        And a drive-by typo.

        * Modules/webgpu/WebGPUBuffer.cpp:
        (WebCore::WebGPUBuffer::rejectOrRegisterPromiseCallback):
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::copyBufferToTexture):

2019-11-13  Antti Koivisto  <antti@apple.com>

        Google Docs spreadsheet tiles render very slowly (because of event region painting)
        https://bugs.webkit.org/show_bug.cgi?id=204160
        <rdar://problem/57073401>

        Reviewed by Simon Fraser.

        Content of a overflow:scroll area on this page doesn't cover the entire scrollable area and we end
        up generating a complex shape for the event region. This is unnecessary as touches within scrollers
        always scroll the content.

        Test: fast/scrolling/ios/event-region-scrolled-contents-layer.html

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

        Initialize event region for scrolled contents layer with layer-sized event region. This optimizes away
        event region mutations. We still need to to do the event region paint to capture touch-action regions.

        In future we should also improve Region type to not have pathological worst-case performance with complex
        shapes.

2019-11-13  Andres Gonzalez  <andresg_22@apple.com>

        AXObjectCache::rootObject should generate the isolated tree.
        https://bugs.webkit.org/show_bug.cgi?id=204131

        Reviewed by Chris Fleizach.

        No new tests, no change in functionality.

        AXObjectCache::rootObject now returns an AccessibilityObject or an
        IsolatedObject. This makes it possible for client code to use the
        isolated tree seamlessly, as long as the client call happens on a
        secondary thread. This allows WKTR AccessibilityController to use the
        isolated tree in LayoutTests.
        
        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::clientSupportsIsolatedTree):
        (WebCore::AXObjectCache::rootObject):
        (WebCore::AXObjectCache::createIsolatedTreeHierarchy):
        (WebCore::AXObjectCache::generateIsolatedTree):
        (WebCore::AXObjectCache::rootWebArea):
        (WebCore::AXObjectCache::createIsolatedAccessibilityTreeHierarchy): Renamed.
        (WebCore::AXObjectCache::generateIsolatedAccessibilityTree): renamed.
        * accessibility/AXObjectCache.h:

2019-11-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][Invalidation] Introduce InvalidationState and Context
        https://bugs.webkit.org/show_bug.cgi?id=204140
        <rdar://problem/57142106>

        Reviewed by Antti Koivisto.

        InvalidationContext take style/content changes and turn them into "dirty layout boxes" (stored in InvalidationState).
        InvalidationState is the input to the (partial)subsequent layout.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/Invalidation.h: Removed.
        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
        (WebCore::Layout::LayoutContext::runLayout):
        (WebCore::Layout::LayoutContext::styleChanged): Deleted.
        (WebCore::Layout::LayoutContext::markNeedsUpdate): Deleted.
        * layout/LayoutContext.h:
        (WebCore::Layout::LayoutContext::updateAll): Deleted.
        * layout/blockformatting/BlockInvalidation.cpp: Removed.
        * layout/blockformatting/BlockInvalidation.h: Removed.
        * layout/invalidation/InvalidationContext.cpp: Renamed from Source/WebCore/layout/inlineformatting/InlineInvalidation.cpp.
        (WebCore::Layout::InvalidationContext::InvalidationContext):
        (WebCore::Layout::InvalidationContext::styleChanged):
        (WebCore::Layout::InvalidationContext::contentChanged):
        (WebCore::Layout::InvalidationContext::subtreeChanged):
        * layout/invalidation/InvalidationContext.h: Renamed from Source/WebCore/layout/inlineformatting/InlineInvalidation.h.
        * layout/invalidation/InvalidationState.cpp: Renamed from Source/WebCore/layout/tableformatting/TableInvalidation.cpp.
        (WebCore::Layout::InvalidationState::InvalidationState):
        (WebCore::Layout::InvalidationState::markNeedsUpdate):
        * layout/invalidation/InvalidationState.h: Renamed from Source/WebCore/layout/tableformatting/TableInvalidation.h.
        (WebCore::Layout::InvalidationState::formattingContextRoots const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):

2019-11-13  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r252402.
        https://bugs.webkit.org/show_bug.cgi?id=204157

        This change broke the iOS and macOS build (Requested by
        aakashja_ on #webkit).

        Reverted changeset:

        "Unreviewed, fix GTK/WPE builds after enabling POINTER_EVENTS
        support."
        https://trac.webkit.org/changeset/252402

2019-11-13  Nikolas Zimmermann  <nzimmermann@igalia.com>

        Unreviewed, fix GTK/WPE builds after enabling POINTER_EVENTS support.

        Our g++ 8.3.0 yields "error: call to non-constexpr function
        WTFReportAssertionFailure" when compiling rendering/EventRegion.cpp
        since r252366.

        Simply remove the ASSERT_NOT_REACHED() from toIndex(): a missing value
        in the switch statement will be caught by compiler warnings. Remove the
        constexpr flag from toTouchAction(): in this case, the
        ASSERT_NOT_REACHED() is useful and should stay.

        Rubber-stamped by Philippe Normand.

        * rendering/EventRegion.cpp:
        (WebCore::toIndex): Remove call to ASSERT_NOT_REACHED().
        (WebCore::toTouchAction): Keep ASSERT_NOT_REACHED(), removed constexpr.

2019-11-13  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, fix build for accessibility disabled.

        * accessibility/AXObjectCache.h:
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::attachWrapper):
        (WebCore::AXObjectCache::postNotification):
        (WebCore::AXObjectCache::postPlatformNotification):
        (WebCore::AXObjectCache::characterOffsetForIndex):
        * accessibility/AccessibilityObject.h:
        (WebCore::AccessibilityObject::children):
        (WebCore::AccessibilityObject::updateBackingStore):

2019-11-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>

        [GStreamer] Several issues while trying to play a video on NextCloud
        https://bugs.webkit.org/show_bug.cgi?id=203194

        Reviewed by Philippe Normand.

        First problem was the loader not being restarted in PAUSED, so
        sometimes playback never started since buffering never reached
        100%.

        Then, after investigating blocksizes and not being a viable
        solution, reducing the 200_ms to 100_ms wait for new data was the
        trick to avoid choppyness.

        During investigation several issues were fixed like turning
        GstQuery* into GRefPtr for MediaPlayerPrivateGStreamer::buffered,
        making blocksize unsigned instead of uint64_t as it is in
        GStreamer and creating and using WEBKIT_WEB_SRC_CAST since many
        uses of WEBKIT_WEB_SRC cast were already protected by
        WEBKIT_IS_WEB_SRC.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::buffered const): GRefPtr<GstQuery>.
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck const):
        Use WEBKIT_WEB_SRC_CAST.
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcCreate): Reduce wait for data down to 100_ms and
        request download restart also in PAUSED.
        (CachedResourceStreamingClient::checkUpdateBlocksize): Turn
        blocksize to unsigned.
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Add
        WEBKIT_WEB_SRC_CAST.

2019-11-13  Rob Buis  <rbuis@igalia.com>

        Support stale-while-revalidate cache strategy
        https://bugs.webkit.org/show_bug.cgi?id=201461

        Reviewed by Youenn Fablet.

        Start parsing the stale-while-revalidate Cache-Control directive
        and expose it on ResourceResponse.

        Tests: imported/w3c/web-platform-tests/fetch/stale-while-revalidate/fetch-sw.https.html
               imported/w3c/web-platform-tests/fetch/stale-while-revalidate/fetch.html
               imported/w3c/web-platform-tests/fetch/stale-while-revalidate/stale-css.html
               imported/w3c/web-platform-tests/fetch/stale-while-revalidate/stale-image.html
               imported/w3c/web-platform-tests/fetch/stale-while-revalidate/stale-script.html

        * platform/network/CacheValidation.cpp:
        (WebCore::parseCacheControlDirectives):
        * platform/network/CacheValidation.h:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::cacheControlStaleWhileRevalidate const):
        * platform/network/ResourceResponseBase.h:

2019-11-12  Simon Fraser  <simon.fraser@apple.com>

        Move CSSUnitType enum to its own file
        https://bugs.webkit.org/show_bug.cgi?id=204139

        Reviewed by Antti Koivisto.

        Pull CSSUnitType and CSSUnitCategory enums into their own file, since more future
        code will use them and not CSSPrimitiveValue.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSPrimitiveValue.cpp:
        (WebCore::unitCategory): Deleted.
        * css/CSSPrimitiveValue.h:
        * css/CSSUnits.cpp: Added.
        (WebCore::unitCategory):
        * css/CSSUnits.h: Added.

2019-11-12  Simon Fraser  <simon.fraser@apple.com>

        Convert CSSPrimitiveValue::UnitType to an enum class, and cleanup
        https://bugs.webkit.org/show_bug.cgi?id=204101

        Reviewed by Antti Koivisto.
        
        Move CSSPrimitiveValue::UnitType to a standalone enum class CSSUnitType, and
        CSSPrimitiveVallue::UnitCategory to CSSUnitCategory; these are going to more extensive
        use in calc() and in the CSS OM.
        
        Remove some comments about quirky units behavior which is now the standard behavior.
        
        The compiler warned about some units not handled in CSSPrimitiveValue::formatNumberForCustomCSSText()
        and CSSPrimitiveValue::equals() which may reveal bugs; assert for now.

        * css/CSSCalculationValue.cpp:
        (WebCore::calcUnitCategory):
        (WebCore::hasDoubleValue):
        (WebCore::CSSCalcOperation::createSimplified):
        (WebCore::CSSCalcOperation::primitiveType const):
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        (WebCore::createBlendHalf):
        (WebCore::createCSS):
        (WebCore::unitCategory): Deleted.
        * css/CSSCalculationValue.h:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForImageSliceSide):
        (WebCore::valueForNinePieceImageQuad):
        (WebCore::zoomAdjustedPixelValue):
        (WebCore::zoomAdjustedNumberValue):
        (WebCore::valueForReflection):
        (WebCore::percentageOrZoomAdjustedValue):
        (WebCore::matrixTransformValue):
        (WebCore::adjustLengthForZoom):
        (WebCore::ComputedStyleExtractor::valueForFilter):
        (WebCore::specifiedValueForGridTrackBreadth):
        (WebCore::specifiedValueForGridTrackSize):
        (WebCore::OrderedNamedLinesCollector::appendLines const):
        (WebCore::valueForGridPosition):
        (WebCore::createTransitionPropertyValue):
        (WebCore::delayValue):
        (WebCore::durationValue):
        (WebCore::textUnderlineOffsetToCSSValue):
        (WebCore::textDecorationThicknessToCSSValue):
        (WebCore::altTextToCSSValue):
        (WebCore::contentToCSSValue):
        (WebCore::counterToCSSValue):
        (WebCore::ComputedStyleExtractor::fontNonKeywordWeightFromStyleValue):
        (WebCore::ComputedStyleExtractor::fontNonKeywordStretchFromStyleValue):
        (WebCore::ComputedStyleExtractor::fontNonKeywordStyleFromStyleValue):
        (WebCore::fontShorthandValueForSelectionProperties):
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSCrossfadeValue.cpp:
        (WebCore::CSSCrossfadeValue::blend const):
        * css/CSSCustomPropertyValue.cpp:
        (WebCore::CSSCustomPropertyValue::customCSSText const):
        * css/CSSFontFace.cpp:
        (WebCore::calculateItalicRange):
        * css/CSSFontStyleValue.h:
        * css/CSSGradientValue.cpp:
        (WebCore::compareStops):
        (WebCore::CSSGradientValue::computeStops):
        (WebCore::appendGradientStops):
        (WebCore::CSSLinearGradientValue::createGradient):
        (WebCore::CSSConicGradientValue::createGradient):
        * css/CSSImageValue.cpp:
        (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper const):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::isValidCSSUnitTypeForDoubleConversion):
        (WebCore::isStringType):
        (WebCore::unitCategory):
        (WebCore::CSSPrimitiveValue::primitiveType const):
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::init):
        (WebCore::CSSPrimitiveValue::cleanup):
        (WebCore::CSSPrimitiveValue::computeDegrees const):
        (WebCore::CSSPrimitiveValue::computeLengthDouble const):
        (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
        (WebCore::CSSPrimitiveValue::setFloatValue):
        (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
        (WebCore::CSSPrimitiveValue::getFloatValue const):
        (WebCore::CSSPrimitiveValue::doubleValue const):
        (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
        (WebCore::CSSPrimitiveValue::doubleValueInternal const):
        (WebCore::CSSPrimitiveValue::setStringValue):
        (WebCore::CSSPrimitiveValue::getStringValue const):
        (WebCore::CSSPrimitiveValue::stringValue const):
        (WebCore:: const):
        (WebCore::CSSPrimitiveValue::getRGBColorValue const):
        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
        (WebCore::CSSPrimitiveValue::equals const):
        (WebCore::CSSPrimitiveValue::collectDirectComputationalDependencies const):
        (WebCore::CSSPrimitiveValue::collectDirectRootComputationalDependencies const):
        (WebCore::CSSPrimitiveValue::unitCategory): Deleted.
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::isAngle const):
        (WebCore::CSSPrimitiveValue::isFontRelativeLength):
        (WebCore::CSSPrimitiveValue::isLength):
        (WebCore::CSSPrimitiveValue::isResolution):
        (WebCore::CSSPrimitiveValue::createAllowingMarginQuirk):
        (WebCore::CSSPrimitiveValue::computeTime const):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator short const):
        (WebCore::CSSPrimitiveValue::operator unsigned short const):
        (WebCore::CSSPrimitiveValue::operator int const):
        (WebCore::CSSPrimitiveValue::operator unsigned const):
        (WebCore::CSSPrimitiveValue::operator float const):
        (WebCore::CSSPrimitiveValue::operator LineClampValue const):
        (WebCore::CSSPrimitiveValue::operator ColumnFill const):
        (WebCore::CSSPrimitiveValue::operator ColumnSpan const):
        (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle const):
        (WebCore::CSSPrimitiveValue::operator ImageOrientation const):
        * css/CSSStyleDeclaration.cpp:
        (WebCore::CSSStyleDeclaration::namedItem):
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
        * css/CSSValue.h:
        * css/CSSValuePool.cpp:
        (WebCore::CSSValuePool::CSSValuePool):
        (WebCore::CSSValuePool::createValue):
        * css/CSSValuePool.h:
        (WebCore::CSSValuePool::createValue):
        * css/DeprecatedCSSOMPrimitiveValue.cpp:
        (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
        (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
        (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue const):
        (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
        * css/DeprecatedCSSOMPrimitiveValue.h:
        * css/DeprecatedCSSOMRGBColor.h:
        * css/MediaQueryEvaluator.cpp:
        (WebCore::doubleValue):
        (WebCore::evaluateResolution):
        * css/MediaQueryExpression.cpp:
        (WebCore::featureWithValidIdent):
        * css/SVGCSSComputedStyleDeclaration.cpp:
        (WebCore::glyphOrientationToCSSPrimitiveValue):
        (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
        (WebCore::ComputedStyleExtractor::svgPropertyValue):
        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::asText const):
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::parseSimpleLength):
        (WebCore::parseSimpleAngle):
        (WebCore::parseSimpleLengthValue):
        (WebCore::parseColorIntOrPercentage):
        (WebCore::fastParseColorInternal):
        (WebCore::parseTransformTranslateArguments):
        (WebCore::parseTransformAngleArgument):
        (WebCore::parseTransformNumberArguments):
        * css/parser/CSSParserToken.cpp:
        (WebCore::cssPrimitiveValueUnitFromTrie):
        (WebCore::stringToUnitType):
        (WebCore::CSSParserToken::CSSParserToken):
        (WebCore::CSSParserToken::convertToPercentage):
        * css/parser/CSSParserToken.h:
        (WebCore::CSSParserToken::unitType const):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::consumeTransformOrigin):
        (WebCore::consumeFontStyle):
        (WebCore::consumeFontStyleRange):
        (WebCore::consumeCounter):
        (WebCore::consumeAnimationName):
        (WebCore::consumePerspective):
        (WebCore::consumePositionLonghand):
        (WebCore::consumeAttr):
        (WebCore::consumeCounterContent):
        (WebCore::consumeReflect):
        (WebCore::consumeGridBreadth):
        (WebCore::CSSPropertyParser::consumeSystemFont):
        (WebCore::CSSPropertyParser::consumeFlex):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::CalcParser::consumeInteger):
        (WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):
        (WebCore::CSSPropertyParserHelpers::consumeInteger):
        (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
        (WebCore::CSSPropertyParserHelpers::consumeLength):
        (WebCore::CSSPropertyParserHelpers::consumePercent):
        (WebCore::CSSPropertyParserHelpers::consumeAngle):
        (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
        (WebCore::CSSPropertyParserHelpers::consumeTime):
        (WebCore::CSSPropertyParserHelpers::consumeResolution):
        (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
        (WebCore::CSSPropertyParserHelpers::consumeString):
        (WebCore::CSSPropertyParserHelpers::consumeUrl):
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientPoint):
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
        (WebCore::CSSPropertyParserHelpers::consumeCrossFade):
        (WebCore::CSSPropertyParserHelpers::consumeImageSet):
        (WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
        * css/parser/MediaQueryParser.cpp:
        (WebCore::MediaQueryParser::readFeatureValue):
        * css/parser/SizesAttributeParser.cpp:
        (WebCore::SizesAttributeParser::computeLength):
        (WebCore::SizesAttributeParser::effectiveSizeDefaultValue):
        * css/parser/SizesAttributeParser.h:
        * css/typedom/StylePropertyMapReadOnly.cpp:
        (WebCore::StylePropertyMapReadOnly::reifyValue):
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::setInlineStyleProperty):
        (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
        * dom/StyledElement.h:
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        (WebCore::ApplyStyleCommand::computedFontSize):
        * editing/EditingStyle.cpp:
        (WebCore::legacyFontSizeFromCSSValue):
        * editing/FontAttributeChanges.cpp:
        (WebCore::FontChanges::createStyleProperties const):
        (WebCore::cssValueListForShadow):
        * editing/cocoa/HTMLConverter.mm:
        (stringFromCSSValue):
        (floatValueFromPrimitiveValue):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::applyBorderAttributeToStyle):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::collectStyleForPresentationAttribute):
        * html/HTMLHRElement.cpp:
        (WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute):
        * html/HTMLInputElement.cpp:
        (WebCore::autoFillStrongPasswordMaskImage):
        * html/HTMLMeterElement.cpp:
        (WebCore::HTMLMeterElement::didElementStateChange):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::collectStyleForPresentationAttribute):
        (WebCore::HTMLTableElement::createSharedCellStyle):
        * html/ValidationMessage.cpp:
        (WebCore::adjustBubblePosition):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::setPosition):
        (WebCore::MediaControlPanelElement::makeOpaque):
        (WebCore::MediaControlPanelElement::makeTransparent):
        (WebCore::MediaControlTextTrackContainerElement::updateTextStrokeStyle):
        (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation):
        * html/shadow/ProgressShadowElement.cpp:
        (WebCore::ProgressValueElement::setWidthPercentage):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::TextControlInnerElement::resolveCustomStyle):
        * html/shadow/mac/ImageControlsButtonElementMac.cpp:
        (WebCore::ImageControlsButtonElementMac::tryCreate):
        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
        (WebCore::TextTrackCueGeneric::setFontSize):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::applyCSSProperties):
        (WebCore::VTTCue::getDisplayTree):
        * html/track/VTTRegion.cpp:
        (WebCore::VTTRegion::displayLastTextTrackCueBox):
        (WebCore::VTTRegion::willRemoveTextTrackCueBox):
        (WebCore::VTTRegion::prepareRegionDisplayTree):
        * page/DragController.cpp:
        (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret):
        * page/PrintContext.cpp:
        (WebCore::PrintContext::computedPageMargin):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::crossfadeBlend):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::resize):
        * rendering/RenderThemeIOS.mm:
        (WebCore::applyCommonButtonPaddingToStyle):
        (WebCore::RenderThemeIOS::adjustButtonStyle const):
        * style/StyleBuilderConverter.h:
        (WebCore::Style::BuilderConverter::convertNumber):
        (WebCore::Style::BuilderConverter::convertWebkitHyphenateLimitLines):
        (WebCore::Style::BuilderConverter::convertClipPath):
        (WebCore::Style::BuilderConverter::convertTextStrokeWidth):
        (WebCore::Style::BuilderConverter::convertFontStyleFromValue):
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::mmLength):
        (WebCore::Style::BuilderCustom::inchLength):
        (WebCore::Style::BuilderCustom::applyValueImageResolution):
        * svg/SVGLengthValue.cpp:
        (WebCore::primitiveTypeToLengthType):
        (WebCore::lengthTypeToPrimitiveType):

2019-11-12  Keith Miller  <keith_miller@apple.com>

        AudioScheduledSourceNodes leak if they have an attached onended EventTarget
        https://bugs.webkit.org/show_bug.cgi?id=204087
        <rdar://problem/56772102>

        Reviewed by Jer Noble.

        Previously, if an AudioNode had any attributes that were event
        targets we would leak the node as long as the AudioContext was
        alive. This patch makes all the AudioNodes with EventTarget
        attributes subclasses of ActiveDOMObject. For,
        AudioScheduledSourceNodes we will mark the node as non-active when
        either the node becomes eligible for deletion from the graph or
        the onended event fires. For, ScriptProcessorNodes we mark the
        node as non-active when the node becomes eligible for deletion.

        Tests: webaudio/finished-audio-buffer-source-nodes-should-be-collectable.html
               webaudio/audiobuffersource-not-gced-until-ended.html

        * Modules/webaudio/AudioBufferSourceNode.cpp:
        (WebCore::AudioBufferSourceNode::startLater):
        (WebCore::AudioBufferSourceNode::start): Deleted.
        * Modules/webaudio/AudioBufferSourceNode.h:
        * Modules/webaudio/AudioBufferSourceNode.idl:
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/AudioNode.cpp:
        (WebCore::AudioNode::deref):
        (WebCore::AudioNode::finishDeref):
        * Modules/webaudio/AudioNode.h:
        (WebCore::AudioNode::didBecomeMarkedForDeletion):
        * Modules/webaudio/AudioNode.idl:
        * Modules/webaudio/AudioScheduledSourceNode.cpp:
        (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
        (WebCore::AudioScheduledSourceNode::startLater):
        (WebCore::AudioScheduledSourceNode::stopLater):
        (WebCore::AudioScheduledSourceNode::didBecomeMarkedForDeletion):
        (WebCore::AudioScheduledSourceNode::finish):
        (WebCore::AudioScheduledSourceNode::start): Deleted.
        (WebCore::AudioScheduledSourceNode::stop): Deleted.
        (WebCore::AudioScheduledSourceNode::addEventListener): Deleted.
        (WebCore::AudioScheduledSourceNode::removeEventListener): Deleted.
        (WebCore::AudioScheduledSourceNode::removeAllEventListeners): Deleted.
        * Modules/webaudio/AudioScheduledSourceNode.h:
        * Modules/webaudio/OscillatorNode.h:
        * Modules/webaudio/OscillatorNode.idl:
        * Modules/webaudio/ScriptProcessorNode.cpp:
        (WebCore::ScriptProcessorNode::ScriptProcessorNode):
        (WebCore::ScriptProcessorNode::~ScriptProcessorNode):
        (WebCore::ScriptProcessorNode::didBecomeMarkedForDeletion):
        (WebCore::ScriptProcessorNode::process):
        (WebCore::ScriptProcessorNode::addEventListener): Deleted.
        (WebCore::ScriptProcessorNode::removeEventListener): Deleted.
        (WebCore::ScriptProcessorNode::removeAllEventListeners): Deleted.
        * Modules/webaudio/ScriptProcessorNode.h:
        * Modules/webaudio/ScriptProcessorNode.idl:
        * Sources.txt:
        * bindings/js/JSAudioNodeCustom.cpp: Removed.

2019-11-12  Zalan Bujtas  <zalan@apple.com>

        [LFC] InlineFormattingState::addInlineRun should take a unique_ptr<Display::Run>
        https://bugs.webkit.org/show_bug.cgi?id=204099
        <rdar://problem/57102586>

        Reviewed by Antti Koivisto.

        It's rather wasteful to create a Display::Run just to pass it in to InlineFormattingState::addInlineRun.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::addInlineRun):

2019-11-12  Antti Koivisto  <antti@apple.com>

        Skip matched declarations cache only for length resolution affecting font properties
        https://bugs.webkit.org/show_bug.cgi?id=204098

        Reviewed by Zalan Bujtas.

        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::equalForLengthResolution):

        Put this next to the length resolution function, hopefully helping to keep them in sync.

        * css/CSSPrimitiveValue.h:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyMatchedProperties):

        Replace test for font declaration change with a narrower test that only looks for those properties that affect length resolution.

        * style/MatchedDeclarationsCache.cpp:
        (WebCore::Style::MatchedDeclarationsCache::Entry::isUsableAfterHighPriorityProperties const):

        Factor into function.

        * style/MatchedDeclarationsCache.h:

2019-11-12  Peng Liu  <peng.liu6@apple.com>

        Picture-in-Picture events are not fired if we switch the Picture-in-Picture mode through modern media controls
        https://bugs.webkit.org/show_bug.cgi?id=203933

        Reviewed by Eric Carlson.

        When the Picture-in-Picture API is not available, we need to call webkitSetPresentationMode()
        of the video element to implement the picture-in-picture feature.

        No new tests, covered by test: media/modern-media-controls/pip-support/pip-support-click.html

        * Modules/modern-media-controls/media/pip-support.js:
        (PiPSupport.prototype.buttonWasPressed):

2019-11-13  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r249434): flashy menus on wellsfargo.com
        https://bugs.webkit.org/show_bug.cgi?id=204175
        <rdar://problem/56654512>

        Reviewed by Zalan Bujtas.

        Test: compositing/backing/backing-for-clipping.html
        
        r249434 made overflow an "indirect compositing reason" (i.e. we composite for overflow:hidden
        when necessary to clip a composited descendant). However this made a clause in RenderLayerCompositor::requiresOwnBackingStore()
        return early when this reason is set, skipping the bounds check, so we need to do the bound check first.
        This is similar to the fix in r252070.

        The change to the perspective test relates to the "FIXME"; we don't use the correct ancestor for the
        bounds check, so sometimes layers can have backing store when they don't need it until that's fixed.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):

2019-11-11  Per Arne Vollan  <pvollan@apple.com>

        Many legacy animation tests are timing out with VS2019
        https://bugs.webkit.org/show_bug.cgi?id=204000

        Reviewed by Brent Fulgham.

        When compiling with VS2019, there is a compiler issue, where an Optional without a value is returned
        when it should definitely have a value. Work around this issue by moving the local Optional value
        when returning.

        No new tests, covered by existing tests.

        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::timeToNextService):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::timeToNextService):

2019-11-11  Youenn Fablet  <youenn@apple.com>

        DOMFormData should be available in workers
        https://bugs.webkit.org/show_bug.cgi?id=176674

        Reviewed by Alex Christensen.

        Expose DOMFormData and File to workers.
        Covered by existing tests.

        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::sendBeacon):
        * Modules/fetch/FetchBody.cpp:
        (WebCore::FetchBody::bodyAsFormData const):
        * Modules/fetch/FetchBody.h:
        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::resourceRequest const):
        * fileapi/File.cpp:
        (WebCore::File::computeNameAndContentType):
        Isolate string as this might now get called from background threads.
        * fileapi/File.idl:
        * html/DOMFormData.cpp:
        (WebCore::DOMFormData::DOMFormData):
        * html/DOMFormData.idl:
        * platform/network/FormData.cpp:

2019-11-11  Youenn Fablet  <youenn@apple.com>

        Fail cross-origin redirection loads in case of CORS with redirection URLs having credentials
        https://bugs.webkit.org/show_bug.cgi?id=204036

        Reviewed by Alex Christensen.

        Update checks in SubresourceLoader according networking process.
        Make error messages consistent,
        Test: http/tests/navigation/page-cache-mediastream.html

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::validateCrossOriginRedirectionURL):
        (WebCore::isValidCrossOriginRedirectionURL): Deleted.
        * loader/CrossOriginAccessControl.h:
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):
        (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):

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

        ASSERT at PlatformCALayerCocoa::avPlayerLayer(): [platformLayer() sublayers].count == 1
        https://bugs.webkit.org/show_bug.cgi?id=204077
        <rdar://problem/56640423>

        Reviewed by Simon Fraser.

        Make PlatformCALayerCocoa::avPlayer() more robust against underlying layer changes.

        Promote WebVideoContainerLayer to its own header file and give the class a "playerLayer" property. In
        PlatformCALayerCocoa::avPlayer(), use that new property to retrieve the AVPlayerLayer.

        Drive-by fix: Make PlatformCALayerCocoa::create() return a Ref<PlatformCALayerCocoa> rather than its parent class type.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.h:
        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
        (WebCore::VideoFullscreenLayerManagerObjC::setVideoLayer):
        (-[WebVideoContainerLayer setBounds:]): Deleted.
        (-[WebVideoContainerLayer setPosition:]): Deleted.
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::create):
        (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
        (WebCore::PlatformCALayerCocoa::clone const):
        (WebCore::PlatformCALayerCocoa::avPlayerLayer const):
        * platform/graphics/ca/cocoa/WebVideoContainerLayer.h: Added.
        * platform/graphics/ca/cocoa/WebVideoContainerLayer.mm: Added.
        (-[WebVideoContainerLayer initWithPlayerLayer:]):
        (-[WebVideoContainerLayer playerLayer]):
        (-[WebVideoContainerLayer setBounds:]):
        (-[WebVideoContainerLayer setPosition:]):

2019-11-11  Antti Koivisto  <antti@apple.com>

        Always use matched declarations cache fully when parent inherited style matches
        https://bugs.webkit.org/show_bug.cgi?id=204083

        Reviewed by Zalan Bujtas.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyMatchedProperties):

        We used inheritedDataShared check here since it is always just pointer compare.
        However instrumentation shows we miss out from singificant amount of cache benefit
        due to this and the full check is not expensive.

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::inheritedEqual const):
        (WebCore::RenderStyle::inheritedNotEqual const): Deleted.

        Reverse the logic.

        (WebCore::RenderStyle::inheritedDataShared const): Deleted.

        Not used anymore.

        * rendering/style/RenderStyle.h:
        * rendering/style/SVGRenderStyle.cpp:
        (WebCore::SVGRenderStyle::inheritedEqual const):
        (WebCore::SVGRenderStyle::inheritedNotEqual const): Deleted.
        * rendering/style/SVGRenderStyle.h:
        * style/StyleChange.cpp:
        (WebCore::Style::determineChange):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::createInheritedDisplayContentsStyleIfNeeded):

2019-11-11  Antti Koivisto  <antti@apple.com>

        Empty property sets should not mark MatchedProperties uncacheable
        https://bugs.webkit.org/show_bug.cgi?id=204079

        Reviewed by Zalan Bujtas.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::addElementStyleProperties):

        Bail out if there are no incoming properties.

2019-11-11  Andy Estes  <aestes@apple.com>

        PaymentRequest / PaymentResponse should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203101
        <rdar://problem/56744409>

        Reviewed by Chris Dumez.

        Removed PaymentRequest's and PaymentResponse's override of
        ActiveDOMObject::shouldPreventEnteringBackForwardCache_DEPRECATED and implemented
        ActiveDOMObject::suspend instead.

        Tests: http/tests/paymentrequest/page-cache-closed-payment-request.https.html
               http/tests/paymentrequest/page-cache-completed-payment-response.https.html
               http/tests/paymentrequest/page-cache-created-payment-request.https.html
               http/tests/paymentrequest/page-cache-created-payment-response.https.html
               http/tests/paymentrequest/page-cache-interactive-payment-request.https.html
               http/tests/paymentrequest/page-cache-retried-payment-response.https.html

        * Modules/paymentrequest/PaymentRequest.cpp:
        (WebCore::PaymentRequest::suspend):
        (WebCore::PaymentRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/paymentrequest/PaymentRequest.h:
        * Modules/paymentrequest/PaymentResponse.cpp:
        (WebCore::PaymentResponse::suspend):
        (WebCore::PaymentResponse::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/paymentrequest/PaymentResponse.h:
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::DeferredPromise::callFunction):

2019-11-11  Youenn Fablet  <youenn@apple.com>

        Make MediaStream/MediaStreamTrack page cache friendly
        https://bugs.webkit.org/show_bug.cgi?id=204030

        Reviewed by Chris Dumez.

        Test: http/tests/navigation/page-cache-mediastream.html

        * Modules/mediastream/MediaStream.cpp:
        Remove the unnneeded opt-out of page cache in case of MediaStream.
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::suspend):
        In case of a capture track, end it at suspend time  but fire ended event at resume time.
        * Modules/mediastream/MediaStreamTrack.h:

2019-11-11  Matt Lewis  <jlewis3@apple.com>

        Unreviewed, rolling out r252076.

        This broke internal builds and tests. For more information
        discuss with your reviewers.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSProperties.json:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isPartialKeywordPropertyID): Deleted.
        * css/parser/CSSParserFastPaths.h:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        * rendering/RenderListMarker.cpp:
        (WebCore::effectiveListMarkerType):
        (WebCore::listMarkerSuffix):
        (WebCore::listMarkerText):
        (WebCore::RenderListMarker::styleDidChange):
        (WebCore::RenderListMarker::paint):
        (WebCore::RenderListMarker::updateContent):
        (WebCore::RenderListMarker::computePreferredLogicalWidths):
        (WebCore::RenderListMarker::updateMargins):
        (WebCore::RenderListMarker::suffix const):
        (WebCore::RenderListMarker::getRelativeMarkerRect):
        * rendering/style/CounterContent.h:
        (WebCore::CounterContent::CounterContent):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::initialListStylePosition):
        (WebCore::RenderStyle::listStyleStringValue const): Deleted.
        (WebCore::RenderStyle::setListStyleStringValue): Deleted.
        (WebCore::RenderStyle::initialListStyleStringValue): Deleted.
        * rendering/style/RenderStyleConstants.cpp:
        (WebCore::operator<<):
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyInheritListStyleType): Deleted.
        (WebCore::Style::BuilderCustom::applyInitialListStyleType): Deleted.
        (WebCore::Style::BuilderCustom::applyValueListStyleType): Deleted.

2019-11-11  Matt Lewis  <jlewis3@apple.com>

        Unreviewed, rolling out r252151.

        This broke internal builds and tests along with
        https://bugs.webkit.org/show_bug.cgi?id=167729#c18. For more
        information discuss with your reviewers.

        Reverted changeset:

        "Keep None value at the end of the ListStyleType enum"
        https://bugs.webkit.org/show_bug.cgi?id=203883
        https://trac.webkit.org/changeset/252151

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

        Ensure MediaRemote callback always called.
        https://bugs.webkit.org/show_bug.cgi?id=204072
        <rdar://problem/56301651>

        Reviewed by Eric Carlson.

        MediaRemote.framework will complain if the callback passed in via MRMediaRemoteAddAsyncCommandHandlerBlock()
        is not called for each invocation of the handler. Make sure we always call the completion handler, even in
        the case of unsupported commands, or if the listener object has already been destroyed.

        * platform/mac/RemoteCommandListenerMac.mm:
        (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):

2019-11-11  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] Support picture-in-picture CSS pseudo-class
        https://bugs.webkit.org/show_bug.cgi?id=203493

        Reviewed by Dean Jackson.

        Add CSS pseudo class ":picture-in-picture" for a video element in the picture-in-picture mode.

        Test: media/picture-in-picture/picture-in-picture-api-css-selector.html

        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const):
        * css/CSSSelector.h:
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::matchesPictureInPicturePseudoClass):
        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):

2019-11-11  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r251460.
        https://bugs.webkit.org/show_bug.cgi?id=204070

        This patch caused a crash due to synchronous event firing
        (Requested by jernoble on #webkit).

        Reverted changeset:

        "media/W3C/video/networkState/networkState_during_progress.html
        is flaky"
        https://bugs.webkit.org/show_bug.cgi?id=76280
        https://trac.webkit.org/changeset/251460

2019-11-11  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Line::m_trimmableRuns does not need to be a ListHashSet
        https://bugs.webkit.org/show_bug.cgi?id=204061
        <rdar://problem/57064178>

        Reviewed by Antti Koivisto.

        Switch from ListHashSet to Vector.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineLine.h:

2019-11-10  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move Line::Run's line layout specific logic to InlineItemRun
        https://bugs.webkit.org/show_bug.cgi?id=204055
        <rdar://problem/57053232>

        Reviewed by Antti Koivisto.

        Line::Run started getting a bit overloaded through supporting the line layout logic and providing the 'run' interface
        to the caller (e.g. merging multiple runs happens at the very end of the line layout, when the line is being closed. When a run
        is expanded some of the properties do not make sense anymore. It makes part of the Run's logic unnecessarily complicated).
        This patch introduces the InlineItemRun structure to support the line layout logic. We construct InlineItemRuns
        as InlineItems are getting appended to the line and when the line is getting closed, we turn them into Line::Runs (InlineItems are never merged, only Line::Runs are).

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::setExpansion):
        (WebCore::Display::Run::Run):
        (WebCore::Display::Run::TextContext::resetExpansion): Deleted.
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::InlineItemRun::layoutBox const):
        (WebCore::Layout::InlineItemRun::logicalRect const):
        (WebCore::Layout::InlineItemRun::textContext const):
        (WebCore::Layout::InlineItemRun::isText const):
        (WebCore::Layout::InlineItemRun::isBox const):
        (WebCore::Layout::InlineItemRun::isContainerStart const):
        (WebCore::Layout::InlineItemRun::isContainerEnd const):
        (WebCore::Layout::InlineItemRun::type const):
        (WebCore::Layout::InlineItemRun::setIsCollapsed):
        (WebCore::Layout::InlineItemRun::isCollapsed const):
        (WebCore::Layout::InlineItemRun::isCollapsedToZeroAdvanceWidth const):
        (WebCore::Layout::InlineItemRun::isCollapsible const):
        (WebCore::Layout::InlineItemRun::isWhitespace const):
        (WebCore::Layout::InlineItemRun::hasExpansionOpportunity const):
        (WebCore::Layout::InlineItemRun::InlineItemRun):
        (WebCore::Layout::InlineItemRun::setCollapsesToZeroAdvanceWidth):
        (WebCore::Layout::Line::Run::Run):
        (WebCore::Layout::Line::Run::adjustExpansionBehavior):
        (WebCore::Layout::Line::Run::expansionBehavior const):
        (WebCore::Layout::Line::Run::setHasExpansionOpportunity):
        (WebCore::Layout::Line::Run::setComputedHorizontalExpansion):
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::~Line):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::alignContentVertically const):
        (WebCore::Layout::Line::justifyRuns const):
        (WebCore::Layout::Line::alignContentHorizontally const):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendReplacedInlineBox): Need to find a better place for setImage.
        (WebCore::Layout::Line::appendLineBreak):
        (WebCore::Layout::Line::alignContentVertically): Deleted.
        (WebCore::Layout::Line::justifyRuns): Deleted.
        (WebCore::Layout::Line::alignContentHorizontally): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::layoutBox const):
        (WebCore::Layout::Line::Run::logicalRect const):
        (WebCore::Layout::Line::Run::textContext const):
        (WebCore::Layout::Line::Run::isCollapsedToVisuallyEmpty const):
        (WebCore::Layout::Line::Run::adjustLogicalTop):
        (WebCore::Layout::Line::Run::moveHorizontally):
        (WebCore::Layout::Line::Run::moveVertically):
        (WebCore::Layout::Line::Run::setTextContext):
        (WebCore::Layout::Line::Run::setIsCollapsedToVisuallyEmpty):
        (WebCore::Layout::Line::Run::hasExpansionOpportunity const):
        (WebCore::Layout::Line::Run::expansionOpportunityCount const):
        (WebCore::Layout::Line::Run::displayRun const): Deleted.
        (WebCore::Layout::Line::Run::isCollapsed const): Deleted.
        (WebCore::Layout::Line::Run::isCollapsible const): Deleted.
        (WebCore::Layout::Line::Run::hasTrailingCollapsedContent const): Deleted.
        (WebCore::Layout::Line::Run::isWhitespace const): Deleted.
        (WebCore::Layout::Line::Run::setIsCollapsed): Deleted.
        (WebCore::Layout::Line::Run::isCollapsedToZeroAdvanceWidth const): Deleted.
        (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth): Deleted.
        (WebCore::Layout::Line::Run::expansionBehavior const): Deleted.
        (WebCore::Layout::Line::Run::setHasExpansionOpportunity): Deleted.
        (WebCore::Layout::Line::Run::adjustExpansionBehavior): Deleted.
        (WebCore::Layout::Line::Run::setComputedHorizontalExpansion): Deleted.

2019-11-10  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Add some infrastructure to resolve ClipboardItems into pasteboard data for writing
        https://bugs.webkit.org/show_bug.cgi?id=203707

        Reviewed by Ryosuke Niwa.

        Implements a new method that will be used in a future patch to aggregate data vended by ClipboardItems when
        writing items to the platform pasteboard. See below for more details; no new tests, since there is no change in
        behavior yet.

        * Modules/async-clipboard/ClipboardItem.cpp:
        (WebCore::ClipboardItem::collectDataForWriting):

        Add a new virtual `collectDataForWriting` method, which is used when writing ClipboardItem data to the
        pasteboard. This allows ClipboardItems to asynchronously convert data to a PasteboardCustomData after resolving
        promises to strings or blobs; or alternately, cancel all data loading if a promise is rejected.

        In order to convert items into a list of PasteboardCustomData, we do the following:

        set up a PasteboardCustomData corresponding to each clipboard item
        for each clipboard item:
            for each type in the clipboard item:
                try to resolve the promise
                if the promise resolved to a string:
                    write the string to custom data under the type
                if the promise resolved to a blob:
                    load the blob data as either text or an ArrayBuffer (depending on the type)
                    write either the loaded string or buffer to custom data under the type
                if the promise rejected or resolved to an unsupported value, bail from these steps

        * Modules/async-clipboard/ClipboardItem.h:
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
        (WebCore::documentFromClipboard):
        (WebCore::readTypeForMIMEType):
        (WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
        (WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::ClipboardItemTypeLoader):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::~ClipboardItemTypeLoader):

        Add a helper class to hold state associated with loading each clipboard type. This includes the final data
        itself (a variant that holds either a String or Blob), as well as a FileReaderLoader which may be present in the
        case where the clipboard item type resolves to a blob.

        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFinishLoading):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail):

        Each ClipboardItemType is also the client for its FileReaderLoader, if present; when the FileReaderLoader
        finishes loading or fails, we then extract data from the loader and invoke the completion handler.

        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::invokeCompletionHandler):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToBlob):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFailToResolve):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToString):

        One of these three methods is called when the promise corresponding to a clipboard type is either resolved or
        rejected. If rejected or resolved to an incompatible type, we call the completion handler immediately with no
        data; if we resolve to a string, we simply store the string in `m_data` and invoke the completion handler;
        otherwise, if we resolve to a blob, we create a new loader to fetch either the string or data buffer for the
        blob, and wait until either didFinishLoading or didFail is called.

        * Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::create):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::type):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::data):
        * Modules/async-clipboard/ClipboardItemDataSource.h:
        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
        (WebCore::ClipboardItemPasteboardDataSource::collectDataForWriting):

        For the time being, leave this unimplemented; a future patch will add support for writing ClipboardItems that
        came from the platform pasteboard, as opposed to those created by the page.

        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:

2019-11-10  Antti Koivisto  <antti@apple.com>

        Stack allocate StyleResolver state
        https://bugs.webkit.org/show_bug.cgi?id=204053

        Reviewed by Zalan Bujtas.

        State is currently awkwardly a member that gets cleared. It should be stack allocated and
        passed around where needed.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::updateBlendingKeyframes):
        * css/DOMCSSRegisterCustomProperty.cpp:
        (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::builderContext):

        Helper for initializing Style::Builder from resolver state.

        (WebCore::StyleResolver::styleForElement):
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::keyframeStylesForAnimation):
        (WebCore::StyleResolver::pseudoStyleForElement):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::defaultStyleForElement):
        (WebCore::StyleResolver::pseudoStyleRulesForElement):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::State::clear): Deleted.

        Nothing to clear, state is transient.

        (WebCore::StyleResolver::setNewStateWithElement): Deleted.
        (WebCore::StyleResolver::applyPropertyToStyle): Deleted.
        (WebCore::StyleResolver::applyPropertyToCurrentStyle): Deleted.

        Style::Builder can be used directly to apply properties instead of via these functions that require state setup.

        (WebCore::StyleResolver::initializeFontStyle): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::inspectorCSSOMWrappers):
        (WebCore::StyleResolver::style const): Deleted.
        (WebCore::StyleResolver::parentStyle const): Deleted.
        (WebCore::StyleResolver::rootElementStyle const): Deleted.
        (WebCore::StyleResolver::element const): Deleted.
        (WebCore::StyleResolver::state): Deleted.
        (WebCore::StyleResolver::state const): Deleted.
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setFont):

        Use Style::Builder directly to apply properties.

        * style/StyleBuilder.cpp:
        (WebCore::Style::Builder::Builder):

        Encapsulte immutable arguments into BuilderContext type.

        (WebCore::Style::Builder::applyPropertyValue):
        * style/StyleBuilder.h:
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::BuilderState):
        (WebCore::Style::BuilderState::updateFontForZoomChange):
        (WebCore::Style::BuilderState::updateFontForGenericFamilyChange):
        * style/StyleBuilderState.h:
        (WebCore::Style::BuilderState::parentStyle const):
        (WebCore::Style::BuilderState::rootElementStyle const):
        (WebCore::Style::BuilderState::document const):
        (WebCore::Style::BuilderState::element const):
        (WebCore::Style::BuilderState::parentFontDescription):

2019-11-09  Antti Koivisto  <antti@apple.com>

        Move style adjustment code out of StyleResolver and into a class of its own
        https://bugs.webkit.org/show_bug.cgi?id=204041

        Reviewed by Zalan Bujtas.

        Introduce Style::Adjuster.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForElement):
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::pseudoStyleForElement):
        (WebCore::addIntrinsicMargins): Deleted.
        (WebCore::equivalentBlockDisplay): Deleted.
        (WebCore::doesNotInheritTextDecoration): Deleted.
        (WebCore::isScrollableOverflow): Deleted.
        (WebCore::hasEffectiveDisplayNoneForDisplayContents): Deleted.
        (WebCore::adjustDisplayContentsStyle): Deleted.
        (WebCore::StyleResolver::adjustSVGElementStyle): Deleted.
        (WebCore::computeEffectiveTouchActions): Deleted.
        (WebCore::hasTextChild): Deleted.
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing): Deleted.
        (WebCore::StyleResolver::adjustRenderStyle): Deleted.
        (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks): Deleted.
        * css/StyleResolver.h:
        * page/Page.cpp:
        (WebCore::Page::recomputeTextAutoSizingInAllFrames):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):

        None of this code uses the StyleResolver argument so remove it.

        (WebCore::RenderTheme::adjustCheckboxStyle const):
        (WebCore::RenderTheme::adjustRadioStyle const):
        (WebCore::RenderTheme::adjustButtonStyle const):
        (WebCore::RenderTheme::adjustInnerSpinButtonStyle const):
        (WebCore::RenderTheme::adjustTextFieldStyle const):
        (WebCore::RenderTheme::adjustTextAreaStyle const):
        (WebCore::RenderTheme::adjustMenuListStyle const):
        (WebCore::RenderTheme::adjustMeterStyle const):
        (WebCore::RenderTheme::adjustCapsLockIndicatorStyle const):
        (WebCore::RenderTheme::adjustAttachmentStyle const):
        (WebCore::RenderTheme::adjustListButtonStyle const):
        (WebCore::RenderTheme::adjustProgressBarStyle const):
        (WebCore::RenderTheme::adjustMenuListButtonStyle const):
        (WebCore::RenderTheme::adjustMediaControlStyle const):
        (WebCore::RenderTheme::adjustSliderTrackStyle const):
        (WebCore::RenderTheme::adjustSliderThumbStyle const):
        (WebCore::RenderTheme::adjustSearchFieldStyle const):
        (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle const):
        (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle const):
        (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle const):
        (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle const):
        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::adjustApplePayButtonStyle const):
        * rendering/RenderThemeCocoa.h:
        * rendering/RenderThemeCocoa.mm:
        (WebCore::RenderThemeCocoa::adjustApplePayButtonStyle const):
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::adjustButtonStyle const):
        (WebCore::RenderThemeGtk::adjustMenuListStyle const):
        (WebCore::RenderThemeGtk::adjustMenuListButtonStyle const):
        (WebCore::RenderThemeGtk::adjustTextFieldStyle const):
        (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle const):
        (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle const):
        (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle const):
        (WebCore::RenderThemeGtk::adjustListButtonStyle const):
        (WebCore::RenderThemeGtk::adjustSearchFieldStyle const):
        (WebCore::RenderThemeGtk::adjustSliderTrackStyle const):
        (WebCore::RenderThemeGtk::adjustSliderThumbStyle const):
        (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle const):
        (WebCore::RenderThemeGtk::adjustProgressBarStyle const):
        * rendering/RenderThemeGtk.h:
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::adjustCheckboxStyle const):
        (WebCore::RenderThemeIOS::adjustRadioStyle const):
        (WebCore::RenderThemeIOS::adjustMenuListButtonStyle const):
        (WebCore::RenderThemeIOS::adjustSliderTrackStyle const):
        (WebCore::RenderThemeIOS::adjustSearchFieldStyle const):
        (WebCore::RenderThemeIOS::adjustButtonStyle const):
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::setFontFromControlSize const):
        (WebCore::RenderThemeMac::adjustListButtonStyle const):
        (WebCore::RenderThemeMac::adjustTextFieldStyle const):
        (WebCore::RenderThemeMac::adjustTextAreaStyle const):
        (WebCore::RenderThemeMac::adjustProgressBarStyle const):
        (WebCore::RenderThemeMac::adjustMenuListStyle const):
        (WebCore::RenderThemeMac::adjustMenuListButtonStyle const):
        (WebCore::RenderThemeMac::adjustSliderTrackStyle const):
        (WebCore::RenderThemeMac::adjustSliderThumbStyle const):
        (WebCore::RenderThemeMac::adjustSearchFieldStyle const):
        (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle const):
        (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle const):
        (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle const):
        (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle const):
        * style/StyleAdjuster.cpp: Added.
        (WebCore::Style::Adjuster::Adjuster):
        (WebCore::Style::addIntrinsicMargins):
        (WebCore::Style::equivalentBlockDisplay):
        (WebCore::Style::isAtShadowBoundary):
        (WebCore::Style::doesNotInheritTextDecoration):
        (WebCore::Style::isScrollableOverflow):
        (WebCore::Style::computeEffectiveTouchActions):
        (WebCore::Style::Adjuster::adjust const):
        (WebCore::Style::hasEffectiveDisplayNoneForDisplayContents):
        (WebCore::Style::Adjuster::adjustDisplayContentsStyle const):
        (WebCore::Style::Adjuster::adjustSVGElementStyle):
        (WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const):
        (WebCore::Style::hasTextChild):
        (WebCore::Style::Adjuster::adjustForTextAutosizing):
        * style/StyleAdjuster.h: Added.
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::resolveCustomStyle):

2019-11-08  Antoine Quint  <graouts@apple.com>

        [Web Animations] Optimize animation resolution to not re-compute whether effects only contain accelerated animation properties
        https://bugs.webkit.org/show_bug.cgi?id=204009

        Reviewed by Dean Jackson.

        A KeyframeEffect already exposes whether it only affects CSS properties that can be accelerated, so use this information instead
        of iterating over an effect's animated properties during resolution to get at the same information. 

        No tests or changes to existed test expectations as this should not yield any change in behavior.

        * dom/Element.cpp:
        (WebCore::Element::applyKeyframeEffects):

2019-11-08  Chris Dumez  <cdumez@apple.com>

        Add back/forward cache quirk for Vimeo.com
        https://bugs.webkit.org/show_bug.cgi?id=204025
        <rdar://problem/56996057>

        Reviewed by Antti Koivisto.

        Vimeo.com used to bypass the back/forward cache by serving "Cache-Control: no-store" over HTTPS.
        We started caching such content in r250437 but the vimeo.com content unfortunately is not currently compatible
        because it changes the opacity of its body to 0 when navigating away and fails to restore the original opacity
        when coming back from the back/forward cache (e.g. in 'pageshow' event handler).

        To address the issue, this patch introduces a quirk to restore pre-r250437 on Vimeo.com, until they get
        a chance to fix their content.

        * history/BackForwardCache.cpp:
        (WebCore::canCacheFrame):
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::siteSpecificQuirkKey):
        * page/DiagnosticLoggingKeys.h:
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldBypassBackForwardCache const):
        * page/Quirks.h:

2019-11-08  Youenn Fablet  <youenn@apple.com>

        SWServerWorker in redundant state do not need to process messages from the context process
        https://bugs.webkit.org/show_bug.cgi?id=204019

        Reviewed by Chris Dumez.

        When a service worker is marked as redundant in network process, it might still receive some messages like didFinishActivation or didFinishInstall.
        In that state, we do not need to process these messages.
        Did some refactoring to directly pass the service worker to the job queue.
        This makes it clear the registration and service worker are the correct ones.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::didFinishInstall):
        Pass the worker instead of its identifier.
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::didFinishInstall):
        Now that we are given the service worker, get its registration directly.
        * workers/service/server/SWServerJobQueue.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::didFinishInstall):
        Exit early in redundant state.
        (WebCore::SWServerWorker::didFinishActivation):
        Exit early in redundant state.

2019-11-08  youenn fablet  <youenn@apple.com>

        XMLHttpRequestUpload should be exposed in dedicated workers
        https://bugs.webkit.org/show_bug.cgi?id=203901

        Reviewed by Alex Christensen.

        Covered by rebased test.

        * xml/XMLHttpRequestUpload.idl:

2019-11-08  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Add quirk needed to support legacy Google NFC Titan security keys
        https://bugs.webkit.org/show_bug.cgi?id=204024
        <rdar://problem/56962320>

        Reviewed by Brent Fulgham.

        Covered by manual tests.

        * Modules/webauthn/fido/FidoConstants.h:

2019-11-08  Peng Liu  <peng.liu6@apple.com>

        Entering/Exiting Picture-in-Picture mode through webkitSetPresentationMode() does not fire events (enterpictureinpicture and leavepictureinpicture) defined in the spec
        https://bugs.webkit.org/show_bug.cgi?id=203989

        Reviewed by Eric Carlson.

        Instantiate a HTMLVideoElementPictureInPicture object when we create a new video element
        so that the events defined in the spec will be fired no matter which interface is used
        to enter/exit the Picture-in-Picture mode.

        Test: media/picture-in-picture/picture-in-picture-events.html

        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::providePictureInPictureTo):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::create):

2019-11-08  Chris Dumez  <cdumez@apple.com>

        Make DeferredPromise behave nicely with regards to the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203976

        Reviewed by Ryosuke Niwa.

        Previously, DeferredPromise would ignore requests to fulfill the promise if
        reject/resolve/settle got called while the promise's script execution context
        is suspended in the back/forward cache. This is really never the right thing to
        do though because this means the promise will never be fulfilled if the user
        ever goes back to this page.

        To address the issue, DeferredPromise now schedules a task on the event loop if
        it gets fulfilled while its script execution context is suspended. As a result,
        the promise will properly get fulfilled if the document ever comes out of the
        back/forward cache and developers using DeferredPromise do not have to worry
        about suspension.

        Now that DeferredPromise properly deals with suspended documents, this patch also
        reverts changes I made recently in code using DeferredPromise. I had made them
        queue a task on the event loop before fulfilling the promise, which did not match
        their specification and is no longer needed.

        Note that capturing the Strong<> in the lambda is correct here because we want
        the resolution value to survive until either:
        1. The task is processed by the event loop and the promise is resolved.
        2. The back/forward cache entry containing this document is destroyed

        Note that we do not leak here because when the back/forward cache's CachedFrame
        gets destroyed, it will call Document::prepareForDestruction(), which will call
        WindowEventLoop::stop() and destroys all pending tasks associated with this
        document. This will therefore destroy the Strong captured in the task.

        No new tests, covered by existing back/forward cache tests.

        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::doSequentialMatch):
        (WebCore::DOMCacheStorage::match):
        (WebCore::DOMCacheStorage::has):
        (WebCore::DOMCacheStorage::open):
        (WebCore::DOMCacheStorage::doOpen):
        (WebCore::DOMCacheStorage::remove):
        (WebCore::DOMCacheStorage::doRemove):
        (WebCore::DOMCacheStorage::keys):
        * Modules/cache/DOMCacheStorage.h:
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::blobLoadingSucceeded):
        (WebCore::FetchBodyOwner::blobLoadingFailed):
        (WebCore::FetchBodyOwner::blobChunk):
        * Modules/fetch/FetchBodyOwner.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        (WebCore::UserMediaRequest::deny):
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/IDLTypes.h:
        * bindings/js/JSDOMGuardedObject.h:
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::DeferredPromise::callFunction):
        (WebCore::DeferredPromise::whenSettled):
        (WebCore::DeferredPromise::reject):
        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DeferredPromise::resolve):
        (WebCore::DeferredPromise::resolveWithNewlyCreated):
        (WebCore::DeferredPromise::resolveCallbackValueWithNewlyCreated):
        (WebCore::DeferredPromise::reject):
        (WebCore::DeferredPromise::resolveWithCallback):
        (WebCore::DeferredPromise::rejectWithCallback):
        (WebCore::DeferredPromise::shouldIgnoreRequestToFulfill const):
        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::didFirstLayout):
        (WebCore::FontFaceSet::completedLoading):
        (WebCore::FontFaceSet::faceFinished):
        * dom/ActiveDOMCallback.cpp:
        (WebCore::ActiveDOMCallback::activeDOMObjectsAreSuspended const):
        (WebCore::ActiveDOMCallback::activeDOMObjectAreStopped const):
        * dom/ActiveDOMCallback.h:
        * dom/Element.h:
        * dom/ScriptExecutionContext.h:
        * page/DOMWindow.h:
        * page/RemoteDOMWindow.h:

2019-11-08  Antti Koivisto  <antti@apple.com>

        StyleResolver state should store user agent appearance style as RenderStyle
        https://bugs.webkit.org/show_bug.cgi?id=204008

        Reviewed by Zalan Bujtas.

        Generate and pass around user agent style as RenderStyle for apperance computation instead
        of awkwardly passing around separate property values.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForElement):
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::pseudoStyleForElement):
        (WebCore::StyleResolver::adjustRenderStyle):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::State::cacheBorderAndBackground): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::element const):
        (WebCore::StyleResolver::State::userAgentAppearanceStyle const):
        (WebCore::StyleResolver::State::setUserAgentAppearanceStyle):
        (WebCore::StyleResolver::element): Deleted.
        (WebCore::StyleResolver::State::hasUAAppearance const): Deleted.
        (WebCore::StyleResolver::State::borderData const): Deleted.
        (WebCore::StyleResolver::State::backgroundData const): Deleted.
        (WebCore::StyleResolver::State::backgroundColor const): Deleted.
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):
        (WebCore::RenderTheme::isControlStyled const):
        * rendering/RenderTheme.h:
        * rendering/RenderThemeIOS.h:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::isControlStyled const):
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::isControlStyled const):
        * style/StyleBuilder.cpp:
        (WebCore::Style::Builder::Builder):

        Allow providing style separately from StyleResolver state.

        * style/StyleBuilder.h:

2019-11-08  Daniel Bates  <dabates@apple.com>

        Add WebKit Legacy SPI to retrieve editable elements in rect
        https://bugs.webkit.org/show_bug.cgi?id=204006
        <rdar://problem/57024093>

        Reviewed by Wenson Hsieh.

        Extract code to retrieve the editable elements inside a specified rect from WebKit
        to WebCore so that it can be shared by both Modern WebKit and Legacy WebKit.

        * page/Page.cpp:
        (WebCore::isEditableTextInputElement):
        (WebCore::Page::editableElementsInRect const):
        * page/Page.h:

2019-11-08  Antoine Quint  <graouts@apple.com>

        [Web Animations] Use a keyframe effect stack to resolve animations on an element
        https://bugs.webkit.org/show_bug.cgi?id=204010

        Reviewed by Dean Jackson.

        Until now, when resolving animations for an element, we would call animationsForElement() during each resolution which
        means doing several hash table lookups to locate the various classes of animations for that given element, sorting each
        of those animations and inserting them into a new Vector.

        We now use a KeyframeEffectStack which keeps a list of KeyframeEffect objects that apply to a given target, provided the
        effect also has a valid animation and that animation has a valid timeline, all pre-conditions for that effect to produce
        an animated value. Any time one of those pre-conditions change, we update the membership of that effect in the stack.
        The KeyframeEffectStack is a new member of ElementRareData.

        Now, each time we resolve an animation for an element, we iterate over the KeyframeEffect objects returned by calling
        sortEffects() on the KeyframeEffectStack which will sort the stack's effects only if a new effect had been added since
        the last iteration, which means that simple animations that are not mutated will require sorting of the stack just once,
        and the addition of several animations in a single animation frame will require sorting just once as well.

        It was also found while doing this work that Style::TreeResolver::createAnimatedElementUpdate would call RenderStyle::clonePtr()
        for any element that was part of a document containing a timeline, regardless of whether that element had any animations. Now
        we check whether that element's KeyframeEffectStack contains any effects prior to cloning the style.

        No tests or changes to existed test expectations as this should not yield any change in behavior.

        * Sources.txt: Add the new KeyframeEffectStack.
        * WebCore.xcodeproj/project.pbxproj:
        * animation/AnimationEffect.h:
        (WebCore::AnimationEffect::setAnimation):
        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::removeAnimation):
        (WebCore::AnimationTimeline::updateCSSAnimationsForElement): Since we need to know the order of CSS @keyframes rules listed in animation-name
        when sorting effects, we must compile the ordered list of those @keyframe rules as we update CSS animations for an element and store it on its
        KeyframeEffectStack.
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::resolveAnimationsForElement): Deleted. Replaced by Element::applyKeyframeEffects().
        * animation/DocumentTimeline.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::animationTimelineDidChange):
        (WebCore::KeyframeEffect::setAnimation):
        (WebCore::KeyframeEffect::setTarget):
        * animation/KeyframeEffect.h:
        * animation/KeyframeEffectStack.cpp: Added.
        (WebCore::KeyframeEffectStack::KeyframeEffectStack):
        (WebCore::KeyframeEffectStack::~KeyframeEffectStack):
        (WebCore::KeyframeEffectStack::addEffect):
        (WebCore::KeyframeEffectStack::removeEffect):
        (WebCore::KeyframeEffectStack::sortedEffects):
        (WebCore::KeyframeEffectStack::ensureEffectsAreSorted):
        (WebCore::KeyframeEffectStack::setCSSAnimationNames):
        * animation/KeyframeEffectStack.h: Added.
        (WebCore::KeyframeEffectStack::hasEffects const):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::setTimelineInternal):
        (WebCore::WebAnimation::persist):
        * dom/Element.cpp:
        (WebCore::Element::ensureKeyframeEffectStack):
        (WebCore::Element::hasKeyframeEffects const):
        (WebCore::Element::applyKeyframeEffects):
        * dom/Element.h:
        * dom/ElementRareData.cpp:
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::keyframeEffectStack):
        (WebCore::ElementRareData::setKeyframeEffectStack):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

2019-11-07  Dean Jackson  <dino@apple.com>

        Add ANGLE backend for iOS device
        https://bugs.webkit.org/show_bug.cgi?id=202159
        <rdar://57000166>

        Reviewed by Myles Maxfield.

        Use the ANGLE for iOS backend.

        Mostly this was just moving some code around so that it would compile
        on iOS when USE(ANGLE) is true. The actual code to render WebGL is
        similar between macOS and iOS - both now using a CALayer with
        a set of IOSurfaces that are used as swap textures.

        The main difference is that macOS (OpenGL) binds to TEXTURE_RECTANGLE,
        and iOS (OpenGL ES) binds to the regular TEXTURE_2D.

        The remaining missing piece is getting video textures into ANGLE
        efficiently (without leaving the GPU). We can ask CoreVideo
        to give us raw GL textures, but with ANGLE we no longer have direct access
        to the underlying OpenGL context.

        This is not enabled in the builds yet, so no tests. However, when
        enabled it will be tested against the official WebGL conformance suite.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
        * platform/cocoa/CoreVideoSoftLink.cpp:
        * platform/cocoa/CoreVideoSoftLink.h:
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::reshapeFBOs):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore):
        (WebCore::GraphicsContext3D::updateFramebufferTextureBackingStoreFromLayer):
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer initWithGraphicsContext3D:]):
        (-[WebGLLayer display]):
        (-[WebGLLayer setEGLDisplay:config:]):
        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
        (-[WebGLLayer bindFramebufferToNextAvailableSurface]):
        (-[WebGLLayer setEGLDisplay:andConfig:]): Deleted.
        * platform/graphics/cv/TextureCacheCV.mm:
        (WebCore::TextureCacheCV::textureFromImage):
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
        * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
        * platform/graphics/opengl/TemporaryOpenGLSetting.h:

2019-11-08  Chris Dumez  <cdumez@apple.com>

        Regression r252209: Layout Test fast/workers/worker-close-more.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=203995
        <rdar://problem/57020558>

        Reviewed by Ryosuke Niwa.

        We should not dispatch events on a MessagePort objects in a WorkerGlobalScope which is
        closing (i.e. WorkerGlobalScope.close() has been called).

        No new tests, covered by fast/workers/worker-close-more.html.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::dispatchEvent):

2019-11-08  Peng Liu  <peng.liu6@apple.com>

        Picture-in-Picture events are not fired when enter/exit the Picture-in-Picture mode through modern media controls
        https://bugs.webkit.org/show_bug.cgi?id=203933

        Reviewed by Eric Carlson.

        Covered by existing layout test cases. No new test is required.

        * Modules/modern-media-controls/media/pip-support.js:
        (PiPSupport.prototype.buttonWasPressed):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):

2019-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        'Strikethrough' editing command reported as 'formatUnderline'
        https://bugs.webkit.org/show_bug.cgi?id=203944

        Reviewed by Adrian Perez de Castro.

        Add an EditAction for strikeThrough command.

        Test: fast/events/input-events-strikethrough-type.html

        * editing/EditAction.cpp:
        (WebCore::undoRedoLabel): Handle StrikeThrough action.
        * editing/EditAction.h:
        * editing/EditCommand.cpp:
        (WebCore::inputTypeNameForEditingAction): Ditto.
        * editing/EditorCommand.cpp:
        (WebCore::executeStrikethrough): Use StrikeThrough action instead of Underline.

2019-11-07  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Default NamepaceURI must be gotten from the topmost parent before the SVG <foreignObject>
        https://bugs.webkit.org/show_bug.cgi?id=203868

        Reviewed by Ryosuke Niwa.

        Ensure that we don't cross boundaries from HTML to SVG when traversing
        the tree of nodes upward. We need to stop at the foreignObject if it is
        one of the ancestors of the contextElement.

        Tests: svg/foreignObject/foreign-object-dynamic-parsing.svg

        * html/HTMLTableCellElement.cpp:
        (WebCore::HTMLTableCellElement::HTMLTableCellElement):
        This assertion should not fire if the tag has a prefix like <h:th> or
        <h:td> where 'h' is a defined namespace.

        * xml/parser/XMLDocumentParser.cpp:
        (WebCore::XMLDocumentParser::parseDocumentFragment):
        Stop at the first SVG <foreignObject> ancestor when calculating the
        defaultNamespaceURI.

        * xml/parser/XMLDocumentParser.h:
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLDocumentParser::XMLDocumentParser):

        (WebCore::XMLDocumentParser::startElementNs):
        We need to special case setting the namespaceURI of the SVGElmenets. The
        defaultNamespaceURI can be wrong for them if the context element is an
        HTML element, <div> for example, and the innerHTML is set to something
        like: '<svg><rect/></svg>'.

2019-11-07  Chris Dumez  <cdumez@apple.com>

        Use ActiveDOMObject::queueTaskKeepingObjectAlive() in DOMCache
        https://bugs.webkit.org/show_bug.cgi?id=203985

        Reviewed by Ryosuke Niwa.

        Use ActiveDOMObject::queueTaskKeepingObjectAlive() in DOMCache and drop DOMCache::enqueueTask().

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::match):
        (WebCore::DOMCache::matchAll):
        (WebCore::DOMCache::addAll):
        (WebCore::DOMCache::putWithResponseData):
        (WebCore::DOMCache::put):
        (WebCore::DOMCache::remove):
        (WebCore::DOMCache::keys):
        (WebCore::DOMCache::enqueueTask): Deleted.
        * Modules/cache/DOMCache.h:

2019-11-07  Kenneth Russell  <kbr@chromium.org>

        Please support WEBGL_compressed_texture_etc1 extension (and possibly WEBGL_compressed_texture_etc too)
        https://bugs.webkit.org/show_bug.cgi?id=197900

        Reviewed by Dean Jackson.

        Support the ETC1 and ETC2 compressed texture formats in WebKit's WebGL
        implementation.

        Tested by changing the code to allocate an OpenGL ES 3.0 context for WebGL,
        and running in the iOS Simulator. The WebGL conformance tests
        webgl-compressed-texture-etc.html and webgl-compressed-texture-etc1.html all
        pass with these changes.

        When an ANGLE backend is supported on iOS, these extensions will
        automatically be supported, and some of the new validation code can be
        removed.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMConvertWebGL.cpp:
        (WebCore::convertToJSValue):
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getExtension):
        (WebCore::WebGL2RenderingContext::getSupportedExtensions):
        * html/canvas/WebGLCompressedTextureETC.cpp: Added.
        (WebCore::WebGLCompressedTextureETC::WebGLCompressedTextureETC):
        (WebCore::WebGLCompressedTextureETC::getName const):
        (WebCore::WebGLCompressedTextureETC::supported):
        * html/canvas/WebGLCompressedTextureETC.h: Added.
        * html/canvas/WebGLCompressedTextureETC.idl: Added.
        * html/canvas/WebGLCompressedTextureETC1.cpp: Added.
        (WebCore::WebGLCompressedTextureETC1::WebGLCompressedTextureETC1):
        (WebCore::WebGLCompressedTextureETC1::getName const):
        (WebCore::WebGLCompressedTextureETC1::supported):
        * html/canvas/WebGLCompressedTextureETC1.h: Added.
        * html/canvas/WebGLCompressedTextureETC1.idl: Added.
        * html/canvas/WebGLExtension.h:
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getExtension):
        (WebCore::WebGLRenderingContext::getSupportedExtensions):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::extensionIsEnabled):
        (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
        (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
        (WebCore::WebGLRenderingContextBase::validateCompressedTexSubDimensions):
        * html/canvas/WebGLRenderingContextBase.h:
        * platform/graphics/Extensions3D.h:
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
        (WebCore::Extensions3DOpenGL::supportsExtension):

2019-11-07  Ryosuke Niwa  <rniwa@webkit.org>

        WindowEventLoop should be shared among similar origin documents
        https://bugs.webkit.org/show_bug.cgi?id=203882

        Reviewed by Wenson Hsieh.

        Made WindowEventLoop shared across similar origin documents.

        Also added internals.queueTask to directly test the event loop behavior
        since implicitly testing it via other features has been very cumbersome.

        This will help test other features that use the HTML5 event loop as well.

        Tests: http/tests/eventloop/queue-task-across-cross-site-frames.html
               http/tests/eventloop/queue-task-across-frames.html

        * dom/Document.cpp:
        (WebCore::Document::eventLoop): Use WindowEventLoop::ensureForRegistrableDomain.
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::ensureForRegistrableDomain): Added. Replaces create,
        and returns an existing WindowEventLoop if the RegistrableDomain matches.
        (WebCore::WindowEventLoop::WindowEventLoop): Added.
        (WebCore::WindowEventLoop::~WindowEventLoop): Added. Removes itself from the map.
        * dom/WindowEventLoop.h:
        * testing/Internals.cpp:
        (WebCore::Internals::queueTask): Added.
        * testing/Internals.h:
        * testing/Internals.idl:

2019-11-07  Chris Dumez  <cdumez@apple.com>

        Drop GenericEventQueue class now that it is unused
        https://bugs.webkit.org/show_bug.cgi?id=203980

        Reviewed by Ryosuke Niwa.

        Drop GenericEventQueue class now that it is unused. All users have been ported to the HTML
        event loop. MainThreadGenericEventQueue remains for now but will get dropped in a follow-up
        patch, once it is no longer used.

        * dom/GenericEventQueue.cpp:
        (WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue):
        (WebCore::MainThreadGenericEventQueue::enqueueEvent):
        (WebCore::MainThreadGenericEventQueue::dispatchOneEvent):
        (WebCore::MainThreadGenericEventQueue::close):
        (WebCore::MainThreadGenericEventQueue::cancelAllEvents):
        (WebCore::MainThreadGenericEventQueue::hasPendingEvents const):
        (WebCore::MainThreadGenericEventQueue::hasPendingEventsOfType const):
        (WebCore::MainThreadGenericEventQueue::setPaused):
        (WebCore::MainThreadGenericEventQueue::suspend):
        (WebCore::MainThreadGenericEventQueue::resume):
        (WebCore::MainThreadGenericEventQueue::rescheduleAllEventsIfNeeded):
        (WebCore::MainThreadGenericEventQueue::stop):
        (WebCore::MainThreadGenericEventQueue::activeDOMObjectName const):
        (WebCore::TaskQueueConstructor::construct): Deleted.
        (WebCore::TaskQueueConstructor<Timer>::construct): Deleted.
        (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase): Deleted.
        (WebCore::GenericEventQueueBase<T>::enqueueEvent): Deleted.
        (WebCore::GenericEventQueueBase<T>::dispatchOneEvent): Deleted.
        (WebCore::GenericEventQueueBase<T>::close): Deleted.
        (WebCore::GenericEventQueueBase<T>::cancelAllEvents): Deleted.
        (WebCore::GenericEventQueueBase<T>::hasPendingEvents const): Deleted.
        (WebCore::GenericEventQueueBase<T>::hasPendingEventsOfType const): Deleted.
        (WebCore::GenericEventQueueBase<T>::setPaused): Deleted.
        (WebCore::GenericEventQueueBase<T>::suspend): Deleted.
        (WebCore::GenericEventQueueBase<T>::resume): Deleted.
        (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded): Deleted.
        (WebCore::GenericEventQueueBase<T>::stop): Deleted.
        (WebCore::GenericEventQueueBase<T>::activeDOMObjectName const): Deleted.
        (WebCore::GenericEventQueue::create): Deleted.
        * dom/GenericEventQueue.h:
        (WebCore::GenericEventQueueBase::isSuspended const): Deleted.
        (WebCore::GenericEventQueueBase::isSuspendedOrPausedByClient const): Deleted.
        (WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue): Deleted.
        (WebCore::GenericEventQueue::GenericEventQueue): Deleted.

2019-11-07  Chris Dumez  <cdumez@apple.com>

        Port Worker to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203919

        Reviewed by Ryosuke Niwa.

        * dom/ActiveDOMObject.h:
        * workers/Worker.cpp:
        (WebCore::Worker::Worker):
        (WebCore::Worker::terminate):
        (WebCore::Worker::hasPendingActivity const):
        (WebCore::Worker::notifyFinished):
        (WebCore::Worker::dispatchEvent):
        (WebCore::Worker::enqueueEvent): Deleted.
        * workers/Worker.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
        (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):

2019-11-07  Chris Dumez  <cdumez@apple.com>

        Port MessagePort to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203960

        Reviewed by Ryosuke Niwa.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::MessagePort):
        (WebCore::MessagePort::close):
        (WebCore::MessagePort::dispatchMessages):
        (WebCore::MessagePort::dispatchEvent):
        * dom/MessagePort.h:
        * dom/TaskSource.h:

2019-11-07  Antti Koivisto  <antti@apple.com>

        Factor matched declarations cache into a class
        https://bugs.webkit.org/show_bug.cgi?id=203972

        Reviewed by Zalan Bujtas.

        Move the code out from StyleResolver and rename "matched properties cache" -> "matched declarations cache"
        to better describe it.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::declarationsForOrigin):

        Add a helper.

        (WebCore::ElementRuleCollector::transferMatchedRules):

        Reserve vector capacity before adding rules.

        (WebCore::ElementRuleCollector::addMatchedProperties):
        * css/ElementRuleCollector.h:
        (WebCore::MatchResult::operator== const):
        (WebCore::MatchResult::operator!= const):

        Remove the unneeded inline capacity so we can just use MatchResult itself in the cache.

        * css/RuleSet.cpp:
        (WebCore::RuleSet::addChildRules):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::StyleResolver):
        (WebCore::StyleResolver::invalidateMatchedDeclarationsCache):
        (WebCore::StyleResolver::clearCachedDeclarationsAffectedByViewportUnits):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::sweepMatchedPropertiesCache): Deleted.
        (WebCore::StyleResolver::computeMatchedPropertiesHash): Deleted.
        (WebCore::StyleResolver::findFromMatchedPropertiesCache): Deleted.
        (WebCore::StyleResolver::addToMatchedPropertiesCache): Deleted.
        (WebCore::StyleResolver::invalidateMatchedPropertiesCache): Deleted.
        (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits): Deleted.
        (WebCore::isCacheableInMatchedPropertiesCache): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::MatchedPropertiesCacheItem::MatchedPropertiesCacheItem): Deleted.
        * dom/Document.cpp:
        (WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
        (WebCore::Document::updateViewportUnitsOnResize):
        * page/Page.cpp:
        (WebCore::Page::updateStyleAfterChangeInEnvironment):
        * style/MatchedDeclarationsCache.cpp: Added.
        (WebCore::Style::MatchedDeclarationsCache::MatchedDeclarationsCache):
        (WebCore::Style::MatchedDeclarationsCache::isCacheable):
        (WebCore::Style::MatchedDeclarationsCache::computeHash):
        (WebCore::Style::MatchedDeclarationsCache::find):
        (WebCore::Style::MatchedDeclarationsCache::add):
        (WebCore::Style::MatchedDeclarationsCache::invalidate):
        (WebCore::Style::MatchedDeclarationsCache::clearEntriesAffectedByViewportUnits):
        (WebCore::Style::MatchedDeclarationsCache::sweep):
        * style/MatchedDeclarationsCache.h: Added.
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement):

2019-11-07  Eric Carlson  <eric.carlson@apple.com>

        UserMediaController::from(document) can return nullptr
        https://bugs.webkit.org/show_bug.cgi?id=203977
        <rdar://problem/56908013>

        Reviewed by Jer Noble.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::stop): NULL-check the UserMediaController.

2019-11-07  Chris Dumez  <cdumez@apple.com>

        Port ServiceWorkerContainer to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203963

        Reviewed by Ryosuke Niwa.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        (WebCore::ServiceWorkerContainer::startMessages):
        (WebCore::ServiceWorkerContainer::postMessage):
        * workers/service/ServiceWorkerContainer.h:

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

        Integrate scroll event into HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203839
        <rdar://problem/56890922>

        Reviewed by Simon Fraser.

        Dispatch scroll events on each pending scroll event targets inside the update-the-rendering step
        of the event loop as specified in the HTML5 and CSSOM View Module specifications:
        https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering
        https://drafts.csswg.org/cssom-view/#run-the-scroll-steps

        The new behavior also matches that of Chrome and Firefox.

        Like resize event, the current visual viewport specification does not specify when scroll event
        is dispatched on visualViewport interface: https://github.com/WICG/visual-viewport/issues/66
        For now, we always dispatch upon it after dispatching on all pending scroll event targets.

        Tests: fast/events/scroll-multiple-elements-in-rendering-update.html
               fast/events/scroll-subframe-in-rendering-update.html
               fast/visual-viewport/visual-viewport-scroll-after-resize-in-subframe.html

        * dom/Document.cpp:
        (WebCore::Document::addPendingScrollEventTarget): Added.
        (WebCore::Document::setNeedsVisualViewportScrollEvent): Added.
        (WebCore::Document::runScrollSteps): Added. This implements run the scroll steps in CSS OM View.
        * dom/Document.h:
        * dom/DocumentEventQueue.cpp:
        (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): Deleted.
        (WebCore::DocumentEventQueue::enqueueScrollEvent): Deleted.
        * dom/DocumentEventQueue.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::sendScrollEvent):
        * page/Page.cpp:
        (WebCore::Page::updateRendering): Invoke runScrollSteps on each document in the frame tree order.
        * page/VisualViewport.cpp:
        (WebCore::VisualViewport::update):
        (WebCore::VisualViewport::enqueueScrollEvent): Deleted.
        * page/VisualViewport.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollTo):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::scrollTo):

2019-11-08  Simon Fraser  <simon.fraser@apple.com>

        Captcha images render as blank white space
        https://bugs.webkit.org/show_bug.cgi?id=204013
        rdar://problem/50095458

        Reviewed by Zalan Bujtas.
        
        If updating z-order lists adds layers to the paint-order lists that have
        dirty bits, we need to propagate those dirty bits up the tree so that
        later dirty bit propagation doesn't stop prematurely. This could happen
        when content triggered visibility, and the missing dirty bits caused
        subframe layers to not get parented, resulting in missing layers with reCaptcha.
        We do this by accumulating dirty bits inside of collectLayers().

        Test: compositing/visibility/visibility-change-in-subframe.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::rebuildZOrderLists):
        (WebCore::RenderLayer::collectLayers):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::layerTreeAsText): Log so that debugging test failures is easier.

2019-11-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][MarginCollapsing] Drag anonymous block level boxes into margin collapsing
        https://bugs.webkit.org/show_bug.cgi?id=203927
        <rdar://problem/56963636>

        Reviewed by Antti Koivisto.

        We've been ignoring anonymous block level boxes in the context of margin collapsing. Now with IFC, we can't really do that anymore.
        This patch removes the early bailout on anon boxes and addresses the fallout.

        * layout/MarginTypes.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):

2019-11-07  Alex Christensen  <achristensen@webkit.org>

        Re-enable NSURLSession isolation after r252116
        https://bugs.webkit.org/show_bug.cgi?id=203934
        <rdar://problem/56921584>

        Reviewed by Chris Dumez.

        * platform/network/StoredCredentialsPolicy.h:

2019-11-07  Andres Gonzalez  <andresg_22@apple.com>

        Rename AXIsolatedTreeNode to AXIsolatedObject for consistency with AXCoreObject and AccessibilityObject.
        https://bugs.webkit.org/show_bug.cgi?id=203913

        Reviewed by Chris Fleizach.

        No new tests needed, no new functionality.

        - Renamed AXIsolatedTreeNode as AXIsolatedObject.
        - This makes the naming consistent with AXCoreObject and AccessibilityObject.
        - Some code cleanup in WebAccessibilityObjectWrapperBase.h.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::createIsolatedAccessibilityTreeHierarchy):
        (WebCore::AXObjectCache::generateIsolatedAccessibilityTree):
        * accessibility/AXObjectCache.h:
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::nodeInTreeForID):
        (WebCore::AXIsolatedTree::nodeForID const):
        (WebCore::AXIsolatedTree::focusedUIElement):
        (WebCore::AXIsolatedTree::rootNode):
        (WebCore::AXIsolatedTree::setRoot):
        (WebCore::AXIsolatedTree::appendNodeChanges):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedObject::AXIsolatedObject):
        (WebCore::AXIsolatedObject::create):
        (WebCore::AXIsolatedObject::initializeAttributeData):
        (WebCore::AXIsolatedObject::setProperty):
        (WebCore::AXIsolatedObject::appendChild):
        (WebCore::AXIsolatedObject::setParent):
        (WebCore::AXIsolatedObject::setTreeIdentifier):
        (WebCore::AXIsolatedObject::children):
        (WebCore::AXIsolatedObject::focusedUIElement const):
        (WebCore::AXIsolatedObject::parentObjectUnignored const):
        (WebCore::AXIsolatedObject::accessibilityHitTest const):
        (WebCore::AXIsolatedObject::tree const):
        (WebCore::AXIsolatedObject::rectAttributeValue const):
        (WebCore::AXIsolatedObject::doubleAttributeValue const):
        (WebCore::AXIsolatedObject::unsignedAttributeValue const):
        (WebCore::AXIsolatedObject::boolAttributeValue const):
        (WebCore::AXIsolatedObject::stringAttributeValue const):
        (WebCore::AXIsolatedObject::intAttributeValue const):
        (WebCore::AXIsolatedObject::updateBackingStore):
        (WebCore::AXIsolatedTreeNode::AXIsolatedTreeNode): Deleted.
        (WebCore::AXIsolatedTreeNode::create): Deleted.
        (WebCore::AXIsolatedTreeNode::initializeAttributeData): Deleted.
        (WebCore::AXIsolatedTreeNode::setProperty): Deleted.
        (WebCore::AXIsolatedTreeNode::appendChild): Deleted.
        (WebCore::AXIsolatedTreeNode::setParent): Deleted.
        (WebCore::AXIsolatedTreeNode::setTreeIdentifier): Deleted.
        (WebCore::AXIsolatedTreeNode::children): Deleted.
        (WebCore::AXIsolatedTreeNode::focusedUIElement const): Deleted.
        (WebCore::AXIsolatedTreeNode::parentObjectUnignored const): Deleted.
        (WebCore::AXIsolatedTreeNode::accessibilityHitTest const): Deleted.
        (WebCore::AXIsolatedTreeNode::tree const): Deleted.
        (WebCore::AXIsolatedTreeNode::rectAttributeValue const): Deleted.
        (WebCore::AXIsolatedTreeNode::doubleAttributeValue const): Deleted.
        (WebCore::AXIsolatedTreeNode::unsignedAttributeValue const): Deleted.
        (WebCore::AXIsolatedTreeNode::boolAttributeValue const): Deleted.
        (WebCore::AXIsolatedTreeNode::stringAttributeValue const): Deleted.
        (WebCore::AXIsolatedTreeNode::intAttributeValue const): Deleted.
        (WebCore::AXIsolatedTreeNode::updateBackingStore): Deleted.
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:

2019-11-07  Andres Gonzalez  <andresg_22@apple.com>

        Implement AXIsolatedTreeNode::roleDescription.
        https://bugs.webkit.org/show_bug.cgi?id=203863
        <rdar://problem/56934443>

        Reviewed by Chris Fleizach.

        No new tests needed, no new functionality.

        AccessibilityObjectWrapper cannot call any of the AX.*Text functions to
        retrieve localized role descriptions, because when running on the
        secondary thread, those AtomStrings are not accessible. Moreover, some
        of the special cases require access to DOM objects that are not
        available in the secondary thread. Therefore, added
        AXCoreObject::rolePlatformDescription that runs in the main thread to
        initialize the corresponding attribute in AXIsolatedTreeNode.
        rolePlatformString, createPlatformRoleMap, roleToPlatformString,
        ariaLandmarkRoleDescription, are helper functions. The platform
        functions allow to customize the behavior of roleDescription in each
        platform. The platform overrides are implemented for mac. Other
        platforms are pending.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::rolePlatformString const):
        (WebCore::AccessibilityObject::rolePlatformDescription const):
        (WebCore::AccessibilityObject::ariaLandmarkRoleDescription const):
        (WebCore::AccessibilityObject::roleDescription const):
        (WebCore::Accessibility::createPlatformRoleMap):
        (WebCore::Accessibility::roleToPlatformString):
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedTreeNode::initializeAttributeData):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/AccessibilityObjectMac.mm:
        (WebCore::AccessibilityObject::rolePlatformString const):
        (WebCore::AccessibilityObject::rolePlatformDescription const):
        (WebCore::Accessibility::createPlatformRoleMap):
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (-[WebAccessibilityObjectWrapperBase accessibilityObject]):
        (-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]): Implementation moved to AccessibilityObject.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper role]): Special cases moved to rolePlatformString.
        (-[WebAccessibilityObjectWrapper roleDescription]):
        (createAccessibilityRoleMap): Deleted, became Accessibility::createPlatformRoleMap.
        (roleValueToNSString): Deleted, became Accessibility::roleToPlatformString.
        * platform/LocalizedStrings.cpp:
        (WebCore::AXARIAContentGroupText):
        (WebCore::AXHorizontalRuleDescriptionText):
        (WebCore::AXMarkText):
        * platform/LocalizedStrings.h:
        * platform/cocoa/LocalizedStringsCocoa.mm:
        (WebCore::AXARIAContentGroupText): Deleted, moved to LocalizedStrings.cpp.
        (WebCore::AXHorizontalRuleDescriptionText): Deleted, moved to LocalizedStrings.cpp.
        (WebCore::AXMarkText): Deleted, moved to LocalizedStrings.cpp.

2019-11-07  Chris Lord  <clord@igalia.com>

        Indentation in ThreadGlobalData.h is incorrect
        https://bugs.webkit.org/show_bug.cgi?id=203895

        Reviewed by Žan Doberšek.

        No new tests -- no change in behavior.

        * platform/ThreadGlobalData.h:
        (WebCore::ThreadGlobalData::ThreadGlobalData::cachedResourceRequestInitiators):
        (WebCore::ThreadGlobalData::ThreadGlobalData::eventNames):
        (WebCore::ThreadGlobalData::ThreadGlobalData::threadTimers):
        (WebCore::ThreadGlobalData::ThreadGlobalData::qualifiedNameCache):
        (WebCore::ThreadGlobalData::ThreadGlobalData::cachedConverterICU):
        (WebCore::ThreadGlobalData::ThreadGlobalData::currentState const):
        (WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState):
        (WebCore::ThreadGlobalData::ThreadGlobalData::isInRemoveAllEventListeners const):
        (WebCore::ThreadGlobalData::ThreadGlobalData::setIsInRemoveAllEventListeners):

2019-11-05  Sergio Villar Senin  <svillar@igalia.com>

        VRDisplay should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203105

        Reviewed by Chris Dumez.

        VRDisplay schedules asynchronous execution of events using the WindowEventLoop instead of
        synchronously firing them. WindowEventLoop does correctly suspend while in cache.

        Apart from that suspend()/resume() were implemented by forcing m_scriptedAnimationController
        to suspend the VR request animation frame machinery while in cache.

        Last but not least, stopPresenting() is now also called on suspension.

        No new tests were added as there is no testing machinery for WebVR so far. It's unclear how
        this unreleased feature will evolve as it's being replaced by WebXR.

        * Modules/webvr/VRDisplay.cpp:
        (WebCore::VRDisplay::dispatchVRDisplayEventInWindowEventLoop):
        (WebCore::VRDisplay::platformDisplayConnected): Use dispatchVRDisplayEventInWindowEventLoop.
        (WebCore::VRDisplay::platformDisplayDisconnected): Ditto.
        (WebCore::VRDisplay::platformDisplayMounted): Ditto.
        (WebCore::VRDisplay::platformDisplayUnmounted): Ditto.
        (WebCore::VRDisplay::suspend): Added.
        (WebCore::VRDisplay::resume): Added.
        (WebCore::VRDisplay::stop): Call stopPresenting().
        (WebCore::VRDisplay::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/webvr/VRDisplay.h:

2019-11-06  Devin Rousso  <drousso@apple.com>

        Remove unimplemented property error log in when getting a property value from a computed style
        https://bugs.webkit.org/show_bug.cgi?id=203943

        Reviewed by Simon Fraser.

        In r251581, the list of computed CSS properties was changed to be autogenerated from 'CSSProperties.json'.
        One issue that arose from this was that `-webkit-text-decorations-in-effect` was no longer part of the
        `CSSComputedStyleDeclaration`, which caused a number of editing tests to fail, as that property is used
        for holding internal state related to various editing commands (e.g. `document.execCommand(...)`). In
        order to get around this, `ComputedStyleExtractor::copyProperties()` was modified to instead copy all CSS
        properties, regardless of whether they're part of the set of computed CSS properties. Unfortunately, this
        had a side effect of triggering a longstanding `LOG_ERROR` (added in r6178) when attempting to retrieve
        the value of certain CSS properties (e.g. `-internal-text-autosizing-status`).

        Since this code path can be triggered by JavaScript (e.g. `getComputedStyle(node).getPropertyCSSValue("...")`),
        it doesn't add much benefit to have this log, especially since the code itself is already annotated with
        comments/FIXMEs for CSS properties that don't have a computed value.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        (WebCore::logUnimplementedPropertyID): Deleted.
        * css/SVGCSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::svgPropertyValue):

2019-11-06  Eric Liang  <ericliang@apple.com>

        AX: WKWebView does not shift Accessibility Focus for Catalyst (203798)
        https://bugs.webkit.org/show_bug.cgi?id=203798

        Reviewed by Chris Fleizach.

        Changed to use the new cocoa directory instead of macOS only

        * accessibility/mac/AXObjectCacheMac.mm:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

2019-11-06  Fujii Hironori  <Hironori.Fujii@sony.com>

        WEBCORE_TESTSUPPORT_EXPORT should be used only for WebCoreTestSupport, not for WebCore
        https://bugs.webkit.org/show_bug.cgi?id=203876

        Reviewed by Ross Kirsling.

        WEBCORE_TESTSUPPORT_EXPORT shouldn't be used for WebCore. It is
        only for WebCoreTestSupport module.

        WebCoreTestSupport symbols don't need to export on Windows because
        it is a static library on it. WEBCORE_TESTSUPPORT_EXPORT should be
        empty.

        No behavioral changes.

        * Modules/encryptedmedia/MediaKeyEncryptionScheme.idl:
        * Modules/encryptedmedia/MediaKeySessionType.idl:
        * Modules/encryptedmedia/MediaKeysRequirement.idl:
        * Modules/mediastream/NavigatorMediaDevices.h:
        * bindings/scripts/test/JS/JSTestNode.h:
        * bindings/scripts/test/TestNode.idl:
        * workers/service/context/ServiceWorkerThreadProxy.h:
        Replaced wrongly marked WEBCORE_TESTSUPPORT_EXPORT with WEBCORE_EXPORT.

        * testing/js/WebCoreTestSupportPrefix.h: Define WEBCORE_TESTSUPPORT_EXPORT empty.
        * WebCorePrefix.h: Removed WEBCORE_TESTSUPPORT_EXPORT definition.

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

        Change the UIWebView layer border colors to more strongly differentiate them from WKWebView's colors
        https://bugs.webkit.org/show_bug.cgi?id=203940
        rdar://problem/56708548

        Reviewed by Tim Horton, Wenson Hsieh.

        Change layer border colors (which also affect the repaint counter) in UIWebView to use
        a chartreuse color, so it's easy to tell at a glance whether an app is using the deprecated
        UIWebView.

        * platform/ios/LegacyTileCache.mm:
        (WebCore::LegacyTileCache::colorForGridTileBorder const):

2019-11-06  Jer Noble  <jer.noble@apple.com>

        Screen locks while watching previously-muted-then-unmuted video
        https://bugs.webkit.org/show_bug.cgi?id=203906
        <rdar://problem/55821375>

        Reviewed by Eric Carlson.

        Test: media/video-unmuted-after-play-holds-sleep-assertion.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setMuted):

2019-11-06  Oriol Brufau  <obrufau@igalia.com>

        Keep None value at the end of the ListStyleType enum
        https://bugs.webkit.org/show_bug.cgi?id=203883

        Reviewed by Manuel Rego Casasnovas.

        Bug 203837 added a String value at the end of the ListStyleType enum.
        This patch moves it before None, in order to keep None at the end.

        * rendering/style/RenderStyleConstants.h:

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

        [LFC][MarginCollapsing] Add Line::isConsideredEmpty
        https://bugs.webkit.org/show_bug.cgi?id=203800
        <rdar://problem/56854192>

        Reviewed by Antti Koivisto.

        https://www.w3.org/TR/CSS22/visuren.html#inline-formatting
        Line boxes that contain no text, no preserved white space, no inline elements with non-zero margins, padding, or borders,
        and no other in-flow content (such as images, inline blocks or inline tables), and do not end with a preserved newline
        must be treated as zero-height line boxes for the purposes of determining the positions of any elements inside of them,
        and must be treated as not existing for any other purpose.

        Note that it does not necessarily mean visually non-empty line
        <span style="font-size: 0px">this is still considered non-empty</span>

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendReplacedInlineBox):
        (WebCore::Layout::Line::appendLineBreak):
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::isConsideredEmpty const):
        (WebCore::Layout::LineBox::setIsConsideredNonEmpty):

2019-11-06  Chris Lord  <clord@igalia.com>

        [Cairo] Cairo graphics backend uses ImageBuffer::copyImage just to access native image buffer handles
        https://bugs.webkit.org/show_bug.cgi?id=203884

        Reviewed by Carlos Garcia Campos.

        The Cairo graphics backend uses ImageBuffer::copyImage(DontCopyBackingStore) frequently just to access
        the native image pointer. This makes several functions unusable off-main-thread, so add an accessor
        function to avoid doing this.

        No new tests -- no change in behavior.

        * platform/graphics/ImageBuffer.h:
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawShadowLayerBuffer):
        (WebCore::Cairo::drawShadowImage):
        (WebCore::Cairo::fillShadowBuffer):
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::clipToImageBuffer):
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::clipToImageBuffer):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::nativeImage const):

2019-11-06  Philippe Normand  <philn@igalia.com>

        REGRESSION(r249428): [GStreamer] VP9 video rendered green
        https://bugs.webkit.org/show_bug.cgi?id=201422
        <rdar://problem/55945741>

        Reviewed by Carlos Garcia Campos.

        Enable the texture upload GStreamer meta code path. Until
        GStreamer 1.16.2 this workaround is needed to fix VP9 (vp9dec)
        rendering. For downstream users cherry-picking the corresponding
        GStreamer patch[0], an environment variable can be set to bypass
        the reintroduced slow color conversion: $WEBKIT_GST_NO_RGBA_CONVERSION.

        [0] https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693

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

2019-11-06  youenn fablet  <youenn@apple.com>

        There is no need to clean the content type header of a request if it is null
        https://bugs.webkit.org/show_bug.cgi?id=203853

        Reviewed by Geoffrey Garen.

        No change of behavior.

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::cleanHTTPRequestHeadersForAccessControl):
        Stop early if content type is null so that we do not log an error that is not a real error.

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

        Integrate visualViewport's resize event with HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203842

        Reviewed by Simon Fraser.

        Integrate the visual viewport API's resize event with HTML5 event loop
        as intended in r251867.

        Test: fast/events/resize-subframe-in-rendering-update.html

        * dom/DocumentEventQueue.cpp:
        (WebCore::DocumentEventQueue::enqueueResizeEvent): Deleted.
        * dom/DocumentEventQueue.h:
        * page/VisualViewport.cpp:
        (WebCore::VisualViewport::update):
        (WebCore::VisualViewport::enqueueResizeEvent): Deleted.

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

        Unreviewed, rolling out r251908.

        This workaround is not needed after r252086.

        Reverted changeset:

        "[WinCairo][Clang] Unreviewed build fix"
        https://bugs.webkit.org/show_bug.cgi?id=203663
        https://trac.webkit.org/changeset/251908

        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::identifier const): Deleted.
        * workers/service/context/ServiceWorkerThreadProxy.h:

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

        [Win][CMake] Build WebCore as an OBJECT library unless Apple internal builds
        https://bugs.webkit.org/show_bug.cgi?id=203663

        Reviewed by Ross Kirsling.

        No behavioral changes.

        * CMakeLists.txt: Changed WebCoreTestSupport not to link with
        WebCore for Windows. Because WebKit.dll exports WebCore symbols,
        they will be duplicated with WebCore.

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

        REGRESSION (r251930): Flaky WK1 crash in printing/pseudo-class-outside-page.html
        https://bugs.webkit.org/show_bug.cgi?id=203855

        Reviewed by Simon Fraser.

        Exit early when executing media queries removes FrameView.

        * page/Frame.cpp:
        (WebCore::Frame::setPrinting):

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

        Adding logging to diagnose crashes resulting from provisional document loader unexpectedly being nullptr
        https://bugs.webkit.org/show_bug.cgi?id=203837

        Reviewed by Geoffrey Garen.

        Added various logging for DocumentLoader and FrameLoader to figure out why
        FrameLoader::m_provisionalDocumentLoader can be nullptr in some cases.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setRequest):
        (WebCore::DocumentLoader::willSendRequest):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::setupForReplace):
        (WebCore::FrameLoader::clearProvisionalLoadForPolicyCheck):
        (WebCore::FrameLoader::stopAllLoaders):
        (WebCore::FrameLoader::stopForBackForwardCache):
        (WebCore::FrameLoader::clearProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):

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

        [css-lists] Implement list-style-type: <string>
        https://bugs.webkit.org/show_bug.cgi?id=167729

        Reviewed by Antti Koivisto.

        This patch extends the syntax of the list-style-type property to accept
        arbitrary string values in order to customize the marker contents.

        When a string is specified for list-style-type, the patch sets it to a
        special ListStyleType::String, and the string value is stored in an
        extra field.

        Tests: imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html
               imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html
               imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
               imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html

        Some tests fail because mixed-bidi is not supported in markers
        (https://bugs.webkit.org/show_bug.cgi?id=202849).

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSProperties.json:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isPartialKeywordPropertyID):
        * css/parser/CSSParserFastPaths.h:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        * rendering/RenderListMarker.cpp:
        (WebCore::effectiveListMarkerType):
        (WebCore::listMarkerSuffix):
        (WebCore::listMarkerText):
        (WebCore::RenderListMarker::styleDidChange):
        (WebCore::RenderListMarker::paint):
        (WebCore::RenderListMarker::updateContent):
        (WebCore::RenderListMarker::computePreferredLogicalWidths):
        (WebCore::RenderListMarker::updateMargins):
        (WebCore::RenderListMarker::suffix const):
        (WebCore::RenderListMarker::getRelativeMarkerRect):
        * rendering/style/CounterContent.h:
        (WebCore::CounterContent::CounterContent):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::listStyleStringValue const):
        (WebCore::RenderStyle::setListStyleStringValue):
        (WebCore::RenderStyle::initialListStyleStringValue):
        * rendering/style/RenderStyleConstants.cpp:
        (WebCore::operator<<):
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator== const):
        * rendering/style/StyleRareInheritedData.h:
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyInheritListStyleType):
        (WebCore::Style::BuilderCustom::applyInitialListStyleType):
        (WebCore::Style::BuilderCustom::applyValueListStyleType):

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

        Content can disappear with a combination of <video> with controls and clipping
        https://bugs.webkit.org/show_bug.cgi?id=203834
        rdar://problem/56559648

        Reviewed by Zalan Bujtas.
        
        <video> with controls triggered a bug where a backing-sharing layer also claimed
        that it didn't need any backing store. RenderLayerCompositor::requiresOwnBackingStore()
        could early-return with 'false' if a layer had an indirect compositing reason of "Clipping",
        while also backing-sharing. We need to check for backing-sharing first.

        Test: compositing/shared-backing/clipping-and-shared-backing.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::setBackingSharingLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):

2019-11-05  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Disabled SVG shapes should not be hit
        https://bugs.webkit.org/show_bug.cgi?id=200140

        Reviewed by Simon Fraser.

        The fill and the stroke rectangles should not be computed for disabled
        SVG shapes.

        The existing code may calculate the root's boundary: at(0, 0) size 0x0
        while one of its children boundary is calculated at: (47,47) size 6x6.
        See circle-01-expected.txt.

        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::updateShapeFromElement):
        * rendering/svg/RenderSVGRect.cpp:
        (WebCore::RenderSVGRect::updateShapeFromElement):
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::fillContains):
        (WebCore::RenderSVGShape::strokeContains):

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

        [Cocoa] Right Command key should have location DOM_KEY_LOCATION_RIGHT instead of DOM_KEY_LOCATION_STANDARD
        https://bugs.webkit.org/show_bug.cgi?id=202601
        <rdar://problem/55992775>

        Reviewed by Wenson Hsieh.

        On Cocoa platforms the right Command key is mapped to VK_APPS. Report VK_APPS as being on the
        right side of the keyboard on these platforms.

        * dom/KeyboardEvent.cpp:
        (WebCore::keyLocationCode):

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

        DatabaseContext should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203103
        <rdar://problem/56592193>

        Reviewed by Geoffrey Garen.

        Let pages with active webdatabase transactions into the back/forward cache. We make sure
        to queue tasks that run script to the Window event loop, so that they get delayed when
        the document is suspended.

        This patch also makes sure that the transaction's error callback gets called if the database
        gets closed while the transaction is going on. We previously did not happen and it was causing
        issues because databases get closed on navigation.

        No new tests, updated existing test.

        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::runTransaction):
        * Modules/webdatabase/DatabaseContext.cpp:
        (WebCore::DatabaseContext::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/webdatabase/DatabaseContext.h:
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::openDatabase):
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::performPendingCallback):
        (WebCore::SQLTransaction::notifyDatabaseThreadIsShuttingDown):
        (WebCore::SQLTransaction::callErrorCallbackDueToInterruption):
        (WebCore::SQLTransaction::checkAndHandleClosedDatabase):
        (WebCore::SQLTransaction::deliverTransactionErrorCallback):
        (WebCore::SQLTransaction::deliverSuccessCallback):
        (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
        * Modules/webdatabase/SQLTransaction.h:

2019-11-05  Sihui Liu  <sihui_liu@apple.com>

        REGRESSION (r250754): web page using IDBIndex doesn't load occasionally
        https://bugs.webkit.org/show_bug.cgi?id=203431

        Reviewed by Brady Eidson.

        We now allow page to enter cache even when there are active IDB objects. The open database connection or blocked
        database request on suspended pages may stop other active pages from deleting or opening the same database.

        To fix this issue, we close those open connections on suspended page when we know from the versionchange event, 
        that there is open/delete request blocked. For blocked requests on suspended page, we abort them and return 
        error. This way, when the suspended page resumes, it will get close event fired on previously opened database 
        connections, and error event fired on previously blocked requests.

        API test: IndexedDB.IndexedDBInPageCache

        * Modules/indexeddb/IDBDatabase.h:
        * Modules/indexeddb/IDBOpenDBRequest.cpp:
        (WebCore::IDBOpenDBRequest::requestCompleted):
        (WebCore::IDBOpenDBRequest::requestBlocked):
        (WebCore::IDBOpenDBRequest::setIsContextSuspended):
        * Modules/indexeddb/IDBOpenDBRequest.h:
        * Modules/indexeddb/IndexedDB.h:
        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
        (WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest):
        (WebCore::IDBClient::IDBConnectionProxy::fireVersionChangeEvent):
        (WebCore::IDBClient::IDBConnectionProxy::didFireVersionChangeEvent):
        (WebCore::IDBClient::setMatchingItemsContextSuspended):
        (WebCore::IDBClient::IDBConnectionProxy::setContextSuspended):
        * Modules/indexeddb/client/IDBConnectionProxy.h:
        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
        (WebCore::IDBClient::IDBConnectionToServer::didFireVersionChangeEvent):
        * Modules/indexeddb/client/IDBConnectionToServer.h:
        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::didFireVersionChangeEvent):
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::clearTransactionsOnConnection):
        (WebCore::IDBServer::UniqueIDBDatabase::didFireVersionChangeEvent):
        (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent):
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::InProcessIDBServer::didFireVersionChangeEvent):
        * Modules/indexeddb/shared/InProcessIDBServer.h:
        * dom/Document.cpp:
        (WebCore::Document::setBackForwardCacheState):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::suspend):
        (WebCore::WorkerGlobalScope::resume):
        * workers/WorkerGlobalScope.h:
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::suspend):

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

        http/tests/media/track-in-band-hls-metadata.html sometimes crashes after r251626
        https://bugs.webkit.org/show_bug.cgi?id=203849
        <rdar://problem/56889717>

        Reviewed by Youenn Fablet.

        No new tests, fixes existing test.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (-[WebCoreAVFMovieObserver metadataOutput:didOutputTimedMetadataGroups:fromPlayerItemTrack:]): Return early if
        m_player has been cleared.
        (-[WebCoreAVFMovieObserver metadataCollector:didCollectDateRangeMetadataGroups:indexesOfNewGroups:indexesOfModifiedGroups:]):
        Ditto.

2019-11-05  Andy Estes  <aestes@apple.com>

        ApplePaySession should never prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203087
        <rdar://problem/56744401>

        Reviewed by Chris Dumez.

        Rather than prevent entering the back/forward cache when there is an active session, abort
        the session on suspension and queue a task to the event loop that dispatches the cancel event.

        Tests: http/tests/ssl/applepay/page-cache-active-apple-pay-session.html
               http/tests/ssl/applepay/page-cache-inactive-apple-pay-session.html

        * Modules/applepay/ApplePaySession.cpp:
        (WebCore::ApplePaySession::canSuspendWithoutCanceling const):
        (WebCore::ApplePaySession::suspend):
        (WebCore::ApplePaySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/applepay/ApplePaySession.h:

2019-11-05  youenn fablet  <youenn@apple.com>

        MessagePort::close cannot assume that is execution context is not null
        https://bugs.webkit.org/show_bug.cgi?id=203843
        <rdar://problem/55599877>

        Reviewed by Chris Dumez.

        Covered by updated test.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::close):
        Do not use m_scriptExecutionContext since it can be nulled out in MessagePort::disentangle.
        * dom/messageports/WorkerMessagePortChannelProvider.cpp:
        (WebCore::WorkerMessagePortChannelProvider::messagePortClosed):

2019-11-05  James Darpinian  <jdarpinian@chromium.org>

        Enable powerPreference controlled GPU switching with ANGLE
        https://bugs.webkit.org/show_bug.cgi?id=203773

        GPU switching can't be controlled from within ANGLE running in the content process
        due to sandbox restrictions. So we need to continue using the existing
        HighPerformanceGPUManager path with ANGLE.

        Although the high power GPU is activated on request with this change, ANGLE does
        not use it yet.

        Reviewed by Alex Christensen.

        * platform/graphics/GraphicsContext3D.cpp:
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/GraphicsContext3DManager.cpp:
        (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
        (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):

2019-11-05  youenn fablet  <youenn@apple.com>

        mp4 video element broken with service worker
        https://bugs.webkit.org/show_bug.cgi?id=184447
        <rdar://problem/39313155>

        Reviewed by Chris Dumez.

        Update fetch header handling to properly handle range header as per https://fetch.spec.whatwg.org/#headers-class.
        In particular, remove thre range header from a Request/Headers object whenever modified.
        Add checks so that range responses are not reused for non range requests.
        For that purpose, add a range-requested flag to ResourceResponse.
        Ass helper routines implementing part of fetch spec.
        Covered by enabled test.

        * Modules/fetch/FetchHeaders.cpp:
        (WebCore::removePrivilegedNoCORSRequestHeaders):
        (WebCore::appendToHeaderMap):
        (WebCore::FetchHeaders::remove):
        (WebCore::FetchHeaders::set):
        * Modules/fetch/FetchHeaders.h:
        (WebCore::FetchHeaders::setInternalHeaders):
        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::initializeWith):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * platform/network/HTTPParsers.cpp:
        (WebCore::isNoCORSSafelistedRequestHeaderName):
        (WebCore::isPriviledgedNoCORSRequestHeaderName):
        * platform/network/HTTPParsers.h:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::crossThreadData const):
        (WebCore::ResourceResponseBase::fromCrossThreadData):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::isRangeRequested const):
        (WebCore::ResourceResponseBase::setAsRangeRequested):
        (WebCore::ResourceResponseBase::encode const):
        (WebCore::ResourceResponseBase::decode):

2019-11-05  youenn fablet  <youenn@apple.com>

        Enforce user gesture for getUserMedia in case a previous getUserMedia call was denied
        https://bugs.webkit.org/show_bug.cgi?id=203362

        Reviewed by Eric Carlson.

        Compute whether a media request is user priviledged or not.
        It is priviledged if it is created as part of a user gesture and no request of the same type
        has been previously created for the same user gesture.
        If getDisplayMedia is called twice as part of a single user gesture, getDisplaMedia will reject for the second call.

        Remove the internal ability to disable user gesture check.
        Instead use internals API to simulate a user gesture.       

        Test: fast/mediastream/getUserMedia-deny-persistency5.html and updated test.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::computeUserGesturePriviledge):
        (WebCore::MediaDevices::getUserMedia):
        (WebCore::MediaDevices::getDisplayMedia):
        (WebCore::MediaDevices::getUserMedia const): Deleted.
        (WebCore::MediaDevices::getDisplayMedia const): Deleted.
        * Modules/mediastream/MediaDevices.h:
        * platform/mediastream/MediaStreamRequest.h:
        (WebCore::MediaStreamRequest::encode const):
        (WebCore::MediaStreamRequest::decode):
        * testing/Internals.cpp:
        (WebCore::Internals::setMediaStreamSourceInterrupted):
        (WebCore::Internals::setDisableGetDisplayMediaUserGestureConstraint): Deleted.
        * testing/Internals.h:
        * testing/Internals.idl:

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

        [FreeType] Too slow running encoding/legacy-mb-korean/euc-kr WPT tests
        https://bugs.webkit.org/show_bug.cgi?id=203544

        Reviewed by Carlos Alberto Lopez Perez.

        Use a cache for system fallbacks to keep the fonts sorted by font description. When a system fallback is needed
        again for the same font description, but different characters, we just iterate the cached font set comparing the
        charsets to get the best one. This avoids using FcFontMatch and FcFontSort is only called once per font description.

        * platform/graphics/FontCache.h:
        * platform/graphics/freetype/FontCacheFreeType.cpp:
        (WebCore::CachedFontSet::CachedFontSet):
        (WebCore::CachedFontSet::bestForCharacters):
        (WebCore::FallbackFontDescriptionKey::FallbackFontDescriptionKey):
        (WebCore::FallbackFontDescriptionKey::operator== const):
        (WebCore::FallbackFontDescriptionKey::operator!= const):
        (WebCore::FallbackFontDescriptionKey::isHashTableDeletedValue const):
        (WebCore::FallbackFontDescriptionKey::computeHash const):
        (WebCore::FallbackFontDescriptionKeyHash::hash):
        (WebCore::FallbackFontDescriptionKeyHash::equal):
        (WebCore::systemFallbackCache):
        (WebCore::FontCache::systemFallbackForCharacters):
        (WebCore::FontCache::platformPurgeInactiveFontData):

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

        Drop SuspendableTaskQueue now that it is unused
        https://bugs.webkit.org/show_bug.cgi?id=203827

        Reviewed by Ryosuke Niwa.

        All users have been ported to the HTML5 event loop.

        * PlatformWin.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/SuspendableTaskQueue.cpp: Removed.
        * platform/SuspendableTaskQueue.h: Removed.
        * workers/service/ServiceWorkerContainer.h:

2019-11-04  Myles C. Maxfield  <mmaxfield@apple.com>

        Rename ui-monospaced to ui-monospace to match the monospace generic font family
        https://bugs.webkit.org/show_bug.cgi?id=203602

        Reviewed by Simon Fraser.

        As per https://github.com/w3c/csswg-drafts/issues/4469

        Updated existing tests.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::platformFontLookupWithFamily):
        (WebCore::fontWithFamilySpecialCase):
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::matchSystemFontUse):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::createDesignSystemUIFont):
        (WebCore::SystemFontDatabaseCoreText::cascadeList):
        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

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

        MediaKeySession / WebKitMediaKeySession should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203089

        Reviewed by Youenn Fablet.

        Port MediaKeySession / WebKitMediaKeySession to the HTML5 event loop instead of using its
        own GenericEventQueue / GenericTaskQueue. Because the HTML5 event loop plays nicely with
        the back/forward cache, we can now let pages using MediaKeySession / WebKitMediaKeySession
        into the back/forward cache.

        Test: http/tests/navigation/page-cache-mediakeysession.html

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::MediaKeySession):
        (WebCore::MediaKeySession::generateRequest):
        (WebCore::MediaKeySession::load):
        (WebCore::MediaKeySession::update):
        (WebCore::MediaKeySession::close):
        (WebCore::MediaKeySession::remove):
        (WebCore::MediaKeySession::enqueueMessage):
        (WebCore::MediaKeySession::updateKeyStatuses):
        (WebCore::MediaKeySession::hasPendingActivity const):
        (WebCore::MediaKeySession::activeDOMObjectName const):
        (WebCore::MediaKeySession::enqueueTask):
        (WebCore::MediaKeySession::enqueueEvent):
        (WebCore::MediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        (WebCore::MediaKeySession::stop): Deleted.
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        (WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
        (WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
        (WebCore::WebKitMediaKeySession::addKeyTimerFired):
        (WebCore::WebKitMediaKeySession::sendMessage):
        (WebCore::WebKitMediaKeySession::sendError):
        (WebCore::WebKitMediaKeySession::hasPendingActivity const):
        (WebCore::WebKitMediaKeySession::enqueueEvent):
        (WebCore::WebKitMediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:

2019-11-04  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed fix for non-unified build.

        * style/PropertyCascade.cpp:
        (WebCore::Style::isValidVisitedLinkProperty): Deleted.
        * style/PropertyCascade.h:
        (WebCore::Style::isValidVisitedLinkProperty): Added.
        This is being used from StyleBuilder.cpp; it can't just be static inline in a .cpp file.

        * Modules/cache/DOMCacheStorage.cpp:
        * css/DOMCSSRegisterCustomProperty.cpp:
        * inspector/InspectorInstrumentation.cpp:
        * style/StyleBuilder.cpp:
        * style/StyleBuilderState.cpp:
        * workers/service/ServiceWorkerProvider.cpp:
        * worklets/WorkletGlobalScope.h:
        Add missing includes.

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

        Unreviewed attempt to fix wincairo build after r252016.

        * css/FontFaceSet.h:

2019-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION (r248750): Drop-down menu for Walgreens 2FA unresponsive to touch
        https://bugs.webkit.org/show_bug.cgi?id=203821
        <rdar://problem/56550488>

        Reviewed by Zalan Bujtas.

        The dropdown in question in the Walgreens app uses UIWebView. In this report, tapping the dropdown menu (which
        installs DOMTimers upon touchstart) no longer dispatches a click event. This reproduces in WebKit1, but not in
        WebKit2.

        After r248750, we no longer transition from IndeterminateChange to NoChange before calling out to the client
        layer to report a deferred content observation change (in legacy WebKit, this is a call to the delegate method
        -webView:didObserveDeferredContentChange:forFrame:).

        In WebKit2, logic in WebPage::handleSyntheticClick handles indeterminate content changes after dispatching
        mousemove by starting a fixed 32ms content observation timer, after the end of which we transition from
        indeterminate to either NoChange or VisibilityChange, and call out to the client. This logic is absent in
        WebKitLegacy, where we directly report the current content observation state to the client.

        As such, the content change is still indeterminate when we finally call out to the client layer in the runloop
        after dispatching the mousemove event in EventHandler::mouseMoved(). Client code in UIKit does not expect this,
        and assumes that the given WKContentChange must either be NoChange or VisibilityChange; thus, it handles
        indeterminate change as VisibilityChange and does not dispatch a click.

        This legacy-WebKit-specific call to didFinishContentChangeObserving is intended to act as a failsafe to stop
        content observation after mousemove, if any active timers scheduled during touchstart have already finished
        executing. To fix this bug, instead of calling out to WebChromeClient::didFinishContentChangeObserving directly,
        add a new method to ContentChangeObserver to inform it that a mousemove event has been handled; here, we call
        notifyClientIfNeeded, which will transition the content change state from indeterminate to NoChange if needed
        before calling out to the client.

        No new test, because we don't have any mechanism for simulating user interaction in UIWebView (and inventing one
        at this stage would have diminishing returns at best).

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::willNotProceedWithFixedObservationTimeWindow):
        (WebCore::ContentChangeObserver::adjustObservedState):
        * page/ios/ContentChangeObserver.h:
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::mouseMoved):

        Replace the call to WebChromeClient::didFinishContentChangeObserving with a ContentChangeObserver method that
        turns around and calls into notifyClientIfNeeded, via ContentChangeObserver::adjustObservedState.

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

        Port FontFaceSet to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203769

        Reviewed by Ryosuke Niwa.

        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::didFirstLayout):
        (WebCore::FontFaceSet::completedLoading):
        (WebCore::FontFaceSet::faceFinished):
        (WebCore::FontFaceSet::enqueueTask):
        * css/FontFaceSet.h:
        * dom/AbstractEventLoop.h:

2019-11-04  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Flush the shared ResourceLoadObserver when the webpage is closed by JavaScript
        https://bugs.webkit.org/show_bug.cgi?id=203623
        <rdar://problem/56756427>

        Reviewed by Alex Christensen.

        New API test added.

        * loader/ResourceLoadObserver.cpp:
        (WebCore::ResourceLoadObserver::shared):
            Now returns its own empty observer if no shared one has been set.
        * loader/ResourceLoadObserver.h:
        (WebCore::ResourceLoadObserver::logSubresourceLoadingForTesting):
            Test function to seed the web process' observer.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::close):
            Now flushes the shared observer.

2019-11-04  Alex Christensen  <achristensen@webkit.org>

        Collect all documents before iterating in Page::forEachDocument
        https://bugs.webkit.org/show_bug.cgi?id=203811
        <rdar://problem/56832747>

        Reviewed by Ryosuke Niwa.

        Some calls to forEachDocument, notably those introduced in r251930, can mutate the frames and documents as they are being iterated.
        This causes problems that can be avoided by iterating, keeping all Documents referenced, then iterating the referenced Documents.

        * page/Page.cpp:
        (WebCore::Page::forEachDocument):

2019-11-04  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r251993.

        Broke platform/mac/media/encrypted-media/fps-
        generateRequest.html on Mojave+

        Reverted changeset:

        "MediaKeySession / WebKitMediaKeySession should not prevent
        entering the back/forward cache"
        https://bugs.webkit.org/show_bug.cgi?id=203089
        https://trac.webkit.org/changeset/251993

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

        Port WebAnimation to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203797

        Reviewed by Ryosuke Niwa.

        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::WebAnimation):
        (WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
        (WebCore::WebAnimation::stop):
        (WebCore::WebAnimation::hasPendingActivity const):
        * animation/WebAnimation.h:

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

        Box-shadow spread radius does not transition or animate correctly with CSS Transitions & Animations
        https://bugs.webkit.org/show_bug.cgi?id=202489

        Reviewed by Zalan Bujtas.
        
        Fix box-shadow offset and spread to support subpixel values, and make the rendering subpixel-aware.
        This also makes animation of shadow spread and offset be smoother on Retina displays.

        Also make ShadowStyle an enum class.

        Test: fast/box-shadow/hidpi-box-shadow.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForShadow):
        (WebCore::ComputedStyleExtractor::valueForFilter):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::computeLength const):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc):
        (WebCore::shadowForBlending):
        * platform/animation/AnimationUtilities.h:
        (WebCore::blend):
        * platform/graphics/RoundedRect.h:
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintBoxDecorations):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintBoxDecorations):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::applyBoxShadowForBackground):
        (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
        (WebCore::areaCastingShadowInHole):
        (WebCore::RenderBoxModelObject::paintBoxShadow):
        Move the snapping until after we've adjusted rects for offset and spread. The "extraOffset"
        computation makes the snapping a little more complex; we have to snap before and after applying
        shadowOffset, and give to GraphicsContext the delta between the snapped values.
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::paintBoxDecorations):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintBoxDecorations):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::setTextShadow):
        (WebCore::RenderStyle::getShadowExtent const):
        (WebCore::RenderStyle::getShadowInsetExtent const):
        (WebCore::RenderStyle::getShadowHorizontalExtent const):
        (WebCore::RenderStyle::getShadowVerticalExtent const):
        * rendering/style/ShadowData.cpp:
        (WebCore::ShadowData::ShadowData):
        (WebCore::calculateShadowExtent):
        (WebCore::ShadowData::adjustRectForShadow const):
        * rendering/style/ShadowData.h:
        (WebCore::ShadowData::ShadowData):
        (WebCore::ShadowData::x const):
        (WebCore::ShadowData::y const):
        (WebCore::ShadowData::location const):
        (WebCore::ShadowData::paintingExtent const):
        (WebCore::ShadowData::spread const):
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

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

        MediaRecorder should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203093
        <rdar://problem/56748870>

        Reviewed by Eric Carlson.

        Let pages using MediaRecorder enter the back/forward cache. On suspension, we
        stop recording and we queue an error event which will get dispatched upon
        resuming.

        Test: fast/history/page-cache-media-recorder.html

        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::document const):
        (WebCore::MediaRecorder::suspend):
        (WebCore::MediaRecorder::activeDOMObjectName const):
        (WebCore::MediaRecorder::scheduleDeferredTask):
        (WebCore::MediaRecorder::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/mediarecorder/MediaRecorder.h:

2019-11-04  Alex Christensen  <achristensen@webkit.org>

        REGRESSION(r243947) Epson software updater fails to install new version
        https://bugs.webkit.org/show_bug.cgi?id=203809
        <rdar://problem/56002179>

        Reviewed by Brady Eidson.

        I manually verified this fixes the issue.  See the radar.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::MacApplication::isEpsonSoftwareUpdater):

2019-11-04  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed WinCairo build fix for r251934.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

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

        MediaKeySession / WebKitMediaKeySession should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203089

        Reviewed by Youenn Fablet.

        Port MediaKeySession / WebKitMediaKeySession to the HTML5 event loop instead of using its
        own GenericEventQueue / GenericTaskQueue. Because the HTML5 event loop plays nicely with
        the back/forward cache, we can now let pages using MediaKeySession / WebKitMediaKeySession
        into the back/forward cache.

        Test: http/tests/navigation/page-cache-mediakeysession.html

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::MediaKeySession):
        (WebCore::MediaKeySession::generateRequest):
        (WebCore::MediaKeySession::load):
        (WebCore::MediaKeySession::update):
        (WebCore::MediaKeySession::close):
        (WebCore::MediaKeySession::remove):
        (WebCore::MediaKeySession::enqueueMessage):
        (WebCore::MediaKeySession::updateKeyStatuses):
        (WebCore::MediaKeySession::hasPendingActivity const):
        (WebCore::MediaKeySession::activeDOMObjectName const):
        (WebCore::MediaKeySession::enqueueTask):
        (WebCore::MediaKeySession::enqueueEvent):
        (WebCore::MediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        (WebCore::MediaKeySession::stop): Deleted.
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        (WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
        (WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
        (WebCore::WebKitMediaKeySession::addKeyTimerFired):
        (WebCore::WebKitMediaKeySession::sendMessage):
        (WebCore::WebKitMediaKeySession::sendError):
        (WebCore::WebKitMediaKeySession::hasPendingActivity const):
        (WebCore::WebKitMediaKeySession::enqueueEvent):
        (WebCore::WebKitMediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:

2019-11-04  Eric Carlson  <eric.carlson@apple.com>

        enumerateDevices() doesn't return correct list of devices after device was changed by user in a system preferences
        https://bugs.webkit.org/show_bug.cgi?id=203407
        <rdar://problem/56648063>

        Reviewed by Youenn Fablet.

        Tested manually as this doesn't reproduce with mock capture devices.

        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
        (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices): Refresh the list of capture
        devices when the default input device changes.
        (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices): Assert if not called
        on the main thread.

2019-11-04  Andy Estes  <aestes@apple.com>

        REGRESSION (r251623): When downloading a QuickLook file, the web view navigates to a "The URL can't be shown" error page instead of staying on the current page
        https://bugs.webkit.org/show_bug.cgi?id=203790
        <rdar://problem/56795440>

        Reviewed by Alex Christensen.

        When a PreviewConverter fails updating due to a call to PreviewConverter::failedUpdating(),
        we should not dispatch previewConverterDidFailUpdating. LegacyPreviewLoader handles that
        callback by calling ResourceLoader::didFail() with a WebKitErrorCannotShowURL error code,
        but when downloading or cancelling we must fail with a
        WebKitErrorFrameLoadInterruptedByPolicyChange error code instead.

        This patch teaches PreviewConverter to distinguish between internal updating errors and
        external calls to failedUpdating(), only dispatching previewConverterDidFailUpdating in the
        former case.

        Updated QuickLook API tests.

        * platform/PreviewConverter.cpp:
        (WebCore::PreviewConverter::updateMainResource):
        (WebCore::PreviewConverter::failedUpdating):
        (WebCore::PreviewConverter::didFailUpdating):
        * platform/PreviewConverter.h:

2019-11-04  youenn fablet  <youenn@apple.com>

        RealtimeOutgoingAudioSource/RealtimeOutgoingVideoSource should unobserve before destruction time
        https://bugs.webkit.org/show_bug.cgi?id=203802

        Reviewed by Eric Carlson.

        These classes are used by LibWebRTCRtpSenderBackend.
        When the backend is destroyed, notify the sources to unobserve before unrefing them.
        Add debug assertions to ensure this is done correctly.
        Covered by existing tests.

        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        (WebCore::LibWebRTCRtpSenderBackend::~LibWebRTCRtpSenderBackend):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
        Fixed Variant Move issue.
        * platform/mediastream/MediaStreamTrackPrivate.h:
        (WebCore::MediaStreamTrackPrivate::hasObserver const):
        * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
        (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
        * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
        (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):

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

        Build error: redefinition of `TransferFunction`
        https://bugs.webkit.org/show_bug.cgi?id=203742

        Reviewed by Jer Noble.

        `TransferFunction` defined in both VideoTextureCopierCV.cpp and TransferFunction.h.
        Renamed `TransferFunction` in VideoTextureCopierCV.cpp to `TransferFunctionCV`.

        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::transferFunctionFromString):
        (WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction):

2019-11-04  youenn fablet  <youenn@apple.com>

        Order of postMessage and fetch events should be preserved when going from client to service worker
        https://bugs.webkit.org/show_bug.cgi?id=203236

        Reviewed by Chris Dumez.

        Now that post message is going through network process, we can make the order predictable.
        Remove unnecessary task posting when firing events in service worker context and when posting message from a client.
        Test: http/wpt/service-workers/service-worker/postMessage-fetch-order.https.html

        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::swConnection):
        (WebCore::ServiceWorker::postMessage):
        * workers/service/ServiceWorker.h:
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::postFetchTask):
        (WebCore::ServiceWorkerThread::fireInstallEvent):
        (WebCore::ServiceWorkerThread::fireActivateEvent):

2019-11-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][Verification] Forced line break display runs don't have TextContext
        https://bugs.webkit.org/show_bug.cgi?id=203779
        <rdar://problem/56839710>

        Reviewed by Antti Koivisto.

        Display::Run's optional TextContext is not available for forced line breaks (since they are not text runs).

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

2019-11-03  Ryosuke Niwa  <rniwa@webkit.org>

        Add a helper function to schedule a task to dispatch an event to ActiveDOMObject
        https://bugs.webkit.org/show_bug.cgi?id=203714

        Reviewed by Chris Dumez.

        Added two helper static member functions queueTaskKeepingObjectAlive and queueTaskToDispatchEvent
        to ActiveDOMObject and deployed them in ServiceWorkerContainer.

        No new tests since there should be no behavioral changes.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/AbstractEventLoop.h:
        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::queueTaskInEventLoop): Added.
        * dom/ActiveDOMObject.h:
        (WebCore::ActiveDOMObject::queueTaskKeepingObjectAlive): Added.
        (WebCore::ActiveDOMObject::queueTaskToDispatchEvent): Added.
        * dom/TaskSource.h: Added.
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ready):
        (WebCore::ServiceWorkerContainer::getRegistration):
        (WebCore::ServiceWorkerContainer::getRegistrations):
        (WebCore::ServiceWorkerContainer::jobFailedWithException):
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
        (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
        (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
        (WebCore::ServiceWorkerContainer::fireControllerChangeEvent):
        (WebCore::ServiceWorkerContainer::enqueueTask): Deleted.
        * workers/service/ServiceWorkerContainer.h:

2019-11-03  Andres Gonzalez  <andresg_22@apple.com>

        Make AXIsolatedTreeNode a subclass of AXCoreObject.
        https://bugs.webkit.org/show_bug.cgi?id=203717

        Reviewed by Chris Fleizach.

        No new tests needed, no new functionality.

        - AXIsolatedTreeNOde derives from AXCoreObject.
        - AccessibilityObjectWrapper can now have a single pointer to a AXCoreObject instead of one for the live object and one for the isolated object.
        - Simplified wrapper code by making it agnostic of the nature of the underlying AXCoreObject.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::characterOffsetForPoint):
        (WebCore::AXObjectCache::characterOffsetForIndex):
        (WebCore::AXObjectCache::createIsolatedAccessibilityTreeHierarchy):
        (WebCore::AXObjectCache::generateIsolatedAccessibilityTree):
        * accessibility/AXObjectCache.h:
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::AXObjectCache::attachWrapper):
        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::attachWrapper):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (AccessibilityUnignoredAncestor):
        (-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
        (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
        (-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityArticleAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
        (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
        (-[WebAccessibilityObjectWrapper tableCellParent]):
        (-[WebAccessibilityObjectWrapper tableParent]):
        (-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
        (-[WebAccessibilityObjectWrapper accessibilityDatetimeValue]):
        (-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
        (-[WebAccessibilityObjectWrapper detailParentForObject:]):
        (-[WebAccessibilityObjectWrapper treeItemParentForObject:]):
        (AXAttributeStringSetStyle):
        (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
        (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
        (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::setRoot):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        (WebCore::AXIsolatedTree::setRootNodeID): Deleted.
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedTreeNode::AXIsolatedTreeNode):
        (WebCore::AXIsolatedTreeNode::create):
        (WebCore::AXIsolatedTreeNode::initializeAttributeData):
        (WebCore::AXIsolatedTreeNode::appendChild):
        (WebCore::AXIsolatedTreeNode::children):
        (WebCore::AXIsolatedTreeNode::parentObjectUnignored const):
        (WebCore::AXIsolatedTreeNode::accessibilityHitTest const):
        (WebCore::AXIsolatedTreeNode::updateBackingStore):
        (WebCore::AXIsolatedTreeNode::parentObjectInterfaceUnignored const): Deleted.
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::attachWrapper):
        (WebCore::AXObjectCache::associateIsolatedTreeNode): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (convertToNSArray):
        (-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
        (-[WebAccessibilityObjectWrapperBase detach]):
        (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
        (-[WebAccessibilityObjectWrapperBase accessibilityObject]):
        (-[WebAccessibilityObjectWrapperBase axBackingObject]):
        (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
        (-[WebAccessibilityObjectWrapperBase isolatedTreeNode]): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
        (convertToVector):
        (-[WebAccessibilityObjectWrapper childrenVectorSize]):
        (-[WebAccessibilityObjectWrapper childrenVectorArray]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        * accessibility/win/AXObjectCacheWin.cpp:
        (WebCore::AXObjectCache::attachWrapper):

2019-11-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Runs collapsed to zero advanced width are not always whitespace collapsed
        https://bugs.webkit.org/show_bug.cgi?id=203778
        <rdar://problem/56839642>

        Reviewed by Antti Koivisto.

        Just because a run collapses to zero advanced width, it does not necessarily mean it is a collapsed run (in whitespace collapsing sense)
        e.g. trimmed trailing whitespace (m_collapsedToZeroAdvanceWidth should probably be renamed to something other than "collapsed" to avoid confusion).

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):

2019-11-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Pre-wrap: Overflown whitespace should stay on the current line
        https://bugs.webkit.org/show_bug.cgi?id=203780
        <rdar://problem/56839822>

        Reviewed by Antti Koivisto.

        white-space: pre-wrap needs clarification. According to CSS Text Module Level 3, content wrapping is as 'normal'
        but apparently we need to keep the overlapping whitespace on the line (and hang it I'd assume).

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isTrailingWhitespaceWithPreWrap):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):

2019-11-02  Chris Dumez  <cdumez@apple.com>

        Port DOMCache / DOMCacheStorage to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203772

        Reviewed by Sam Weinig.

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::DOMCache):
        (WebCore::DOMCache::match):
        (WebCore::DOMCache::matchAll):
        (WebCore::DOMCache::addAll):
        (WebCore::DOMCache::putWithResponseData):
        (WebCore::DOMCache::put):
        (WebCore::DOMCache::remove):
        (WebCore::DOMCache::keys):
        (WebCore::DOMCache::enqueueTask):
        (WebCore::DOMCache::hasPendingActivity const): Deleted.
        * Modules/cache/DOMCache.h:
        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::DOMCacheStorage):
        (WebCore::DOMCacheStorage::doSequentialMatch):
        (WebCore::DOMCacheStorage::match):
        (WebCore::DOMCacheStorage::has):
        (WebCore::DOMCacheStorage::open):
        (WebCore::DOMCacheStorage::doOpen):
        (WebCore::DOMCacheStorage::remove):
        (WebCore::DOMCacheStorage::doRemove):
        (WebCore::DOMCacheStorage::keys):
        (WebCore::DOMCacheStorage::enqueueTask):
        (WebCore::DOMCacheStorage::hasPendingActivity const): Deleted.
        * Modules/cache/DOMCacheStorage.h:

2019-11-02  Oriol Brufau  <obrufau@igalia.com>

        [css-grid] Fix line name positions after auto repeat with no line names
        https://bugs.webkit.org/show_bug.cgi?id=203670

        Reviewed by Manuel Rego Casasnovas.

        When serializing grid-template-rows/columns of a grid container, we need
        to handle auto repeat() specially in order to insert the line names at
        the correct places.

        Before this patch, this was skipped for indices before the insertion
        point of the auto repeat, and in case the auto repeat had no line name.
        The latter logic was wrong, if there is an auto repeat we still need the
        special code after the insertion point, even if it has no line names.
        The proper condition to check is whether there is no auto repeat.

        The patch also avoids a 2nd call to gridAutoRepeatRows/Columns since we
        already have the value in a variable.

        Tests: imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::OrderedNamedLinesCollectorInGridLayout::OrderedNamedLinesCollectorInGridLayout):
        (WebCore::OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex const):
        (WebCore::valueForGridTrackList):

2019-11-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: Add diagnostic logging for frontend feature usage
        https://bugs.webkit.org/show_bug.cgi?id=203579
        <rdar://problem/56717410>

        Reviewed by Brian Burg.

        Add `InspectorFrontendHost` API for logging diagnostic events from the
        Web Inspector UI. An event consists of a message string, such as "TabActivity"
        or "SettingChanged", and a dictionary payload encoded as a JSON string.

        Original patch by Matt Baker.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::supportsDiagnosticLogging): Added.
        (WebCore::valuePayloadFromJSONValue): Added.
        (WebCore::InspectorFrontendHost::logDiagnosticEvent): Added.

        * inspector/InspectorFrontendClient.h:
        (WebCore::InspectorFrontendClient::supportsDiagnosticLogging): Added.
        (WebCore::InspectorFrontendClient::logDiagnosticEvent): Added.

        * Configurations/FeatureDefines.xcconfig:
        Add `ENABLE_INSPECTOR_TELEMETRY`, which is only enabled for macOS.

2019-11-01  Chris Fleizach  <cfleizach@apple.com>

        AX: Restrict WebSpeech voices to built-in voices only
        https://bugs.webkit.org/show_bug.cgi?id=203689

        Reviewed by Per Arne Vollan.

        Only show built-in voices when requesting through WebKit to reduce fingerprinting surface area. 

        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):

2019-11-01  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: add a timeline that shows information about any recorded CSS animation/transition
        https://bugs.webkit.org/show_bug.cgi?id=203651
        <rdar://problem/56128726>

        Reviewed by Brian Burg.

        Unlike all other forms of Web Animations, CSS animations/transitions, are _not_ created by
        JavaScript, and therefore can seemingly appear out of nowhere. This patch expands the Media
        timeline to be the Media & Animations timeline, which tracks when CSS animations/transitions
        are created, started, delayed, iterated, canceled, or finished.

        Test: inspector/animation/tracking.html

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::apply):
        * animation/WebAnimation.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::~WebAnimation):
        (WebCore::WebAnimation::contextDestroyed): Added.
        (WebCore::WebAnimation::setEffectInternal):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willApplyKeyframeEffect): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffect): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebAnimation): Added.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willApplyKeyframeEffectImpl): Added.
        (WebCore::InspectorInstrumentation::didChangeWebAnimationEffectImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebAnimationImpl): Added.
        Add instrumentation points for CSS animations/transitions.

        * inspector/agents/InspectorAnimationAgent.h: Added.
        * inspector/agents/InspectorAnimationAgent.cpp: Added.
        (WebCore::InspectorAnimationAgent::InspectorAnimationAgent):
        (WebCore::InspectorAnimationAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorAnimationAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorAnimationAgent::startTracking):
        (WebCore::InspectorAnimationAgent::stopTracking):
        (WebCore::isDelayed):
        (WebCore::InspectorAnimationAgent::willApplyKeyframeEffect):
        (WebCore::InspectorAnimationAgent::didChangeWebAnimationEffect):
        (WebCore::InspectorAnimationAgent::willDestroyWebAnimation):
        (WebCore::InspectorAnimationAgent::stopTrackingDeclarativeAnimation):
        * inspector/InstrumentingAgents.h:
        (WebCore::InstrumentingAgents::persistentInspectorAnimationAgent const): Added.
        (WebCore::InstrumentingAgents::setPersistentInspectorAnimationAgent): Added.
        (WebCore::InstrumentingAgents::trackingInspectorAnimationAgent const): Added.
        (WebCore::InstrumentingAgents::setTrackingInspectorAnimationAgent): Added.
        * inspector/InstrumentingAgents.cpp:
        (WebCore::InstrumentingAgents::reset):
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::createLazyAgents):
        Add an Animation domain for handling the tracking of CSS Web Animations.

        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::toggleInstruments):
        (WebCore::InspectorTimelineAgent::toggleAnimationInstrument): Added.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-11-01  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVG pair properties must be detached from their owner before it's deleted
        https://bugs.webkit.org/show_bug.cgi?id=203545

        Reviewed by Simon Fraser.

        SVGAnimatedPropertyPairAccessor needs to override its detach() method so
        each of its pair properties detaches itself from the owner.
        SVGPointerMemberAccessor does the same thing but for a single property
        which covers all the list properties as well.

        Test: svg/custom/pair-properties-detach.html

        * svg/properties/SVGAnimatedPropertyPairAccessor.h:

2019-11-01  Benjamin Nham  <nham@apple.com>

        Mark VeryLow priority requests using a request dictionary key
        https://bugs.webkit.org/show_bug.cgi?id=203594

        Reviewed by Alex Christensen.

        Mark very-low-pri beacon/ping loads using a request dictionary key. PLT currently ignores
        these loads by checking if a request's CFURLRequestPriority is 0, but that won't work
        anymore once I make VeryLow and Low pri requests both have a priority of 0 for
        https://bugs.webkit.org/show_bug.cgi?id=203423.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):

2019-11-01  Chris Dumez  <cdumez@apple.com>

        Port FileReader to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203749

        Reviewed by Ryosuke Niwa.

        * dom/AbstractEventLoop.h:
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::FileReader):
        (WebCore::FileReader::stop):
        (WebCore::FileReader::hasPendingActivity const):
        (WebCore::FileReader::abort):
        (WebCore::FileReader::didStartLoading):
        (WebCore::FileReader::didReceiveData):
        (WebCore::FileReader::didFinishLoading):
        (WebCore::FileReader::didFail):
        (WebCore::FileReader::enqueueTask):
        * fileapi/FileReader.h:

2019-11-01  Eric Carlson  <eric.carlson@apple.com>

        Add experimental TextTrackCue API
        https://bugs.webkit.org/show_bug.cgi?id=203649
        <rdar://problem/55675172>

        Reviewed by Jer Noble.

        Tests: media/track/texttrackcue/texttrackcue-addcue.html
               media/track/texttrackcue/texttrackcue-constructor.html
               media/track/texttrackcue/texttrackcue-displaycue.html

        * Modules/mediacontrols/MediaControlsHost.cpp:
        (WebCore::MediaControlsHost::updateCaptionDisplaySizes):
        * Modules/mediacontrols/MediaControlsHost.h:
        * bindings/js/JSTextTrackCueCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/WebCoreBuiltinNames.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (NeedsRuntimeCheck):
        (GenerateRuntimeEnableConditionalString):
        * bindings/scripts/IDLAttributes.json:
        * bindings/scripts/preprocess-idls.pl:
        (GenerateConstructorAttributes):
        * dom/DocumentFragment.idl:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateRenderer):
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
        (WebCore::HTMLMediaElement::textTrackRemoveCue):
        (WebCore::HTMLMediaElement::configureTextTrackDisplay):
        (WebCore::HTMLMediaElement::captionPreferencesChanged):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
        (WebCore::MediaControlTextTrackContainerElement::processActiveVTTCue):
        (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
        (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
        (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation):
        * html/shadow/MediaControlElements.h:
        * html/track/TextTrack.cpp:
        (WebCore::TextTrack::setMode):
        * html/track/TextTrackCue.cpp:
        (WebCore::TextTrackCue::cueBoxShadowPseudoId):
        (WebCore::TextTrackCue::cueBackdropShadowPseudoId):
        (WebCore::cueAttributName):
        (WebCore::cueBackgroundAttributName):
        (WebCore::TextTrackCueBox::TextTrackCueBox):
        (WebCore::TextTrackCueBox::getCue const):
        (WebCore::isLegalNode):
        (WebCore::invalidNodeException):
        (WebCore::checkForInvalidNodeTypes):
        (WebCore::tagPseudoObjects):
        (WebCore::removePseudoAttributes):
        (WebCore::TextTrackCue::create):
        (WebCore::TextTrackCue::TextTrackCue):
        (WebCore::TextTrackCue::didChange):
        (WebCore::TextTrackCue::setIsActive):
        (WebCore::TextTrackCue::toJSON const):
        (WebCore::TextTrackCue::debugString const):
        (WebCore::TextTrackCue::getCueAsHTML):
        (WebCore::TextTrackCue::isRenderable const):
        (WebCore::TextTrackCue::getDisplayTree):
        (WebCore::TextTrackCue::removeDisplayTree):
        (WebCore::TextTrackCue::setFontSize):
        (WebCore::TextTrackCue::rebuildDisplayTree):
        * html/track/TextTrackCue.h:
        (WebCore::TextTrackCueBox::create):
        (WebCore::TextTrackCueBox::applyCSSProperties):
        (WebCore::TextTrackCueBox::~TextTrackCueBox):
        (WebCore::TextTrackCue::cueType const):
        (WebCore::TextTrackCue::recalculateStyles):
        (WebCore::TextTrackCue::updateDisplayTree):
        (WebCore::TextTrackCue::isRenderable const): Deleted.
        * html/track/TextTrackCue.idl:
        * html/track/TextTrackCueGeneric.cpp:
        (WebCore::TextTrackCueGeneric::isEqual const):
        (WebCore::TextTrackCueGeneric::isOrderedBefore const):
        (WebCore::TextTrackCueGeneric::isPositionedAbove const):
        * html/track/TextTrackCueGeneric.h:
        (isType):
        * html/track/VTTCue.cpp:
        (WebCore::VTTCueBox::VTTCueBox):
        (WebCore::VTTCueBox::applyCSSProperties):
        (WebCore::VTTCue::getDisplayTree):
        (WebCore::VTTCue::removeDisplayTree):
        (WebCore::VTTCue::setFontSize):
        (WebCore::toVTTCue):
        (WebCore::VTTCueBox::create): Deleted.
        (WebCore::VTTCueBox::getCue const): Deleted.
        (WebCore::VTTCueBox::vttCueBoxShadowPseudoId): Deleted.
        (WebCore::VTTCue::cueBackdropShadowPseudoId): Deleted.
        * html/track/VTTCue.h:
        (WebCore::VTTCueBox::create):
        (isType):
        * html/track/VTTRegion.cpp:
        (WebCore::VTTRegion::appendTextTrackCueBox):
        (WebCore::VTTRegion::getDisplayTree):
        (WebCore::VTTRegion::prepareRegionDisplayTree):
        * html/track/VTTRegion.h:
        * page/CaptionUserPreferencesMediaAF.cpp:
        (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride const):
        * page/Settings.yaml:
        * rendering/RenderVTTCue.cpp:
        (WebCore::RenderVTTCue::RenderVTTCue):

2019-11-01  Chris Dumez  <cdumez@apple.com>

        Port ServiceWorkerContainer to the HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203680

        Reviewed by Ryosuke Niwa.

        * dom/AbstractEventLoop.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        (WebCore::ServiceWorkerContainer::ready):
        (WebCore::ServiceWorkerContainer::getRegistration):
        (WebCore::ServiceWorkerContainer::getRegistrations):
        (WebCore::ServiceWorkerContainer::jobFailedWithException):
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
        (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
        (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
        (WebCore::ServiceWorkerContainer::enqueueTask):
        * workers/service/ServiceWorkerContainer.h:

2019-11-01  Ryosuke Niwa  <rniwa@webkit.org>

        Integrate media query evaluation into HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203134
        <rdar://problem/56396316>

        Reviewed by Antti Koivisto.

        Moved the code to call media query listeners to HTML5 event loop's step to update the rendering:
        https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering

        Tests: fast/media/mq-inverted-colors-live-update-for-listener.html
               fast/media/mq-prefers-reduced-motion-live-update-for-listener.html

        * css/MediaQueryMatcher.cpp:
        (WebCore::MediaQueryMatcher::evaluateAll): Renamed from styleResolverChanged.
        * css/MediaQueryMatcher.h:
        * dom/Document.cpp:
        (WebCore::Document::updateElementsAffectedByMediaQueries): Split from evaluateMediaQueryList.
        This function is still called right after each layout update so that picture element may start
        requesting newly selected image resources without having to wait for a rendering update.
        But this function will no longer execute arbitrary scripts.
        (WebCore::Document::evaluateMediaQueriesAndReportChanges): Split from evaluateMediaQueryList.
        Evaluates media query listeners.
        * dom/Document.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::setEmulatedMedia): Force the evaluation of media queries for now
        but this code should really be scheduling a rendering update instead so added a FIXME.
        * page/Frame.cpp:
        (WebCore::Frame::setPrinting): Evaluate media queries. We should consider invoking the full
        algorithm to update the rendering here. e.g. intersection observer may add more contents.
        * page/Page.cpp:
        (WebCore::Page::updateStyleAfterChangeInEnvironment): Schedule a rendering update after
        accessibility settings have changed.
        (WebCore::Page::updateRendering): Call evaluateMediaQueriesAndReportChanges.
        (WebCore::Page::accessibilitySettingsDidChange): Schedule a rendering update after accessibility
        settings have changed.
        (WebCore::Page::appearanceDidChange): Ditto.

2019-11-01  Tim Horton  <timothy_horton@apple.com>

        Fix the watchOS build after r251896

        * Configurations/WebCore.xcconfig:
        Whoops.

2019-11-01  Peng Liu  <peng.liu6@apple.com>

        Turn on the Picture-in-Picture API feature by default
        https://bugs.webkit.org/show_bug.cgi?id=203725

        Reviewed by Jer Noble.

        No new tests are required.

        * page/Settings.yaml:

2019-11-01  Ryosuke Niwa  <rniwa@webkit.org>

        Don't leak documents with a pending requestIdleCallback
        https://bugs.webkit.org/show_bug.cgi?id=203708

        Reviewed by Simon Fraser.

        Remove all tasks associated with a stopped document right away instead of waiting for
        WindowEventLoop::run to execute so that even when author scripts synchronously add and remove
        multiple documents, we don't end up leaking all of them until we yield to the run loop.

        Also moved the code to suspend & resume event loops from CachedFrame to Document's
        ActiveDOMObjects related functions for consistency.

        Test: requestidlecallback/requestidlecallback-document-gc.html

        * dom/Document.cpp:
        (WebCore::Document::suspendActiveDOMObjects): Moved the code from CachedFrameBase::restore.
        (WebCore::Document::resumeActiveDOMObjects): Ditto from CachedFrame.
        (WebCore::Document::stopActiveDOMObjects): Remove all tasks associated with this document.
        * dom/Document.h:
        (WebCore::Document::eventLoopIfExists): Deleted.
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::stop):
        (WebCore::WindowEventLoop::run):
        * dom/WindowEventLoop.h:
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        (WebCore::CachedFrame::CachedFrame):

2019-11-01  Peng Liu  <peng.liu6@apple.com>

        Picture-in-Picture layout test cases interfere with each other
        https://bugs.webkit.org/show_bug.cgi?id=203614

        Reviewed by Eric Carlson.

        Fix test running issues, no new test is needed.

        Add a member variable m_pictureInPictureAPITestEnabled to the HTMLVideoElement class.
        When this variable is true, HTMLVideoElement::setFullscreenMode() will mock the
        behavior of the Picture-in-Picture mode changing without the AVKit/CoreMedia involvement.
        So we can run multiple layout test cases for Picture-in-Picture API simultaneously.
        Note: this solution only tests the code for the Picture-in-Picture API implementation!
        We still need to use the API tests to test the Picture-in-Picture implementation end-to-end.

        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::setFullscreenMode):
        (WebCore::HTMLVideoElement::setPictureInPictureAPITestEnabled):
        * html/HTMLVideoElement.h:
        * html/HTMLVideoElement.idl:
        * testing/Internals.cpp:
        (WebCore::Internals::setPictureInPictureAPITestEnabled):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-11-01  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for text-align: justify
        https://bugs.webkit.org/show_bug.cgi?id=203715
        <rdar://problem/56804607>

        Reviewed by Antti Koivisto.

        Add basic support for text-align: justify. Register expansion opportunities as the text content is being
        appended to the line (Line::appendTextContent) and distribute the extra space when the line is being closed (Line::close).
        Now LFC rendering of OpenSource/PerformanceTests/Layout/line-layout-simple.html visually matches trunk rendering.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::resetExpansion):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::justifyRuns):
        (WebCore::Layout::Line::alignContentHorizontally):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::isTextAlignJustify const):
        (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):
        (WebCore::Layout::Line::Run::adjustExpansionBehavior):
        (WebCore::Layout::Line::Run::expand): Deleted.
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::close):

2019-11-01  Antti Koivisto  <antti@apple.com>

        Style::Builder should not depend on StyleResolver
        https://bugs.webkit.org/show_bug.cgi?id=203729

        Reviewed by Zalan Bujtas.

        With all style building state in builder, we can remove the back-reference to style resolver.

        * css/CSSFilterImageValue.cpp:
        (WebCore::CSSFilterImageValue::createFilterOperations):
        * css/CSSFilterImageValue.h:
        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::gradientWithStylesResolved):
        (WebCore::CSSGradientValue::resolveRGBColors):

        Add helper for resolving basic colors without style builder.

        * css/CSSGradientValue.h:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::State::clear):
        (WebCore::StyleResolver::State::State):
        (WebCore::StyleResolver::State::setStyle):
        (WebCore::StyleResolver::applyMatchedProperties):

        Register content attributes encountered during style building.

        (WebCore::StyleResolver::State::updateConversionData): Deleted.

        This is now created by BuilderState constructor.

        (WebCore::StyleResolver::styleImage): Deleted.
        (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement): Deleted.
        (WebCore::StyleResolver::colorFromPrimitiveValue const): Deleted.
        (WebCore::filterOperationForType): Deleted.
        (WebCore::StyleResolver::createFilterOperations): Deleted.

        Move image mapping functions to BuilderState.

        * css/StyleResolver.h:
        (WebCore::StyleResolver::State::cssToLengthConversionData const): Deleted.
        * html/HTMLInputElement.cpp:
        (WebCore::autoFillStrongPasswordMaskImage):
        (WebCore::HTMLInputElement::createInnerTextStyle):

        Create mask image without requiring style resolver.

        * style/StyleBuilder.cpp:
        (WebCore::Style::Builder::Builder):
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyValueZoom):
        (WebCore::Style::BuilderCustom::applyValueContent):
        (WebCore::Style::BuilderCustom::applyValueFontSize):
        (WebCore::Style::BuilderCustom::applyValueAlt):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::BuilderState):

        No more m_styleResolver.

        (WebCore::Style::BuilderState::createStyleImage):
        (WebCore::Style::filterOperationForType):
        (WebCore::Style::BuilderState::createFilterOperations):
        (WebCore::Style::BuilderState::isColorFromPrimitiveValueDerivedFromElement):
        (WebCore::Style::BuilderState::colorFromPrimitiveValue const):
        (WebCore::Style::BuilderState::registerContentAttribute):

        Collect content attributes so they can be applied later by StyleResolver.

        * style/StyleBuilderState.h:
        (WebCore::Style::BuilderState::builder):
        (WebCore::Style::BuilderState::rootElementStyle const):

        Restore this to be nullable for simplicity.

        (WebCore::Style::BuilderState::registeredContentAttributes const):
        (WebCore::Style::BuilderState::styleResolver): Deleted.

2019-11-01  Zan Dobersek  <zdobersek@igalia.com>  and  Chris Lord  <clord@igalia.com>

        CanvasRenderingContext2DBase: use CanvasBase more extensively
        https://bugs.webkit.org/show_bug.cgi?id=182685

        Reviewed by Adrian Perez de Castro.

        In CanvasRenderingContext2DBase, stop downcasting the CanvasBase object
        to HTMLCanvasElement where not necessary, and where necessary, do so
        after testing that the CanvasBase object is indeed a HTMLCanvasElement.

        All the functionality that previously required downcasting has now moved
        into the CanvasBase class. Combined with these changes, this will allow
        OffscreenCanvas to leverage CanvasRenderingContext2DBase for 2D
        rasterization.

        CanvasStyle is similarly modified to work on CanvasBase objects, only
        retrieving current color value from the inline style only in case of
        an HTMLCanvasElement derivative.

        No new tests -- no change in behavior.

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::setStrokeStyle):
        (WebCore::CanvasRenderingContext2DBase::setFillStyle):
        (WebCore::CanvasRenderingContext2DBase::setShadowColor):
        (WebCore::CanvasRenderingContext2DBase::setShadow):
        (WebCore::CanvasRenderingContext2DBase::didDraw):
        (WebCore::CanvasRenderingContext2DBase::getImageData const):
        (WebCore::CanvasRenderingContext2DBase::putImageData):
        (WebCore::CanvasRenderingContext2DBase::platformLayer const):
        * html/canvas/CanvasStyle.cpp:
        (WebCore::currentColor):
        (WebCore::parseColorOrCurrentColor):
        * html/canvas/CanvasStyle.h:

2019-10-31  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][Clang] Unreviewed build fix
        https://bugs.webkit.org/show_bug.cgi?id=203663

        ServiceWorkerThreadProxy::notifyNetworkStateChange was not
        exported from WebKit.dll even though it's marked with
        WEBCORE_TESTSUPPORT_EXPORT because any symbols in the object file of
        ServiceWorkerThreadProxy.cpp is not referred by WebKit.dll.

        > WebCoreTestSupport.lib(ServiceWorkerInternals.cpp.obj) : error LNK2019: unresolved external symbol
        >   "__declspec(dllimport) public: void __cdecl WebCore::ServiceWorkerThreadProxy::notifyNetworkStateChange(bool)"
        >   (__imp_?notifyNetworkStateChange@ServiceWorkerThreadProxy@WebCore@@QEAAX_N@Z) referenced in function
        >   "public: <auto> __cdecl `public: void __cdecl WebCore::ServiceWorkerInternals::setOnline(bool)'::`1'::<lambda_0>::operator()(void)const "
        >   (??R<lambda_0>@?0??setOnline@ServiceWorkerInternals@WebCore@@QEAAX_N@Z@QEBA?A?<auto>@@XZ)

        Uninline ServiceWorkerThreadProxy::identifier temporarily.
        I will revert this change after fixing this issue properly in Bug 203663.

        No behavioral changes.

        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::identifier const):
        * workers/service/context/ServiceWorkerThreadProxy.h:

2019-10-31  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Adopt DirectWrite in place of Uniscribe
        https://bugs.webkit.org/show_bug.cgi?id=203548
        <rdar://problem/56695130>

        Reviewed by Fujii Hironori.

        This patch switches from the Uniscribe text controller to a
        DirectWrite based ComplexTextController.

        * PlatformFTW.cmake:
        * platform/graphics/ComplexTextController.cpp:
        (WebCore::ComplexTextController::ComplexTextController): Treat Windows
        like any other ComplexTextController platform.
        * platform/graphics/Font.cpp:
        (WebCore::Font::platformGlyphInit): Add hack for DirectWrite
        zero-width space handling.
        * platform/graphics/FontCascade.cpp:
        (WebCore::FontCascade::widthOfTextRange const): Don't use Uniscribe.
        * platform/graphics/FontPlatformData.h:
        (WebCore::FontPlatformData::dwFontCollection const):
        (WebCore::FontPlatformData::faceName const):
        * platform/graphics/win/ComplexTextControllerDirectWrite.cpp:
        (WebCore::shape): Added,
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
        Added.
        * platform/graphics/win/DirectWriteUtilities.cpp:
        (WebCore::DirectWrite::createWithPlatformFont): Modify to return a
        pair of font and font collection.
        (WebCore::DirectWrite::fontWeight): Added stub.
        (WebCore::DirectWrite::fontStyle): Ditto.
        (WebCore::DirectWrite::fontStretch): Ditto.
        * platform/graphics/win/DirectWriteUtilities.h:
        * platform/graphics/win/FontCustomPlatformData.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData): Add more
        information to help DirectWrite handle font styles.
        * platform/graphics/win/FontPlatformDataDirect2D.cpp:
        (WebCore::FontPlatformData::platformDataInit):
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::createFallbackFont): Deleted.
        * platform/graphics/win/FontWin.cpp:
        * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
        (WebCore::GlyphPage::fill): Update to handle multiple runs in a
        given string.
        * platform/graphics/win/TextAnalyzerHelper.cpp:
        (WebCore::TextAnalyzerHelper::TextAnalyzerHelper): Update to handle
        analysis of strings with multiple runs.
        (WebCore::TextAnalyzerHelper::SetScriptAnalysis): Ditto.
        * platform/graphics/win/TextAnalyzerHelper.h:

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

        Turn on IOSurface support in the iOS Simulator
        https://bugs.webkit.org/show_bug.cgi?id=203026
        <rdar://problem/56320993>

        Reviewed by Simon Fraser.

        * Configurations/WebCore.xcconfig:
        Always link IOSurface now that we always have it. We continue to only link
        IOSurfaceAccelerator on iOS hardware, since it's only available there.

        * platform/graphics/cocoa/IOSurface.h:
        Turn off RGB10 in the Simulator.

        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::paintSystemPreviewBadge):
        Disable CoreImage rendering via IOSurface for the system preview badge,
        since it does not seem to work in the simulator.

2019-10-31  Jer Noble  <jer.noble@apple.com>

        [EME] Batch multiple key requests into one request and response
        https://bugs.webkit.org/show_bug.cgi?id=203580
        <rdar://problem/54853345>

        Reviewed by Eric Carlson.

        Test: platform/mac/media/encrypted-media/fps-multiple-pssh.html

        Add a path for -didProvideRequests: giving an NSArray of AVContentKeyRequests to result in
        an EME message containing a JSON object containing keyIDs and licence request payloads.

        - CDMInstanceSessionFairPlayStreamingAVFObjC now defines a "Request" as a Vector of
          AVContentKeyRequests.
        - When we receive an NSArray of AVContentKeyRequests, we store that as a single "Request"
          in m_currentRequest and m_requests, or in m_pendingRequests.
        - Generating a key request message from such a vector will result in a JSON object in the format
          of [{ keyID: ..., payload: ...}, ...].
        - Clients can update these all at once with a matching JSON object in the same format, or alternatively
          of the format [{ keyID: ..., error: ...}, ...] to indicate to the CDN that there was an error
          encountered while completing the key request.
        - There are a couple of helper classes that facilitate collecting delegate callbacks and completion handlers
          into a single final callback: UpdateResponseCollector and CallbackAggregator.

        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (-[WebCoreFPSContentKeySessionDelegate contentKeySession:didProvideContentKeyRequests:forInitializationData:]):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::UpdateResponseCollector::UpdateResponseCollector):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::UpdateResponseCollector::addSuccessfulResponse):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::UpdateResponseCollector::addErrorResponse):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::UpdateResponseCollector::fail):
        (WebCore::parseJSONValue):
        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForKeyIDs const):
        (WebCore::keyIDsForRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyIDs):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestDidSucceed):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::nextRequest):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::lastKeyRequest const):
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyStatuses const):

2019-10-31  Alex Christensen  <achristensen@apple.com>

        Enable more features in Mac CMake build
        https://bugs.webkit.org/show_bug.cgi?id=203699

        Rubber-stamped by Tim Horton.

        * Modules/pictureinpicture/PictureInPictureWindow.h:
        * PlatformMac.cmake:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:

2019-10-31  Russell Epstein  <repstein@apple.com>

        Unreviewed, rolling out r251861.

        Caused 50+ Layout Test Crashes

        Reverted changeset:

        "Use SecurityOriginData in NetworkProcess where possible
        without other changes"
        https://bugs.webkit.org/show_bug.cgi?id=203615
        https://trac.webkit.org/changeset/251861

2019-10-31  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVGGeometryElement.getPointAtLength should clamp its argument to [0, length]
        https://bugs.webkit.org/show_bug.cgi?id=203687

        Reviewed by Simon Fraser.

        The spec link is:
            https://svgwg.org/svg2-draft/types.html#__svg__SVGGeometryElement__getPointAtLength

        -- Fix the SVGGeometryElement.idl to match the specs.
        -- Fix the path utility functions to return zeros in case of an error.
           The callers never used the return values.

        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::getPointAtLength const):
        * rendering/svg/RenderSVGShape.h:
        * svg/SVGGeometryElement.cpp:
        (WebCore::SVGGeometryElement::getPointAtLength const):
        * svg/SVGGeometryElement.h:
        * svg/SVGGeometryElement.idl:
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::getTotalLength const):
        (WebCore::SVGPathElement::getPointAtLength const):
        (WebCore::SVGPathElement::getPathSegAtLength const):
        * svg/SVGPathElement.h:
        * svg/SVGPathUtilities.cpp:
        (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
        (WebCore::getTotalLengthOfSVGPathByteStream):
        (WebCore::getPointAtLengthOfSVGPathByteStream):
        * svg/SVGPathUtilities.h:

2019-10-31  Zan Dobersek  <zdobersek@igalia.com>  and  Chris Lord  <clord@igalia.com>

        Move ImageBuffer-related functionality from HTMLCanvasElement to CanvasBase
        https://bugs.webkit.org/show_bug.cgi?id=182503

        Reviewed by Ryosuke Niwa.

        Move the ImageBuffer member variable, other related member variables and
        majority of methods that operate on these from the HTMLCanvasElement
        class up to the CanvasBase class. This will make it possible for the
        OffscreenCanvas implementation to leverage the same code when using 2D
        contexts for painting.

        Most of the moved methods are public, while the setImageBuffer() method
        is made protected so that it's still accessible from the inheriting
        class.

        Along with setImageBuffer(), the active pixel memory counter is moved
        into the CanvasBase class. It's still using static storage, but is now
        a member of the class with protected access. The storage has been made
        atomic so as to allow its consistency to be maintained when accessed
        from multiple threads (which may happen in the future).

        The m_size member variable is also moved up into the CanvasBase class.
        Constructor is changed so that the passed-in IntSize argument is used
        to initialize it. Canvas implementations are still the owners of their
        respective canvas contexts and are responsible for the destruction of
        both the context and the ImageBuffer, in that order.

        HTMLCanvasElement destructor still has to invoke
        CanvasBase::notifyObserversCanvasDestroyed() since some CanvasObserver
        derivatives perform virtual method calls on the CanvasBase object for
        typecasting purposes in their canvasDestroyed() implementation.
        Calling virtual methods on an object that's being destroyed is normally
        discouraged and should be fixed separately, but it works as long as
        invocations are done before the HTMLCanvasElement object is destroyed
        completely (as has been the case so far).

        CanvasRenderingContext2DBase is already changed in unwindStateStack()
        to call CanvasBase::existingDrawingContext() and not downcast the
        CanvasBase object to HTMLCanvasElement. This is done now due to
        unwindStateStack() being called from the destructor, which is now
        invoked from the CanvasBase destructor and not the HTMLCanvasElement
        destructor, avoiding virtual method calls on the CanvasBase object as
        it's being destroyed.

        This patch doesn't address various methods using const qualifier and
        then working around that by requiring member variables to be mutable.
        This should be amended as much as possible in a separate patch.

        No new tests -- no change in functionality, only refactoring.

        * html/CanvasBase.cpp:
        (WebCore::CanvasBase::CanvasBase):
        (WebCore::CanvasBase::~CanvasBase):
        (WebCore::CanvasBase::drawingContext const):
        (WebCore::CanvasBase::existingDrawingContext const):
        (WebCore::CanvasBase::buffer const):
        (WebCore::CanvasBase::baseTransform const):
        (WebCore::CanvasBase::makeRenderingResultsAvailable):
        (WebCore::CanvasBase::memoryCost const):
        (WebCore::CanvasBase::externalMemoryCost const):
        (WebCore::CanvasBase::callTracingActive const):
        (WebCore::CanvasBase::setImageBuffer const):
        (WebCore::CanvasBase::activePixelMemory):
        (WebCore::CanvasBase::resetGraphicsContextState const):
        * html/CanvasBase.h:
        (WebCore::CanvasBase::width const):
        (WebCore::CanvasBase::height const):
        (WebCore::CanvasBase::size const):
        (WebCore::CanvasBase::setSize):
        (WebCore::CanvasBase::hasCreatedImageBuffer const):
        (WebCore::CanvasBase::createImageBuffer const):
        * html/CustomPaintCanvas.cpp:
        (WebCore::CustomPaintCanvas::CustomPaintCanvas):
        (WebCore::CustomPaintCanvas::~CustomPaintCanvas):
        * html/CustomPaintCanvas.h:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::setSize):
        (WebCore::HTMLCanvasElement::createContext2d):
        (WebCore::HTMLCanvasElement::reset):
        (WebCore::HTMLCanvasElement::setSurfaceSize):
        (WebCore::HTMLCanvasElement::toDataURL):
        (WebCore::HTMLCanvasElement::toBlob):
        (WebCore::HTMLCanvasElement::createImageBuffer const):
        (WebCore::HTMLCanvasElement::setImageBufferAndMarkDirty):
        * html/HTMLCanvasElement.h:
        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::OffscreenCanvas):
        (WebCore::OffscreenCanvas::~OffscreenCanvas):
        (WebCore::OffscreenCanvas::setWidth):
        (WebCore::OffscreenCanvas::setHeight):
        (WebCore::OffscreenCanvas::transferToImageBitmap):
        (WebCore::OffscreenCanvas::createImageBuffer const):
        * html/OffscreenCanvas.h:

2019-10-31  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOMDebugger: Node Removed breakpoints should fire whenever the node is removed from the main DOM tree, not just when it's removed from it's parent
        https://bugs.webkit.org/show_bug.cgi?id=203349

        Reviewed by Matt Baker.

        Test: inspector/dom-debugger/dom-breakpoints.html

        Replace `targetNode` (which was a `Runtime.RemoteObject`) with a `targetNodeId` (which is a
        `DOM.NodeId`) when dispatching `DOMDebugger` pauses. Additionally, include the ancestor's
        `DOM.NodeId` as the `targetNodeId` whenever an ancestor is removed that has a descendant
        with a node removed DOM breakpoint.

        * inspector/agents/page/PageDOMDebuggerAgent.h:
        * inspector/agents/page/PageDOMDebuggerAgent.cpp:
        (WebCore::PageDOMDebuggerAgent::willRemoveDOMNode):
        (WebCore::PageDOMDebuggerAgent::descriptionForDOMEvent):

        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::pushNodeToFrontend): Added.

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

        Rename AccessibilityObject::matchedParent as Accessibility::findAncestor and re-implement in a generic way so that can be used with both AccessibilityObjects and AXIsolatedTreeNodes.
        https://bugs.webkit.org/show_bug.cgi?id=203654

        Reviewed by Chris Fleizach.

        No new tests necessary since this does not change functionality.

        - Deleted AccessibilityObject::matchedParent and replaced with Accessibility::findAncestor.
        - Accessibility::findAncestor is a template function that can be used with both AccessibilityObjects and AXIsolatedTreeNodes.
        - Created the namespace Accessibility for implementation details that need not to be exposed to client code.
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::helpText const):
        (WebCore::AccessibilityNodeObject::textUnderElement const):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::parentObjectUnignored const):
        (WebCore::AccessibilityObject::isDescendantOfRole const):
        (WebCore::AccessibilityObject::ancestorAccessibilityScrollView const):
        (WebCore::AccessibilityObject::headingElementForNode):
        (WebCore::AccessibilityObject::isDescendantOfObject const):
        (WebCore::AccessibilityObject::liveRegionAncestor const):
        (WebCore::AccessibilityObject::isExpanded const):
        (WebCore::AccessibilityObject::isAXHidden const):
        (WebCore::AccessibilityObject::focusableAncestor):
        (WebCore::AccessibilityObject::editableAncestor):
        (WebCore::AccessibilityObject::radioGroupAncestor const):
        (WebCore::AccessibilityObject::matchedParent): Deleted.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::Accessibility::findAncestor):
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::hasPopup const):
        * accessibility/AccessibilitySVGElement.cpp:
        (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityArticleAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
        (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
        (-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
        (-[WebAccessibilityObjectWrapper tableCellParent]):
        (-[WebAccessibilityObjectWrapper tableParent]):
        (-[WebAccessibilityObjectWrapper accessibilityDatetimeValue]):
        (-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
        (-[WebAccessibilityObjectWrapper detailParentForObject:]):
        (-[WebAccessibilityObjectWrapper treeItemParentForObject:]):
        (AXAttributeStringSetStyle):

2019-10-31  Ryosuke Niwa  <rniwa@webkit.org>

        Integrate resize event with HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=202964

        Reviewed by Geoffrey Garen and Simon Fraser.

        Dispatch resize events in "run the resize steps" during the "update the rendering":
        https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering

        Existing code in WebCore which was dispatching or scheduling dispatching of resize events now simply sets
        a flag on document and schedules a rendering update. In Page::updateRendering, we fire resize events on
        any documents with this flag set.

        Test: fast/events/resize-subframe-in-rendering-update.html

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::beginLoadTimerFired): Fixed the flakiness in SVG animation tests observed
        after this patch was landed previously. The issue was that this code was calling FrameLoader's
        checkLoadComplete before checkCompleted. checkCompleted starts SVG animations in Document::implicitClose
        whereas checkLoadComplete can cause DumpRenderTree to end the test. As a result, depending on when this
        function was called relative to other work being done in the main thread, DumpRenderTree could prematurely
        end and dump the test result even though SVG animation would have immediately started in either scenario.
        Unfortunately I couldn't come up with a new deterministic test for this issue since the exact condition
        under which this problem comes up seems quite racy (which makes sense given this only manifested as flaky
        failures in existing tests).
        * dom/Document.cpp:
        (WebCore::Document::setNeedsDOMWindowResizeEvent): Added.
        (WebCore::Document::setNeedsVisualViewportResize): Added.
        (WebCore::Document::runResizeSteps): Added. https://drafts.csswg.org/cssom-view/#run-the-resize-steps
        * dom/Document.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::sendResizeEventIfNeeded): Now sets m_needsDOMWindowResizeEvent on Document instead of
        enqueuing a resize event.
        * page/Page.cpp:
        (WebCore::Page::updateRendering): Call runResizeSteps on each document.
        (WebCore::Page::collectDocuments): Added.
        * page/Page.h:
        * page/VisualViewport.cpp:
        (WebCore::VisualViewport::enqueueResizeEvent):

2019-10-31  Jer Noble  <jer.noble@apple.com>

        Unreviewed build fix; move PictureInPictureSupport.h include outside HAVE(AVKIT) check.

        * platform/ios/VideoFullscreenInterfaceAVKit.mm:

2019-10-31  Antti Koivisto  <antti@apple.com>

        Introduce Style::Builder
        https://bugs.webkit.org/show_bug.cgi?id=203682

        Reviewed by Zalan Bujtas.

        Encapsulate the style building step into a new Builder class. It owns the cascade and the style building state.

        Move tha applying code from StyleResolver and PropertyCascade there.
        Move a bunch of font related state from StyleResolver::State to BuilderState.

        * DerivedSources-output.xcfilelist:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSVariableReferenceValue.cpp:
        (WebCore::resolveVariableReference):
        * css/DOMCSSRegisterCustomProperty.cpp:
        (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
        (WebCore::StyleResolver::initializeFontStyle):
        (WebCore::StyleResolver::adjustStyleForInterCharacterRuby): Deleted.
        (WebCore::checkForOrientationChange): Deleted.
        (WebCore::StyleResolver::updateFont): Deleted.
        (WebCore::StyleResolver::useSVGZoomRules const): Deleted.
        (WebCore::StyleResolver::useSVGZoomRulesForLength const): Deleted.
        (WebCore::StyleResolver::checkForTextSizeAdjust): Deleted.
        (WebCore::StyleResolver::checkForZoomChange): Deleted.
        (WebCore::StyleResolver::checkForGenericFamilyChange): Deleted.
        (WebCore::StyleResolver::setFontSize): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Deleted.
        (WebCore::StyleResolver::State::fontSizeHasViewportUnits const): Deleted.
        (WebCore::StyleResolver::State::useSVGZoomRules const): Deleted.
        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseValueWithVariableReferences):
        * css/parser/CSSPropertyParser.cpp:
        * style/PropertyCascade.cpp:
        (WebCore::Style::PropertyCascade::PropertyCascade):
        (WebCore::Style::PropertyCascade::set):
        (WebCore::Style::PropertyCascade::propertyCascadeForRollback const):
        (WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const):
        (WebCore::Style::PropertyCascade::applyDeferredProperties): Deleted.
        (WebCore::Style::PropertyCascade::applyProperties): Deleted.
        (WebCore::Style::PropertyCascade::applyPropertiesImpl): Deleted.
        (WebCore::Style::PropertyCascade::applyCustomProperties): Deleted.
        (WebCore::Style::PropertyCascade::applyCustomProperty): Deleted.
        (WebCore::Style::PropertyCascade::propertyCascadeForRollback): Deleted.
        (WebCore::Style::PropertyCascade::applyProperty): Deleted.
        (WebCore::Style::PropertyCascade::resolveValue): Deleted.
        (WebCore::Style::PropertyCascade::resolvedVariableValue): Deleted.
        (WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode): Deleted.
        * style/PropertyCascade.h:
        (WebCore::Style::PropertyCascade::deferredProperties const):
        (WebCore::Style::PropertyCascade::customProperties const):
        (WebCore::Style::PropertyCascade::direction const):
        (WebCore::Style::PropertyCascade::builderState): Deleted.
        * style/StyleBuilder.cpp: Added.
        (WebCore::Style::directionFromStyle):
        (WebCore::Style::Builder::Builder):
        (WebCore::Style::Builder::applyAllProperties):
        (WebCore::Style::Builder::applyHighPriorityProperties):
        (WebCore::Style::Builder::applyLowPriorityProperties):
        (WebCore::Style::Builder::applyPropertyValue):
        (WebCore::Style::Builder::applyDeferredProperties):
        (WebCore::Style::Builder::applyProperties):
        (WebCore::Style::Builder::applyPropertiesImpl):
        (WebCore::Style::Builder::applyCustomProperties):
        (WebCore::Style::Builder::applyCustomProperty):
        (WebCore::Style::Builder::applyCascadeProperty):
        (WebCore::Style::Builder::applyProperty):
        (WebCore::Style::Builder::resolveValue):
        (WebCore::Style::Builder::resolvedVariableValue):
        * style/StyleBuilder.h: Added.
        (WebCore::Style::Builder::applyProperty):
        (WebCore::Style::Builder::state):
        * style/StyleBuilderCustom.h:
        (WebCore::Style::BuilderCustom::applyValueFontSize):
        * style/StyleBuilderState.cpp:
        (WebCore::Style::BuilderState::BuilderState):
        (WebCore::Style::BuilderState::useSVGZoomRules const):
        (WebCore::Style::BuilderState::useSVGZoomRulesForLength const):
        (WebCore::Style::BuilderState::adjustStyleForInterCharacterRuby):
        (WebCore::Style::BuilderState::updateFont):
        (WebCore::Style::BuilderState::updateFontForTextSizeAdjust):
        (WebCore::Style::BuilderState::updateFontForZoomChange):
        (WebCore::Style::BuilderState::updateFontForGenericFamilyChange):
        (WebCore::Style::BuilderState::updateFontForOrientationChange):
        (WebCore::Style::BuilderState::setFontSize):
        * style/StyleBuilderState.h:
        (WebCore::Style::BuilderState::builder):
        (WebCore::Style::BuilderState::setFontDirty):
        (WebCore::Style::BuilderState::cascade): Deleted.
        (WebCore::Style::BuilderState::clearFontDirty): Deleted.

2019-10-31  Alex Christensen  <achristensen@webkit.org>

        Remove unneeded HAVE_TIMINGDATAOPTIONS
        https://bugs.webkit.org/show_bug.cgi?id=202990

        Reviewed by Brady Eidson.

        This macro allowed us to adopt CFNetwork SPI, but now that the SPI is available everywhere we support, we don't need it.

        * platform/network/NetworkLoadMetrics.h:
        * platform/network/cocoa/NetworkLoadMetrics.mm:
        (WebCore::copyTimingData):
        (WebCore::setCollectsTimingData): Deleted.
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::createNSURLConnection):

2019-10-31  Alex Christensen  <achristensen@webkit.org>

        Use SecurityOriginData in NetworkProcess where possible without other changes
        https://bugs.webkit.org/show_bug.cgi?id=203615

        Reviewed by Brady Eidson.

        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::SecurityOrigin):
        (WebCore::SecurityOrigin::isolatedCopy const):
        * page/SecurityOrigin.h:
        * page/SecurityOriginData.h:
        (WebCore::SecurityOriginData::encode const):
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::allowFrameAncestors const):
        * page/csp/ContentSecurityPolicy.h:
        * page/csp/ContentSecurityPolicyDirectiveList.cpp:
        (WebCore::urlFromOrigin):
        (WebCore::checkFrameAncestors):
        (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrameAncestorOrigins const):
        * page/csp/ContentSecurityPolicyDirectiveList.h:

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

        [LFC][IFC] Add expansion context to Line::Run
        https://bugs.webkit.org/show_bug.cgi?id=203683
        <rdar://problem/56785012>

        Reviewed by Antti Koivisto.

        This is in preparation for adding text-align: justify support.
        The temporary Line::Run holds the number of expansion opportunities, while Display::Run holds both the expansion behavior and
        the final expansion width.
        The number of opportunities is used to compute the final expansion width for each run.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::TextContext):
        (WebCore::Display::Run::TextContext::setExpansion):
        (WebCore::Display::Run::TextContext::expansion const):
        (WebCore::Display::Run::TextContext::expansionBehavior const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::hasExpansionOpportunity const):
        (WebCore::Layout::Line::Run::expansionOpportunityCount const):
        (WebCore::Layout::Line::Run::expansionBehavior const):
        (WebCore::Layout::Line::Run::setHasExpansionOpportunity):
        (WebCore::Layout::Line::Run::setComputedHorizontalExpansion):

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

        [LFC][IFC] Line::Run should not hold a reference to InlineItem
        https://bugs.webkit.org/show_bug.cgi?id=203660
        <rdar://problem/56770286>

        Reviewed by Antti Koivisto.

        When Line::Runs are merged ([content][   ] -> [content ]) they end up with multiple InlineItems. Let's cache some values from
        the InlineItems instead.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::Run):
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::layoutBox const):
        (WebCore::Layout::Line::Run::isText const):
        (WebCore::Layout::Line::Run::isBox const):
        (WebCore::Layout::Line::Run::isForcedLineBreak const):
        (WebCore::Layout::Line::Run::isContainerStart const):
        (WebCore::Layout::Line::Run::isContainerEnd const):
        (WebCore::Layout::Line::Run::isCollapsible const):
        (WebCore::Layout::Line::Run::isWhitespace const):
        (WebCore::Layout::Line::Run::expand):

2019-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, update DerivedSources-output.xcfilelist after r251841

        * DerivedSources-output.xcfilelist: Replace StyleBuilder.cpp with StyleBuilderGenerated.cpp.

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

        [LFC][IFC] Do not merge completely collapsed run with the previous run
        https://bugs.webkit.org/show_bug.cgi?id=203658
        <rdar://problem/56769334>

        Reviewed by Antti Koivisto.

        When a whitespace run is completely collapsed (and visually empty), we should not try to merge it with previous text runs.
        E.g. [before  \nafter] -> [before][  ][\n][after] -> [before ][][after] -> [before ][after]
                ^content               ^inline items             ^line runs          ^display runs

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::hasTrailingCollapsedContent const):
        (WebCore::Layout::Line::Run::canBeExtended const): Deleted.

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

        [LFC][IFC] Set setIsCollapsed on the line item when its content is actually collapsed
        https://bugs.webkit.org/show_bug.cgi?id=203655
        <rdar://problem/56767543>

        Reviewed by Antti Koivisto.

        Do not set the isCollapsed flag on the line run unless we actually collapsed it (changed its length from greated than 1 to 1).

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendTextContent):

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

        [LFC][IFC] Line::appendTextContent::willCollapseCompletely should check for isCollapsible()
        https://bugs.webkit.org/show_bug.cgi?id=203653
        <rdar://problem/56766949>

        Reviewed by Antti Koivisto.

        When deciding whether the current collapsible whitespace run collapses completely, we need to check whether the previous
        run is collapsible and not whether it is collapsed (it addresses the cases when the previous whitespace length is 1, so it is collapsible but not
        collapsed -> " " followed by '\n' <- no preserved segment break.)

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendTextContent):

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

        [LFC][IFC] Add justify expansion information to Display::Runs
        https://bugs.webkit.org/show_bug.cgi?id=203535
        <rdar://problem/56689268>

        Reviewed by Antti Koivisto.

        This is in preparation for supporting text-align: justify.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::TextContext):
        (WebCore::Display::Run::TextContext::expansionBehavior const):
        (WebCore::Display::Run::TextContext::expansion const):

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

        [LFC][IFC] Preserved segment breaks should produce ForcedLineBreak type of InlineItems
        https://bugs.webkit.org/show_bug.cgi?id=203645
        <rdar://problem/56763606>

        Reviewed by Antti Koivisto.

        This patch turns preserved segment breaks (e.g. \n) into a ForcedLineBreak. Non-preserved segments breaks are treated as whitespace characters.
        It fixes a small type mismatch of having an InlineTextItem representing a non-text content (line break).

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContent):
        * layout/inlineformatting/InlineItem.cpp:
        (WebCore::Layout::InlineItem::InlineItem):
        (WebCore::Layout::InlineItem::isForcedLineBreak const): Deleted.
        (WebCore::Layout::InlineItem::isText const): Deleted.
        * layout/inlineformatting/InlineItem.h:
        (WebCore::Layout::InlineItem::isText const):
        (WebCore::Layout::InlineItem::isForcedLineBreak const):
        (WebCore::Layout::InlineItem::InlineItem): Deleted.
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::left const):
        (WebCore::Layout::InlineTextItem::right const):
        (WebCore::Layout::InlineTextItem::isWhitespace const): Deleted.
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::isWhitespace const):

2019-10-31  Antti Koivisto  <antti@apple.com>

        Rename StyleBuilder to Style::BuilderGenerated
        https://bugs.webkit.org/show_bug.cgi?id=203673

        Reviewed by Antoine Quint.

        Also rename the related StykeBuilderCustom and StyleBuilderConverter classes
        and move them to the Style namespace and directory.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSFontFace.cpp:
        (WebCore::calculateWeightRange):
        (WebCore::calculateStretchRange):
        (WebCore::calculateItalicRange):
        * css/CSSFontFaceSet.cpp:
        (WebCore::computeFontSelectionRequest):
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::mapFillXPosition):
        (WebCore::CSSToStyleMap::mapFillYPosition):
        * css/StyleBuilder.h: Removed.
        * css/makeprop.pl:
        (getScopeForFunction):
        (generateInitialValueSetter):
        (generateInheritValueSetter):
        (generateValueSetter):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
        * style/PropertyCascade.cpp:
        (WebCore::Style::PropertyCascade::applyProperty):
        * style/StyleBuilderConverter.h: Renamed from Source/WebCore/css/StyleBuilderConverter.h.
        (WebCore::Style::BuilderConverter::convertLength):
        (WebCore::Style::BuilderConverter::convertLengthOrAuto):
        (WebCore::Style::BuilderConverter::convertLengthSizing):
        (WebCore::Style::BuilderConverter::convertLengthMaxSizing):
        (WebCore::Style::BuilderConverter::convertTabSize):
        (WebCore::Style::BuilderConverter::convertComputedLength):
        (WebCore::Style::BuilderConverter::convertLineWidth):
        (WebCore::Style::BuilderConverter::convertSpacing):
        (WebCore::Style::BuilderConverter::convertToRadiusLength):
        (WebCore::Style::BuilderConverter::convertRadius):
        (WebCore::Style::BuilderConverter::convertTo100PercentMinusLength):
        (WebCore::Style::BuilderConverter::convertPositionComponentX):
        (WebCore::Style::BuilderConverter::convertPositionComponentY):
        (WebCore::Style::BuilderConverter::convertPositionComponent):
        (WebCore::Style::BuilderConverter::convertObjectPosition):
        (WebCore::Style::BuilderConverter::convertTextDecoration):
        (WebCore::Style::BuilderConverter::convertNumber):
        (WebCore::Style::BuilderConverter::convertNumberOrAuto):
        (WebCore::Style::BuilderConverter::convertWebkitHyphenateLimitLines):
        (WebCore::Style::BuilderConverter::convertBorderImage):
        (WebCore::Style::BuilderConverter::convertBorderMask):
        (WebCore::Style::BuilderConverter::convertStyleImage):
        (WebCore::Style::BuilderConverter::convertTransform):
        (WebCore::Style::BuilderConverter::updateColorScheme):
        (WebCore::Style::BuilderConverter::convertColorScheme):
        (WebCore::Style::BuilderConverter::convertString):
        (WebCore::Style::BuilderConverter::convertStringOrAuto):
        (WebCore::Style::BuilderConverter::convertStringOrNone):
        (WebCore::Style::BuilderConverter::valueToEmphasisPosition):
        (WebCore::Style::BuilderConverter::convertTextEmphasisPosition):
        (WebCore::Style::BuilderConverter::convertTextAlign):
        (WebCore::Style::BuilderConverter::convertClipPath):
        (WebCore::Style::BuilderConverter::convertResize):
        (WebCore::Style::BuilderConverter::convertMarqueeRepetition):
        (WebCore::Style::BuilderConverter::convertMarqueeSpeed):
        (WebCore::Style::BuilderConverter::convertQuotes):
        (WebCore::Style::BuilderConverter::convertTextUnderlinePosition):
        (WebCore::Style::BuilderConverter::convertTextUnderlineOffset):
        (WebCore::Style::BuilderConverter::convertTextDecorationThickness):
        (WebCore::Style::BuilderConverter::convertReflection):
        (WebCore::Style::BuilderConverter::convertInitialLetter):
        (WebCore::Style::BuilderConverter::convertTextStrokeWidth):
        (WebCore::Style::BuilderConverter::convertLineBoxContain):
        (WebCore::Style::BuilderConverter::valueToDecorationSkip):
        (WebCore::Style::BuilderConverter::convertTextDecorationSkip):
        (WebCore::Style::BuilderConverter::convertShapeValue):
        (WebCore::Style::BuilderConverter::convertScrollSnapType):
        (WebCore::Style::BuilderConverter::convertScrollSnapAlign):
        (WebCore::Style::BuilderConverter::createGridTrackBreadth):
        (WebCore::Style::BuilderConverter::createGridTrackSize):
        (WebCore::Style::BuilderConverter::createGridTrackList):
        (WebCore::Style::BuilderConverter::createGridPosition):
        (WebCore::Style::BuilderConverter::createImplicitNamedGridLinesFromGridArea):
        (WebCore::Style::BuilderConverter::convertGridTrackSizeList):
        (WebCore::Style::BuilderConverter::convertGridTrackSize):
        (WebCore::Style::BuilderConverter::convertGridPosition):
        (WebCore::Style::BuilderConverter::convertGridAutoFlow):
        (WebCore::Style::BuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
        (WebCore::Style::BuilderConverter::convertWordSpacing):
        (WebCore::Style::BuilderConverter::convertPerspective):
        (WebCore::Style::BuilderConverter::convertMarqueeIncrement):
        (WebCore::Style::BuilderConverter::convertFilterOperations):
        (WebCore::Style::BuilderConverter::convertFontFeatureSettings):
        (WebCore::Style::BuilderConverter::convertFontWeightFromValue):
        (WebCore::Style::BuilderConverter::convertFontStretchFromValue):
        (WebCore::Style::BuilderConverter::convertFontStyleFromValue):
        (WebCore::Style::BuilderConverter::convertFontWeight):
        (WebCore::Style::BuilderConverter::convertFontStretch):
        (WebCore::Style::BuilderConverter::convertFontVariationSettings):
        (WebCore::Style::BuilderConverter::convertTouchCallout):
        (WebCore::Style::BuilderConverter::convertTapHighlightColor):
        (WebCore::Style::BuilderConverter::convertTouchAction):
        (WebCore::Style::BuilderConverter::convertOverflowScrolling):
        (WebCore::Style::BuilderConverter::convertSVGLengthValue):
        (WebCore::Style::BuilderConverter::convertSVGLengthVector):
        (WebCore::Style::BuilderConverter::convertStrokeDashArray):
        (WebCore::Style::BuilderConverter::convertPaintOrder):
        (WebCore::Style::BuilderConverter::convertOpacity):
        (WebCore::Style::BuilderConverter::convertSVGURIReference):
        (WebCore::Style::BuilderConverter::convertSVGColor):
        (WebCore::Style::BuilderConverter::convertSelfOrDefaultAlignmentData):
        (WebCore::Style::BuilderConverter::convertContentAlignmentData):
        (WebCore::Style::BuilderConverter::convertGlyphOrientation):
        (WebCore::Style::BuilderConverter::convertGlyphOrientationOrAuto):
        (WebCore::Style::BuilderConverter::convertLineHeight):
        (WebCore::Style::BuilderConverter::convertFontSynthesis):
        (WebCore::Style::BuilderConverter::convertSpeakAs):
        (WebCore::Style::BuilderConverter::convertHangingPunctuation):
        (WebCore::Style::BuilderConverter::convertGapLength):
        * style/StyleBuilderCustom.h: Renamed from Source/WebCore/css/StyleBuilderCustom.h.
        (WebCore::Style::BuilderCustom::applyInitialWebkitMaskImage):
        (WebCore::Style::BuilderCustom::applyInheritWebkitMaskImage):
        (WebCore::Style::BuilderCustom::applyInitialFontFeatureSettings):
        (WebCore::Style::BuilderCustom::applyInheritFontFeatureSettings):
        (WebCore::Style::BuilderCustom::applyInitialFontVariationSettings):
        (WebCore::Style::BuilderCustom::applyInheritFontVariationSettings):
        (WebCore::Style::BuilderCustom::applyValueDirection):
        (WebCore::Style::BuilderCustom::applyInitialTextAlign):
        (WebCore::Style::BuilderCustom::applyValueTextAlign):
        (WebCore::Style::BuilderCustom::resetEffectiveZoom):
        (WebCore::Style::BuilderCustom::applyInitialZoom):
        (WebCore::Style::BuilderCustom::applyInheritZoom):
        (WebCore::Style::BuilderCustom::applyValueZoom):
        (WebCore::Style::BuilderCustom::mmLength):
        (WebCore::Style::BuilderCustom::inchLength):
        (WebCore::Style::BuilderCustom::getPageSizeFromName):
        (WebCore::Style::BuilderCustom::applyValueVerticalAlign):
        (WebCore::Style::BuilderCustom::applyInheritImageResolution):
        (WebCore::Style::BuilderCustom::applyInitialImageResolution):
        (WebCore::Style::BuilderCustom::applyValueImageResolution):
        (WebCore::Style::BuilderCustom::applyInheritSize):
        (WebCore::Style::BuilderCustom::applyInitialSize):
        (WebCore::Style::BuilderCustom::applyValueSize):
        (WebCore::Style::BuilderCustom::applyInheritTextIndent):
        (WebCore::Style::BuilderCustom::applyInitialTextIndent):
        (WebCore::Style::BuilderCustom::applyValueTextIndent):
        (WebCore::Style::ApplyPropertyBorderImageModifier::applyInheritValue):
        (WebCore::Style::ApplyPropertyBorderImageModifier::applyInitialValue):
        (WebCore::Style::ApplyPropertyBorderImageModifier::applyValue):
        (WebCore::Style::BuilderCustom::applyInheritLineHeight):
        (WebCore::Style::BuilderCustom::applyInitialLineHeight):
        (WebCore::Style::BuilderCustom::applyValueLineHeight):
        (WebCore::Style::BuilderCustom::applyInheritOutlineStyle):
        (WebCore::Style::BuilderCustom::applyInitialOutlineStyle):
        (WebCore::Style::BuilderCustom::applyValueOutlineStyle):
        (WebCore::Style::BuilderCustom::applyInitialClip):
        (WebCore::Style::BuilderCustom::applyInheritClip):
        (WebCore::Style::BuilderCustom::applyValueClip):
        (WebCore::Style::BuilderCustom::applyValueWebkitLocale):
        (WebCore::Style::BuilderCustom::applyValueWritingMode):
        (WebCore::Style::BuilderCustom::applyValueWebkitTextOrientation):
        (WebCore::Style::BuilderCustom::applyValueWebkitTextSizeAdjust):
        (WebCore::Style::BuilderCustom::applyValueWebkitTextZoom):
        (WebCore::Style::BuilderCustom::applyValueColorScheme):
        (WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):
        (WebCore::Style::BuilderCustom::applyInitialTextShadow):
        (WebCore::Style::BuilderCustom::applyInheritTextShadow):
        (WebCore::Style::BuilderCustom::applyValueTextShadow):
        (WebCore::Style::BuilderCustom::applyInitialBoxShadow):
        (WebCore::Style::BuilderCustom::applyInheritBoxShadow):
        (WebCore::Style::BuilderCustom::applyValueBoxShadow):
        (WebCore::Style::BuilderCustom::applyInitialWebkitBoxShadow):
        (WebCore::Style::BuilderCustom::applyInheritWebkitBoxShadow):
        (WebCore::Style::BuilderCustom::applyValueWebkitBoxShadow):
        (WebCore::Style::BuilderCustom::applyInitialFontFamily):
        (WebCore::Style::BuilderCustom::applyInheritFontFamily):
        (WebCore::Style::BuilderCustom::applyValueFontFamily):
        (WebCore::Style::BuilderCustom::isValidDisplayValue):
        (WebCore::Style::BuilderCustom::applyInheritDisplay):
        (WebCore::Style::BuilderCustom::applyValueDisplay):
        (WebCore::Style::BuilderCustom::applyValueBaselineShift):
        (WebCore::Style::BuilderCustom::applyInitialWebkitAspectRatio):
        (WebCore::Style::BuilderCustom::applyInheritWebkitAspectRatio):
        (WebCore::Style::BuilderCustom::applyValueWebkitAspectRatio):
        (WebCore::Style::BuilderCustom::applyInitialWebkitTextEmphasisStyle):
        (WebCore::Style::BuilderCustom::applyInheritWebkitTextEmphasisStyle):
        (WebCore::Style::BuilderCustom::applyValueWebkitTextEmphasisStyle):
        (WebCore::Style::BuilderCustom::applyInheritCounter):
        (WebCore::Style::BuilderCustom::applyValueCounter):
        (WebCore::Style::BuilderCustom::applyInitialCounterIncrement):
        (WebCore::Style::BuilderCustom::applyInheritCounterIncrement):
        (WebCore::Style::BuilderCustom::applyValueCounterIncrement):
        (WebCore::Style::BuilderCustom::applyInitialCounterReset):
        (WebCore::Style::BuilderCustom::applyInheritCounterReset):
        (WebCore::Style::BuilderCustom::applyValueCounterReset):
        (WebCore::Style::BuilderCustom::applyInitialCursor):
        (WebCore::Style::BuilderCustom::applyInheritCursor):
        (WebCore::Style::BuilderCustom::applyValueCursor):
        (WebCore::Style::BuilderCustom::applyInitialFill):
        (WebCore::Style::BuilderCustom::applyInheritFill):
        (WebCore::Style::BuilderCustom::applyValueFill):
        (WebCore::Style::BuilderCustom::applyInitialStroke):
        (WebCore::Style::BuilderCustom::applyInheritStroke):
        (WebCore::Style::BuilderCustom::applyValueStroke):
        (WebCore::Style::BuilderCustom::applyInitialContent):
        (WebCore::Style::BuilderCustom::applyInheritContent):
        (WebCore::Style::BuilderCustom::applyValueContent):
        (WebCore::Style::BuilderCustom::applyInheritFontVariantLigatures):
        (WebCore::Style::BuilderCustom::applyInitialFontVariantLigatures):
        (WebCore::Style::BuilderCustom::applyValueFontVariantLigatures):
        (WebCore::Style::BuilderCustom::applyInheritFontVariantNumeric):
        (WebCore::Style::BuilderCustom::applyInitialFontVariantNumeric):
        (WebCore::Style::BuilderCustom::applyValueFontVariantNumeric):
        (WebCore::Style::BuilderCustom::applyInheritFontVariantEastAsian):
        (WebCore::Style::BuilderCustom::applyInitialFontVariantEastAsian):
        (WebCore::Style::BuilderCustom::applyValueFontVariantEastAsian):
        (WebCore::Style::BuilderCustom::applyInitialFontSize):
        (WebCore::Style::BuilderCustom::applyInheritFontSize):
        (WebCore::Style::BuilderCustom::largerFontSize):
        (WebCore::Style::BuilderCustom::smallerFontSize):
        (WebCore::Style::BuilderCustom::determineRubyTextSizeMultiplier):
        (WebCore::Style::BuilderCustom::applyInitialFontStyle):
        (WebCore::Style::BuilderCustom::applyInheritFontStyle):
        (WebCore::Style::BuilderCustom::applyValueFontStyle):
        (WebCore::Style::BuilderCustom::applyValueFontSize):
        (WebCore::Style::BuilderCustom::applyInitialGridTemplateAreas):
        (WebCore::Style::BuilderCustom::applyInheritGridTemplateAreas):
        (WebCore::Style::BuilderCustom::applyValueGridTemplateAreas):
        (WebCore::Style::BuilderCustom::applyInitialGridTemplateColumns):
        (WebCore::Style::BuilderCustom::applyInheritGridTemplateColumns):
        (WebCore::Style::BuilderCustom::applyValueGridTemplateColumns):
        (WebCore::Style::BuilderCustom::applyInitialGridTemplateRows):
        (WebCore::Style::BuilderCustom::applyInheritGridTemplateRows):
        (WebCore::Style::BuilderCustom::applyValueGridTemplateRows):
        (WebCore::Style::BuilderCustom::applyValueAlt):
        (WebCore::Style::BuilderCustom::applyValueWillChange):
        (WebCore::Style::BuilderCustom::applyValueStrokeWidth):
        (WebCore::Style::BuilderCustom::applyValueStrokeColor):
        (WebCore::Style::BuilderCustom::applyInitialCustomProperty):
        (WebCore::Style::BuilderCustom::applyInheritCustomProperty):
        (WebCore::Style::BuilderCustom::applyValueCustomProperty):
        * style/StyleBuilderGenerated.h: Added.

2019-10-31  Antoine Quint  <graouts@apple.com>

        [Web Animations] Add support for AnimationEvent.pseudoElement
        https://bugs.webkit.org/show_bug.cgi?id=203671

        Reviewed by Dean Jackson.

        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::enqueueDOMEvent):
        * dom/AnimationEvent.cpp:
        (WebCore::AnimationEvent::AnimationEvent):
        (WebCore::AnimationEvent::pseudoElement const):
        * dom/AnimationEvent.h:
        * dom/AnimationEvent.idl:
        * dom/WebKitAnimationEvent.cpp:
        (WebCore::WebKitAnimationEvent::WebKitAnimationEvent):
        (WebCore::WebKitAnimationEvent::pseudoElement const):
        * dom/WebKitAnimationEvent.h:
        * dom/WebKitAnimationEvent.idl:
        * page/animation/CSSAnimationController.cpp:
        (WebCore::CSSAnimationControllerPrivate::fireEventsAndUpdateStyle):

2019-10-31  Antoine Quint  <graouts@apple.com>

        [Web Animations] transform property is always "none" for getKeyframes() output of a CSS Animation
        https://bugs.webkit.org/show_bug.cgi?id=203669

        Reviewed by Dean Jackson.

        Calling valueForPropertyInStyle() with CSSPropertyTransform will eventually call into computedTransform()
        which requires a renderer. Note that right now we're returning the computed style instead of the parsed
        style, this will be addressed in a separate patch.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::getKeyframes):

2019-10-31  Miguel Gomez  <magomez@igalia.com>

        Unreviewed, rolling out r251772.

        Caused lots of media related tests to timeout

        Reverted changeset:

        "REGRESSION(r249428): [GStreamer] VP9 video rendered green"
        https://bugs.webkit.org/show_bug.cgi?id=201422
        https://trac.webkit.org/changeset/251772

2019-10-31  Miguel Gomez  <magomez@igalia.com>

        [CoordGraphics] Avoid painting backing stores for zero-opacity layers
        https://bugs.webkit.org/show_bug.cgi?id=184143

        Reviewed by Žan Doberšek.

        Skip generating backing stores for layers that have zero opacity and do
        not animate the opacity value. In the current CoordinatedGraphics system
        this can end up saving loads of memory on Web content that deploys a
        large number of such elements.

        Based on a previous patch from Žan Doberšek.

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):

2019-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] ImageDecoders: use SharedBuffer::DataSegment instead of SharedBuffer
        https://bugs.webkit.org/show_bug.cgi?id=202807

        Reviewed by Adrian Perez de Castro.

        Because SharedBuffer::DataSegment is ThreadSafeRefCounted.

        * platform/image-decoders/ScalableImageDecoder.h:
        * platform/image-decoders/bmp/BMPImageDecoder.cpp:
        (WebCore::BMPImageDecoder::setData):
        (WebCore::BMPImageDecoder::decodeHelper):
        * platform/image-decoders/bmp/BMPImageDecoder.h:
        * platform/image-decoders/bmp/BMPImageReader.h:
        (WebCore::BMPImageReader::readUint16):
        (WebCore::BMPImageReader::readUint32):
        (WebCore::BMPImageReader::setData):
        (WebCore::BMPImageReader::readUint16 const):
        (WebCore::BMPImageReader::readUint32 const):
        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        (WebCore::GIFImageDecoder::setData):
        (WebCore::GIFImageDecoder::decode):
        * platform/image-decoders/gif/GIFImageReader.h:
        (GIFImageReader::setData):
        * platform/image-decoders/ico/ICOImageDecoder.cpp:
        (WebCore::ICOImageDecoder::setData):
        (WebCore::ICOImageDecoder::decodeAtIndex):
        * platform/image-decoders/ico/ICOImageDecoder.h:
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::JPEGImageReader::decode):
        * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:
        (WebCore::JPEG2000ImageDecoder::decode):
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageReader::decode):
        * platform/image-decoders/webp/WEBPImageDecoder.cpp:
        (WebCore::WEBPImageDecoder::decode):

2019-10-30  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] Enable the support for iOS
        https://bugs.webkit.org/show_bug.cgi?id=202618

        Reviewed by Jer Noble.

        Enable the Picture-in-Picture API support for iOS (iPad only).
        Add a file WebCore/platform/PictureInPictureSupport.h to define supportsPictureInPicture()
        and provide a default implementation of that function if a configuration does not provide it (just return false).
        The original definition of this function in platform/cocoa/VideoFullscreenModel.h is removed,
        and the usage of this function is cleaned up.
        Also fix a build error related to including header file (pal/spi/cg/CoreGraphicsSPI.h).

        Covered by existing test cases.

        * Configurations/FeatureDefines.xcconfig:
        * Modules/pictureinpicture/DocumentPictureInPicture.cpp:
        (WebCore::DocumentPictureInPicture::pictureInPictureEnabled):
        * Modules/pictureinpicture/DocumentPictureInPicture.h:
        (WebCore::DocumentPictureInPicture::pictureInPictureEnabled): Deleted.
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):

        * Configurations/FeatureDefines.xcconfig:
        * Modules/pictureinpicture/DocumentPictureInPicture.cpp:
        (WebCore::DocumentPictureInPicture::pictureInPictureEnabled):
        * Modules/pictureinpicture/DocumentPictureInPicture.h:
        (WebCore::DocumentPictureInPicture::pictureInPictureEnabled): Deleted.
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::webkitSupportsPresentationMode const):
        * platform/PictureInPictureSupport.h: Copied from Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h.
        (WebCore::supportsPictureInPicture):
        * platform/cocoa/VideoFullscreenModel.h:
        * platform/graphics/cg/PathCG.cpp:
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        * platform/mac/VideoFullscreenInterfaceMac.mm:

2019-10-30  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: ResizeObserver callbacks are not labeled in the Events timeline
        https://bugs.webkit.org/show_bug.cgi?id=203634
        <rdar://problem/56760736>

        Reviewed by Simon Fraser.

        Wrap the `ResizeObserver` event handler in two `InspectorInstrumentation` calls so the
        frontend knows how to properly label the callbacks.

        * page/ResizeObserver.cpp:
        (WebCore::ResizeObserver::deliverObservations):

2019-10-30  Alex Christensen  <achristensen@webkit.org>

        Prevent Mac CMake build from bit rotting
        https://bugs.webkit.org/show_bug.cgi?id=203647

        Rubber-stamped by Tim Horton.

        * PlatformMac.cmake:
        * platform/graphics/mac/WebKitNSImageExtras.mm:

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

        Add fullscreen style quirk for reddit.com
        https://bugs.webkit.org/show_bug.cgi?id=203635
        <rdar://problem/55813774>

        Reviewed by Eric Carlson.

        Reddit.com expects the UA stylesheet to give the fullscreen element
        a "width:100%; height:100%;" style.

        * css/CSSDefaultStyleSheets.cpp:
        (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
        * page/Quirks.cpp:
        (WebCore::Quirks::needsFullWidthHeightFullscreenStyleQuirk const):
        * page/Quirks.h:

2019-10-30  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Date functions should have intrinsic
        https://bugs.webkit.org/show_bug.cgi?id=202187

        Reviewed by Keith Miller.

        * loader/archive/mhtml/MHTMLArchive.cpp:
        (WebCore::MHTMLArchive::generateMHTMLData):

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

        Opacity should always serialize as a number
        https://bugs.webkit.org/show_bug.cgi?id=203601

        Reviewed by Dean Jackson.
        
        opacity should always serialize as a number, even if it was specified as a percentage.

        Tests: imported/w3c/web-platform-tests/css/css-color/parsing/opacity-valid

        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getPropertyValue const):

2019-10-30  Chris Dumez  <cdumez@apple.com>

        GPUCanvasContext should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203104
        <rdar://problem/56748066>

        Reviewed by Tim Horton.

        Let pages with a GPUCanvasContext into the back/forward cache. The current implementation
        does not run any script.

        Test: fast/history/page-cache-gpu-canvas-context.html

        * Modules/webgpu/GPUCanvasContext.h:

2019-10-30  Daniel Bates  <dabates@apple.com>

        Move tracking and computation of timer heap current insertion order to ThreadTimers
        https://bugs.webkit.org/show_bug.cgi?id=203519

        Reviewed by Jer Noble.

        Each thread maintains its own heap of timers. So, they should also maintain the running insertion count.
        The running insertion count is used to ensure timers with the same firing time are ordered by when
        they were inserted into the heap. This is important to ensure that code like:

                window.setTimeout(a, 0)
                window.setTimeout(b, 0)

        schedule a() to be called before b() even though both has the same firing time.

        Currently the insertion count is process-wide. That is, it is globally unique across all threads. The
        current width of the count is sizeof(unsigned) and so the more threads that increment it the faster it
        approaches the point of wrapping around. The current code can only ensure correct timer ordering in a
        window of sizeof(unsigned) / 2 timers (see TimerHeapLessThanFunction::compare(MonotonicTime, unsigned, MonotonicTime, unsigned)).
        We could simply leave it process-wide and increases the width to 64-bits, but I felt it made more
        sense conceptually to move the count to the thread local storage and be with the timer heap itself
        despite the extra 4 bytes per thread that it adds.

        * dom/ActiveDOMObject.h:
        * platform/ThreadTimers.h:
        (WebCore::ThreadTimers::nextHeapInsertionCount): Added.
        * platform/Timer.cpp:
        (WebCore::TimerBase::setNextFireTime):

2019-10-30  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Remove the argument 'resultElement' from the SVG animation functions
        https://bugs.webkit.org/show_bug.cgi?id=202052

         Reviewed by Simon Fraser.

         This is a clean-up patch, which does the following:

         -- It removes the argument 'resultElement' from all the SVG animation
           functions except from SVGSMILElement::progress(). In this function, we
           need to start the animation only with the first animation.

         -- It renames resetAnimatedType() and clearAnimatedType() to startAnimation()
           and stopAnimation() respectively. These functions were named for the
           type SVGAnimatedType which had been deleted. The real purpose of these
           functions is to start/stop the animation.

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::SVGAnimateElementBase::startAnimation):
        (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
        (WebCore::SVGAnimateElementBase::stopAnimation):
        (WebCore::SVGAnimateElementBase::resetAnimatedType): Deleted.
        (WebCore::SVGAnimateElementBase::clearAnimatedType): Deleted.
        * svg/SVGAnimateElementBase.h:
        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::startAnimation):
        (WebCore::SVGAnimateMotionElement::stopAnimation):
        (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
        (WebCore::SVGAnimateMotionElement::resetAnimatedType): Deleted.
        (WebCore::SVGAnimateMotionElement::clearAnimatedType): Deleted.
        * svg/SVGAnimateMotionElement.h:
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::updateAnimation):
        * svg/SVGAnimationElement.h:
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::updateAnimations):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::reset):
        (WebCore::SVGSMILElement::setAttributeName):
        (WebCore::SVGSMILElement::setTargetElement):
        (WebCore::SVGSMILElement::progress):
        * svg/animation/SVGSMILElement.h:

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

        ASSERTION FAILED: !object || !isRuby(object->parent()) || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == D
        https://bugs.webkit.org/show_bug.cgi?id=196003
        <rdar://problem/49219890>

        Reviewed by Antti Koivisto.

        This test case triggered two slightly different issues.
        1. It's valid to have column flows/sets as the child of the ruby renderer (isRubyChildForNormalRemoval already accepts these type of renderers).
        2. When the parent finding logic comes back with the insertion point as parent candidate, we can only call the simple internal insert when the multicol context is not present (since the multicol context (sadly) mutates the insertion point).

        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::attach):
        * rendering/updating/RenderTreeBuilderRuby.cpp:
        (WebCore::isAnonymousRubyInlineBlock):
        (WebCore::lastRubyRun):

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

        Create base class common to AccessibilityObject and AXIsolatedTreeNode.
        https://bugs.webkit.org/show_bug.cgi?id=203408

        Reviewed by Chris Fleizach.

        No new tests needed since this doesn't change any functionality.

        AXCoreObject is now a common base class for both AccessibilityObject and
        AXIsolatedTreeNode. All client code should use AXCoreObject instead of
        any of the derived classes. This will allow to seamlessly switch
        between using AXIsolatedTreeNode in the secondary thread and
        AccessibilityObject in the main thread when needed. This change also
        allows for cleaner client code, encapsulating the decision whether
        AXIsolatedTreeNode can respond to a request or need to resort to its
        corresponding AccessibilityObject, and reducing the number of compile
        time flag checks for ENABLE(ACCESSIBILITY_ISOLATED_TREE).

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::~AXObjectCache):
        (WebCore::AXObjectCache::focusedImageMapUIElement):
        (WebCore::AXObjectCache::focusedUIElementForPage):
        (WebCore::AXObjectCache::getOrCreate):
        (WebCore::AXObjectCache::remove):
        (WebCore::AXObjectCache::getAXID):
        (WebCore::AXObjectCache::childrenChanged):
        (WebCore::AXObjectCache::notificationPostTimerFired):
        (WebCore::AXObjectCache::postNotification):
        (WebCore::AXObjectCache::setTextMarkerDataWithCharacterOffset):
        (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
        (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
        (WebCore::AXObjectCache::performDeferredCacheUpdate):
        * accessibility/AXObjectCache.h:
        (WebCore::AXObjectCache::childrenChanged):
        * accessibility/AccessibilityARIAGrid.cpp:
        (WebCore::AccessibilityARIAGrid::addTableCellChild):
        (WebCore::AccessibilityARIAGrid::addRowDescendant):
        * accessibility/AccessibilityARIAGrid.h:
        * accessibility/AccessibilityARIAGridCell.cpp:
        (WebCore::AccessibilityARIAGridCell::parentTable const):
        (WebCore::AccessibilityARIAGridCell::rowIndexRange const):
        (WebCore::AccessibilityARIAGridCell::axRowSpanWithRowIndex const):
        (WebCore::AccessibilityARIAGridCell::columnIndexRange const):
        * accessibility/AccessibilityARIAGridRow.cpp:
        (WebCore::AccessibilityARIAGridRow::disclosedRows):
        (WebCore::AccessibilityARIAGridRow::disclosedByRow const):
        (WebCore::AccessibilityARIAGridRow::headerObject):
        * accessibility/AccessibilityARIAGridRow.h:
        * accessibility/AccessibilityLabel.cpp:
        (WebCore::AccessibilityLabel::insertChild):
        * accessibility/AccessibilityLabel.h:
        * accessibility/AccessibilityListBox.cpp:
        (WebCore::AccessibilityListBox::elementAccessibilityHitTest const):
        * accessibility/AccessibilityListBox.h:
        * accessibility/AccessibilityMathMLElement.cpp:
        (WebCore::AccessibilityMathMLElement::isMathScriptObject const):
        (WebCore::AccessibilityMathMLElement::isMathMultiscriptObject const):
        (WebCore::AccessibilityMathMLElement::mathRadicandObject):
        (WebCore::AccessibilityMathMLElement::mathRootIndexObject):
        (WebCore::AccessibilityMathMLElement::mathNumeratorObject):
        (WebCore::AccessibilityMathMLElement::mathDenominatorObject):
        (WebCore::AccessibilityMathMLElement::mathUnderObject):
        (WebCore::AccessibilityMathMLElement::mathOverObject):
        (WebCore::AccessibilityMathMLElement::mathBaseObject):
        (WebCore::AccessibilityMathMLElement::mathSubscriptObject):
        (WebCore::AccessibilityMathMLElement::mathSuperscriptObject):
        * accessibility/AccessibilityMathMLElement.h:
        * accessibility/AccessibilityMediaControls.h:
        * accessibility/AccessibilityMenuList.cpp:
        (WebCore::AccessibilityMenuList::addChildren):
        * accessibility/AccessibilityMenuListPopup.cpp:
        (WebCore::AccessibilityMenuListPopup::childrenChanged):
        (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
        * accessibility/AccessibilityNodeObject.cpp:
        (WebCore::AccessibilityNodeObject::selectedRadioButton):
        (WebCore::AccessibilityNodeObject::selectedTabItem):
        * accessibility/AccessibilityNodeObject.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
        (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
        (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch):
        (WebCore::AccessibilityObject::containsText const):
        (WebCore::AccessibilityObject::parentObjectUnignored const):
        (WebCore::appendAccessibilityObject):
        (WebCore::AccessibilityObject::insertChild):
        (WebCore::AccessibilityObject::addChild):
        (WebCore::appendChildrenToArray):
        (WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit):
        (WebCore::AccessibilityObject::findMatchingObjects):
        (WebCore::AccessibilityObject::headingElementForNode):
        (WebCore::AccessibilityObject::isDescendantOfObject const):
        (WebCore::AccessibilityObject::isAncestorOfObject const):
        (WebCore::AccessibilityObject::elementAccessibilityHitTest const):
        (WebCore::AccessibilityObject::focusedUIElement const):
        (WebCore::AccessibilityObject::isExpanded const):
        (WebCore::AccessibilityObject::isOnScreen const):
        (WebCore::AccessibilityObject::accessibilityIsIgnored const):
        (WebCore::AccessibilityObject::selectedListItem):
        (WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):
        (WebCore::AccessibilityObject::accessibilityObjectContainsText const): Deleted.
        (WebCore::AccessibilityObject::isOnscreen const): Deleted.
        * accessibility/AccessibilityObject.h:
        (isType):
        (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode): Deleted.
        (WebCore::AccessibilityIsIgnoredFromParentData::AccessibilityIsIgnoredFromParentData): Deleted.
        (WebCore::AccessibilityIsIgnoredFromParentData::isNull const): Deleted.
        (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria): Deleted.
        (WebCore::VisiblePositionRange::VisiblePositionRange): Deleted.
        (WebCore::VisiblePositionRange::isNull const): Deleted.
        (WebCore::PlainTextRange::PlainTextRange): Deleted.
        (WebCore::PlainTextRange::isNull const): Deleted.
        (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria): Deleted.
        (WebCore::AccessibilityTextOperation::AccessibilityTextOperation): Deleted.
        (WebCore::AccessibilityObject::setAXObjectID): Deleted.
        (WebCore::AccessibilityObject::init): Deleted.
        (WebCore::AccessibilityObject::isAccessibilityNodeObject const): Deleted.
        (WebCore::AccessibilityObject::isAccessibilityRenderObject const): Deleted.
        (WebCore::AccessibilityObject::isAccessibilityScrollbar const): Deleted.
        (WebCore::AccessibilityObject::isAccessibilityScrollView const): Deleted.
        (WebCore::AccessibilityObject::isAccessibilitySVGRoot const): Deleted.
        (WebCore::AccessibilityObject::isAccessibilitySVGElement const): Deleted.
        (WebCore::AccessibilityObject::isAttachmentElement const): Deleted.
        (WebCore::AccessibilityObject::isHeading const): Deleted.
        (WebCore::AccessibilityObject::isImageMap const): Deleted.
        (WebCore::AccessibilityObject::isNativeImage const): Deleted.
        (WebCore::AccessibilityObject::isImageButton const): Deleted.
        (WebCore::AccessibilityObject::isPasswordField const): Deleted.
        (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField): Deleted.
        (WebCore::AccessibilityObject::isNativeTextControl const): Deleted.
        (WebCore::AccessibilityObject::isSearchField const): Deleted.
        (WebCore::AccessibilityObject::isWebArea const): Deleted.
        (WebCore::AccessibilityObject::isCheckbox const): Deleted.
        (WebCore::AccessibilityObject::isRadioButton const): Deleted.
        (WebCore::AccessibilityObject::isNativeListBox const): Deleted.
        (WebCore::AccessibilityObject::isListBox const): Deleted.
        (WebCore::AccessibilityObject::isListBoxOption const): Deleted.
        (WebCore::AccessibilityObject::isMediaTimeline const): Deleted.
        (WebCore::AccessibilityObject::isMenuRelated const): Deleted.
        (WebCore::AccessibilityObject::isMenu const): Deleted.
        (WebCore::AccessibilityObject::isMenuBar const): Deleted.
        (WebCore::AccessibilityObject::isMenuButton const): Deleted.
        (WebCore::AccessibilityObject::isMenuItem const): Deleted.
        (WebCore::AccessibilityObject::isInputImage const): Deleted.
        (WebCore::AccessibilityObject::isProgressIndicator const): Deleted.
        (WebCore::AccessibilityObject::isSlider const): Deleted.
        (WebCore::AccessibilityObject::isSliderThumb const): Deleted.
        (WebCore::AccessibilityObject::isInputSlider const): Deleted.
        (WebCore::AccessibilityObject::isControl const): Deleted.
        (WebCore::AccessibilityObject::isLabel const): Deleted.
        (WebCore::AccessibilityObject::isList const): Deleted.
        (WebCore::AccessibilityObject::isTable const): Deleted.
        (WebCore::AccessibilityObject::isDataTable const): Deleted.
        (WebCore::AccessibilityObject::isTableRow const): Deleted.
        (WebCore::AccessibilityObject::isTableColumn const): Deleted.
        (WebCore::AccessibilityObject::isTableCell const): Deleted.
        (WebCore::AccessibilityObject::isFieldset const): Deleted.
        (WebCore::AccessibilityObject::isGroup const): Deleted.
        (WebCore::AccessibilityObject::isARIATreeGridRow const): Deleted.
        (WebCore::AccessibilityObject::isMenuList const): Deleted.
        (WebCore::AccessibilityObject::isMenuListPopup const): Deleted.
        (WebCore::AccessibilityObject::isMenuListOption const): Deleted.
        (WebCore::AccessibilityObject::isSpinButton const): Deleted.
        (WebCore::AccessibilityObject::isNativeSpinButton const): Deleted.
        (WebCore::AccessibilityObject::isSpinButtonPart const): Deleted.
        (WebCore::AccessibilityObject::isMockObject const): Deleted.
        (WebCore::AccessibilityObject::isMediaObject const): Deleted.
        (WebCore::AccessibilityObject::isSwitch const): Deleted.
        (WebCore::AccessibilityObject::isToggleButton const): Deleted.
        (WebCore::AccessibilityObject::isTabList const): Deleted.
        (WebCore::AccessibilityObject::isTabItem const): Deleted.
        (WebCore::AccessibilityObject::isRadioGroup const): Deleted.
        (WebCore::AccessibilityObject::isComboBox const): Deleted.
        (WebCore::AccessibilityObject::isTreeGrid const): Deleted.
        (WebCore::AccessibilityObject::isListItem const): Deleted.
        (WebCore::AccessibilityObject::isCheckboxOrRadio const): Deleted.
        (WebCore::AccessibilityObject::isScrollView const): Deleted.
        (WebCore::AccessibilityObject::isCanvas const): Deleted.
        (WebCore::AccessibilityObject::isPopUpButton const): Deleted.
        (WebCore::AccessibilityObject::isColorWell const): Deleted.
        (WebCore::AccessibilityObject::isSplitter const): Deleted.
        (WebCore::AccessibilityObject::isToolbar const): Deleted.
        (WebCore::AccessibilityObject::isSummary const): Deleted.
        (WebCore::AccessibilityObject::isChecked const): Deleted.
        (WebCore::AccessibilityObject::isEnabled const): Deleted.
        (WebCore::AccessibilityObject::isSelected const): Deleted.
        (WebCore::AccessibilityObject::isFocused const): Deleted.
        (WebCore::AccessibilityObject::isHovered const): Deleted.
        (WebCore::AccessibilityObject::isIndeterminate const): Deleted.
        (WebCore::AccessibilityObject::isLoaded const): Deleted.
        (WebCore::AccessibilityObject::isMultiSelectable const): Deleted.
        (WebCore::AccessibilityObject::isOffScreen const): Deleted.
        (WebCore::AccessibilityObject::isPressed const): Deleted.
        (WebCore::AccessibilityObject::isUnvisited const): Deleted.
        (WebCore::AccessibilityObject::isVisited const): Deleted.
        (WebCore::AccessibilityObject::isRequired const): Deleted.
        (WebCore::AccessibilityObject::supportsRequiredAttribute const): Deleted.
        (WebCore::AccessibilityObject::isLinked const): Deleted.
        (WebCore::AccessibilityObject::isVisible const): Deleted.
        (WebCore::AccessibilityObject::isCollapsed const): Deleted.
        (WebCore::AccessibilityObject::setIsExpanded): Deleted.
        (WebCore::AccessibilityObject::isSelectedOptionActive const): Deleted.
        (WebCore::AccessibilityObject::hasBoldFont const): Deleted.
        (WebCore::AccessibilityObject::hasItalicFont const): Deleted.
        (WebCore::AccessibilityObject::hasPlainText const): Deleted.
        (WebCore::AccessibilityObject::hasSameFont const): Deleted.
        (WebCore::AccessibilityObject::hasSameFontColor const): Deleted.
        (WebCore::AccessibilityObject::hasSameStyle const): Deleted.
        (WebCore::AccessibilityObject::isStaticText const): Deleted.
        (WebCore::AccessibilityObject::hasUnderline const): Deleted.
        (WebCore::AccessibilityObject::canSetFocusAttribute const): Deleted.
        (WebCore::AccessibilityObject::canSetTextRangeAttributes const): Deleted.
        (WebCore::AccessibilityObject::canSetValueAttribute const): Deleted.
        (WebCore::AccessibilityObject::canSetNumericValue const): Deleted.
        (WebCore::AccessibilityObject::canSetSelectedAttribute const): Deleted.
        (WebCore::AccessibilityObject::canSetSelectedChildrenAttribute const): Deleted.
        (WebCore::AccessibilityObject::canSetExpandedAttribute const): Deleted.
        (WebCore::AccessibilityObject::node const): Deleted.
        (WebCore::AccessibilityObject::renderer const): Deleted.
        (WebCore::AccessibilityObject::headingLevel const): Deleted.
        (WebCore::AccessibilityObject::tableLevel const): Deleted.
        (WebCore::AccessibilityObject::valueDescription const): Deleted.
        (WebCore::AccessibilityObject::valueForRange const): Deleted.
        (WebCore::AccessibilityObject::maxValueForRange const): Deleted.
        (WebCore::AccessibilityObject::minValueForRange const): Deleted.
        (WebCore::AccessibilityObject::stepValueForRange const): Deleted.
        (WebCore::AccessibilityObject::selectedRadioButton): Deleted.
        (WebCore::AccessibilityObject::selectedTabItem): Deleted.
        (WebCore::AccessibilityObject::layoutCount const): Deleted.
        (WebCore::AccessibilityObject::estimatedLoadingProgress const): Deleted.
        (WebCore::AccessibilityObject::supportsARIAOwns const): Deleted.
        (WebCore::AccessibilityObject::hasPopup const): Deleted.
        (WebCore::AccessibilityObject::canvasHasFallbackContent const): Deleted.
        (WebCore::AccessibilityObject::supportsARIADropping const): Deleted.
        (WebCore::AccessibilityObject::supportsARIADragging const): Deleted.
        (WebCore::AccessibilityObject::isARIAGrabbed): Deleted.
        (WebCore::AccessibilityObject::setARIAGrabbed): Deleted.
        (WebCore::AccessibilityObject::determineARIADropEffects): Deleted.
        (WebCore::AccessibilityObject::firstChild const): Deleted.
        (WebCore::AccessibilityObject::lastChild const): Deleted.
        (WebCore::AccessibilityObject::previousSibling const): Deleted.
        (WebCore::AccessibilityObject::nextSibling const): Deleted.
        (WebCore::AccessibilityObject::parentObject const): Deleted.
        (WebCore::AccessibilityObject::parentObjectIfExists const): Deleted.
        (WebCore::AccessibilityObject::isDescendantOfBarrenParent const): Deleted.
        (WebCore::AccessibilityObject::observableObject const): Deleted.
        (WebCore::AccessibilityObject::linkedUIElements const): Deleted.
        (WebCore::AccessibilityObject::titleUIElement const): Deleted.
        (WebCore::AccessibilityObject::exposesTitleUIElement const): Deleted.
        (WebCore::AccessibilityObject::correspondingLabelForControlElement const): Deleted.
        (WebCore::AccessibilityObject::correspondingControlForLabelElement const): Deleted.
        (WebCore::AccessibilityObject::scrollBar): Deleted.
        (WebCore::AccessibilityObject::ariaRoleAttribute const): Deleted.
        (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole const): Deleted.
        (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren const): Deleted.
        (WebCore::AccessibilityObject::inheritsPresentationalRole const): Deleted.
        (WebCore::AccessibilityObject::accessibilityText const): Deleted.
        (WebCore::AccessibilityObject::setAccessibleName): Deleted.
        (WebCore::AccessibilityObject::accessibilityDescription const): Deleted.
        (WebCore::AccessibilityObject::title const): Deleted.
        (WebCore::AccessibilityObject::helpText const): Deleted.
        (WebCore::AccessibilityObject::isARIAStaticText const): Deleted.
        (WebCore::AccessibilityObject::stringValue const): Deleted.
        (WebCore::AccessibilityObject::textUnderElement const): Deleted.
        (WebCore::AccessibilityObject::text const): Deleted.
        (WebCore::AccessibilityObject::textLength const): Deleted.
        (WebCore::AccessibilityObject::ariaLabeledByAttribute const): Deleted.
        (WebCore::AccessibilityObject::ariaDescribedByAttribute const): Deleted.
        (WebCore::AccessibilityObject::expandedTextValue const): Deleted.
        (WebCore::AccessibilityObject::supportsExpandedTextValue const): Deleted.
        (WebCore::AccessibilityObject::colorValue const): Deleted.
        (WebCore::AccessibilityObject::axObjectID const): Deleted.
        (WebCore::AccessibilityObject::anchorElement const): Deleted.
        (WebCore::AccessibilityObject::actionElement const): Deleted.
        (WebCore::AccessibilityObject::boundingBoxRect const): Deleted.
        (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect const): Deleted.
        (WebCore::AccessibilityObject::size const): Deleted.
        (WebCore::AccessibilityObject::elementPath const): Deleted.
        (WebCore::AccessibilityObject::supportsPath const): Deleted.
        (WebCore::AccessibilityObject::selectedTextRange const): Deleted.
        (WebCore::AccessibilityObject::selectionStart const): Deleted.
        (WebCore::AccessibilityObject::selectionEnd const): Deleted.
        (WebCore::AccessibilityObject::url const): Deleted.
        (WebCore::AccessibilityObject::selection const): Deleted.
        (WebCore::AccessibilityObject::selectedText const): Deleted.
        (WebCore::AccessibilityObject::accessKey const): Deleted.
        (WebCore::AccessibilityObject::widget const): Deleted.
        (WebCore::AccessibilityObject::widgetForAttachmentView const): Deleted.
        (WebCore::AccessibilityObject::hierarchicalLevel const): Deleted.
        (WebCore::AccessibilityObject::setFocused): Deleted.
        (WebCore::AccessibilityObject::setSelectedText): Deleted.
        (WebCore::AccessibilityObject::setSelectedTextRange): Deleted.
        (WebCore::AccessibilityObject::setValue): Deleted.
        (WebCore::AccessibilityObject::setSelected): Deleted.
        (WebCore::AccessibilityObject::setSelectedRows): Deleted.
        (WebCore::AccessibilityObject::makeRangeVisible): Deleted.
        (WebCore::AccessibilityObject::performDefaultAction): Deleted.
        (WebCore::AccessibilityObject::increment): Deleted.
        (WebCore::AccessibilityObject::decrement): Deleted.
        (WebCore::AccessibilityObject::childrenChanged): Deleted.
        (WebCore::AccessibilityObject::textChanged): Deleted.
        (WebCore::AccessibilityObject::updateAccessibilityRole): Deleted.
        (WebCore::AccessibilityObject::addChildren): Deleted.
        (WebCore::AccessibilityObject::shouldIgnoreAttributeRole const): Deleted.
        (WebCore::AccessibilityObject::canHaveChildren const): Deleted.
        (WebCore::AccessibilityObject::hasChildren const): Deleted.
        (WebCore::AccessibilityObject::setNeedsToUpdateChildren): Deleted.
        (WebCore::AccessibilityObject::setNeedsToUpdateSubtree): Deleted.
        (WebCore::AccessibilityObject::needsToUpdateChildren const): Deleted.
        (WebCore::AccessibilityObject::detachFromParent): Deleted.
        (WebCore::AccessibilityObject::isDetachedFromParent): Deleted.
        (WebCore::AccessibilityObject::canHaveSelectedChildren const): Deleted.
        (WebCore::AccessibilityObject::selectedChildren): Deleted.
        (WebCore::AccessibilityObject::visibleChildren): Deleted.
        (WebCore::AccessibilityObject::tabChildren): Deleted.
        (WebCore::AccessibilityObject::shouldFocusActiveDescendant const): Deleted.
        (WebCore::AccessibilityObject::activeDescendant const): Deleted.
        (WebCore::AccessibilityObject::handleActiveDescendantChanged): Deleted.
        (WebCore::AccessibilityObject::handleAriaExpandedChanged): Deleted.
        (WebCore::AccessibilityObject::visiblePositionRange const): Deleted.
        (WebCore::AccessibilityObject::visiblePositionRangeForLine const): Deleted.
        (WebCore::AccessibilityObject::boundsForVisiblePositionRange const): Deleted.
        (WebCore::AccessibilityObject::boundsForRange const): Deleted.
        (WebCore::AccessibilityObject::setSelectedVisiblePositionRange const): Deleted.
        (WebCore::AccessibilityObject::visiblePositionForPoint const): Deleted.
        (WebCore::AccessibilityObject::nextVisiblePosition const): Deleted.
        (WebCore::AccessibilityObject::previousVisiblePosition const): Deleted.
        (WebCore::AccessibilityObject::visiblePositionForIndex const): Deleted.
        (WebCore::AccessibilityObject::indexForVisiblePosition const): Deleted.
        (WebCore::AccessibilityObject::index const): Deleted.
        (WebCore::AccessibilityObject::lineBreaks const): Deleted.
        (WebCore::AccessibilityObject::doAXRangeForLine const): Deleted.
        (WebCore::AccessibilityObject::doAXRangeForIndex const): Deleted.
        (WebCore::AccessibilityObject::doAXStringForRange const): Deleted.
        (WebCore::AccessibilityObject::doAXBoundsForRange const): Deleted.
        (WebCore::AccessibilityObject::doAXBoundsForRangeUsingCharacterOffset const): Deleted.
        (WebCore::AccessibilityObject::stringValueForMSAA const): Deleted.
        (WebCore::AccessibilityObject::stringRoleForMSAA const): Deleted.
        (WebCore::AccessibilityObject::nameForMSAA const): Deleted.
        (WebCore::AccessibilityObject::descriptionForMSAA const): Deleted.
        (WebCore::AccessibilityObject::roleValueForMSAA const): Deleted.
        (WebCore::AccessibilityObject::passwordFieldValue const): Deleted.
        (WebCore::AccessibilityObject::liveRegionStatus const): Deleted.
        (WebCore::AccessibilityObject::liveRegionRelevant const): Deleted.
        (WebCore::AccessibilityObject::liveRegionAtomic const): Deleted.
        (WebCore::AccessibilityObject::isBusy const): Deleted.
        (WebCore::AccessibilityObject::speakAsProperty const): Deleted.
        (WebCore::AccessibilityObject::isMathElement const): Deleted.
        (WebCore::AccessibilityObject::isMathFraction const): Deleted.
        (WebCore::AccessibilityObject::isMathFenced const): Deleted.
        (WebCore::AccessibilityObject::isMathSubscriptSuperscript const): Deleted.
        (WebCore::AccessibilityObject::isMathRow const): Deleted.
        (WebCore::AccessibilityObject::isMathUnderOver const): Deleted.
        (WebCore::AccessibilityObject::isMathRoot const): Deleted.
        (WebCore::AccessibilityObject::isMathSquareRoot const): Deleted.
        (WebCore::AccessibilityObject::isMathText const): Deleted.
        (WebCore::AccessibilityObject::isMathNumber const): Deleted.
        (WebCore::AccessibilityObject::isMathOperator const): Deleted.
        (WebCore::AccessibilityObject::isMathFenceOperator const): Deleted.
        (WebCore::AccessibilityObject::isMathSeparatorOperator const): Deleted.
        (WebCore::AccessibilityObject::isMathIdentifier const): Deleted.
        (WebCore::AccessibilityObject::isMathTable const): Deleted.
        (WebCore::AccessibilityObject::isMathTableRow const): Deleted.
        (WebCore::AccessibilityObject::isMathTableCell const): Deleted.
        (WebCore::AccessibilityObject::isMathMultiscript const): Deleted.
        (WebCore::AccessibilityObject::isMathToken const): Deleted.
        (WebCore::AccessibilityObject::isMathScriptObject const): Deleted.
        (WebCore::AccessibilityObject::isMathMultiscriptObject const): Deleted.
        (WebCore::AccessibilityObject::mathRadicandObject): Deleted.
        (WebCore::AccessibilityObject::mathRootIndexObject): Deleted.
        (WebCore::AccessibilityObject::mathUnderObject): Deleted.
        (WebCore::AccessibilityObject::mathOverObject): Deleted.
        (WebCore::AccessibilityObject::mathNumeratorObject): Deleted.
        (WebCore::AccessibilityObject::mathDenominatorObject): Deleted.
        (WebCore::AccessibilityObject::mathBaseObject): Deleted.
        (WebCore::AccessibilityObject::mathSubscriptObject): Deleted.
        (WebCore::AccessibilityObject::mathSuperscriptObject): Deleted.
        (WebCore::AccessibilityObject::mathFencedOpenString const): Deleted.
        (WebCore::AccessibilityObject::mathFencedCloseString const): Deleted.
        (WebCore::AccessibilityObject::mathLineThickness const): Deleted.
        (WebCore::AccessibilityObject::isAnonymousMathOperator const): Deleted.
        (WebCore::AccessibilityObject::mathPrescripts): Deleted.
        (WebCore::AccessibilityObject::mathPostscripts): Deleted.
        (WebCore::AccessibilityObject::isHidden const): Deleted.
        (WebCore::AccessibilityObject::setWrapper): Deleted.
        (WebCore::AccessibilityObject::overrideAttachmentParent): Deleted.
        (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const): Deleted.
        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Deleted.
        (WebCore::AccessibilityObject::clearIsIgnoredFromParentData): Deleted.
        (WebCore::AccessibilityObject::setIsIgnoredFromParentData): Deleted.
        (WebCore::AccessibilityObject::children): Deleted.
        (WebCore::AccessibilityObject::updateBackingStore): Deleted.
        * accessibility/AccessibilityObjectInterface.h:
        (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
        (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria):
        (WebCore::AccessibilityTextOperation::AccessibilityTextOperation):
        (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
        (WebCore::PlainTextRange::PlainTextRange):
        (WebCore::PlainTextRange::isNull const):
        (WebCore::VisiblePositionRange::VisiblePositionRange):
        (WebCore::VisiblePositionRange::isNull const):
        (WebCore::AccessibilityIsIgnoredFromParentData::AccessibilityIsIgnoredFromParentData):
        (WebCore::AccessibilityIsIgnoredFromParentData::isNull const):
        (WebCore::AccessibilityObjectInterface::isAccessibilityObject const): Deleted.
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::addRadioButtonGroupChildren const):
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest const):
        (WebCore::AccessibilityRenderObject::remoteSVGElementHitTest const):
        (WebCore::AccessibilityRenderObject::elementAccessibilityHitTest const):
        (WebCore::AccessibilityRenderObject::accessibilityHitTest const):
        (WebCore::AccessibilityRenderObject::addImageMapChildren):
        (WebCore::AccessibilityRenderObject::addHiddenChildren):
        (WebCore::AccessibilityRenderObject::selectedChildren):
        * accessibility/AccessibilityRenderObject.h:
        * accessibility/AccessibilityScrollView.cpp:
        (WebCore::AccessibilityScrollView::accessibilityHitTest const):
        * accessibility/AccessibilityScrollView.h:
        * accessibility/AccessibilitySlider.cpp:
        (WebCore::AccessibilitySlider::addChildren):
        (WebCore::AccessibilitySlider::elementAccessibilityHitTest const):
        * accessibility/AccessibilitySlider.h:
        * accessibility/AccessibilitySpinButton.cpp:
        (WebCore::AccessibilitySpinButton::incrementButton):
        (WebCore::AccessibilitySpinButton::decrementButton):
        * accessibility/AccessibilitySpinButton.h:
        * accessibility/AccessibilityTable.cpp:
        (WebCore::AccessibilityTable::columnHeaders):
        (WebCore::AccessibilityTable::rowHeaders):
        (WebCore::AccessibilityTable::cellForColumnAndRow):
        * accessibility/AccessibilityTableCell.cpp:
        (WebCore::AccessibilityTableCell::parentRow const):
        * accessibility/AccessibilityTableColumn.cpp:
        (WebCore::AccessibilityTableColumn::headerObject):
        * accessibility/AccessibilityTableColumn.h:
        * accessibility/AccessibilityTableRow.cpp:
        (WebCore::AccessibilityTableRow::headerObject):
        * accessibility/AccessibilityTableRow.h:
        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::getListObject):
        (WebCore::notifyChildrenSelectionChange):
        (WebCore::AXObjectCache::postPlatformNotification):
        (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
        * accessibility/atk/WebKitAccessible.cpp:
        (interfaceMaskFromObject):
        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
        (rangeLengthForObject):
        (webkitAccessibleHyperlinkGetStartIndex):
        (webkitAccessibleHyperlinkGetEndIndex):
        * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
        (webkitAccessibleHypertextGetLink):
        (webkitAccessibleHypertextGetNLinks):
        * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
        (listObjectForCoreSelection):
        (optionFromList):
        (optionFromSelection):
        (webkitAccessibleSelectionAddSelection):
        (webkitAccessibleSelectionRefSelection):
        (webkitAccessibleSelectionIsChildSelected):
        (webkitAccessibleSelectionRemoveSelection):
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (offsetAdjustmentForListItem):
        (webCoreOffsetToAtkOffset):
        (webkitAccessibleTextGetCaretOffset):
        * accessibility/atk/WebKitAccessibleUtil.cpp:
        (objectFocusedAndCaretOffsetUnignored):
        * accessibility/atk/WebKitAccessibleUtil.h:
        * accessibility/ios/AXObjectCacheIOS.mm:
        (WebCore::AXObjectCache::postPlatformNotification):
        * accessibility/ios/AccessibilityObjectIOS.mm:
        (WebCore::AccessibilityObject::overrideAttachmentParent):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (AccessibilityUnignoredAncestor):
        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
        (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
        (-[WebAccessibilityObjectWrapper accessibilityContainer]):
        (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedTreeNode::focusedUIElement const):
        (WebCore::AXIsolatedTreeNode::parentObjectInterfaceUnignored const):
        (WebCore::AXIsolatedTreeNode::accessibilityHitTest const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::postPlatformNotification):
        * accessibility/mac/AccessibilityObjectMac.mm:
        (WebCore::AccessibilityObject::overrideAttachmentParent):
        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (addChildToArray):
        (-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
        (-[WebAccessibilityObjectWrapperBase axBackingObject]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
        * accessibility/win/AXObjectCacheWin.cpp:
        * editing/atk/FrameSelectionAtk.cpp:
        (WebCore::emitTextSelectionChange):
        (WebCore::maybeEmitTextFocusChange):
        (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
        * inspector/InspectorAuditAccessibilityObject.cpp:
        (WebCore::accessiblityObjectForNode):
        (WebCore::InspectorAuditAccessibilityObject::getElementsByComputedRole):
        (WebCore::InspectorAuditAccessibilityObject::getActiveDescendant):
        (WebCore::addChildren):
        (WebCore::InspectorAuditAccessibilityObject::getChildNodes):
        (WebCore::InspectorAuditAccessibilityObject::getComputedProperties):
        (WebCore::InspectorAuditAccessibilityObject::getControlledNodes):
        (WebCore::InspectorAuditAccessibilityObject::getFlowedNodes):
        (WebCore::InspectorAuditAccessibilityObject::getMouseEventNode):
        (WebCore::InspectorAuditAccessibilityObject::getOwnedNodes):
        (WebCore::InspectorAuditAccessibilityObject::getParentNode):
        (WebCore::InspectorAuditAccessibilityObject::getSelectedChildNodes):
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::processAccessibilityChildren):
        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
        * inspector/agents/InspectorDOMAgent.h:

2019-10-30  Antti Koivisto  <antti@apple.com>

        Move style building state to a class of its own
        https://bugs.webkit.org/show_bug.cgi?id=203562

        Reviewed by Zalan Bujtas.

        Move most of the state needed for applying properties from StyleResolver::State and PropertyCascade::ApplyState to
        new Style::BuilderState. Pass BuilderState around in all functions invoked during style building
        instead of StyleResolver.

        Unlike StyleResolver, BuilderState is a stack-allocated object that exists during style building only.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::CSSToStyleMap):
        (WebCore::CSSToStyleMap::style const):
        (WebCore::CSSToStyleMap::useSVGZoomRules const):
        (WebCore::CSSToStyleMap::styleImage):
        (WebCore::CSSToStyleMap::mapFillSize):
        (WebCore::CSSToStyleMap::mapFillXPosition):
        (WebCore::CSSToStyleMap::mapFillYPosition):
        (WebCore::CSSToStyleMap::mapAnimationName):
        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
        (WebCore::CSSToStyleMap::rootElementStyle const): Deleted.
        * css/CSSToStyleMap.h:
        * css/CSSVariableReferenceValue.cpp:
        (WebCore::resolveVariableFallback):
        (WebCore::resolveVariableReference):
        (WebCore::resolveTokenRange):
        (WebCore::CSSVariableReferenceValue::resolveVariableReferences const):
        * css/CSSVariableReferenceValue.h:
        * css/DOMCSSRegisterCustomProperty.cpp:
        (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
        * css/StyleBuilder.h:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertLength):
        (WebCore::StyleBuilderConverter::convertLengthOrAuto):
        (WebCore::StyleBuilderConverter::convertLengthSizing):
        (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
        (WebCore::StyleBuilderConverter::convertTabSize):
        (WebCore::StyleBuilderConverter::convertComputedLength):
        (WebCore::StyleBuilderConverter::convertLineWidth):
        (WebCore::StyleBuilderConverter::convertSpacing):
        (WebCore::StyleBuilderConverter::convertRadius):
        (WebCore::StyleBuilderConverter::convertPositionComponentX):
        (WebCore::StyleBuilderConverter::convertPositionComponentY):
        (WebCore::StyleBuilderConverter::convertPositionComponent):
        (WebCore::StyleBuilderConverter::convertObjectPosition):
        (WebCore::StyleBuilderConverter::convertTextDecoration):
        (WebCore::StyleBuilderConverter::convertNumber):
        (WebCore::StyleBuilderConverter::convertNumberOrAuto):
        (WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
        (WebCore::StyleBuilderConverter::convertBorderImage):
        (WebCore::StyleBuilderConverter::convertBorderMask):
        (WebCore::StyleBuilderConverter::convertStyleImage):
        (WebCore::StyleBuilderConverter::convertTransform):
        (WebCore::StyleBuilderConverter::convertColorScheme):
        (WebCore::StyleBuilderConverter::convertString):
        (WebCore::StyleBuilderConverter::convertStringOrAuto):
        (WebCore::StyleBuilderConverter::convertStringOrNone):
        (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
        (WebCore::StyleBuilderConverter::convertTextAlign):
        (WebCore::StyleBuilderConverter::convertClipPath):
        (WebCore::StyleBuilderConverter::convertResize):
        (WebCore::StyleBuilderConverter::convertMarqueeRepetition):
        (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
        (WebCore::StyleBuilderConverter::convertQuotes):
        (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
        (WebCore::StyleBuilderConverter::convertTextUnderlineOffset):
        (WebCore::StyleBuilderConverter::convertTextDecorationThickness):
        (WebCore::StyleBuilderConverter::convertReflection):
        (WebCore::StyleBuilderConverter::convertInitialLetter):
        (WebCore::StyleBuilderConverter::convertTextStrokeWidth):
        (WebCore::StyleBuilderConverter::convertLineBoxContain):
        (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
        (WebCore::StyleBuilderConverter::convertShapeValue):
        (WebCore::StyleBuilderConverter::convertScrollSnapType):
        (WebCore::StyleBuilderConverter::convertScrollSnapAlign):
        (WebCore::StyleBuilderConverter::createGridTrackBreadth):
        (WebCore::StyleBuilderConverter::createGridTrackSize):
        (WebCore::StyleBuilderConverter::createGridTrackList):
        (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
        (WebCore::StyleBuilderConverter::convertGridTrackSize):
        (WebCore::StyleBuilderConverter::convertGridPosition):
        (WebCore::StyleBuilderConverter::convertGridAutoFlow):
        (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
        (WebCore::StyleBuilderConverter::convertWordSpacing):
        (WebCore::StyleBuilderConverter::convertPerspective):
        (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
        (WebCore::StyleBuilderConverter::convertFilterOperations):
        (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
        (WebCore::StyleBuilderConverter::convertFontWeight):
        (WebCore::StyleBuilderConverter::convertFontStretch):
        (WebCore::StyleBuilderConverter::convertFontVariationSettings):
        (WebCore::StyleBuilderConverter::convertTouchCallout):
        (WebCore::StyleBuilderConverter::convertTapHighlightColor):
        (WebCore::StyleBuilderConverter::convertTouchAction):
        (WebCore::StyleBuilderConverter::convertOverflowScrolling):
        (WebCore::StyleBuilderConverter::convertSVGLengthValue):
        (WebCore::StyleBuilderConverter::convertSVGLengthVector):
        (WebCore::StyleBuilderConverter::convertStrokeDashArray):
        (WebCore::StyleBuilderConverter::convertPaintOrder):
        (WebCore::StyleBuilderConverter::convertOpacity):
        (WebCore::StyleBuilderConverter::convertSVGURIReference):
        (WebCore::StyleBuilderConverter::convertSVGColor):
        (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
        (WebCore::StyleBuilderConverter::convertContentAlignmentData):
        (WebCore::StyleBuilderConverter::convertGlyphOrientation):
        (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
        (WebCore::StyleBuilderConverter::convertLineHeight):
        (WebCore::StyleBuilderConverter::convertFontSynthesis):
        (WebCore::StyleBuilderConverter::convertSpeakAs):
        (WebCore::StyleBuilderConverter::convertHangingPunctuation):
        (WebCore::StyleBuilderConverter::convertGapLength):
        * css/StyleBuilderCustom.h:
        (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage):
        (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage):
        (WebCore::StyleBuilderCustom::applyInitialFontFeatureSettings):
        (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings):
        (WebCore::StyleBuilderCustom::applyInitialFontVariationSettings):
        (WebCore::StyleBuilderCustom::applyInheritFontVariationSettings):
        (WebCore::StyleBuilderCustom::applyValueDirection):
        (WebCore::StyleBuilderCustom::applyInitialTextAlign):
        (WebCore::StyleBuilderCustom::applyValueTextAlign):
        (WebCore::StyleBuilderCustom::resetEffectiveZoom):
        (WebCore::StyleBuilderCustom::applyInitialZoom):
        (WebCore::StyleBuilderCustom::applyInheritZoom):
        (WebCore::StyleBuilderCustom::applyValueZoom):
        (WebCore::StyleBuilderCustom::applyValueVerticalAlign):
        (WebCore::StyleBuilderCustom::applyInheritImageResolution):
        (WebCore::StyleBuilderCustom::applyInitialImageResolution):
        (WebCore::StyleBuilderCustom::applyValueImageResolution):
        (WebCore::StyleBuilderCustom::applyInheritSize):
        (WebCore::StyleBuilderCustom::applyInitialSize):
        (WebCore::StyleBuilderCustom::applyValueSize):
        (WebCore::StyleBuilderCustom::applyInheritTextIndent):
        (WebCore::StyleBuilderCustom::applyInitialTextIndent):
        (WebCore::StyleBuilderCustom::applyValueTextIndent):
        (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
        (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
        (WebCore::ApplyPropertyBorderImageModifier::applyValue):
        (WebCore::ApplyPropertyBorderImageModifier::getValue):
        (WebCore::ApplyPropertyBorderImageModifier::setValue):
        (WebCore::StyleBuilderCustom::applyInheritLineHeight):
        (WebCore::StyleBuilderCustom::applyInitialLineHeight):
        (WebCore::StyleBuilderCustom::applyValueLineHeight):
        (WebCore::StyleBuilderCustom::applyInheritOutlineStyle):
        (WebCore::StyleBuilderCustom::applyInitialOutlineStyle):
        (WebCore::StyleBuilderCustom::applyValueOutlineStyle):
        (WebCore::StyleBuilderCustom::applyInitialClip):
        (WebCore::StyleBuilderCustom::applyInheritClip):
        (WebCore::StyleBuilderCustom::applyValueClip):
        (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
        (WebCore::StyleBuilderCustom::applyValueWritingMode):
        (WebCore::StyleBuilderCustom::applyValueWebkitTextOrientation):
        (WebCore::StyleBuilderCustom::applyValueWebkitTextSizeAdjust):
        (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
        (WebCore::StyleBuilderCustom::applyValueColorScheme):
        (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
        (WebCore::StyleBuilderCustom::applyInitialTextShadow):
        (WebCore::StyleBuilderCustom::applyInheritTextShadow):
        (WebCore::StyleBuilderCustom::applyValueTextShadow):
        (WebCore::StyleBuilderCustom::applyInitialBoxShadow):
        (WebCore::StyleBuilderCustom::applyInheritBoxShadow):
        (WebCore::StyleBuilderCustom::applyValueBoxShadow):
        (WebCore::StyleBuilderCustom::applyInitialWebkitBoxShadow):
        (WebCore::StyleBuilderCustom::applyInheritWebkitBoxShadow):
        (WebCore::StyleBuilderCustom::applyValueWebkitBoxShadow):
        (WebCore::StyleBuilderCustom::applyInitialFontFamily):
        (WebCore::StyleBuilderCustom::applyInheritFontFamily):
        (WebCore::StyleBuilderCustom::applyValueFontFamily):
        (WebCore::StyleBuilderCustom::isValidDisplayValue):
        (WebCore::StyleBuilderCustom::applyInheritDisplay):
        (WebCore::StyleBuilderCustom::applyValueDisplay):
        (WebCore::StyleBuilderCustom::applyValueBaselineShift):
        (WebCore::StyleBuilderCustom::applyInitialWebkitAspectRatio):
        (WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio):
        (WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio):
        (WebCore::StyleBuilderCustom::applyInitialWebkitTextEmphasisStyle):
        (WebCore::StyleBuilderCustom::applyInheritWebkitTextEmphasisStyle):
        (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
        (WebCore::StyleBuilderCustom::applyInheritCounter):
        (WebCore::StyleBuilderCustom::applyValueCounter):
        (WebCore::StyleBuilderCustom::applyInitialCounterIncrement):
        (WebCore::StyleBuilderCustom::applyInheritCounterIncrement):
        (WebCore::StyleBuilderCustom::applyValueCounterIncrement):
        (WebCore::StyleBuilderCustom::applyInitialCounterReset):
        (WebCore::StyleBuilderCustom::applyInheritCounterReset):
        (WebCore::StyleBuilderCustom::applyValueCounterReset):
        (WebCore::StyleBuilderCustom::applyInitialCursor):
        (WebCore::StyleBuilderCustom::applyInheritCursor):
        (WebCore::StyleBuilderCustom::applyValueCursor):
        (WebCore::StyleBuilderCustom::applyInitialFill):
        (WebCore::StyleBuilderCustom::applyInheritFill):
        (WebCore::StyleBuilderCustom::applyValueFill):
        (WebCore::StyleBuilderCustom::applyInitialStroke):
        (WebCore::StyleBuilderCustom::applyInheritStroke):
        (WebCore::StyleBuilderCustom::applyValueStroke):
        (WebCore::StyleBuilderCustom::applyInitialContent):
        (WebCore::StyleBuilderCustom::applyInheritContent):
        (WebCore::StyleBuilderCustom::applyValueContent):
        (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
        (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
        (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
        (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
        (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
        (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
        (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
        (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
        (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
        (WebCore::StyleBuilderCustom::applyInitialFontSize):
        (WebCore::StyleBuilderCustom::applyInheritFontSize):
        (WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
        (WebCore::StyleBuilderCustom::applyInitialFontStyle):
        (WebCore::StyleBuilderCustom::applyInheritFontStyle):
        (WebCore::StyleBuilderCustom::applyValueFontStyle):
        (WebCore::StyleBuilderCustom::applyValueFontSize):
        (WebCore::StyleBuilderCustom::applyInitialGridTemplateAreas):
        (WebCore::StyleBuilderCustom::applyInheritGridTemplateAreas):
        (WebCore::StyleBuilderCustom::applyValueGridTemplateAreas):
        (WebCore::StyleBuilderCustom::applyInitialGridTemplateColumns):
        (WebCore::StyleBuilderCustom::applyInheritGridTemplateColumns):
        (WebCore::StyleBuilderCustom::applyValueGridTemplateColumns):
        (WebCore::StyleBuilderCustom::applyInitialGridTemplateRows):
        (WebCore::StyleBuilderCustom::applyInheritGridTemplateRows):
        (WebCore::StyleBuilderCustom::applyValueGridTemplateRows):
        (WebCore::StyleBuilderCustom::applyValueAlt):
        (WebCore::StyleBuilderCustom::applyValueWillChange):
        (WebCore::StyleBuilderCustom::applyValueStrokeWidth):
        (WebCore::StyleBuilderCustom::applyValueStrokeColor):
        (WebCore::StyleBuilderCustom::applyInitialCustomProperty):
        (WebCore::StyleBuilderCustom::applyInheritCustomProperty):
        (WebCore::StyleBuilderCustom::applyValueCustomProperty):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::StyleResolver):
        (WebCore::StyleResolver::State::State):
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::updateFont):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
        (WebCore::StyleResolver::initializeFontStyle):
        * css/StyleResolver.h:
        (WebCore::StyleResolver::inspectorCSSOMWrappers):
        (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle): Deleted.
        (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle): Deleted.
        (WebCore::StyleResolver::State::applyPropertyToRegularStyle const): Deleted.
        (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle const): Deleted.
        (WebCore::StyleResolver::State::setFontDirty): Deleted.
        (WebCore::StyleResolver::State::fontDirty const): Deleted.
        (WebCore::StyleResolver::State::fontDescription): Deleted.
        (WebCore::StyleResolver::State::parentFontDescription): Deleted.
        (WebCore::StyleResolver::State::setFontDescription): Deleted.
        (WebCore::StyleResolver::State::setZoom): Deleted.
        (WebCore::StyleResolver::State::setEffectiveZoom): Deleted.
        (WebCore::StyleResolver::State::setWritingMode): Deleted.
        (WebCore::StyleResolver::State::setTextOrientation): Deleted.
        (WebCore::StyleResolver::State::cascadeLevel const): Deleted.
        (WebCore::StyleResolver::State::setCascadeLevel): Deleted.
        (WebCore::StyleResolver::State::styleScopeOrdinal const): Deleted.
        (WebCore::StyleResolver::State::setStyleScopeOrdinal): Deleted.
        (WebCore::StyleResolver::applyPropertyToRegularStyle const): Deleted.
        (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle const): Deleted.
        (WebCore::StyleResolver::styleMap): Deleted.
        (WebCore::StyleResolver::fontDescription): Deleted.
        (WebCore::StyleResolver::parentFontDescription): Deleted.
        (WebCore::StyleResolver::setFontDescription): Deleted.
        (WebCore::StyleResolver::setZoom): Deleted.
        (WebCore::StyleResolver::setEffectiveZoom): Deleted.
        (WebCore::StyleResolver::setWritingMode): Deleted.
        (WebCore::StyleResolver::setTextOrientation): Deleted.
        * css/makeprop.pl:
        (getAutoGetter):
        (getAutoSetter):
        (getVisitedLinkSetter):
        (colorFromPrimitiveValue):
        (generateColorValueSetter):
        (handleCurrentColorValue):
        (generateAnimationPropertyInitialValueSetter):
        (generateAnimationPropertyInheritValueSetter):
        (generateAnimationPropertyValueSetter):
        (generateFillLayerPropertyInitialValueSetter):
        (generateFillLayerPropertyInheritValueSetter):
        (generateFillLayerPropertyValueSetter):
        (generateSetValueStatement):
        (generateInitialValueSetter):
        (generateInheritValueSetter):
        (generateValueSetter):
        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseValueWithVariableReferences):
        * css/parser/CSSParser.h:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
        * css/parser/CSSPropertyParser.h:
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setFont):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::builderState):
        (WebCore::GraphicsContext::applyState): Deleted.
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/displaylists/DisplayListItems.h:
        * style/CascadeLevel.h: Copied from Source/WebCore/css/StyleBuilder.h.
        (WebCore::Style::allCascadeLevels):
        * style/PropertyCascade.cpp:
        (WebCore::Style::PropertyCascade::PropertyCascade):
        (WebCore::Style::PropertyCascade::applyPropertiesImpl):
        (WebCore::Style::PropertyCascade::applyCustomProperty):
        (WebCore::Style::PropertyCascade::applyProperty):
        (WebCore::Style::PropertyCascade::resolveValue):
        (WebCore::Style::PropertyCascade::resolvedVariableValue):
        (WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode):
        * style/PropertyCascade.h:
        (WebCore::Style::PropertyCascade::builderState):
        (WebCore::Style::allCascadeLevels): Deleted.
        (WebCore::Style::PropertyCascade::styleResolver): Deleted.
        * style/StyleBuilderState.cpp: Added.
        (WebCore::Style::BuilderState::BuilderState):
        (WebCore::Style::BuilderState::useSVGZoomRules const):
        (WebCore::Style::BuilderState::useSVGZoomRulesForLength const):
        (WebCore::Style::BuilderState::createStyleImage):
        (WebCore::Style::BuilderState::createFilterOperations):
        (WebCore::Style::BuilderState::colorFromPrimitiveValue const):
        (WebCore::Style::BuilderState::setFontSize):
        * style/StyleBuilderState.h: Added.
        (WebCore::Style::BuilderState::cascade):
        (WebCore::Style::BuilderState::styleResolver):
        (WebCore::Style::BuilderState::style):
        (WebCore::Style::BuilderState::parentStyle const):
        (WebCore::Style::BuilderState::rootElementStyle const):
        (WebCore::Style::BuilderState::document const):
        (WebCore::Style::BuilderState::element const):
        (WebCore::Style::BuilderState::setFontDescription):
        (WebCore::Style::BuilderState::setZoom):
        (WebCore::Style::BuilderState::setEffectiveZoom):
        (WebCore::Style::BuilderState::setWritingMode):
        (WebCore::Style::BuilderState::setTextOrientation):
        (WebCore::Style::BuilderState::fontDirty const):
        (WebCore::Style::BuilderState::setFontDirty):
        (WebCore::Style::BuilderState::clearFontDirty):
        (WebCore::Style::BuilderState::fontDescription):
        (WebCore::Style::BuilderState::parentFontDescription):
        (WebCore::Style::BuilderState::applyPropertyToRegularStyle const):
        (WebCore::Style::BuilderState::applyPropertyToVisitedLinkStyle const):
        (WebCore::Style::BuilderState::styleScopeOrdinal const):
        (WebCore::Style::BuilderState::cssToLengthConversionData const):
        (WebCore::Style::BuilderState::styleMap):

2019-10-30  Ryosuke Niwa  <rniwa@webkit.org>

        Introduce WorkerEventLoop and use it in FetchBodyOwner::runNetworkTaskWhenPossible
        https://bugs.webkit.org/show_bug.cgi?id=203526

        Reviewed by Chris Dumez.

        Added WorkerEventLoop to implement the worker event loop:
        https://html.spec.whatwg.org/multipage/webappapis.html#worker-event-loop-2

        Each ScriptExecutionContext now returns an AbstractEventLoop so the code that may run in either
        main thread or a worker thread can simply get the event loop object via ScriptExecutionContext.

        For now, WorkerEventLoop also implements the worklet event loop:
        https://html.spec.whatwg.org/multipage/webappapis.html#worklet-event-loop

        WorkerEventLoop is an active DOM object since it's used by at most one ScriptExecutionContext
        unlike WindowEventLoop, which can be shared by multiple documents and needs a custom logic to
        suspend and resume a subset of tasks enqueued to the event loop.

        No new tests since there should be no behavioral change for now.

        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::runNetworkTaskWhenPossible): Use WorkerEventLoop.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/AbstractEventLoop.h:
        (WebCore::AbstractEventLoop::suspend): Removed since it's not needed for WorkerEventLoop.
        (WebCore::AbstractEventLoop::resume): Ditto.
        * dom/Document.cpp:
        (WebCore::Document::eventLoop): Returns AbstractEventLoop as it now overrides the abstract
        member function defined in AbstractEventLoop.
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::suspend):
        (WebCore::WindowEventLoop::resume):
        * dom/WindowEventLoop.h:
        * workers/WorkerEventLoop.cpp: Added.
        (WebCore::WorkerEventLoop::create): Added.
        (WebCore::WorkerEventLoop::WorkerEventLoop): Added.
        (WebCore::WorkerEventLoop::queueTask): Added.
        (WebCore::WorkerEventLoop::hasPendingActivity const): Added.
        (WebCore::WorkerEventLoop::activeDOMObjectName const): Added.
        (WebCore::WorkerEventLoop::suspend): Added.
        (WebCore::WorkerEventLoop::resume): Added. Unlike WindowEventLoop, we only need to check
        whether m_tasks is empty or not since WorkerEventLoop is associated with at most one
        ScriptExecutionContext as noted above.
        (WebCore::WorkerEventLoop::stop): Added. Clear m_tasks to free memory as early as possible.
        (WebCore::WorkerEventLoop::scheduleToRunIfNeeded): Added.
        (WebCore::WorkerEventLoop::run): Added.
        * workers/WorkerEventLoop.h: Added.
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::eventLoop): Added.
        * workers/WorkerGlobalScope.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::eventLoop): Added. It returns WorkerEventLoop for now since
        there is no implementation difference.
        * worklets/WorkletGlobalScope.h:

2019-10-30  Antoine Quint  <graouts@apple.com>

        [ Mac Debug ] (r251706) webanimations/empty-keyframes-crash.html is crashing
        https://bugs.webkit.org/show_bug.cgi?id=203588

        Reviewed by Dean Jackson.

        The KeyframeEffect for which the blending keyframes were generated for a CSS Transition could be applied to a different animation,
        which is not a CSSTransition, which does not change the fact that we can blend the single CSS property with two fully-qualified
        keyframes directly. So we can remove that assertion and simply check that we have a single CSS property instead and access the
        single CSS property in the KeyframeList.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

2019-10-30  Chris Dumez  <cdumez@apple.com>

        WKFrameIsDisplayingMarkupDocument() should return true after a window.open/document.write
        https://bugs.webkit.org/show_bug.cgi?id=203587
        <rdar://problem/56717726>

        Reviewed by Alex Christensen.

        When doing a document.open(), we were propagating the document's URL to the UIProcess but not its
        MIME type. WKFrameIsDisplayingMarkupDocument() was relying on this MIME type.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::didExplicitOpen):
        * loader/FrameLoaderClient.h:

2019-10-30  Antoine Quint  <graouts@apple.com>

        [Web Animations] Precompute an animation effect's active duration and end time
        https://bugs.webkit.org/show_bug.cgi?id=203611

        Reviewed by Dean Jackson.

        We would compute an animation effect's active duration and end time in AnimationEffect::getBasicTiming()
        but these two properties could be computed ahead of time when the other static timing properties of an
        animation effect are changed. This allows several calls sites to WebAnimation::effectEndTime() to no
        longer require the dynamic computation of all the other timing properties in AnimationEffect::getBasicTiming(),
        (local time, active time and phase) which need to be computed dynamically as they rely on the current
        timeline time.

        * animation/AnimationEffect.cpp:
        (WebCore::AnimationEffect::getBasicTiming const):
        (WebCore::AnimationEffect::getComputedTiming const):
        (WebCore::AnimationEffect::updateTiming):
        (WebCore::AnimationEffect::updateStaticTimingProperties):
        * animation/AnimationEffect.h:
        (WebCore::AnimationEffect::activeDuration const):
        (WebCore::AnimationEffect::endTime const):
        * animation/CSSAnimation.cpp:
        (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::setTimingProperties):
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::copyPropertiesFromSource):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::effectEndTime const):
        (WebCore::WebAnimation::timeToNextTick const):

2019-10-30  Antti Koivisto  <antti@apple.com>

        ::before/::after elements not filling their grid cell when container has display: contents
        https://bugs.webkit.org/show_bug.cgi?id=193567

        Reviewed by Simon Fraser.

        Test: fast/css/display-contents-before-after-grid.html

        We were not providing parent box style when resolving :before/:after pseudo elements. Because of this we
        failed to blockify the pseudo elements when their host element had 'display:contents' and the parent
        box was a grid.

        Original test case by Michał Gołębiowski-Owczarek.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::pseudoStyleForElement):

        Pass the parent box style.

        * css/StyleResolver.h:
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolvePseudoStyle):
        (WebCore::Style::TreeResolver::parentBoxStyle const):
        (WebCore::Style::TreeResolver::parentBoxStyleForPseudo const):

        If the element has 'display:contents', look for style of its ancestors.

        * style/StyleTreeResolver.h:

2019-10-30  Dirk Schulze  <krit@webkit.org>

        [css-masking] Unprefix -webkit-clip-path
        https://bugs.webkit.org/show_bug.cgi?id=187888

        Reviewed by Simon Fraser.

        Unprefix -webkit-clip-path. Make clip-path alias the prefixed version.

        We already have a wide variaty of pre-/unprexied clip-path tests.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
        * css/CSSProperties.json:
        * css/SVGCSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::svgPropertyValue):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
        * rendering/style/SVGRenderStyle.h:
        (WebCore::SVGRenderStyle::initialShadow):
        (WebCore::SVGRenderStyle::y const):
        (WebCore::SVGRenderStyle::initialClipperResource): Deleted.
        (WebCore::SVGRenderStyle::clipperResource const): Deleted.
        (WebCore::SVGRenderStyle::hasClipper const): Deleted.
        (WebCore::SVGRenderStyle::setClipperResource): Deleted.
        * rendering/style/SVGRenderStyleDefs.cpp:
        (WebCore::StyleResourceData::StyleResourceData):
        (WebCore::StyleResourceData::operator== const):
        * rendering/style/SVGRenderStyleDefs.h:
        * rendering/style/WillChangeData.cpp:
        (WebCore::WillChangeData::propertyCreatesStackingContext):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::writeResources):
        * rendering/svg/SVGResources.cpp:
        (WebCore::SVGResources::buildCachedResources):

2019-10-30  Philippe Normand  <philn@igalia.com>

        REGRESSION(r249428): [GStreamer] VP9 video rendered green
        https://bugs.webkit.org/show_bug.cgi?id=201422
        <rdar://problem/55945741>

        Reviewed by Carlos Garcia Campos.

        Enable the texture upload GStreamer meta code path. Until
        GStreamer 1.16.2 this workaround is needed to fix VP9 (vp9dec)
        rendering.

        Original patch by: Chris Lord <clord@igalia.com>

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

2019-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>

        ImageDecoders: use a thread safe data buffer for Cairo backing store
        https://bugs.webkit.org/show_bug.cgi?id=201727
        <rdar://problem/56665041>

        Reviewed by Fujii Hironori.

        Use SharedBuffer::dataSegment which is ThreadSafeRefCounted.

        * platform/graphics/ImageBackingStore.h:
        (WebCore::ImageBackingStore::setSize):
        (WebCore::ImageBackingStore::ImageBackingStore):
        * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
        (WebCore::ImageBackingStore::image const):

2019-10-29  Ryosuke Niwa  <rniwa@webkit.org>

        Remove HTMLMediaElementDestructorScope
        https://bugs.webkit.org/show_bug.cgi?id=203600

        Reviewed by Chris Dumez.

        Removed the workaround introduced in r231392 for the bug 185284 now that it's been fixed.

        No new tests since this code should be dead code.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::isRunningDestructor): Deleted.
        (WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Deleted.
        (WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Deleted.
        * html/HTMLMediaElement.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkCompleted):

2019-10-29  Andy Estes  <aestes@apple.com>

        [Quick Look] Clean up LegacyPreviewLoaderClients
        https://bugs.webkit.org/show_bug.cgi?id=203472

        Reviewed by Brady Eidson.

        * loader/ios/LegacyPreviewLoader.mm:
        (WebCore::LegacyPreviewLoader::didReceiveBuffer):
        * platform/network/ios/LegacyPreviewLoaderClient.h:
        (WebCore::LegacyPreviewLoaderClient::didReceiveBuffer):
        (WebCore::LegacyPreviewLoaderClient::didReceiveDataArray): Deleted.

2019-10-29  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2] SVGSymbolElement should inherits SVGGraphicsElement
        https://bugs.webkit.org/show_bug.cgi?id=203573

        Reviewed by Simon Fraser.

        The spec link is:
            https://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSymbolElement

        * svg/SVGSymbolElement.cpp:
        (WebCore::SVGSymbolElement::SVGSymbolElement):
        (WebCore::SVGSymbolElement::parseAttribute):
        * svg/SVGSymbolElement.h:
        * svg/SVGSymbolElement.idl:

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

        [WebAuthn] Add more information to _WKWebAuthenticationPanel
        https://bugs.webkit.org/show_bug.cgi?id=202561
        <rdar://problem/55973910>

        Reviewed by Youenn Fablet and Brent Fulgham.

        Covered by new tests within existing test files.

        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        * Modules/webauthn/WebAuthenticationConstants.h:

2019-10-29  Wenson Hsieh  <wenson_hsieh@apple.com>

        REGRESSION (r251693): [iOS] Unable to change selection after focusing an element with keyboard attached
        https://bugs.webkit.org/show_bug.cgi?id=203582

        Reviewed by Tim Horton.

        Introduces a new helper method to check whether two ElementContexts refer to the same element. Importantly, this
        ignores any information on ElementContext that is not either the element, document, or page identifier (for now,
        this only includes the element's bounding rect, which may change over time).

        Test: editing/selection/ios/set-selection-by-tapping-after-changing-focused-element-bounds.html

        * dom/ElementContext.h:
        (WebCore::ElementContext::isSameElement const):
        (WebCore::operator==):

2019-10-29  Chris Dumez  <cdumez@apple.com>

        UserMediaRequest should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203098
        <rdar://problem/56716101>

        Reviewed by Eric Carlson.

        Allow pages to enter the back/forward cache, even if they have a pending
        getUserMedia promise. Whenever we get a permission decision from the
        UIProcess, we now schedule a task to resolve/reject the promise on the
        WindowEventLoop. The WindowEventLoop properly gets suspended while in
        the back/forward cache.

        Test: http/tests/navigation/page-cache-getUserMedia-pending-promise.html

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::getUserMedia const):
        If the document is not fully active, reject the promise with an InvalidStateError, as per:
        - https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia (Step 4)

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        (WebCore::UserMediaRequest::deny):
        (WebCore::UserMediaRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/mediastream/UserMediaRequest.h:

2019-10-29  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] Implement PictureInPictureWindow
        https://bugs.webkit.org/show_bug.cgi?id=202615

        Reviewed by Eric Carlson.

        Tests: media/picture-in-picture-api-enter-pip-1.html
               media/picture-in-picture-api-enter-pip-2.html
               media/picture-in-picture-api-enter-pip-3.html
               media/picture-in-picture-api-enter-pip-4.html
               media/picture-in-picture-api-exit-pip-1.html
               media/picture-in-picture-api-exit-pip-2.html
               media/picture-in-picture-api-pip-events.html
               media/picture-in-picture-api-pip-window.html

        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::HTMLVideoElementPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::pictureInPictureWindowResized):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
        * Modules/pictureinpicture/PictureInPictureWindow.cpp:
        (WebCore::PictureInPictureWindow::create):
        (WebCore::PictureInPictureWindow::PictureInPictureWindow):
        (WebCore::PictureInPictureWindow::setSize):
        (WebCore::PictureInPictureWindow::close):
        * Modules/pictureinpicture/PictureInPictureWindow.h:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::fullscreenModeChanged):
        (WebCore::HTMLVideoElement::didBecomeFullscreenElement):
        (WebCore::HTMLVideoElement::setPictureInPictureObserver):
        (WebCore::HTMLVideoElement::setVideoFullscreenFrame):
        * html/HTMLVideoElement.h:
        * platform/PictureInPictureObserver.h:

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

        WebAnimation should never prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203088
        <rdar://problem/56374249>

        Reviewed by Antti Koivisto.

        Test: webanimations/animation-page-cache.html

        We remove the Web Animation override of the deprecated method ActiveDOMObject::shouldPreventEnteringBackForwardCache_DEPRECATED()
        and instead ensure event dispatch is suspended along with the WebAnimation object through the adoption of a SuspendableTaskQueue.

        We also ensure an animation correctly suspends itself when ActiveDOMObject::suspend() and ActiveDOMObject::resume() are called.
        Implementing these methods showed that we have some placeholders in DeclarativeAnimation that were not necessary, so we remove those.

        Finally, we no longer need to track the stopped state since the SuspendableTaskQueue will close itself when ActiveDOMObject::stop()
        is called.

        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::stop): Deleted.
        (WebCore::DeclarativeAnimation::suspend): Deleted.
        (WebCore::DeclarativeAnimation::resume): Deleted.
        * animation/DeclarativeAnimation.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::WebAnimation):
        (WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
        (WebCore::WebAnimation::suspend):
        (WebCore::WebAnimation::resume):
        (WebCore::WebAnimation::stop):
        (WebCore::WebAnimation::hasPendingActivity):
        (WebCore::WebAnimation::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * animation/WebAnimation.h:

2019-10-29  Simon Fraser  <simon.fraser@apple.com>

        Align CSS hsl() -> rgb() color conversion with the spec
        https://bugs.webkit.org/show_bug.cgi?id=203592

        Reviewed by Tim Horton.

        Fix lots of tests in css/css-color/color-resolving-hsl.html by matching the specified rounding
        when converting between hsl() and rgb().
        
        Remove some duplicated code, and call HSLToSRGB().
        
        Tested by WPT.

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::parseHSLParameters):
        * platform/graphics/Color.cpp:
        (WebCore::makeRGBAFromHSLA):
        (WebCore::calcHue): Deleted.
        * platform/graphics/Color.h:

2019-10-07  Jer Noble  <jer.noble@apple.com>

        Implement the Remote Playback API.
        https://bugs.webkit.org/show_bug.cgi?id=162971

        Reviewed by Youenn Fablet.

        Tests: media/remoteplayback-cancel-invalid.html
               media/remoteplayback-prompt.html
               media/remoteplayback-target-availability.html
               media/remoteplayback-watch-disableremoteplayback.html
               imported/w3c/web-platform-tests/remote-playback/cancel-watch-availability.html
               imported/w3c/web-platform-tests/remote-playback/disable-remote-playback-cancel-watch-availability-throws.html
               imported/w3c/web-platform-tests/remote-playback/disable-remote-playback-prompt-throws.html
               imported/w3c/web-platform-tests/remote-playback/disable-remote-playback-watch-availability-throws.html
               imported/w3c/web-platform-tests/remote-playback/idlharness.window.html
               imported/w3c/web-platform-tests/remote-playback/watch-availability-initial-callback.html

        The Remote Playback API <https://w3c.github.io/remote-playback> allows page authors
        to control the presentation of <audio> and <video> elements to remote playback devices
        such as the Apple TV or Chromecast. WebKit already exposes a non-standardized API to
        initiate remote playback, and the Remote Playback API is largely congruent with the
        webkitShowPlaybackTargetPicker() API et. al.

        One addition provided by the Remote Playback API is an event in the case the user
        dismisses the picker UI without making a choice, so this concept needs to be plumbed
        through from the ChromeClient to the PlatformMediaSession.

        * DerivedSources.make:
        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::mockMediaPlaybackTargetPickerDismissPopup):
        (WebCore::WebMediaSessionManager::playbackTargetPickerWasDismissed):
        (WebCore::WebMediaSessionManager::configurePlaybackTargetClients):
        * Modules/mediasession/WebMediaSessionManager.h:
        * Modules/mediasession/WebMediaSessionManagerClient.h:
        * Modules/remoteplayback/HTMLMediaElementRemotePlayback.h: Added.
        (WebCore::HTMLMediaElementRemotePlayback::remote):
        (WebCore::HTMLMediaElementRemotePlayback::hasAttributeWithoutSynchronization):
        (WebCore::HTMLMediaElementRemotePlayback::setBooleanAttribute):
        * Modules/remoteplayback/HTMLMediaElementRemotePlayback.idl: Added.
        * Modules/remoteplayback/RemotePlayback.cpp: Added.
        (WebCore::RemotePlayback::create):
        (WebCore::RemotePlayback::RemotePlayback):
        (WebCore::RemotePlayback::~RemotePlayback):
        (WebCore::RemotePlayback::watchAvailability):
        (WebCore::RemotePlayback::cancelWatchAvailability):
        (WebCore::RemotePlayback::prompt):
        (WebCore::RemotePlayback::shouldPlayToRemoteTargetChanged):
        (WebCore::RemotePlayback::setState):
        (WebCore::RemotePlayback::establishConnection):
        (WebCore::RemotePlayback::disconnect):
        (WebCore::RemotePlayback::updateAvailability):
        (WebCore::RemotePlayback::playbackTargetPickerWasDismissed):
        (WebCore::RemotePlayback::isPlayingToRemoteTargetChanged):
        (WebCore::RemotePlayback::hasAvailabilityCallbacks):
        (WebCore::RemotePlayback::availabilityChanged):
        (WebCore::RemotePlayback::invalidate):
        (WebCore::RemotePlayback::activeDOMObjectName):
        (WebCore::RemotePlayback::canSuspendForDocumentSuspension):
        (WebCore::RemotePlayback::stop):
        * Modules/remoteplayback/RemotePlayback.h: Added.
        (WebCore::RemotePlayback::state):
        * Modules/remoteplayback/RemotePlayback.idl: Added.
        * Modules/remoteplayback/RemotePlaybackAvailabilityCallback.h: Added.
        (WebCore::RemotePlaybackAvailabilityCallback::~RemotePlaybackAvailabilityCallback):
        * Modules/remoteplayback/RemotePlaybackAvailabilityCallback.idl: Added.
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/generic/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setRemotePlaybackEnabled):
        (WebCore::RuntimeEnabledFeatures::remotePlaybackEnabled):
        * dom/Document.cpp:
        (WebCore::Document::playbackTargetPickerWasDismissed):
        * dom/Document.h:
        * dom/EventNames.h:
        * dom/EventTargetFactory.in:
        * html/HTMLAttributeNames.in:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::clearMediaPlayer):
        (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange):
        (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
        (WebCore::HTMLMediaElement::addEventListener):
        (WebCore::HTMLMediaElement::removeEventListener):
        (WebCore::HTMLMediaElement::setWirelessPlaybackTarget):
        (WebCore::HTMLMediaElement::playbackTargetPickerWasDismissed):
        (WebCore::HTMLMediaElement::remoteHasAvailabilityCallbacksChanged):
        (WebCore::HTMLMediaElement::createMediaPlayer):
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::remote):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
        (WebCore::MediaElementSession::playbackTargetPickerWasDismissed):
        * html/MediaElementSession.h:
        * page/Page.cpp:
        (WebCore::Page::mockMediaPlaybackTargetPickerDismissPopup):
        (WebCore::Page::playbackTargetPickerWasDismissed):
        * page/Page.h:
        * page/Settings.in:
        * platform/audio/PlatformMediaSession.h:
        (WebCore::PlatformMediaSessionClient::playbackTargetPickerWasDismissed):
        * platform/graphics/MediaPlaybackTargetClient.h:
        * platform/graphics/MediaPlaybackTargetPicker.h:
        (WebCore::MediaPlaybackTargetPicker::playbackTargetPickerWasDismissed):
        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
        (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
        * platform/mock/MediaPlaybackTargetPickerMock.cpp:
        (WebCore::MediaPlaybackTargetPickerMock::dismissPopup):
        * platform/mock/MediaPlaybackTargetPickerMock.h:
        * testing/Internals.cpp:
        (WebCore::Internals::mockMediaPlaybackTargetPickerDismissPopup):
        * testing/Internals.h:
        * testing/Internals.idl:

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

        Add enterkeyhint support
        https://bugs.webkit.org/show_bug.cgi?id=189546
        <rdar://problem/51021148>

        Reviewed by Tim Horton.

        * Headers.cmake: Add EnterKeyHint.h.

2019-10-29  Chris Dumez  <cdumez@apple.com>

        <input type="range">.setAttribute("value") does not update the value
        https://bugs.webkit.org/show_bug.cgi?id=202859
        <rdar://problem/56204271>

        Reviewed by Frédéric Wang.

        Make sure the position of the range input element's slider gets updated whenever
        the element's 'value' attribute changes.

        No new tests, unskipped existing test.

        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::attributeChanged):

2019-10-29  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r251639.

        Caused flakey API failures for GetDisplayMediaTest.Constraints

        Reverted changeset:

        "Enforce user gesture for getUserMedia in case a previous
        getUserMedia call was denied"
        https://bugs.webkit.org/show_bug.cgi?id=203362
        https://trac.webkit.org/changeset/251639

2019-10-29  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r251594.

        Caused an API test failure

        Reverted changeset:

        "mp4 video element broken with service worker"
        https://bugs.webkit.org/show_bug.cgi?id=184447
        https://trac.webkit.org/changeset/251594

2019-10-29  Chris Dumez  <cdumez@apple.com>

        Unreviewed, revert r251637 as it caused http/tests/lazyload/scroll-element-removed-from-document.html to crash
        https://bugs.webkit.org/show_bug.cgi?id=203566

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        * dom/Document.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):
        (WebCore::HTMLImageElement::didMoveToNewDocument):
        * html/HTMLImageElement.h:
        * html/HTMLImageElement.idl:
        * html/LazyLoadImageObserver.cpp: Removed.
        * html/LazyLoadImageObserver.h: Removed.
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement):
        (WebCore::ImageLoader::notifyFinished):
        * loader/ImageLoader.h:
        * loader/cache/CachedImage.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestImage):
        (WebCore::CachedResourceLoader::requestResource):
        (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
        (WebCore::CachedResourceLoader::clientDefersImage const):
        (WebCore::CachedResourceLoader::shouldDeferImageLoad const):
        (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
        * loader/cache/CachedResourceLoader.h:
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintReplaced):

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

        [Web Animations] Optimize blending for CSS Transitions
        https://bugs.webkit.org/show_bug.cgi?id=203561

        Reviewed by Simon Fraser.

        The work performed in KeyframeEffect::setAnimatedPropertiesInStyle() has a level of complexity warranted by the
        flexibility of how keyframes can be specified via the Web Animations JS API. However, in the case of CSS Transitions,
        we already know that there are only two keyframes, one where offset=0 and one where offset=1, and that only a single
        CSS property is specified so we can simplify the process greatly.

        To ensure we only perform this quicker blending operation for keyframes computed for a CSS Transition and that no
        modification to the keyframes have been applied via the Web Animations JS API after the fact, we now keep track
        of whether the blending keyframes (KeyframeList) were generated for a CSS Transition or a CSS Animation and only
        use this information to decide whether we're blending for declarative animations.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::processKeyframes):
        (WebCore::KeyframeEffect::clearBlendingKeyframes):
        (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
        (WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes):
        (WebCore::KeyframeEffect::setTarget):
        (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
        * animation/KeyframeEffect.h:

2019-10-29  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fix non-unified build after r251691
        https://bugs.webkit.org/show_bug.cgi?id=203556

        Reviewed by Žan Doberšek.

        No new tests needed.

        * bindings/js/ScriptModuleLoader.cpp:
        (WebCore::rejectPromise): Add missing namespace in call to JSC::JSInternalPromise::create().

2019-10-29  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] Synchronize the attributes and properties of HTMLVideoElementPictureInPicture
        https://bugs.webkit.org/show_bug.cgi?id=203518

        Reviewed by Eric Carlson.

        Test: media/picture-in-picture-api-element-attributes.html

        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.idl:
        * html/HTMLAttributeNames.in:

2019-10-29  Dirk Schulze  <krit@webkit.org>

        [SVG2] fill-opacity, stroke-opacity, stop-opacity and flood-opacity doe not support percentage
        https://bugs.webkit.org/show_bug.cgi?id=201731

        Reviewed by Simon Fraser.

        The CSS properties opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity support
        percentage in addition to number values.
        Add percentage support.

        Tests: fast/css/parsing-opacity.html
               fast/svg/parsing-fill-opacity.html
               fast/svg/parsing-flood-opacity.html
               fast/svg/parsing-stop-opacity.html
               fast/svg/parsing-stroke-opacity.html

        * css/CSSProperties.json: opacity needs to use Opacity converter now.
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertOpacity): Clamp values to [0,1]
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue): Parse percentage values.

2019-10-29  Dirk Schulze  <krit@webkit.org>

        Add CSS Masking and SVG 2 to feature list
        https://bugs.webkit.org/show_bug.cgi?id=186155

        Reviewed by Simon Fraser.

        Add CSS Masking Level 1 and SVG 2 to feature list.

        * features.json:

2019-10-28  Daniel Bates  <dabates@apple.com>

        Remove unnecessary #include <limits.h> header from Timer.cpp
        https://bugs.webkit.org/show_bug.cgi?id=203504

        Reviewed by Alex Christensen.

        Timer.cpp includes both <limits> and <limits.h>. The latter was added to fix a build issue in r30193 that
        effected GCC 4.3 when Timer.cpp referenced UINT_MAX. Timer.cpp no longer references this constant and instead
        uses the C++ std::numeric_limits equivalent. So, remove the #include <limits.h>.

        * platform/Timer.cpp:

2019-10-28  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Remove JSPromiseDeferred
        https://bugs.webkit.org/show_bug.cgi?id=203400

        Reviewed by Keith Miller.

        This patch removes PromiseExecutionScope. This assumed that promise operation cannot fail in main thread. But this is
        wrong since any JS call can fail due to stack-overflow error. This patch makes things more robust by handling errors correctly.
        And we remove JSPromiseDeferred and use JSPromise instead.

        * bindings/js/JSCustomElementRegistryCustom.cpp:
        (WebCore::whenDefinedPromise):
        (WebCore::JSCustomElementRegistry::whenDefined):
        * bindings/js/JSDOMConvertPromise.h:
        (WebCore::Converter<IDLPromise<T>>::convert):
        * bindings/js/JSDOMGlobalObject.cpp:
        * bindings/js/JSDOMOperationReturningPromise.h:
        (WebCore::IDLOperationReturningPromise::call):
        (WebCore::IDLOperationReturningPromise::callStatic):
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::DeferredPromise::promise const):
        (WebCore::DeferredPromise::callFunction):
        (WebCore::DeferredPromise::whenSettled):
        (WebCore::rejectPromiseWithExceptionIfAny):
        (WebCore::createDeferredPromise):
        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DeferredPromise::create):
        (WebCore::DeferredPromise::DeferredPromise):
        (WebCore::DeferredPromise::deferred const):
        (WebCore::DeferredPromise::resolve):
        (WebCore::DeferredPromise::reject):
        (WebCore::DOMPromiseDeferredBase::DOMPromiseDeferredBase):
        (WebCore::DOMPromiseDeferredBase::operator=):
        (WebCore::DOMPromiseDeferredBase::reject):
        (WebCore::DOMPromiseDeferredBase::rejectType):
        (WebCore::DOMPromiseDeferredBase::promise const):
        (WebCore::DOMPromiseDeferredBase::whenSettled):
        (WebCore::DOMPromiseDeferred::resolve):
        (WebCore::DOMPromiseDeferred<void>::resolve):
        (WebCore::callPromiseFunction):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::moduleLoaderFetch):
        (WebCore::JSDOMWindowBase::moduleLoaderImportModule):
        (WebCore::tryAllocate):
        (WebCore::isResponseCorrect):
        (WebCore::handleResponseOnStreamingAction):
        (WebCore::JSDOMWindowBase::compileStreaming):
        (WebCore::JSDOMWindowBase::instantiateStreaming):
        * bindings/js/JSDOMWindowBase.h:
        * bindings/js/ScriptModuleLoader.cpp:
        (WebCore::ScriptModuleLoader::fetch):
        (WebCore::rejectPromise):
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::addTimerSetNotification):
        (WebCore::WorkerScriptController::removeTimerSetNotification):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateOperationTrampolineDefinition):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
        (WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestCustomPromiseFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticCustomPromiseFunction):
        * workers/WorkerRunLoop.cpp:
        * worklets/WorkletScriptController.cpp:

2019-10-28  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fix various non-unified build issues introduced since r251436
        https://bugs.webkit.org/show_bug.cgi?id=203492

        Reviewed by Alex Christensen and Mark Lam.

        No new tests needed.

        * Modules/entriesapi/FileSystemEntry.cpp: Add missing inclusion of Document.h
        * Modules/entriesapi/FileSystemFileEntry.cpp: Add missing inclusion of File.h
        * Modules/fetch/FetchBodyOwner.cpp: Add missing inclusion of Document.h
        * bindings/js/ExceptionDetails.h: Add missing inclusion of wtf/text/WTFString.h; remove
        unneeded inclusion of wtf/Forward.h.
        * css/ElementRuleCollector.cpp: Add missing inclusion of DocumentRuleSets.h and
        styleResolver.h
        * inspector/agents/page/PageDebuggerAgent.h: Add forward declaration for Frame.
        * style/StyleInvalidator.cpp: Add missing inclusion of RuleSet.h
        * style/StyleSharingResolver.cpp: Add missing inclusion of StyleResolver.h

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

        Add bindings support for the enterkeyhint HTML attribute
        https://bugs.webkit.org/show_bug.cgi?id=203440

        Reviewed by Ryosuke Niwa.

        Work towards support for the enterkeyhint attribute. This patch introduces the new attribute to HTMLElement's
        IDL; see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute
        for more information. This version of the spec was last updated October 25, 2019 (at time of writing).

        Test: fast/forms/enterkeyhint-attribute-values.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/EnterKeyHint.cpp: Added.

        Add a new helper file that declares a new EnterKeyHint enum type, as well as helper functions to map between
        attribute values and EnterKeyHint values.

        (WebCore::enterKeyHintForAttributeValue):
        (WebCore::attributeValueForEnterKeyHint):
        * html/EnterKeyHint.h: Added.
        * html/HTMLAttributeNames.in:
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::canonicalEnterKeyHint const):

        Returns the canonical EnterKeyHint enum value, by inspecting the "enterkeyhint" attribute value.

        (WebCore::HTMLElement::enterKeyHint const):
        (WebCore::HTMLElement::setEnterKeyHint):

        Implement enterKeyHint. Since enterkeyhint is a reflected HTML attribute with enumerated values, the setter sets
        the attribute value and the getter returns the "canonicalized" attribute value.

        * html/HTMLElement.h:
        * html/HTMLElement.idl:

        Add the new attribute. Note that this isn't marked as [Reflect] in IDL, since doing so would generate incorrect
        bindings code. This is because we don't support reflection for enumerated attributes in our bindings generator
        yet, so for now, we just match `HTMLInputElement.type` and `HTMLElement.inputMode`.

        * page/Settings.yaml:

        Add a new runtime switch to guard the enterkeyhint attribute.

2019-10-28  Chris Dumez  <cdumez@apple.com>

        editing/firstPositionInNode-crash.html in crashing in Debug
        https://bugs.webkit.org/show_bug.cgi?id=203520

        Reviewed by Ryosuke Niwa.

        If positionInParentBeforeNode / positionInParentAfterNode on a node and editingIgnoresContent()
        returns true for this node's parent, keep traversing ancestors until we find one for which
        editingIgnoresContent() returns false.

        No new tests, covered by editing/firstPositionInNode-crash.html.

        * dom/Position.cpp:
        (WebCore::positionInParentBeforeNode):
        (WebCore::positionInParentAfterNode):
        * dom/Position.h:

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

        Hidden framesets should provide default edgeInfo value
        https://bugs.webkit.org/show_bug.cgi?id=203506
        <rdar://problem/56233726>

        Reviewed by Simon Fraser.

        The grid information (and certain associated structures e.g. edegeInfo) for a frameset is updated through the layout() call.
        When the used height/width computes to zero on a frameset child (frame or nested frameset), we don't run layout on the renderer thus
        hidden nested framesets can only provide the default edge info.
        This patch changes this behaviour and we now call layout on those hidden renderers the same way we do it on iOS.

        Test: fast/frames/hidden-frameset.html

        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::edgeInfo const):

2019-10-28  Chris Dumez  <cdumez@apple.com>

        Drop code for X-Temp-Tablet HTTP header experiment
        https://bugs.webkit.org/show_bug.cgi?id=203524
        <rdar://problem/55791195>

        Reviewed by Ryosuke Niwa.

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::CachedResourceLoader):
        (WebCore::CachedResourceLoader::requestResource):
        * loader/cache/CachedResourceLoader.h:

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

        Properties that take <position> should not accept 3 values
        https://bugs.webkit.org/show_bug.cgi?id=189142

        Reviewed by Antti Koivisto.
        
        The resolution in https://github.com/w3c/csswg-drafts/issues/2140 changed the syntax for <position>,
        disallowing the 3-value syntax. This is used in object-position, gradients and shapes. background-position
        continues to use the old syntax.
        
        Fix CSS parsing accordingly.

        Tested by css-images WPT, by shapes tests, and object-position tests.

        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::consumePerspectiveOrigin):
        (WebCore::consumeBasicShapeCircle):
        (WebCore::consumeBasicShapeEllipse):
        (WebCore::CSSPropertyParser::parseSingleValue):
        (WebCore::consumeBackgroundPosition):
        (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::backgroundPositionFromThreeValues):
        (WebCore::CSSPropertyParserHelpers::positionFromFourValues):
        (WebCore::CSSPropertyParserHelpers::consumePosition):
        (WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
        (WebCore::CSSPropertyParserHelpers::consumeConicGradient):
        (WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Deleted.
        * css/parser/CSSPropertyParserHelpers.h:

2019-10-28  Alex Christensen  <achristensen@webkit.org>

        Remove unused NetworkProcessCreationParameters.urlSchemesRegisteredAsCanDisplayOnlyIfCanRequest
        https://bugs.webkit.org/show_bug.cgi?id=203393

        Reviewed by Chris Dumez.

        * platform/LegacySchemeRegistry.cpp:
        (WebCore::canDisplayOnlyIfCanRequestSchemes):
        (WebCore::LegacySchemeRegistry::canDisplayOnlyIfCanRequest):
        (WebCore::LegacySchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):

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

        Add support for the Q unit
        https://bugs.webkit.org/show_bug.cgi?id=203469

        Reviewed by Antti Koivisto.
        
        Add support for the CSS "Q" unit (quater-millimeter):
        <https://drafts.csswg.org/css-values-4/#Q>

        Tested by web platform tests.

        * css/CSSCalculationValue.cpp:
        (WebCore::unitCategory):
        (WebCore::hasDoubleValue):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::isValidCSSUnitTypeForDoubleConversion):
        (WebCore::isStringType):
        (WebCore::CSSPrimitiveValue::unitCategory):
        (WebCore::CSSPrimitiveValue::cleanup):
        (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
        (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
        (WebCore::CSSPrimitiveValue::equals const):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::isLength):
        * css/parser/CSSParserToken.cpp:
        (WebCore::cssPrimitiveValueUnitFromTrie):
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeLength):
        * editing/cocoa/HTMLConverter.mm:
        (floatValueFromPrimitiveValue):

2019-10-28  Antoine Quint  <graouts@apple.com>

        CSS Transitions and CSS Animations properties should treat unitless 0 as an invalid value for times
        https://bugs.webkit.org/show_bug.cgi?id=203484

        Reviewed by Antti Koivisto.

        The CSS specification does not allow for "0" as a valid time (https://drafts.csswg.org/css-values-3/#time).
        We change the way we parse time values to only allow for "0" if the UnitlessQuirk is set to Allow, which is
        only the case for the -webkit-marquee-speed property.

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeTime):

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

        [Web Animations] The easing property for a CSSTransition effect is always "linear"
        https://bugs.webkit.org/show_bug.cgi?id=203476

        Reviewed by Dean Jackson.

        While we correctly used the timing function set on the Animation object created while parsing a CSS Transition
        for blending, we wouldn't set the timing function on the CSSTransition's AnimationEffect and it would not be
        reflected correctly through the JS API. This also means that we shouldn't perform per-keyframe blending for CSS
        Transitions.

        * animation/CSSTransition.cpp:
        (WebCore::CSSTransition::setTimingProperties):
        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):

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

        Can't change @font-face descriptors from fontFaceRule.style.setProperty()
        https://bugs.webkit.org/show_bug.cgi?id=177975
        <rdar://problem/56648761>

        Reviewed by Antti Koivisto.

        When parsing properties via PropertySetCSSStyleDeclaration::setProperty() (called from
        script as rule.style.setProperty()), CSSPropertyParser::parseValue() needs to know if
        we're parsing properties in a @font-face or @viewport rule, since some properties are
        only allowed in these contexts.

        Achieve this by adding to CSSParserContext an Optional<enclosingRuleType>, which gets set
        for font-face and viewport rules. This gets set by StyleRuleCSSStyleDeclaration::cssParserContext()
        based on the type of the parent rule.

        Moved StyleRule::Type to its own header so CSSParserContext can use it. Added compile-time asserts
        that the values match CSSRule::Type (fixing one of them).

        Also fix <urange> serialization when start and end values are the same.

        Test: web-platform-tests/css/css-syntax/urange-parsing.html

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSKeyframeRule.cpp:
        (WebCore::StyleRuleKeyframe::StyleRuleKeyframe):
        * css/CSSKeyframesRule.cpp:
        (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
        * css/CSSPropertySourceData.h:
        (WebCore::CSSRuleSourceData::create):
        (WebCore::CSSRuleSourceData::createUnknown):
        (WebCore::CSSRuleSourceData::CSSRuleSourceData):
        * css/CSSRule.cpp:
        * css/CSSUnicodeRangeValue.cpp:
        (WebCore::CSSUnicodeRangeValue::customCSSText const):
        * css/PropertySetCSSStyleDeclaration.cpp:
        (WebCore::StyleRuleCSSStyleDeclaration::cssParserContext const):
        * css/StyleRule.cpp:
        (WebCore::StyleRuleBase::destroy):
        (WebCore::StyleRuleBase::copy const):
        (WebCore::StyleRuleBase::createCSSOMWrapper const):
        (WebCore::StyleRule::StyleRule):
        (WebCore::StyleRulePage::StyleRulePage):
        (WebCore::StyleRuleFontFace::StyleRuleFontFace):
        (WebCore::StyleRuleGroup::StyleRuleGroup):
        (WebCore::StyleRuleMedia::StyleRuleMedia):
        (WebCore::StyleRuleSupports::StyleRuleSupports):
        (WebCore::StyleRuleViewport::StyleRuleViewport):
        (WebCore::StyleRuleCharset::StyleRuleCharset):
        (WebCore::StyleRuleNamespace::StyleRuleNamespace):
        * css/StyleRule.h:
        (WebCore::StyleRuleBase::type const):
        (WebCore::StyleRuleBase::isCharsetRule const):
        (WebCore::StyleRuleBase::isFontFaceRule const):
        (WebCore::StyleRuleBase::isKeyframesRule const):
        (WebCore::StyleRuleBase::isKeyframeRule const):
        (WebCore::StyleRuleBase::isNamespaceRule const):
        (WebCore::StyleRuleBase::isMediaRule const):
        (WebCore::StyleRuleBase::isPageRule const):
        (WebCore::StyleRuleBase::isStyleRule const):
        (WebCore::StyleRuleBase::isSupportsRule const):
        (WebCore::StyleRuleBase::isViewportRule const):
        (WebCore::StyleRuleBase::isImportRule const):
        (WebCore::StyleRuleBase::StyleRuleBase):
        * css/StyleRuleImport.cpp:
        (WebCore::StyleRuleImport::StyleRuleImport):
        * css/StyleRuleImport.h:
        * css/StyleRuleType.h: Copied from Source/WebCore/css/CSSUnicodeRangeValue.cpp.
        * css/StyleSheetContents.cpp:
        (WebCore::traverseRulesInVector):
        (WebCore::StyleSheetContents::traverseSubresources const):
        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseValueWithVariableReferences):
        * css/parser/CSSParserContext.h:
        * css/parser/CSSParserImpl.cpp:
        (WebCore::CSSParserImpl::parseValue):
        (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
        (WebCore::CSSParserImpl::parseDeferredDeclaration):
        (WebCore::CSSParserImpl::parseDeclarationList):
        (WebCore::CSSParserImpl::supportsDeclaration):
        (WebCore::CSSParserImpl::parseDeclarationListForInspector):
        (WebCore::CSSParserImpl::consumeImportRule):
        (WebCore::CSSParserImpl::consumeMediaRule):
        (WebCore::CSSParserImpl::consumeSupportsRule):
        (WebCore::CSSParserImpl::consumeViewportRule):
        (WebCore::CSSParserImpl::consumeFontFaceRule):
        (WebCore::CSSParserImpl::consumeKeyframesRule):
        (WebCore::CSSParserImpl::consumePageRule):
        (WebCore::CSSParserImpl::consumeKeyframeStyleRule):
        (WebCore::observeSelectors):
        (WebCore::CSSParserImpl::consumeStyleRule):
        (WebCore::CSSParserImpl::consumeDeclarationList):
        (WebCore::CSSParserImpl::consumeDeclaration):
        (WebCore::CSSParserImpl::consumeDeclarationValue):
        * css/parser/CSSParserImpl.h:
        * css/parser/CSSParserObserver.h:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseValue):
        * css/parser/CSSPropertyParser.h:
        * css/parser/CSSTokenizer.cpp:
        (WebCore::CSSTokenizer::letterU):
        * inspector/InspectorStyleSheet.cpp:
        (flattenSourceData):
        (WebCore::StyleSheetHandler::startRuleHeader):
        (WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData const):

2019-10-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r251651.
        https://bugs.webkit.org/show_bug.cgi?id=203488

        It's causing crashes in several tests (Requested by KaL on
        #webkit).

        Reverted changeset:

        "ImageDecoders: use a thread safe data buffer for Cairo
        backing store"
        https://bugs.webkit.org/show_bug.cgi?id=201727
        https://trac.webkit.org/changeset/251651

2019-10-28  Charlie Turner  <cturner@igalia.com>

        ImageDecoders: use a thread safe data buffer for Cairo backing store
        https://bugs.webkit.org/show_bug.cgi?id=201727

        Reviewed by Carlos Garcia Campos.

        When an image resource gets cached and replaces an existing image,
        CachedImage::didReplaceSharedBufferContents is called, which
        destroys the decoder in the BitmapImage class. This decoder can be
        initialized from any thread via
        ImageSource::ensureDecoderAvailable. On GTK/WPE, this dispatches
        to a ScalableImageDecoder, which contains a vector of
        ScalableImageDecoderFrame's, which contain ImageBackingStore's,
        which for reasons related to Cairo, contain a RefCounted
        SharedBuffer of pixel data.

        The problem is that the CachedImage's decoders can be
        created/destroyed on different threads, so a thread-safe buffer
        class is required to hold these data, and pass them safely into
        cairo_image_surface_create_for_data rather than a SharedBuffer
        which must be created/destroyed on the main-thread.

        Covered by existing tests.

        * platform/graphics/ImageBackingStore.h: Create a small
        thread-safe utility class to hold the RGBA pixel data.
        (WebCore::ImageBackingStore::setSize):
        (WebCore::ImageBackingStore::clear):
        (WebCore::ImageBackingStore::pixelAt const):
        (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::create):
        (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::zeroPixelData):
        (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::pixelAt const):
        (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::data const):
        (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::isValid const):
        (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::RGBAPixelBufferThreadSafeRefCounted):
        (WebCore::ImageBackingStore::ImageBackingStore):
        * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
        (WebCore::ImageBackingStore::image const):

2019-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Simplify the Input Method implementation
        https://bugs.webkit.org/show_bug.cgi?id=203149

        Reviewed by Adrian Perez de Castro.

        Remove CompositionResults and remove dead code in PlatformKeyboardEventGtk.

        * PlatformGTK.cmake:
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        * platform/gtk/CompositionResults.h: Removed.
        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):

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

        [Web Animations] getKeyframes() doesn't return the right timing function for declarative animations
        https://bugs.webkit.org/show_bug.cgi?id=203475

        Reviewed by Dean Jackson.

        We had two bugs for declarative animations and the "easing" property for keyframes returned by KeyframeEffect::getKeyframes().
        First, we should return "linear" for all keyframes for CSS Transitions since the transition-timing-function is set as the "easing"
        property of the effect itself, not any indvidual keyframe. Then, we would always return the "easing" of the first keyframe while
        iterating over keyframes, which was an oversight.

        * animation/KeyframeEffect.cpp:
        (WebCore::KeyframeEffect::getKeyframes):

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

        Fix nth-child An+B serialization to match the spec
        https://bugs.webkit.org/show_bug.cgi?id=203464

        Reviewed by Antti Koivisto.

        The spec says to expand "odd" and "even" to "2n+1" and "2n", and to simplify
        things like "1n+1" and "0n"

        Tested by existing tests.

        * css/CSSSelector.cpp:
        (WebCore::outputNthChildAnPlusB):
        (WebCore::CSSSelector::selectorText const):

2019-10-21  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Warn users when multiple NFC tags present
        https://bugs.webkit.org/show_bug.cgi?id=200932
        <rdar://problem/54890736>

        Reviewed by Brent Fulgham.

        Covered by new tests in existing test file.

        * testing/MockWebAuthenticationConfiguration.h:
        (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl:
        Adds a new test option.

2019-10-27  Antti Koivisto  <antti@apple.com>

        Move resolving direction and writing mode to PropertyCascade
        https://bugs.webkit.org/show_bug.cgi?id=203471
        Reviewed by Zalan Bujtas.

        Simplify PropertyCascade call sites.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
        (WebCore::extractDirectionAndWritingMode): Deleted.
        * style/PropertyCascade.cpp:
        (WebCore::Style::PropertyCascade::PropertyCascade):

        Add copying constructor that avoids re-resolving directions.

        (WebCore::Style::PropertyCascade::buildCascade):

        Factor into a function.

        (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
        (WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode):

        The code moves here.

        * style/PropertyCascade.h:

2019-10-27  Claudio Saavedra  <csaavedra@igalia.com>

        [GTK][WPE] Test PublicSuffix.TopPrivatelyControlledDomain is failing since r250589
        https://bugs.webkit.org/show_bug.cgi?id=203193

        Reviewed by Carlos Garcia Campos.

        * platform/soup/PublicSuffixSoup.cpp:
        (WebCore::topPrivatelyControlledDomain): Skip any leading dots before using libsoup TLD API.

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

        [LFC][IFC] Do not expand runs with collapsed trailing whitespace
        https://bugs.webkit.org/show_bug.cgi?id=203468
        <rdar://problem/56653689>

        Reviewed by Antti Koivisto.

        Runs are supposed to be a continuous chunk of content. Runs with trailing
        collapsed whitespace can't accommodate additional trailing content.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::Run::isWhitespace const): Deleted.
        (WebCore::Layout::Line::Run::canBeExtended const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::Run::isWhitespace const):
        (WebCore::Layout::Line::Run::setIsCollapsed):
        (WebCore::Layout::Line::Run::canBeExtended const):
        (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):

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

        [LFC][Painting] Use the dirty rect to decide what to paint
        https://bugs.webkit.org/show_bug.cgi?id=203467
        <rdar://problem/56653229>

        Reviewed by Antti Koivisto.

        This is a very basic dirty rect instersect check since we don't yet have layout overflow.
        It enables us to not paint the entire content on every paint frame. 

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::paint):
        * layout/LayoutContext.h:
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintBoxDecorationAndChildren):
        (WebCore::Display::Painter::paint):
        * layout/displaytree/DisplayPainter.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents):

2019-10-26  youenn fablet  <youenn@apple.com>

        Enforce user gesture for getUserMedia in case a previous getUserMedia call was denied
        https://bugs.webkit.org/show_bug.cgi?id=203362

        Reviewed by Eric Carlson.

        Compute whether a media request is user priviledged or not.
        It is priviledged if it is created as part of a user gesture and no request of the same type
        has been previously created for the same user gesture. 
        If getDisplayMedia is called twice as part of a single user gesture, getDisplaMedia will reject for the second call.

        Test: fast/mediastream/getUserMedia-deny-persistency5.html and updated test.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::computeUserGesturePriviledge):
        (WebCore::MediaDevices::getUserMedia):
        (WebCore::MediaDevices::getDisplayMedia):
        (WebCore::MediaDevices::getUserMedia const): Deleted.
        (WebCore::MediaDevices::getDisplayMedia const): Deleted.
        * Modules/mediastream/MediaDevices.h:
        * platform/mediastream/MediaStreamRequest.h:
        (WebCore::MediaStreamRequest::encode const):
        (WebCore::MediaStreamRequest::decode):

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

        [LFC] Do not layout on every paint frame.
        https://bugs.webkit.org/show_bug.cgi?id=203462
        <rdar://problem/56646779>

        Reviewed by Antti Koivisto.

        This is in preparation for being able to run layout benchmarks.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::runLayoutAndVerify):
        (WebCore::Layout::LayoutContext::paint):
        (WebCore::Layout::LayoutContext::runLayoutAndPaint): Deleted.
        * layout/LayoutContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::LayoutState):
        * layout/LayoutState.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
        (WebCore::FrameViewLayoutContext::layout):
        (WebCore::layoutUsingFormattingContext): Deleted.
        * page/FrameViewLayoutContext.h:
        (WebCore::FrameViewLayoutContext::initialLayoutState const):

2019-10-26  Rob Buis  <rbuis@igalia.com>

        Main implementation for lazy image loading
        https://bugs.webkit.org/show_bug.cgi?id=200764

        Reviewed by Simon Fraser.

        Implement lazy image loading as specified here [1]. Lazy image loading
        is controlled by the loading attribute on <img>. When the loading attribute is
        auto or not specified, the behavior is like before this patch, i.e. loading is
        eager.

        Not all loading=lazy requests will turn into actual lazy image loads, when
        scripting is turned off or images are not http(s), they will not be deferred.

        This implementation relies on Intersection Observer and hence works on WK2 only.

        Deferred images are painted using a simple outline until fully loaded.

        [1] https://github.com/whatwg/html/pull/3752/files

        Tests: http/tests/lazyload/attribute.html
               http/tests/lazyload/invisible-image.html
               http/tests/lazyload/js-image.html
               http/tests/lazyload/lazy-image-load-in-iframes-scripting-disabled.html
               http/tests/lazyload/lazy-image-load-in-iframes-scripting-enabled.html
               http/tests/lazyload/lazy.html
               http/tests/lazyload/scroll-element-moved-from-document.html
               http/tests/lazyload/scroll-element-removed-from-document.html
               http/tests/lazyload/scroll.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::lazyLoadImageObserver):
        * dom/Document.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseAttribute):
        (WebCore::HTMLImageElement::loadDeferredImage):
        (WebCore::HTMLImageElement::didMoveToNewDocument):
        (WebCore::HTMLImageElement::loadingForBindings const):
        (WebCore::HTMLImageElement::setLoadingForBindings):
        (WebCore::HTMLImageElement::isDeferred const):
        (WebCore::HTMLImageElement::isLazyLoadable const):
        * html/HTMLImageElement.h:
        * html/HTMLImageElement.idl:
        * html/LazyLoadImageObserver.cpp: Added.
        (WebCore::LazyLoadImageObserver::observe):
        (WebCore::LazyLoadImageObserver::unobserve):
        (WebCore::LazyLoadImageObserver::intersectionObserver):
        (WebCore::LazyLoadImageObserver::isObserved const):
        * html/LazyLoadImageObserver.h: Added.
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
        * loader/ImageLoader.cpp:
        (WebCore::ImageLoader::updateFromElement):
        (WebCore::ImageLoader::notifyFinished):
        (WebCore::ImageLoader::loadDeferredImage):
        * loader/ImageLoader.h:
        (WebCore::ImageLoader::isDeferred const):
        * loader/cache/CachedImage.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestImage):
        (WebCore::CachedResourceLoader::requestResource):
        (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
        (WebCore::CachedResourceLoader::clientDefersImage const):
        (WebCore::CachedResourceLoader::shouldDeferImageLoad const):
        (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
        * loader/cache/CachedResourceLoader.h:
        * rendering/RenderImage.cpp:
        (WebCore::isDeferredImage):
        (WebCore::RenderImage::paintReplaced):

2019-10-26  Antti Koivisto  <antti@apple.com>

        Move StyleResolver::applyProperty to PropertyCascade
        https://bugs.webkit.org/show_bug.cgi?id=203458

        Reviewed by Zalan Bujtas.

        Move the more of the property applying code out of StyleResolver.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
        (WebCore::isValidVisitedLinkProperty): Deleted.
        (WebCore::StyleResolver::applyProperty): Deleted.
        (WebCore::StyleResolver::resolvedVariableValue const): Deleted.
        * css/StyleResolver.h:
        * style/PropertyCascade.cpp:
        (WebCore::Style::isValidVisitedLinkProperty):
        (WebCore::Style::PropertyCascade::applyCustomProperty):
        (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
        (WebCore::Style::PropertyCascade::applyProperty):
        (WebCore::Style::PropertyCascade::resolveValue):
        (WebCore::Style::PropertyCascade::resolvedVariableValue):
        * style/PropertyCascade.h:
        (WebCore::Style::PropertyCascade::property const):
        (WebCore::Style::PropertyCascade::property): Deleted.
        (WebCore::Style::PropertyCascade::hasAppliedProperty const): Deleted.

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

        [LFC][IFC] Completely collapsed runs should not have advance width
        https://bugs.webkit.org/show_bug.cgi?id=203457
        <rdar://problem/56645024>

        Reviewed by Antti Koivisto.

        Let's reset the advance width for completely collapsed runs (any a collapsible space immediatelly following another
        collapsible space).
        https://drafts.csswg.org/css-text-3/#white-space-phase-1

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::canBeExtended const):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::Run::isCollapsedToZeroAdvanceWidth const):
        (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):
        (WebCore::Layout::Line::Run::isVisuallyEmpty const): Deleted.
        (WebCore::Layout::Line::Run::setVisuallyIsEmpty): Deleted.

2019-10-26  Antti Koivisto  <antti@apple.com>

        Build cascade in PropertyCascade constructor
        https://bugs.webkit.org/show_bug.cgi?id=203455

        Reviewed by Zalan Bujtas.

        Instead of calling addNormalMatches/addImportantMatches several times, clients now simply
        pass the desired cascade levels to the constructor.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
        * style/PropertyCascade.cpp:
        (WebCore::Style::PropertyCascade::PropertyCascade):
        (WebCore::Style::PropertyCascade::addMatch):
        (WebCore::Style::PropertyCascade::addNormalMatches):

        Return if there were any important matches so we may skip the step later.

        (WebCore::Style::PropertyCascade::addImportantMatches):
        (WebCore::Style::PropertyCascade::applyDeferredProperties):
        (WebCore::Style::PropertyCascade::applyPropertiesImpl):
        (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
        (WebCore::Style::PropertyCascade::applyProperty):
        (WebCore::Style::PropertyCascade::Property::apply): Deleted.

        Also make this PropertyCascade::applyProperty

        * style/PropertyCascade.h:

2019-10-26  Chris Lord  <clord@igalia.com>

        Put OffscreenCanvas behind a build flag
        https://bugs.webkit.org/show_bug.cgi?id=203146

        Reviewed by Ryosuke Niwa.

        No new tests. No behavior changes.

        * Configurations/FeatureDefines.xcconfig:
        * bindings/js/JSEventTargetCustom.cpp:
        * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp:
        * dom/EventTargetFactory.in:
        * html/ImageBitmap.idl:
        * html/OffscreenCanvas.cpp:
        * html/OffscreenCanvas.h:
        * html/OffscreenCanvas.idl:
        * html/canvas/CanvasRenderingContext.cpp:
        * html/canvas/ImageBitmapRenderingContext.idl:
        * html/canvas/OffscreenCanvasRenderingContext2D.cpp:
        * html/canvas/OffscreenCanvasRenderingContext2D.h:
        * html/canvas/OffscreenCanvasRenderingContext2D.idl:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::canvas):
        * html/canvas/WebGLRenderingContextBase.h:
        * html/canvas/WebGLRenderingContextBase.idl:
        * inspector/agents/InspectorCanvasAgent.cpp:
        * page/PageConsoleClient.cpp:
        (WebCore::canvasRenderingContext):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setImageBitmapEnabled):
        (WebCore::RuntimeEnabledFeatures::imageBitmapEnabled const):
        (WebCore::RuntimeEnabledFeatures::setOffscreenCanvasEnabled):
        (WebCore::RuntimeEnabledFeatures::offscreenCanvasEnabled const):
        * page/WindowOrWorkerGlobalScope.idl:

2019-10-25  Eric Carlson  <eric.carlson@apple.com>

        Support for callbacks for manifest events
        https://bugs.webkit.org/show_bug.cgi?id=202101
        <rdar://problem/54277362>

        Reviewed by Jer Noble.
        
        Use AVPlayerItemMetadataCollector to get manifest based time metadata. Use 
        AVPlayerItemMetadataOutput to get time metadata instead of listening for a "timedMetadata"
        KVO on AVPlayer.

        No new tests, existing test updated.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::globalMetadataProcessingQueue):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
        (WebCore::metadataType):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataGroupDidArrive):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
        (WebCore::itemKVOProperties):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFMovieObserver metadataOutput:didOutputTimedMetadataGroups:fromPlayerItemTrack:]):
        (-[WebCoreAVFMovieObserver metadataCollector:didCollectDateRangeMetadataGroups:indexesOfNewGroups:indexesOfModifiedGroups:]):

2019-10-25  Andy Estes  <aestes@apple.com>

        [Quick Look] Move the QLPreviewConverter delegate into PreviewConverter and vend a C++ client interface
        https://bugs.webkit.org/show_bug.cgi?id=203396

        Reviewed by Alex Christensen.

        PreviewConverter existed as a thin wrapper around QLPreviewConverter for use by
        LegacyPreviewLoader and Quick Look NSData loading in WebKitLegacy. This patch makes two
        changes to this arrangement:

        1. The QLPreviewConverter delegate and the bulk of the conversion state machine was moved
        into PreviewConverter, which now vends a C++ client interface. LegacyPreviewLoader is now a
        client of its PreviewConverter, retaining the responsiility of interacting with the
        ResourceLoader and LegacyPreviewLoaderClient.

        2. The Quick Look NSData loading code for WebKitLegacy now uses QLPreviewConverter API
        directly rather than creating a PreviewConverter. This code path does not require a delegate
        nor any of the other logic in PreviewConverter.

        This change also organizes PreviewConverter into a cross-platform .cpp file and an
        iOS-specific .mm file for the direct usage of QLPreviewConverter API. LegacyPreviewConverter
        was also organized such that it can be changed from .mm to .cpp in a future patch.

        No change in behavior. Covered by existing API and layout tests.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setPreviewConverter):
        * loader/DocumentLoader.h: Changed m_previewConverter from std::unique_ptr to RefPtr.

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse): Used makeUnique directly instead of
        LegacyPreviewLoader::create().

        * loader/ios/LegacyPreviewLoader.h: Privately inherited from PreviewConverterClient and
        PreviewConverterProvider and migrated WebPreviewLoader ivars to member variables.

        * loader/ios/LegacyPreviewLoader.mm:
        (WebCore::makeClient):
        (WebCore::LegacyPreviewLoader::didReceiveBuffer):
        (WebCore::LegacyPreviewLoader::didFinishLoading):
        (WebCore::LegacyPreviewLoader::didFail):
        (WebCore::LegacyPreviewLoader::previewConverterDidStartConverting):
        (WebCore::LegacyPreviewLoader::previewConverterDidReceiveData):
        (WebCore::LegacyPreviewLoader::previewConverterDidFinishConverting):
        (WebCore::LegacyPreviewLoader::previewConverterDidFailUpdating):
        (WebCore::LegacyPreviewLoader::previewConverterDidFailConverting):
        (WebCore::LegacyPreviewLoader::providePasswordForPreviewConverter):
        (WebCore::LegacyPreviewLoader::provideMainResourceForPreviewConverter):
        (WebCore::LegacyPreviewLoader::LegacyPreviewLoader):
        (WebCore::LegacyPreviewLoader::didReceiveData):
        (WebCore::LegacyPreviewLoader::didReceiveResponse):
        (testingClient): Deleted.
        (emptyClient): Deleted.
        (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]): Deleted.
        (-[WebPreviewLoader appendDataArray:]): Deleted.
        (-[WebPreviewLoader finishedAppending]): Deleted.
        (-[WebPreviewLoader failed]): Deleted.
        (-[WebPreviewLoader _loadPreviewIfNeeded]): Deleted.
        (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]): Deleted.
        (-[WebPreviewLoader connectionDidFinishLoading:]): Deleted.
        (isQuickLookPasswordError): Deleted.
        (-[WebPreviewLoader connection:didFailWithError:]): Deleted.
        (WebCore::LegacyPreviewLoader::~LegacyPreviewLoader): Deleted.
        (WebCore::LegacyPreviewLoader::create): Deleted.

        * platform/PreviewConverter.cpp: Added.
        (WebCore::PreviewConverter::supportsMIMEType):
        (WebCore::PreviewConverter::previewResponse const):
        (WebCore::PreviewConverter::previewError const):
        (WebCore::PreviewConverter::previewData const):
        (WebCore::PreviewConverter::updateMainResource):
        (WebCore::PreviewConverter::appendFromBuffer):
        (WebCore::PreviewConverter::finishUpdating):
        (WebCore::PreviewConverter::failedUpdating):
        (WebCore::PreviewConverter::hasClient const):
        (WebCore::PreviewConverter::addClient):
        (WebCore::PreviewConverter::removeClient):
        (WebCore::sharedPasswordForTesting):
        (WebCore::PreviewConverter::passwordForTesting):
        (WebCore::PreviewConverter::setPasswordForTesting):
        (WebCore::PreviewConverter::iterateClients):
        (WebCore::PreviewConverter::didAddClient):
        (WebCore::PreviewConverter::didFailConvertingWithError):
        (WebCore::PreviewConverter::didFailUpdating):
        (WebCore::PreviewConverter::replayToClient):
        (WebCore::PreviewConverter::delegateDidReceiveData):
        (WebCore::PreviewConverter::delegateDidFinishLoading):
        (WebCore::PreviewConverter::delegateDidFailWithError):
        * platform/PreviewConverter.h:
        (WebCore::PreviewConverter::PreviewConverter): Deleted.
        (WebCore::PreviewConverter::platformConverter const): Deleted.
        * platform/PreviewConverterClient.h: Copied from Source/WebCore/platform/PreviewConverter.h.
        * platform/PreviewConverterProvider.h: Copied from Source/WebCore/platform/PreviewConverter.h.
        * platform/ios/PreviewConverterIOS.mm:
        (-[WebPreviewConverterDelegate initWithDelegate:]):
        (-[WebPreviewConverterDelegate connection:didReceiveData:lengthReceived:]):
        (-[WebPreviewConverterDelegate connectionDidFinishLoading:]):
        (-[WebPreviewConverterDelegate connection:didFailWithError:]):
        (WebCore::PreviewConverter::PreviewConverter):
        (WebCore::PreviewConverter::platformSupportedMIMETypes):
        (WebCore::PreviewConverter::safeRequest const):
        (WebCore::PreviewConverter::platformPreviewResponse const):
        (WebCore::PreviewConverter::platformAppend):
        (WebCore::PreviewConverter::platformFinishedAppending):
        (WebCore::PreviewConverter::platformFailedAppending):
        (WebCore::PreviewConverter::isPlatformPasswordError const):
        (WebCore::optionsWithPassword):
        (WebCore::PreviewConverter::platformUnlockWithPassword):
        (WebCore::PreviewConverter::supportsMIMEType): Deleted.
        (WebCore::PreviewConverter::previewRequest const): Deleted.
        (WebCore::PreviewConverter::previewResponse const): Deleted.

        * platform/ios/QuickLook.mm:
        (WebCore::registerQLPreviewConverterIfNeeded): Used QLPreviewConverter directly.

2019-10-25  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: support emulateUserGesture parameter in Runtime.callFunctionOn
        https://bugs.webkit.org/show_bug.cgi?id=200262

        Reviewed by Devin Rousso.

        Support emulateUserGesture in Runtime.callFunctionOn

        Tests: inspector/runtime/callFunctionOn-emulateUserGesture-userIsInteracting.html
               inspector/runtime/callFunctionOn-emulateUserGesture.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::evaluateOnCallFrame):
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::asBool):
        (WebCore::PageRuntimeAgent::evaluate):
        (WebCore::PageRuntimeAgent::callFunctionOn):
        * inspector/agents/page/PageRuntimeAgent.h:
        * inspector/agents/page/UserGestureEmulationScope.cpp: Added.
        (WebCore::UserGestureEmulationScope::UserGestureEmulationScope): Extracted logic
        of overriding user gesture into the scope object to share it between evaluate and
        callFunctionOn as well as PageDebuggerAgent::evaluateOnCallFrame.
        (WebCore::UserGestureEmulationScope::~UserGestureEmulationScope):
        * inspector/agents/page/UserGestureEmulationScope.h: Added.

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

        [LFC][IFC] Remove redundant LineLayout::LineInput c'tor
        https://bugs.webkit.org/show_bug.cgi?id=203425
        <rdar://problem/56624666>

        Reviewed by Antti Koivisto.

        Move the SkipAligment paramenter to the LineLayout from LineLayout::LineInput, because it's the property of the layout and not an input to the actual line.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineInput::LineInput):
        (WebCore::Layout::LineLayout::LineLayout):
        * layout/inlineformatting/InlineLineLayout.h:

2019-10-25  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Build failures in projects that have both AppKit and WAK headers
        https://bugs.webkit.org/show_bug.cgi?id=203429
        <rdar://problem/56598370>

        Reviewed by Sam Weinig.

        * platform/ios/wak/WAKAppKitStubs.h:
        Slightly abuse the preprocessor to avoid errors due to redefining AppKit symbols.

2019-10-25  Antti Koivisto  <antti@apple.com>

        Move more cascade related code from StyleResolver to PropertyCascade
        https://bugs.webkit.org/show_bug.cgi?id=203409

        Reviewed by Zalan Bujtas.

        - Move a bunch of StyleResolver member functions to PropertyCascade.
        - Make ApplyCascadedPropertyState part of the PropertyCascade internal state.
        - Pass around a reference to the PropertyCascade itself instead of the state object
          The state contained PropertyCascade member already so this is equivalent but simpler.

        * css/CSSVariableReferenceValue.cpp:
        (WebCore::resolveVariableFallback):
        (WebCore::resolveVariableReference):
        (WebCore::resolveTokenRange):
        (WebCore::CSSVariableReferenceValue::resolveVariableReferences const):
        * css/CSSVariableReferenceValue.h:
        * css/ElementRuleCollector.h:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::applyPropertyToCurrentStyle):
        (WebCore::StyleResolver::applyProperty):
        (WebCore::StyleResolver::resolvedVariableValue const):
        (WebCore::StyleResolver::cascadedPropertiesForRollback): Deleted.
        (WebCore::StyleResolver::applyCascadedCustomProperty): Deleted.
        (WebCore::StyleResolver::applyCascadedProperties): Deleted.
        (WebCore::StyleResolver::applyCascadedPropertiesImpl): Deleted.

        These become PropertyCascade members.

        * css/StyleResolver.h:
        (WebCore::StyleResolver::State::authorRollback const): Deleted.
        (WebCore::StyleResolver::State::userRollback const): Deleted.
        (WebCore::StyleResolver::State::setAuthorRollback): Deleted.
        (WebCore::StyleResolver::State::setUserRollback): Deleted.

        Rollbacks are now owned by PropertyCascade.

        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseValueWithVariableReferences):
        * css/parser/CSSParser.h:
        * style/PropertyCascade.cpp:
        (WebCore::Style::PropertyCascade::PropertyCascade):
        (WebCore::Style::PropertyCascade::set):
        (WebCore::Style::PropertyCascade::addNormalMatches):
        (WebCore::Style::PropertyCascade::addImportantMatches):
        (WebCore::Style::PropertyCascade::applyDeferredProperties):
        (WebCore::Style::PropertyCascade::applyProperties):
        (WebCore::Style::PropertyCascade::applyPropertiesImpl):
        (WebCore::Style::PropertyCascade::applyCustomProperties):
        (WebCore::Style::PropertyCascade::applyCustomProperty):
        (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
        (WebCore::Style::PropertyCascade::Property::apply):
        * style/PropertyCascade.h:
        (WebCore::Style::PropertyCascade::styleResolver):
        (WebCore::Style::PropertyCascade::hasAppliedProperty const):
        (WebCore::Style::PropertyCascade::customProperties): Deleted.

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

        [LFC][IFC] Add support for no-wrap
        https://bugs.webkit.org/show_bug.cgi?id=203424
        <rdar://problem/56624136>

        Reviewed by Antti Koivisto.

        Consult the white-space style property about line wrapping when the content overflows and can't be split.

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::isContentWrappingAllowed):
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        * layout/inlineformatting/InlineLineBreaker.h:

2019-10-25  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r251322.
        https://bugs.webkit.org/show_bug.cgi?id=203430

        Causing more test failures after the rollout of resize event
        patch (Requested by rniwa on #webkit).

        Reverted changeset:

        "Integrate media query evaluation into HTML5 event loop"
        https://bugs.webkit.org/show_bug.cgi?id=203134
        https://trac.webkit.org/changeset/251322

2019-10-25  youenn fablet  <youenn@apple.com>

        Introduce AudioTrackPrivateMediaStreamCocoa::clear()
        https://bugs.webkit.org/show_bug.cgi?id=203369
        <rdar://problem/49017262>

        Reviewed by Jer Noble.

        Introduce the clear method to make sure the AudioTrackPrivteMediaStreamCocoa is in a clean state.
        This will help further simplifications.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
        (WebCore::AudioTrackPrivateMediaStreamCocoa::~AudioTrackPrivateMediaStreamCocoa):
        (WebCore::AudioTrackPrivateMediaStreamCocoa::clear):
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:

2019-10-25  Matt Lewis  <jlewis3@apple.com>

        Rolling out r251579,r251162,r251512,r251500, and r251498 for build failures
        and test failures

        Unreviewed rollout.

        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        * Modules/webauthn/WebAuthenticationConstants.h:
        * testing/MockWebAuthenticationConfiguration.h:
        (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl:

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

        Add exclusion rules to text manipulation SPI
        https://bugs.webkit.org/show_bug.cgi?id=203398
        <rdar://problem/56567256>

        Reviewed by Wenson Hsieh.

        This patch adds the ability to define a ordered set of rules to exclude or include content an element of
        a certain name or one with a certain attribute value.

        Also made completeManipulation return more detailed errors for debugging purposes.

        Tests: TextManipulation.StartTextManipulationApplySingleExcluionRuleForElement
               TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForAttributes
               TextManipulation.CompleteTextManipulationFailWhenExclusionIsViolated

        * editing/TextManipulationController.cpp:
        (WebCore::TextManipulationController::ExclusionRule::match const): Added.
        (WebCore::ExclusionRuleMatcher): Added. This class is responsible for figuring out whether a given node
        is excluded or included in the text manipulation.
        (WebCore::ExclusionRuleMatcher::ExclusionRuleMatcher): Added.
        (WebCore::ExclusionRuleMatcher::isExcluded): Added.
        (WebCore::ExclusionRuleMatcher::typeForElement): Added.
        (WebCore::TextManipulationController::startObservingParagraphs): Added a Vector of ExclusionRule as
        an argument.
        (WebCore::TextManipulationController::completeManipulation):
        (WebCore::TextManipulationController::replace):
        * editing/TextManipulationController.h:
        (WebCore::TextManipulationController::ExclusionRule): Added.
        (WebCore::TextManipulationController::ManipulationResult): Added.
        (WebCore::TextManipulationController::ManipulationToken::encode const): Include isExcluded boolean.
        (WebCore::TextManipulationController::ManipulationToken::decode): Ditto.
        (WebCore::TextManipulationController::ExclusionRule::encode const): Added.
        (WebCore::TextManipulationController::ExclusionRule::decode): Added.
        (WebCore::TextManipulationController::ExclusionRule::ElementRule::encode const): Added.
        (WebCore::TextManipulationController::ExclusionRule::ElementRule::decode): Added.
        (WebCore::TextManipulationController::ExclusionRule::AttributeRule::encode const): Added.
        (WebCore::TextManipulationController::ExclusionRule::AttributeRule::decode): Added.

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

        Move code around in CSSCalculationValue.cpp
        https://bugs.webkit.org/show_bug.cgi?id=203397

        Reviewed by Zalan Bujtas.

        Large amounts of code were in inline (but virtual) functions in CSSCalcPrimitiveValue, CSSCalcOperation
        and CSSCalcExpressionNodeParser, making it hard to navigate around this file. Move code into
        out-of-line functions. No behavior changes.

        * css/CSSCalculationValue.cpp:
        (WebCore::CSSCalcPrimitiveValue::createCalcExpression const):
        (WebCore::CSSCalcPrimitiveValue::doubleValue const):
        (WebCore::CSSCalcPrimitiveValue::computeLengthPx const):
        (WebCore::CSSCalcPrimitiveValue::collectDirectComputationalDependencies const):
        (WebCore::CSSCalcPrimitiveValue::collectDirectRootComputationalDependencies const):
        (WebCore::CSSCalcPrimitiveValue::equals const):
        (WebCore::CSSCalcOperation::create):
        (WebCore::CSSCalcOperation::createMinOrMax):
        (WebCore::CSSCalcOperation::createSimplified):
        (WebCore::CSSCalcOperation::primitiveType const):
        (WebCore::CSSCalcOperation::createCalcExpression const):
        (WebCore::CSSCalcOperation::doubleValue const):
        (WebCore::CSSCalcOperation::computeLengthPx const):
        (WebCore::CSSCalcOperation::collectDirectComputationalDependencies const):
        (WebCore::CSSCalcOperation::collectDirectRootComputationalDependencies const):
        (WebCore::CSSCalcOperation::buildCssText):
        (WebCore::CSSCalcOperation::customCSSText const):
        (WebCore::CSSCalcOperation::equals const):
        (WebCore::CSSCalcOperation::evaluateOperator):
        (WebCore::CSSCalcExpressionNodeParser::parseCalc):
        (WebCore::CSSCalcExpressionNodeParser::parseValue):
        (WebCore::checkDepthAndIndex):
        (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
        (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
        (WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
        (WebCore::CSSCalcValue::customCSSText const):
        (WebCore::CSSCalcValue::equals const):
        (WebCore::CSSCalcValue::clampToPermittedRange const):
        (WebCore::CSSCalcValue::doubleValue const):
        (WebCore::CSSCalcValue::computeLengthPx const):

2019-10-25  youenn fablet  <youenn@apple.com>

        mp4 video element broken with service worker
        https://bugs.webkit.org/show_bug.cgi?id=184447
        <rdar://problem/39313155>

        Reviewed by Chris Dumez.

        Update fetch header handling to properly handle range header as per https://fetch.spec.whatwg.org/#headers-class.
        In particular, remove thre range header from a Request/Headers object whenever modified.
        Add checks so that range responses are not reused for non range requests.
        For that purpose, add a range-requested flag to ResourceResponse.
        Ass helper routines implementing part of fetch spec.
        Covered by enabled test.

        * Modules/fetch/FetchHeaders.cpp:
        (WebCore::removePrivilegedNoCORSRequestHeaders):
        (WebCore::appendToHeaderMap):
        (WebCore::FetchHeaders::remove):
        (WebCore::FetchHeaders::set):
        * Modules/fetch/FetchHeaders.h:
        (WebCore::FetchHeaders::setInternalHeaders):
        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::initializeWith):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * platform/network/HTTPParsers.cpp:
        (WebCore::isNoCORSSafelistedRequestHeaderName):
        (WebCore::isPriviledgedNoCORSRequestHeaderName):
        * platform/network/HTTPParsers.h:
        * platform/network/ResourceResponseBase.cpp:
        (WebCore::ResourceResponseBase::crossThreadData const):
        (WebCore::ResourceResponseBase::fromCrossThreadData):
        * platform/network/ResourceResponseBase.h:
        (WebCore::ResourceResponseBase::isRangeRequested const):
        (WebCore::ResourceResponseBase::setAsRangeRequested):
        (WebCore::ResourceResponseBase::encode const):
        (WebCore::ResourceResponseBase::decode):

2019-10-25  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r251586.

        New test is flaky

        Reverted changeset:

        "DatabaseContext should not prevent entering the back/forward
        cache"
        https://bugs.webkit.org/show_bug.cgi?id=203103
        https://trac.webkit.org/changeset/251586

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

        [LFC][IFC] Add support for preserved new line (pre, pre-wrap, break-spaces, pre-line)
        https://bugs.webkit.org/show_bug.cgi?id=203395
        <rdar://problem/56606243>

        Reviewed by Antti Koivisto.

        <pre>Let's wrap the line
        when the inline item's type is forced line break.</pre>

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/LayoutContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContent):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineItem.cpp: Copied from Source/WebCore/layout/tableformatting/TableInvalidation.cpp.
        (WebCore::Layout::InlineItem::isForcedLineBreak const):
        (WebCore::Layout::InlineItem::isText const):
        * layout/inlineformatting/InlineItem.h:
        (WebCore::Layout::InlineItem::isBox const):
        (WebCore::Layout::InlineItem::isText const): Deleted.
        (WebCore::Layout::InlineItem::isHardLineBreak const): Deleted.
        (WebCore::Layout::InlineItem::isLineBreak const): Deleted.
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::alignContentVertically):
        (WebCore::Layout::Line::append):
        (WebCore::Layout::Line::appendLineBreak):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        (WebCore::Layout::Line::appendHardLineBreak): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::isText const):
        (WebCore::Layout::Line::Run::isForcedLineBreak const):
        (WebCore::Layout::Line::Run::isLineBreak const): Deleted.
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::isSegmentBreak const):
        * layout/tableformatting/TableInvalidation.cpp:

2019-10-25  Chris Dumez  <cdumez@apple.com>

        DatabaseContext should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203103

        Reviewed by Geoffrey Garen.

        Let pages with active webdatabase transactions into the back/forward cache. We make sure
        to queue tasks that run script to the Window event loop, so that they get delayed when
        the document is suspended.

        No new tests, updated existing test.

        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::runTransaction):
        * Modules/webdatabase/DatabaseContext.cpp:
        (WebCore::DatabaseContext::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/webdatabase/DatabaseContext.h:
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::openDatabase):
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::performPendingCallback):

2019-10-24  Mark Lam  <mark.lam@apple.com>

        Move JSC::Register inline methods into RegisterInlines.h.
        https://bugs.webkit.org/show_bug.cgi?id=203391

        Reviewed by Yusuke Suzuki and Keith Miller.

        No new tests needed because there is no behavior change.

        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:

2019-10-24  Alex Christensen  <achristensen@webkit.org>

        Add more information to SRI failure console messages
        https://bugs.webkit.org/show_bug.cgi?id=203383

        Reviewed by Geoff Garen.

        * bindings/js/ScriptModuleLoader.cpp:
        (WebCore::ScriptModuleLoader::notifyFinished):
        * dom/LoadableClassicScript.cpp:
        (WebCore::LoadableClassicScript::notifyFinished):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::setCSSStyleSheet):
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::didFinishLoading):
        (WebCore::DocumentThreadableLoader::reportIntegrityMetadataError):
        * loader/DocumentThreadableLoader.h:
        * loader/SubresourceIntegrity.cpp:
        (WebCore::integrityMismatchDescription):
        * loader/SubresourceIntegrity.h:

2019-10-24  Devin Rousso  <drousso@apple.com>

        Automate generation of computedProperties
        https://bugs.webkit.org/show_bug.cgi?id=198680
        <rdar://problem/51507834>

        Reviewed by Simon Fraser.

        A property should be listed as part of a `CSSStyleDeclaration` if:
         - it will not be skipped (`skip-builder`) when generating/building properties
         - it's not `internal-only`
         - it has more than one non-`skip-builder`/non-`internal-only` property in `longhands`
            - if all the `longhands` are `skip-builder`/`internal-only` then the property doesn't
              really "have" any longhand properties
            - if there's only one property in `longhands`, then it's more of an alias than a longhand

        * css/makeprop.pl:
        (sortWithPrefixedPropertiesLast): Added.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::cssText const):
        (WebCore::CSSComputedStyleDeclaration::length const):
        (WebCore::CSSComputedStyleDeclaration::item const):
        (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
        (WebCore::ComputedStyleExtractor::copyProperties):

        * css/StyleProperties.h:
        * css/StyleProperties.cpp:
        (WebCore::MutableStyleProperties::MutableStyleProperties):
        (WebCore::StyleProperties::copyPropertiesInSet):
        (WebCore::MutableStyleProperties::create):

2019-10-24  Simon Fraser  <simon.fraser@apple.com>

        imported/w3c/web-platform-tests/css/css-values/calc-positive-fraction-001.html fails
        https://bugs.webkit.org/show_bug.cgi?id=203332

        Reviewed by Dean Jackson.
        
        The calc() spec <https://drafts.csswg.org/css-values-4/#calc-range> says that you clamp
        and round the result of the clamp computation. Do that, instead of treating non-integral
        calc results as invalid for CSS properties that only take integers.

        Tests: imported/w3c/web-platform-tests/css/css-values/calc-positive-fraction-001.html

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::CalcParser::consumeInteger):
        (WebCore::CSSPropertyParserHelpers::consumeInteger):

2019-10-23  Ryosuke Niwa  <rniwa@webkit.org>

        Add a mechanism to find and manipulate text by paragraphs
        https://bugs.webkit.org/show_bug.cgi?id=203286

        Reviewed by Wenson Hsieh.

        This patch introduces TextManipulationController which allows WebKit clients to find and replace
        text content in a given document by paragraph boundary. For now, TextManipulationController finds
        all paragraphs in the document and invokes the callback for each paragraph. In the future, this
        controller will support detecting removal and insertion of new content to the document.

        Tests: TextManipulation.StartTextManipulationFindSimpleParagraphs
               TextManipulation.StartTextManipulationFindParagraphsWithMultileTokens
               TextManipulation.CompleteTextManipulationShouldReplaceSimpleParagraphContent
               TextManipulation.CompleteTextManipulationShouldFailWhenContentIsChanged
               TextManipulation.CompleteTextManipulationShouldFailWhenDocumentHasBeenNavigatedAway

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction): Clear TextManipulationController. Otherwise m_items
        in TextManipulationController may keep a bunch of nodes alive and not let this document destructed.
        (WebCore::Document::textManipulationController): Added.
        * dom/Document.h:
        (WebCore::Document::textManipulationControllerIfExists): Added.
        * editing/TextManipulationController.cpp: Added.
        (WebCore::TextManipulationController::TextManipulationController): Added.
        (WebCore::TextManipulationController::startObservingParagraphs): Finds all pargraphs and invoke
        the callback.
        (WebCore::TextManipulationController::addItem): Added. A helper for startObservingParagraphs.
        (WebCore::TextManipulationController::completeManipulation): Added.
        (WebCore::TextManipulationController::replace): Added. A helper for completeManipulation.
        * editing/TextManipulationController.h: Added.
        (WebCore::TextManipulationController::ManipulationToken::encode const): Added.
        (WebCore::TextManipulationController::ManipulationToken::decode): Added.

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

        Build fix after r251567.

        * page/Page.cpp:
        (WebCore::Page::collectDocuments):
        * page/Page.h:

2019-10-24  Matt Lewis  <jlewis3@apple.com>

        Unreviewed, rolling out r251558.

        This broke internal builds

        Reverted changeset:

        "Add a mechanism to find and manipulate text by paragraphs"
        https://bugs.webkit.org/show_bug.cgi?id=203286
        https://trac.webkit.org/changeset/251558

2019-10-24  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r251269, r251294, and r251328.
        https://bugs.webkit.org/show_bug.cgi?id=203384

        Probably made many animation tests flaky (Requested by rniwa
        on #webkit).

        Reverted changesets:

        "Integrate resize event with HTML5 event loop"
        https://bugs.webkit.org/show_bug.cgi?id=202964
        https://trac.webkit.org/changeset/251269

        "Flaky Test: fast/events/resize-subframe-in-rendering-
        update.html"
        https://bugs.webkit.org/show_bug.cgi?id=203140
        https://trac.webkit.org/changeset/251294

        "Flaky Test: fast/events/resize-subframe-in-rendering-
        update.html"
        https://bugs.webkit.org/show_bug.cgi?id=203140
        https://trac.webkit.org/changeset/251328

2019-10-23  Ryosuke Niwa  <rniwa@webkit.org>

        Add a mechanism to find and manipulate text by paragraphs
        https://bugs.webkit.org/show_bug.cgi?id=203286

        Reviewed by Wenson Hsieh.

        This patch introduces TextManipulationController which allows WebKit clients to find and replace
        text content in a given document by paragraph boundary. For now, TextManipulationController finds
        all paragraphs in the document and invokes the callback for each paragraph. In the future, this
        controller will support detecting removal and insertion of new content to the document.

        Tests: TextManipulation.StartTextManipulationFindSimpleParagraphs
               TextManipulation.StartTextManipulationFindParagraphsWithMultileTokens
               TextManipulation.CompleteTextManipulationShouldReplaceSimpleParagraphContent
               TextManipulation.CompleteTextManipulationShouldFailWhenContentIsChanged
               TextManipulation.CompleteTextManipulationShouldFailWhenDocumentHasBeenNavigatedAway

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction): Clear TextManipulationController. Otherwise m_items
        in TextManipulationController may keep a bunch of nodes alive and not let this document destructed.
        (WebCore::Document::textManipulationController): Added.
        * dom/Document.h:
        (WebCore::Document::textManipulationControllerIfExists): Added.
        * editing/TextManipulationController.cpp: Added.
        (WebCore::TextManipulationController::TextManipulationController): Added.
        (WebCore::TextManipulationController::startObservingParagraphs): Finds all pargraphs and invoke
        the callback.
        (WebCore::TextManipulationController::addItem): Added. A helper for startObservingParagraphs.
        (WebCore::TextManipulationController::completeManipulation): Added.
        (WebCore::TextManipulationController::replace): Added. A helper for completeManipulation.
        * editing/TextManipulationController.h: Added.
        (WebCore::TextManipulationController::ManipulationToken::encode const): Added.
        (WebCore::TextManipulationController::ManipulationToken::decode): Added.

2019-10-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for partial leading and trailing content
        https://bugs.webkit.org/show_bug.cgi?id=203375

        Reviewed by Antti Koivisto.

        This patch adds support for splitting text content across multiple lines when needed.
        It also supports complex cases when the text content spreads across multiple inline level boxes with different word-break values e.g.
        <span style="word-break: keep-all">donotsplitthiscontent</span><span style="word-break: break-all">splitthiscontent</span>
        would produce something like this with certain constraints.
                                -> | <- available width
        "donotsplitthiscontentsplit
        thiscontent"

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
        (WebCore::Layout::LineBreaker::shouldWrapFloatBox):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
        (WebCore::Layout::LineBreaker::breakingContext): Deleted.
        (WebCore::Layout::LineBreaker::breakingContextForFloat): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineInput::LineInput):
        (WebCore::Layout::LineLayout::layout):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::processUncommittedContent):
        (WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
        (WebCore::Layout::LineLayout::UncommittedContent::trim):
        * layout/inlineformatting/InlineLineLayout.h:
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::left const):
        (WebCore::Layout::InlineTextItem::right const):
        (WebCore::Layout::InlineTextItem::split const): Deleted.
        * layout/inlineformatting/InlineTextItem.h:

2019-10-24  Alex Christensen  <achristensen@webkit.org>

        Pass CORS-enabled schemes through WebProcess instead of having them NetworkProcess-global
        https://bugs.webkit.org/show_bug.cgi?id=202891

        Reviewed by Youenn Fablet.

        * platform/LegacySchemeRegistry.cpp:
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
        (WebCore::LegacySchemeRegistry::allURLSchemesRegisteredAsCORSEnabled):
        * platform/LegacySchemeRegistry.h:

2019-10-24  Andy Estes  <aestes@apple.com>

        [Cocoa] Make it possible to convert SharedBuffer segments and data views to NSData without copying
        https://bugs.webkit.org/show_bug.cgi?id=203348

        Reviewed by Alex Christensen.

        Added an API test.

        * platform/SharedBuffer.h:
        * platform/cocoa/SharedBufferCocoa.mm:
        (-[WebCoreSharedBufferData initWithDataSegment:position:]):
        (-[WebCoreSharedBufferData length]):
        (-[WebCoreSharedBufferData bytes]):
        (WebCore::SharedBuffer::createCFData const):
        (WebCore::SharedBuffer::createNSDataArray const):
        (WebCore::SharedBuffer::DataSegment::createNSData const):
        (WebCore::SharedBufferDataView::createNSData const):
        (-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]): Deleted.

2019-10-24  Chris Dumez  <cdumez@apple.com>

        FetchResponse should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203092
        <rdar://problem/56554677>

        Reviewed by Alex Christensen.

        Drop shouldPreventEnteringBackForwardCache_DEPRECATED() in FetchResponse to allow pages to
        enter the back/forward cache, even when the fetch response has a blob loader. r251495
        already made this safe by updating the FetchBodyOwner parent class to not resolve promises
        while in the back/forward cache.

        Test: fast/history/page-cache-active-fetch-response-blobReadAsBlob.html

        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        * Modules/fetch/FetchResponse.h:

2019-10-24  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Reintroduce ensureGLVideoSinkContext() fix
        https://bugs.webkit.org/show_bug.cgi?id=201401

        Reviewed by Philippe Normand.

        That patch was almost mechanically reverted temporarily along the rest
        of the WebKitMediaSrc rework. In theory that should have been OK since
        it was supposed to fix a regression of that patch... But actually
        the bug was already causing problems before, the WebKitMediaSrc rework
        just exposed a more common case.

        It has been reported that the same bug arises when adding some CSS
        styles to the <video> element, and the patch fixes the issue.

        And the patch actually makes sense in any case... since without it
        some perfectly valid state transitions are not covered!

        So I'm reintroducing it.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):

2019-10-24  Antoine Quint  <graouts@apple.com>

        [Web Animations] Only process CSS properties affected by a given CSS transition
        https://bugs.webkit.org/show_bug.cgi?id=203238

        Reviewed by Simon Fraser.

        When the "transition" property, or one of its longhands, would change we would iterate over every known CSS property to identify whether the before and after
        styles showed reasons to create, modify or cancel a backing CSSTransition object. However, we only need to do this in the case where "transition-property" is
        "all", ie. where the Animation object has its animationMode() set to Animation::AnimateAll. In all other cases, we only need to iterate over the CSS properties
        specified by "transition-property".

        We now compile a list of CSS properties to iterate over by looking at all properties listed in the "transition-property" for the before and after styles.

        * animation/AnimationTimeline.cpp:
        (WebCore::compileTransitionPropertiesInStyle):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
        (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
        * animation/AnimationTimeline.h:

2019-10-24  youenn fablet  <youenn@apple.com>

        XMLHttpRequest.responseXML url should be the HTTP response URL
        https://bugs.webkit.org/show_bug.cgi?id=203289

        Reviewed by Chris Dumez.

        Follow https://xhr.spec.whatwg.org/#document-response step 9.
        Covered by rebased tests.

        * xml/XMLHttpRequest.cpp:

2019-10-24  Antti Koivisto  <antti@apple.com>

        Move property cascade out of StyleResolver
        https://bugs.webkit.org/show_bug.cgi?id=203361

        Reviewed by Zalan Bujtas.

        Rename StyleResolver::CascadedProperties -> Style::PropertyCascade and move it into a file of its own.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::cascadedPropertiesForRollback):
        (WebCore::StyleResolver::applyProperty):
        (WebCore::StyleResolver::applyCascadedPropertiesImpl):
        (WebCore::shouldApplyPropertyInParseOrder): Deleted.
        (WebCore::isValidMarkerStyleProperty): Deleted.
        (WebCore::isValidCueStyleProperty): Deleted.
        (WebCore::StyleResolver::CascadedProperties::CascadedProperties): Deleted.
        (WebCore::StyleResolver::CascadedProperties::hasProperty const): Deleted.
        (WebCore::StyleResolver::CascadedProperties::property): Deleted.
        (WebCore::StyleResolver::CascadedProperties::hasCustomProperty const): Deleted.
        (WebCore::StyleResolver::CascadedProperties::customProperty const): Deleted.
        (WebCore::StyleResolver::CascadedProperties::setPropertyInternal): Deleted.
        (WebCore::StyleResolver::CascadedProperties::set): Deleted.
        (WebCore::StyleResolver::CascadedProperties::setDeferred): Deleted.
        (WebCore::StyleResolver::CascadedProperties::addMatch): Deleted.
        (WebCore::declarationsForCascadeLevel): Deleted.
        (WebCore::StyleResolver::CascadedProperties::addNormalMatches): Deleted.
        (WebCore::hasImportantProperties): Deleted.
        (WebCore::StyleResolver::CascadedProperties::addImportantMatches): Deleted.
        (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties): Deleted.
        (WebCore::StyleResolver::CascadedProperties::Property::apply): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::State::authorRollback const):
        (WebCore::StyleResolver::State::userRollback const):
        (WebCore::StyleResolver::State::setAuthorRollback):
        (WebCore::StyleResolver::State::setUserRollback):
        (WebCore::StyleResolver::CascadedProperties::customProperties): Deleted.
        (WebCore::StyleResolver::cascadeLevel const): Deleted.
        (WebCore::StyleResolver::setCascadeLevel): Deleted.
        * style/PropertyCascade.cpp: Added.
        (WebCore::Style::shouldApplyPropertyInParseOrder):
        (WebCore::Style::isValidMarkerStyleProperty):
        (WebCore::Style::isValidCueStyleProperty):
        (WebCore::Style::PropertyCascade::PropertyCascade):
        (WebCore::Style::PropertyCascade::setPropertyInternal):
        (WebCore::Style::PropertyCascade::set):
        (WebCore::Style::PropertyCascade::setDeferred):
        (WebCore::Style::PropertyCascade::addMatch):
        (WebCore::Style::declarationsForCascadeLevel):
        (WebCore::Style::PropertyCascade::addNormalMatches):
        (WebCore::Style::hasImportantProperties):
        (WebCore::Style::PropertyCascade::addImportantMatches):
        (WebCore::Style::PropertyCascade::applyDeferredProperties):
        (WebCore::Style::PropertyCascade::Property::apply):
        * style/PropertyCascade.h: Added.
        (WebCore::Style::PropertyCascade::customProperties):
        (WebCore::Style::PropertyCascade::hasProperty const):
        (WebCore::Style::PropertyCascade::property):
        (WebCore::Style::PropertyCascade::hasCustomProperty const):
        (WebCore::Style::PropertyCascade::customProperty const):

2019-10-24  Chris Dumez  <cdumez@apple.com>

        AudioContext should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203102

        Reviewed by Geoffrey Garen.

        Allow pages with AudioContexts that are rendering in the back/forward cache.
        Upon entering the back/forward cache, we suspend rendering and update IsPlaying
        state so that the browser no longer shows the "Audio Playing" icon. Upon restoring
        from the back/forward cache, we resume rendering and update IsPlaying state again
        so that the browser shows the "Audio Playing" icon again. I tested it on:
        - http://webaudioplayground.appspot.com

        With regards to events dispatching, the AudioContext class is already using a
        GenericEventQueue that properly delays event dispatching while in the back/forward
        cache.

        No new tests, updated existing test.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::suspend):
        (WebCore::AudioContext::resume):
        (WebCore::AudioContext::suspendRendering):
        (WebCore::AudioContext::resumeRendering):
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/AudioContext.idl:

2019-10-24  Antti Koivisto  <antti@apple.com>

        Move MatchResult and related types out of StyleResolver
        https://bugs.webkit.org/show_bug.cgi?id=203252

        Reviewed by Zalan Bujtas.

        Reverse the dependency between StyleResolver and ElementRuleCollector so that the former depends on the latter.
        This makes the code easier to understand and enables further cleanups.

        The patch also gets rid of the confusing RuleRange objects in fovor of splitting declarations from different cascade levels to separate vectors.
        The desired cascade level is indicated with an enum instead of a range.

        There is also some general modernization.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchResult const):
        (WebCore::ElementRuleCollector::addElementStyleProperties):
        (WebCore::ElementRuleCollector::transferMatchedRules):
        (WebCore::ElementRuleCollector::matchAllRules):
        (WebCore::ElementRuleCollector::addMatchedProperties):
        (WebCore::ElementRuleCollector::matchedResult): Deleted.
        * css/ElementRuleCollector.h:
        (WebCore::PseudoStyleRequest::PseudoStyleRequest):
        (WebCore::MatchResult::isEmpty const):
        (WebCore::operator==):
        (WebCore::operator!=):
        * css/PageRuleCollector.cpp:
        (WebCore::PageRuleCollector::matchPageRules):
        * css/PageRuleCollector.h:
        (WebCore::PageRuleCollector::matchResult const):
        (WebCore::PageRuleCollector::matchedResult): Deleted.
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::sweepMatchedPropertiesCache):
        (WebCore::StyleResolver::styleForElement):
        (WebCore::StyleResolver::styleForKeyframe):
        (WebCore::StyleResolver::pseudoStyleForElement):
        (WebCore::StyleResolver::styleForPage):
        (WebCore::StyleResolver::computeMatchedPropertiesHash):
        (WebCore::StyleResolver::findFromMatchedPropertiesCache):
        (WebCore::extractDirectionAndWritingMode):
        (WebCore::StyleResolver::applyMatchedProperties):
        (WebCore::StyleResolver::cascadedPropertiesForRollback):
        (WebCore::StyleResolver::CascadedProperties::addMatch):
        (WebCore::declarationsForCascadeLevel):
        (WebCore::StyleResolver::CascadedProperties::addNormalMatches):
        (WebCore::StyleResolver::CascadedProperties::addImportantMatches):
        (WebCore::StyleResolver::MatchResult::addMatchedProperties): Deleted.
        (WebCore::operator==): Deleted.
        (WebCore::operator!=): Deleted.
        (WebCore::cascadeLevelForIndex): Deleted.
        * css/StyleResolver.h:
        (WebCore::StyleResolver::MatchedPropertiesCacheItem::MatchedPropertiesCacheItem):
        (WebCore::PseudoStyleRequest::PseudoStyleRequest): Deleted.
        (WebCore::StyleResolver::RuleRange::RuleRange): Deleted.
        (WebCore::StyleResolver::MatchRanges::MatchRanges): Deleted.
        (WebCore::StyleResolver::MatchRanges::UARuleRange): Deleted.
        (WebCore::StyleResolver::MatchRanges::authorRuleRange): Deleted.
        (WebCore::StyleResolver::MatchRanges::userRuleRange): Deleted.
        (WebCore::StyleResolver::MatchResult::MatchResult): Deleted.
        (WebCore::StyleResolver::MatchResult::matchedProperties const): Deleted.
        (WebCore::StyleResolver::isRightPage const): Deleted.

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

        Web Inspector: provide a way to inject "bootstrap" JavaScript into the page as the first script executed
        https://bugs.webkit.org/show_bug.cgi?id=195847
        <rdar://problem/48950551>

        Reviewed by Joseph Pecoraro.

        When debugging webpages, it's often useful to be able to swizzle various functions in order
        to add extra logs for when they're called (e.g. `Event.prototype.preventDefault`). Sometimes
        this can be difficult, such as if the page saves a copy of the function and references that
        instead, in which case it would be helpful to have a way to guarantee that the swizzled code
        is the first thing evaluated after the context is created.

        This change adds support for that concept, which has been named Inspector Bootstrap Script.
        Once created, it will be injected as the first user script to every new global object that
        is created afterwards. Modifications to the Inspector Bootstrap Script take effect for all
        new global objects created _after_ the modification happened.

        Tests: inspector/page/setBootstrapScript-main-frame.html
               inspector/page/setBootstrapScript-sub-frame.html

        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::setBootstrapScript): Added.
        (WebCore::InspectorPageAgent::didClearWindowObjectInWorld): Added.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::didClearWindowObjectInWorld): Added.
        (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject): Deleted.
        * inspector/agents/page/PageRuntimeAgent.h:
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::didClearWindowObjectInWorld): Added.
        (WebCore::PageRuntimeAgent::didCreateMainWorldContext): Deleted.
        Rename existing global object creation "notifications" for more consistency between agents.

2019-10-23  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] Implement EnterPictureInPictureEvent support
        https://bugs.webkit.org/show_bug.cgi?id=202616

        Reviewed by Eric Carlson.

        Implement the support for enterpictureinpicture and leavepictureinpicture events.
        - Add a public method schduleEvent() to HTMLMediaElement in order to fire enterpictureinpicture
        event which includes properties.
        - In order to notify the observer (HTMLVideoElementPictureInPicture) after entering picture-in-picture
        transition is completed and the picture-in-picture window size information is available,
        we have to change setVideoFullscreenFrame() to virtual in HTMLMediaElement and implement it in
        HTMLVideoElement to track the transition state.
        - The PictureInPictureWindow does not need to ba an ActiveDOMObject, so it is updated accordingly.

        With manual tests, the implementation passes LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/enter-picture-in-picture.html
        and LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/leave-picture-in-picture.html.

        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::pictureInPictureWindowResized):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
        * Modules/pictureinpicture/PictureInPictureWindow.cpp:
        (WebCore::PictureInPictureWindow::PictureInPictureWindow):
        (WebCore::PictureInPictureWindow::activeDOMObjectName const): Deleted.
        (WebCore::PictureInPictureWindow::eventTargetInterface const): Deleted.
        (WebCore::PictureInPictureWindow::scriptExecutionContext const): Deleted.
        * Modules/pictureinpicture/PictureInPictureWindow.h:
        * Modules/pictureinpicture/PictureInPictureWindow.idl:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::scheduleEvent):
        * html/HTMLMediaElement.h:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::fullscreenModeChanged):
        (WebCore::HTMLVideoElement::didBecomeFullscreenElement):
        (WebCore::HTMLVideoElement::setVideoFullscreenFrame):
        * html/HTMLVideoElement.h:
        * platform/PictureInPictureObserver.h:

2019-10-23  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Remove wasmAwareLexicalGlobalObject
        https://bugs.webkit.org/show_bug.cgi?id=203351

        Reviewed by Mark Lam.

        * bindings/js/CommonVM.cpp:
        (WebCore::lexicalFrameFromCommonVM):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::responsibleDocument):
        * bindings/js/StructuredClone.cpp:
        (WebCore::cloneArrayBufferImpl):
        * dom/Document.cpp:
        (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
        * testing/Internals.cpp:
        (WebCore::Internals::parserMetaData):
        (WebCore::Internals::isFromCurrentWorld const):

2019-10-23  Chris Dumez  <cdumez@apple.com>

        Notification should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203099
        <rdar://problem/56557479>

        Reviewed by Geoffrey Garen.

        Notifications currently displayed were preventing a page from entering the back/forward cache.
        Instead, we now make sure to close any visible notification upon suspension. Since closing
        a notification will fire events, we also schedule tasks on the window event loop to fire those
        events, instead of firing these events synchronously. The Window event loop takes care of delaying
        those events if the document is suspended.

        Test: fast/history/page-cache-notification-showing.html

        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::Notification):
        (WebCore::Notification::show):
        (WebCore::Notification::close):
        (WebCore::Notification::document const):
        (WebCore::Notification::activeDOMObjectName const):
        (WebCore::Notification::stop):
        (WebCore::Notification::suspend):
        (WebCore::Notification::queueTask):
        (WebCore::Notification::dispatchShowEvent):
        (WebCore::Notification::dispatchClickEvent):
        (WebCore::Notification::dispatchCloseEvent):
        (WebCore::Notification::dispatchErrorEvent):
        * Modules/notifications/Notification.h:
        * dom/AbstractEventLoop.h:

2019-10-23  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2] Fix SVGSVGElement to conform with SVG2
        https://bugs.webkit.org/show_bug.cgi?id=203278

        Reviewed by Simon Fraser.

        The interface of SVGSVGElement is defined here:
            https://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSVGElement

        -- Delete the viewport attribute.
        -- Delete the attributes contentScriptType and contentStyleType.
        -- Delete pixelUnitxxx() and screenPixelxxx() functions.
        -- Make the SVGElement argument to checkIntersection() and 
           checkEnclosure() be non-optional.

        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::checkIntersection):
        (WebCore::SVGSVGElement::checkEnclosure):
        (WebCore::SVGSVGElement::contentScriptType const): Deleted.
        (WebCore::SVGSVGElement::setContentScriptType): Deleted.
        (WebCore::SVGSVGElement::contentStyleType const): Deleted.
        (WebCore::SVGSVGElement::setContentStyleType): Deleted.
        (WebCore::SVGSVGElement::viewport const): Deleted.
        (WebCore::SVGSVGElement::pixelUnitToMillimeterX const): Deleted.
        (WebCore::SVGSVGElement::pixelUnitToMillimeterY const): Deleted.
        (WebCore::SVGSVGElement::screenPixelToMillimeterX const): Deleted.
        (WebCore::SVGSVGElement::screenPixelToMillimeterY const): Deleted.
        (WebCore::SVGSVGElement::suspendRedraw): Deleted.
        (WebCore::SVGSVGElement::unsuspendRedraw): Deleted.
        (WebCore::SVGSVGElement::unsuspendRedrawAll): Deleted.
        (WebCore::SVGSVGElement::forceRedraw): Deleted.
        * svg/SVGSVGElement.h:
        * svg/SVGSVGElement.idl:

2019-10-23  Chris Dumez  <cdumez@apple.com>

        Unreviewed build fix after r251509.

        * Modules/entriesapi/FileSystemDirectoryEntry.cpp:

2019-10-23  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Figure out missing prepareCallOperation
        https://bugs.webkit.org/show_bug.cgi?id=203285

        Reviewed by Mark Lam.

        Use JITOperationPrologueCallFrameTracer instead of NativeCallFrameTracer.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateOperationDefinition):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
        * domjit/DOMJITHelpers.h:
        (WebCore::DOMJIT::toWrapperSlow):

2019-10-23  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Should dispatch contextmenu event on right click
        https://bugs.webkit.org/show_bug.cgi?id=203316
        <rdar://problem/54617376>

        Reviewed by Wenson Hsieh.

        macCatalyst does not have ENABLE(CONTEXT_MENUS), because it uses the
        iOS-style platform-driven context menu API, but should still dispatch
        the contextmenu event on right click, for pages that depend on that.

        Separate ENABLE(CONTEXT_MENU_EVENT) out from ENABLE(CONTEXT_MENUS).

        In the future, calling preventDefault on the contextmenu event should
        block the platform context menu from appearing, but currently they
        use entirely different gestures.

        * page/EventHandler.cpp:
        * page/EventHandler.h:
        * replay/UserInputBridge.cpp:
        * replay/UserInputBridge.h:

2019-10-23  Russell Epstein  <repstein@apple.com>

        Unreviewed, rolling out r251469.

        Broke accessibility/ios-simulator/link-with-images-text.html
        on iOS

        Reverted changeset:

        "AX: Implement support for new ARIA roles: code, strong,
        emphasis, generic"
        https://bugs.webkit.org/show_bug.cgi?id=203257
        https://trac.webkit.org/changeset/251469

2019-10-23  Chris Dumez  <cdumez@apple.com>

        FileSystemDirectoryReader / FileSystemEntry should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203090
        <rdar://problem/56550805>

        Reviewed by Geoffrey Garen.

        FileSystemDirectoryReader / FileSystemEntry no longer prevent entering the back/forward cache.
        We now dispatch tasks to the window event loop whenever we need to call a JS callback since the
        window event loop takes care of suspending tasks while in the back/forward cache.

        Tests: editing/pasteboard/entries-api/DirectoryEntry-getFile-back-forward-cache.html
               editing/pasteboard/entries-api/DirectoryReader-readEntries-back-forward-cache.html

        * Modules/entriesapi/FileSystemDirectoryEntry.cpp:
        (WebCore::FileSystemDirectoryEntry::getEntry):
        * Modules/entriesapi/FileSystemDirectoryReader.cpp:
        (WebCore::FileSystemDirectoryReader::document const):
        (WebCore::FileSystemDirectoryReader::readEntries):
        * Modules/entriesapi/FileSystemDirectoryReader.h:
        * Modules/entriesapi/FileSystemEntry.cpp:
        (WebCore::FileSystemEntry::document const):
        (WebCore::FileSystemEntry::getParent):
        * Modules/entriesapi/FileSystemEntry.h:
        * Modules/entriesapi/FileSystemFileEntry.cpp:
        (WebCore::FileSystemFileEntry::file):

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

        [iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
        https://bugs.webkit.org/show_bug.cgi?id=203345

        Reviewed by Simon Fraser.

        This iOS-specific quirk made Yahoo Japan stop using the 800-weight
        version of Hiragino Sans because it's too heavy. We were using the
        800-weight because the site requests 700 but we didn't have a 700-
        weight of Hiragino Sans. However, now in iOS 13 we do have a 700-
        weight of Hiragino Sans, so we can just delete this quirk.

        Also, it turns out that Yahoo Japan modified their content to no
        longer hit this quirk anyway, so this patch has 0 behavior change.

        Site specific quirks are untestable.

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::fontRangesForFamily):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const): Deleted.
        * page/Quirks.h:

2019-10-23  Chris Dumez  <cdumez@apple.com>

        Ignore document.open/write after the active parser has been aborted
        https://bugs.webkit.org/show_bug.cgi?id=203028

        Reviewed by Geoffrey Garen.

        Ignore document.open/write after the active parser has been aborted, as per:
        - https://github.com/whatwg/html/pull/4907

        Test: imported/blink/fast/loader/document-write-after-location-change.html

        * dom/Document.cpp:
        (WebCore::Document::open):
        (WebCore::Document::cancelParsing):
        (WebCore::Document::implicitOpen):
        (WebCore::Document::write):
        * dom/Document.h:

2019-10-23  Andy Estes  <aestes@apple.com>

        [Quick Look] Move PreviewConverter from platform/network/ to platform/
        https://bugs.webkit.org/show_bug.cgi?id=203309

        Reviewed by Tim Horton.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/PreviewConverter.h: Renamed from Source/WebCore/platform/network/ios/PreviewConverter.h.
        * platform/ios/PreviewConverterIOS.mm: Renamed from Source/WebCore/platform/network/ios/PreviewConverter.mm.

2019-10-23  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2] Fix SVGElement to conform with SVG2
        https://bugs.webkit.org/show_bug.cgi?id=203280

        Reviewed by Simon Fraser.

        The interface of SVGElement is defined here:
            https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement.

        -- Remove SVGElement.getPresentationAttribute.
        -- Remove the SVGElement attributes xmllang and xmlspace.
        -- Remove the class SVGLangSpace

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * svg/SVGComponentTransferFunctionElement.cpp:
        (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
        Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
        instead of calling PropertyRegistry::isKnownAttribute().

        * svg/SVGElement.cpp:
        (WebCore::SVGElement::SVGElement):
        (WebCore::SVGElement::parseAttribute):
        (WebCore::SVGElement::svgAttributeChanged):
        (WebCore::SVGElement::getPresentationAttribute): Deleted.
        * svg/SVGElement.h:
        * svg/SVGElement.idl:
        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
        (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
        Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
        instead of calling PropertyRegistry::isKnownAttribute().

        * svg/SVGLangSpace.cpp: Removed.
        * svg/SVGLangSpace.h: Removed.
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::svgAttributeChanged):

2019-10-23  Chris Dumez  <cdumez@apple.com>

        FetchRequest should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203091
        <rdar://problem/56525333>

        Reviewed by Youenn Fablet.

        FetchRequest used to prevent the page from entering the back/forward cache while it had a blob
        load in progress. We no longer prevent suspension in such case. Instead, if the document is
        suspended when the blob load finishes, we post a task to the Window event loop to do the work
        and resolve / reject the promise. The Window event loop makes sure not to delays tasks that
        are associated with a document that is suspended.

        Tests: fast/history/page-cache-active-fetch-request-blobReadAsBlob.html
               fast/history/page-cache-active-fetch-request-blobReadAsReadableStream.html
               fast/history/page-cache-active-fetch-request-blobReadAsText.html

        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::runNetworkTaskWhenPossible):
        (WebCore::FetchBodyOwner::blobLoadingSucceeded):
        (WebCore::FetchBodyOwner::blobLoadingFailed):
        (WebCore::FetchBodyOwner::blobChunk):
        (WebCore::FetchBodyOwner::postSuspendableNetworkTask): Deleted.
        * Modules/fetch/FetchBodyOwner.h:
        * Modules/fetch/FetchRequest.cpp:
        * Modules/fetch/FetchRequest.h:
        * dom/AbstractEventLoop.h:

2019-10-23  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: notify inspector when provisional page is created, committed and destroyed
        https://bugs.webkit.org/show_bug.cgi?id=202704

        Reviewed by Devin Rousso.

        Test: http/tests/inspector/target/target-events-for-proisional-page.html

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::setIsUnderTest): This method may be called several times
        when reloading inspected page with opened frontend so the assumption that there are no
        connected frontends when this method is called from tests doesn't hold anymore.

2019-10-23  Rob Buis  <rbuis@igalia.com>

        Be strict on request's Content-Type
        https://bugs.webkit.org/show_bug.cgi?id=191356

        Reviewed by Alex Christensen.

        Implement steps 1-3 from Content-Type rules defined here:
        https://fetch.spec.whatwg.org/#cors-safelisted-request-header

        Behavior matches Firefox and Chrome.

        Tests: imported/w3c/web-platform-tests/cors/cors-safelisted-request-header.any.html
               imported/w3c/web-platform-tests/cors/cors-safelisted-request-header.any.worker.html

        * platform/network/HTTPParsers.cpp:
        (WebCore::isCorsUnsafeRequestHeaderByte):
        (WebCore::containsCORSUnsafeRequestHeaderBytes):
        (WebCore::isCrossOriginSafeRequestHeader):

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

        [WebAuthn] Supply FrameInfo in -[WKUIDelegatePrivate _webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]
        https://bugs.webkit.org/show_bug.cgi?id=202563
        <rdar://problem/55973968>

        Reviewed by Brent Fulgham.

        Covered by new test contents within existing tests.

        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinator::create const):
        (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
        * Modules/webauthn/AuthenticatorCoordinatorClient.h:

2019-10-23  Andy Estes  <aestes@apple.com>

        [Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
        https://bugs.webkit.org/show_bug.cgi?id=203306

        Reviewed by Tim Horton.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/EmptyClients.cpp:
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoaderClient.h:
        * loader/ResourceLoader.cpp:
        * loader/ResourceLoader.h:
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):
        * loader/ios/LegacyPreviewLoader.h: Renamed from Source/WebCore/loader/ios/PreviewLoader.h.
        * loader/ios/LegacyPreviewLoader.mm: Renamed from Source/WebCore/loader/ios/PreviewLoader.mm.
        (testingClient):
        (emptyClient):
        (WebCore::LegacyPreviewLoader::LegacyPreviewLoader):
        (WebCore::LegacyPreviewLoader::~LegacyPreviewLoader):
        (WebCore::LegacyPreviewLoader::create):
        (WebCore::LegacyPreviewLoader::didReceiveResponse):
        (WebCore::LegacyPreviewLoader::didReceiveData):
        (WebCore::LegacyPreviewLoader::didReceiveBuffer):
        (WebCore::LegacyPreviewLoader::didFinishLoading):
        (WebCore::LegacyPreviewLoader::didFail):
        (WebCore::LegacyPreviewLoader::setClientForTesting):
        * platform/network/ios/LegacyPreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/PreviewLoaderClient.h.
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setQuickLookPassword):
        * testing/MockPreviewLoaderClient.h:

2019-10-23  Antti Koivisto  <antti@apple.com>

        [LFC] LayoutState should have out-of-line destructor
        https://bugs.webkit.org/show_bug.cgi?id=203307

        Reviewed by Zalan Bujtas.

        Otherwise instantiating it requires a pile of other headers.

        * layout/LayoutState.cpp:
        * layout/LayoutState.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutTree):

        Use makeUnique.

2019-10-23  youenn fablet  <youenn@apple.com>

        Remove NavigatorBase::serviceWorkerIfExists
        https://bugs.webkit.org/show_bug.cgi?id=203241

        Reviewed by Chris Dumez.

        Remove unused method.
        No change of behavior.

        * page/NavigatorBase.cpp:
        (WebCore::NavigatorBase::serviceWorkerIfExists): Deleted.
        * page/NavigatorBase.h:

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

        wpt/css/css-images/gradient/color-stops-parsing.html fails
        https://bugs.webkit.org/show_bug.cgi?id=200211

        Reviewed by Dean Jackson.

        CSS gradients allow a single color stop to have multiple positions. In this case
        we need to copy the color from the first to subsequent stops.

        Tested by web-platform-tests/css/css-images/gradient/color-stops-parsing.html
        and imported/w3c/web-platform-tests/css/css-images/multiple-position-color-stop-conic.html.

        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::gradientWithStylesResolved): Copy colors to subsequent stops.
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops): Fix the parsing of
        stops with multiple positions.

2019-10-22  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: Implement support for new ARIA roles: code, strong, emphasis, generic
        https://bugs.webkit.org/show_bug.cgi?id=203257

        Reviewed by Chris Fleizach.

        Create new internal AccessibilityRole types for the new roles.
        Treat code, strong, and emphasis as internal format style groups,
        which are equivalent to their corresponding HTML elements.

        No new tests. Instead, added new roles to existing tests and updated
        expectations.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::initializeRoleMap):
        (WebCore::AccessibilityObject::isStyleFormatGroup const):
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        * accessibility/atk/WebKitAccessible.cpp:
        (atkRole):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (createAccessibilityRoleMap):
        (-[WebAccessibilityObjectWrapper subrole]):

2019-10-22  John Wilander  <wilander@apple.com>

        Resource Load Statistics (experimental): Block all third-party cookies
        https://bugs.webkit.org/show_bug.cgi?id=203266
        <rdar://problem/56512858>

        Reviewed by Alex Christensen.

        This change updates the experimental change in
        <https://trac.webkit.org/changeset/251213> to block all
        third-party cookies, regardless of user interaction with
        the first-party website.

        Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-database.html
               http/tests/resourceLoadStatistics/third-party-cookie-blocking.html

        * page/Settings.yaml:
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::shouldBlockCookies const):
        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingEnabled):
        (WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingOnSitesWithoutUserInteractionEnabled): Deleted.

2019-10-22  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2] Remove the 'viewTarget' property of SVGViewElement
        https://bugs.webkit.org/show_bug.cgi?id=203217

        Reviewed by Simon Fraser.

        The interface of SVGViewElement is defined here:
            https://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement.

        * svg/SVGViewElement.cpp:
        (WebCore::SVGViewElement::SVGViewElement):
        (WebCore::SVGViewElement::parseAttribute):
        * svg/SVGViewElement.h:
        * svg/SVGViewElement.idl:

2019-10-22  Charlie Turner  <cturner@igalia.com>

        media/W3C/video/networkState/networkState_during_progress.html is flaky
        https://bugs.webkit.org/show_bug.cgi?id=76280

        Reviewed by Eric Carlson.

        The onprogress event must be received when networkState is
        NETWORK_LOADING, make sure in the transition from loading to idle
        that the progress event is fired synchronously, so that it is
        received before the networkState changes to NETWORK_IDLE.

        Tested by media/W3C/video/networkState/networkState_during_progress.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):

2019-10-22  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] The implementation needs runtime logging
        https://bugs.webkit.org/show_bug.cgi?id=202774

        Reviewed by Eric Carlson.

        Add runtime logging, no new tests needed.

        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
        (WebCore::HTMLVideoElementPictureInPicture::HTMLVideoElementPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::~HTMLVideoElementPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::exitPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::logChannel const):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:

2019-10-22  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Remove non-LargeAllocation restriction for JSCallee
        https://bugs.webkit.org/show_bug.cgi?id=203260

        Reviewed by Saam Barati.

        Passing VM& instead of calling CallFrame::vm.

        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::callerGlobalObject):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::responsibleDocument):
        * bindings/js/JSDOMWindowBase.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateCallWith):
        * testing/Internals.cpp:
        (WebCore::Internals::parserMetaData):

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

        [LFC][IFC] Add support for continuous content/commit boundary check
        https://bugs.webkit.org/show_bug.cgi?id=203255
        <rdar://problem/56503598>

        Reviewed by Antti Koivisto.

        This patch adds support for continuous content and commit boundary check.
        
        <span style="padding-right: 10px;">textcontent</span>

        The content above forms a continuous, unbreakable run of ([container start][textcontent][container end with horizontal padding of 10px]).
        However at this point we don't know yet whether we are at the end of the run and we need to keep checking for the trailing content.
        In general, we can't submit the run to the line breaking unless we managed to find the commit boundary for the current run.

        <span style="padding-right: 10px;">textcontent</span><img src="broken.jpg">
            This content produces two separate runs as follows:
            1. ([container start][textcontent][container end with horizontal padding of 10px])
            2. ([img])
        vs.
        <span style="padding-right: 10px;">textcontent</span>moretextcontent
            This content produces only one run
            1. ([container start][textcontent][container end with horizontal padding of 10px][moretextcontent])

        The idea here is that we don't commit the content on the line unless we identified the run boundary. In practice it means that we hardly commit the current inline item on the line
        but instead we use it to decide whether the uncommitted content is ready to be committed.

        Using the following example:        
        <span style="padding-right: 10px;">textcontent<img src="broken.jpg"></span>
        
        Incoming inline items are:
         [container start] -> we can't identify the run boundary -> add inline item to pending content
         [textcontent] -> we still can't identify the run boundary sine we don't know what the next inline item is -> add inline item to pending content
         [img] -> now we know that the [container start][textcontent] is on a commit boundary -> commit pending content -> however the current [img] item's boundary is unknown.
         [container end with horizontal padding of 10px] -> Now the [img] and [container end] form an unbreakable run but we don't yet know if this is a run boundary
         - End of content -> always a commit boundary -> commit pending items -> ([img][container end])  

        * layout/inlineformatting/InlineLineBreaker.cpp:
        (WebCore::Layout::LineBreaker::breakingContext):
        (WebCore::Layout::LineBreaker::breakingContextForFloat):
        (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
        (WebCore::Layout::LineBreaker::isAtBreakingOpportunity): Deleted.
        * layout/inlineformatting/InlineLineBreaker.h:
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::LineLayout::layout):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::processUncommittedContent):
        (WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
        * layout/inlineformatting/InlineLineLayout.h:
        (WebCore::Layout::LineLayout::UncommittedContent::runs):
        (WebCore::Layout::LineLayout::UncommittedContent::runs const):

2019-10-22  Dean Jackson  <dino@apple.com>

        WebCoreDecompressionSession needs padding on all platforms to avoid link warnings
        https://bugs.webkit.org/show_bug.cgi?id=203267
        <rdar://problem/56514219>

        Reviewed by Simon Fraser.

        It's annoying that we have to do this, but it is less annoying than getting
        4 linker warnings every time you compile for iOS.

        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
        (WebCore::WebCoreDecompressionSession::enqueueSample): Use padding everywhere.

2019-10-22  Tim Horton  <timothy_horton@apple.com>

        Make it possible to not include IPC Messages headers in other headers
        https://bugs.webkit.org/show_bug.cgi?id=203074

        Reviewed by Geoffrey Garen.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/ExceptionDetails.h: Added.
        * bindings/js/JSDOMExceptionHandling.h:
        Split the ExceptionDetails struct out into its own file.

2019-10-22  Dirk Schulze  <krit@webkit.org>

        SVG2: Add bounding-box keyword to pointer-events
        https://bugs.webkit.org/show_bug.cgi?id=191382

        Reviewed by Dean Jackson.

        SVG 2 added the bounding-box keyword to the pointer-events CSS
        property. It takes the bounding box of an element as hit area.

        Implemented it so that it is as if "fill" was specified for HTML.

        Extended existing tests.

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator PointerEvents const):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSParserFastPaths.cpp:
        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
        * rendering/PointerEventsHitRules.cpp:
        (WebCore::PointerEventsHitRules::PointerEventsHitRules):
        * rendering/PointerEventsHitRules.h:
        * rendering/style/RenderStyleConstants.h:
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::nodeAtFloatPoint):

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

        Change some image-related CSSValue subclasses to use references
        https://bugs.webkit.org/show_bug.cgi?id=203284

        Reviewed by Zalan Bujtas.

        The fake-virtual CSSValue subclasses all have the same functions, but their types
        have diverged. Convert some from pointers to references.

        * css/CSSCanvasValue.cpp:
        (WebCore::CSSCanvasValue::fixedSize):
        (WebCore::CSSCanvasValue::image):
        * css/CSSCanvasValue.h:
        * css/CSSFilterImageValue.cpp:
        (WebCore::CSSFilterImageValue::fixedSize):
        (WebCore::CSSFilterImageValue::image):
        * css/CSSFilterImageValue.h:
        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::image):
        (WebCore::CSSImageGeneratorValue::fixedSize):
        * css/CSSNamedImageValue.cpp:
        (WebCore::CSSNamedImageValue::image):
        * css/CSSNamedImageValue.h:

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

        wpt/css/css-images/gradient/color-stops-parsing.html fails
        https://bugs.webkit.org/show_bug.cgi?id=200211

        Reviewed by Dean Jackson.

        CSS gradients allow a single color stop to have multiple positions. In this case
        we need to copy the color from the first to subsequent stops.

        Tested by web-platform-tests/css/css-images/gradient/color-stops-parsing.html
        and imported/w3c/web-platform-tests/css/css-images/multiple-position-color-stop-conic.html.

        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::gradientWithStylesResolved): Copy colors to subsequent stops.
        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops): Fix the parsing of
        stops with multiple positions.

2019-10-22  youenn fablet  <youenn@apple.com>

        Carriage return character sometimes missing in SDP c-line
        https://bugs.webkit.org/show_bug.cgi?id=203190

        Reviewed by Eric Carlson.

        Covered by updated test.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::filterSDP const):
        Add missing\r when filterig the c line.

2019-10-22  youenn fablet  <youenn@apple.com>

        Remove mayHaveServiceWorkerRegisteredForOrigin
        https://bugs.webkit.org/show_bug.cgi?id=203055

        Reviewed by Alex Christensen.

        Remove ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin and existingServiceWorkerConnection since they are no longer useful.
        Creation of a service worker connection no longer requires any additional IPC once network connection is created.
        Covered by existing tests.

        * dom/Document.cpp:
        (WebCore::Document::resume):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::matchRegistration):
        (WebCore::DocumentLoader::commitData):
        * testing/Internals.cpp:
        (WebCore::Internals::terminateServiceWorker):
        * testing/Internals.h:
        * testing/Internals.idl:
        * workers/service/SWClientConnection.h:
        * workers/service/ServiceWorkerProvider.cpp:
        * workers/service/ServiceWorkerProvider.h:
        * workers/service/WorkerSWClientConnection.cpp:
        * workers/service/WorkerSWClientConnection.h:

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

        wpt/css/css-images/gradient/color-stops-parsing.html crashes
        https://bugs.webkit.org/show_bug.cgi?id=200206

        Reviewed by Carlos Alberto Lopez Perez.

        Share the code that writes color stops, and null-check the stop's m_color.

        Tested by http/wpt/css/css-images/gradient/color-stops-parsing.html.

        * css/CSSGradientValue.cpp:
        (WebCore::CSSGradientValue::writeColorStop const):
        (WebCore::CSSLinearGradientValue::customCSSText const):
        (WebCore::CSSRadialGradientValue::customCSSText const):
        (WebCore::CSSConicGradientValue::customCSSText const):
        * css/CSSGradientValue.h:
        (WebCore::CSSGradientValue::CSSGradientValue):

2019-10-22  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fix non-unified builds after r251326
        https://bugs.webkit.org/show_bug.cgi?id=203244

        Reviewed by Youenn Fablet.

        No new tests needed.

        * Modules/async-clipboard/Clipboard.cpp: Switch inclusion of Blob.h to JSBlob.h, in order to
        have a toJS() conversion for Blob defined. Remove the unneeded JSPromise.h header inclusion.
        * Modules/indexeddb/IDBFactory.h: Add missing forward declaration of JSC::JSGlobalObject.
        * bindings/js/JSDOMBindingSecurity.h: Ditto.
        * bindings/js/ScriptState.h: Ditto.
        * dom/Node.cpp: Add missing inclusion of JavaScriptCore/HeapInlines.h
        * page/RemoteDOMWindow.h: Add missing forward declaration of JSC::JSGlobalObject.
        * platform/graphics/HEVCUtilities.cpp: Add missing inclusion of the wtf/text/StringHash.h
        header, needed to use String as key for a HashMap.

2019-10-22  Miguel Gomez  <magomez@igalia.com>

        REGRESSION(r244372): [GTK][WPE] fast/images/icon-decoding.html and others are failing
        https://bugs.webkit.org/show_bug.cgi?id=197251

        Reviewed by Adrian Perez de Castro.

        Return 0_s as the duration of incomplete frames in an animation.

        Covered by existing tests.

        * platform/image-decoders/ScalableImageDecoder.cpp:
        (WebCore::ScalableImageDecoder::frameDurationAtIndex const):

2019-10-22  Dirk Schulze  <krit@webkit.org>

        SVG2: Use DOMMatrix2DInit for setMatrix and createSVGTransformFromMatrix
        https://bugs.webkit.org/show_bug.cgi?id=191417

        Reviewed by Dean Jackson.

        setMatrix and createSVGTransformFromMatrix used to use SVGMatrix as argument.
        With SVG 2.0, any DOMPoint2DInit type is supported which inlcudes dictionaries,
        DOMMatrix, DOMMatrixReadOnly and SVGMatrix (alias of DOMMatrix).

        Extended existing tests.

        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
        * svg/SVGSVGElement.h:
        * svg/SVGSVGElement.idl:
        * svg/SVGTransform.h:
        (WebCore::SVGTransform::setMatrix):
        * svg/SVGTransform.idl:
        * svg/SVGTransformList.h:
        * svg/SVGTransformList.idl:
        * svg/SVGTransformListValues.cpp:
        (WebCore::SVGTransformListValues::createSVGTransformFromMatrix const):
        * svg/SVGTransformListValues.h:

2019-10-21  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Thread JSGlobalObject* instead of ExecState*
        https://bugs.webkit.org/show_bug.cgi?id=202392

        Reviewed by Geoffrey Garen.

        This patch is changing ExecState* to JSGlobalObject*. We are using ExecState* (a.k.a. CallFrame*) as a useful way to access arguments, thisValue,
        and lexical JSGlobalObject*. But using `CallFrame*` to access lexical `JSGlobalObject*` is wrong: when a function is inlined, `CallFrame*` is pointing
        a CallFrame* of outer function. So if outer function's lexical JSGlobalObject is different from inlined one, we are getting wrong value. We had this
        bug so long and we are adhocly fixing some of them, but we have bunch of this type of bugs.

        In this patch, we explicitly pass lexical JSGlobalObject* so that we pass correct lexical JSGlobalObject* instead of just passing ExecState*. This fixes
        various issues. And furthermore, it cleans up code by decoupling JSGlobalObject* from CallFrame*. Now CallFrame* is really a CallFrame* and it is used
        only when we actually want to access CallFrame information.

        And this also removes many `ExecState::vm()` function calls. And we can just use `JSGlobalObject::vm()` calls instead. We had a ugly hack that we had
        restriction that all JSCallee needs to be non-large-allocation. This limitation is introduced to keep `ExecState::vm()` fast. But this limitation now
        becomes major obstacle to introduce IsoSubspace optimization, and this problem prevents us from putting all JSCells into IsoSubspace. This patch paves
        the way to putting all JSCells into IsoSubspace by removing the above restriction.

        * Modules/applepay/ApplePaySession.cpp:
        (WebCore::ApplePaySession::completeMerchantValidation):
        * Modules/applepay/ApplePaySession.h:
        * Modules/applepay/ApplePaySession.idl:
        * Modules/applepay/PaymentMerchantSession.h:
        * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
        (WebCore::PaymentMerchantSession::fromJS):
        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
        (WebCore::ApplePayPaymentHandler::computeTotalAndLineItems const):
        (WebCore::toJSDictionary):
        (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
        (WebCore::ApplePayPaymentHandler::didSelectPaymentMethod):
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
        (WebCore::ClipboardItemBindingsDataSource::getType):
        * Modules/encryptedmedia/MediaKeyStatusMap.cpp:
        (WebCore::MediaKeyStatusMap::get):
        * Modules/encryptedmedia/MediaKeyStatusMap.h:
        * Modules/encryptedmedia/MediaKeyStatusMap.idl:
        * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
        (WebCore::CDMSessionClearKey::update):
        * Modules/fetch/FetchBody.idl:
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::readableStream):
        (WebCore::FetchBodyOwner::createReadableStream):
        * Modules/fetch/FetchBodyOwner.h:
        * Modules/fetch/FetchResponse.h:
        * Modules/indexeddb/IDBCursor.cpp:
        (WebCore::IDBCursor::update):
        (WebCore::IDBCursor::continuePrimaryKey):
        (WebCore::IDBCursor::continueFunction):
        (WebCore::IDBCursor::deleteFunction):
        * Modules/indexeddb/IDBCursor.h:
        * Modules/indexeddb/IDBCursor.idl:
        * Modules/indexeddb/IDBFactory.cpp:
        (WebCore::IDBFactory::cmp):
        * Modules/indexeddb/IDBFactory.h:
        * Modules/indexeddb/IDBFactory.idl:
        * Modules/indexeddb/IDBIndex.cpp:
        (WebCore::IDBIndex::doOpenCursor):
        (WebCore::IDBIndex::openCursor):
        (WebCore::IDBIndex::doOpenKeyCursor):
        (WebCore::IDBIndex::openKeyCursor):
        (WebCore::IDBIndex::count):
        (WebCore::IDBIndex::doCount):
        (WebCore::IDBIndex::get):
        (WebCore::IDBIndex::doGet):
        (WebCore::IDBIndex::getKey):
        (WebCore::IDBIndex::doGetKey):
        (WebCore::IDBIndex::doGetAll):
        (WebCore::IDBIndex::getAll):
        (WebCore::IDBIndex::doGetAllKeys):
        (WebCore::IDBIndex::getAllKeys):
        * Modules/indexeddb/IDBIndex.h:
        * Modules/indexeddb/IDBIndex.idl:
        * Modules/indexeddb/IDBKeyRange.cpp:
        (WebCore::IDBKeyRange::only):
        (WebCore::IDBKeyRange::lowerBound):
        (WebCore::IDBKeyRange::upperBound):
        (WebCore::IDBKeyRange::bound):
        (WebCore::IDBKeyRange::includes):
        * Modules/indexeddb/IDBKeyRange.h:
        * Modules/indexeddb/IDBKeyRange.idl:
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::doOpenCursor):
        (WebCore::IDBObjectStore::openCursor):
        (WebCore::IDBObjectStore::doOpenKeyCursor):
        (WebCore::IDBObjectStore::openKeyCursor):
        (WebCore::IDBObjectStore::get):
        (WebCore::IDBObjectStore::getKey):
        (WebCore::IDBObjectStore::add):
        (WebCore::IDBObjectStore::put):
        (WebCore::IDBObjectStore::putForCursorUpdate):
        (WebCore::IDBObjectStore::putOrAdd):
        (WebCore::IDBObjectStore::deleteFunction):
        (WebCore::IDBObjectStore::doDelete):
        (WebCore::IDBObjectStore::clear):
        (WebCore::IDBObjectStore::createIndex):
        (WebCore::IDBObjectStore::count):
        (WebCore::IDBObjectStore::doCount):
        (WebCore::IDBObjectStore::doGetAll):
        (WebCore::IDBObjectStore::getAll):
        (WebCore::IDBObjectStore::doGetAllKeys):
        (WebCore::IDBObjectStore::getAllKeys):
        * Modules/indexeddb/IDBObjectStore.h:
        * Modules/indexeddb/IDBObjectStore.idl:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::requestOpenCursor):
        (WebCore::IDBTransaction::doRequestOpenCursor):
        (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
        (WebCore::IDBTransaction::requestGetAllIndexRecords):
        (WebCore::IDBTransaction::requestGetRecord):
        (WebCore::IDBTransaction::requestGetValue):
        (WebCore::IDBTransaction::requestGetKey):
        (WebCore::IDBTransaction::requestIndexRecord):
        (WebCore::IDBTransaction::requestCount):
        (WebCore::IDBTransaction::requestDeleteRecord):
        (WebCore::IDBTransaction::requestClearObjectStore):
        (WebCore::IDBTransaction::requestPutOrAdd):
        * Modules/indexeddb/IDBTransaction.h:
        * Modules/indexeddb/server/IDBSerializationContext.cpp:
        (WebCore::IDBServer::IDBSerializationContext::execState):
        * Modules/indexeddb/server/IDBSerializationContext.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::certificateTypeFromAlgorithmIdentifier):
        (WebCore::RTCPeerConnection::generateCertificate):
        * Modules/mediastream/RTCPeerConnection.h:
        * Modules/mediastream/RTCPeerConnection.idl:
        * Modules/paymentrequest/PaymentMethodChangeEvent.h:
        * Modules/paymentrequest/PaymentRequest.cpp:
        (WebCore::checkAndCanonicalizeDetails):
        * Modules/paymentrequest/PaymentResponse.h:
        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
        (WebCore::QuickTimePluginReplacement::installReplacement):
        (WebCore::JSQuickTimePluginReplacement::timedMetaData const):
        (WebCore::JSQuickTimePluginReplacement::accessLog const):
        (WebCore::JSQuickTimePluginReplacement::errorLog const):
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createBufferMapped const):
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.idl:
        * animation/Animatable.idl:
        * animation/KeyframeEffect.cpp:
        (WebCore::processKeyframeLikeObject):
        (WebCore::processIterableKeyframes):
        (WebCore::processPropertyIndexedKeyframes):
        (WebCore::KeyframeEffect::create):
        (WebCore::KeyframeEffect::getKeyframes):
        (WebCore::KeyframeEffect::setKeyframes):
        (WebCore::KeyframeEffect::processKeyframes):
        (WebCore::KeyframeEffect::animationDidSeek):
        * animation/KeyframeEffect.h:
        * animation/KeyframeEffect.idl:
        * bindings/js/DOMPromiseProxy.h:
        (WebCore::DOMPromiseProxy<IDLType>::promise):
        (WebCore::DOMPromiseProxy<IDLVoid>::promise):
        (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::promise):
        * bindings/js/DOMWrapperWorld.h:
        (WebCore::currentWorld):
        (WebCore::isWorldCompatible):
        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::get):
        (WebCore::set):
        (WebCore::toJS):
        (WebCore::createIDBKeyFromValue):
        (WebCore::getNthValueOnKeyPath):
        (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
        (WebCore::ensureNthValueOnKeyPath):
        (WebCore::canInjectNthValueOnKeyPath):
        (WebCore::injectIDBKeyIntoScriptValue):
        (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
        (WebCore::canInjectIDBKeyIntoScriptValue):
        (WebCore::deserializeIDBValueToJSValue):
        (WebCore::scriptValueToIDBKey):
        (WebCore::createKeyPathArray):
        (WebCore::generateIndexKeyForValue):
        (WebCore::deserializeIDBValueWithKeyInjection):
        * bindings/js/IDBBindingUtilities.h:
        * bindings/js/JSAnimationEffectCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSAnimationTimelineCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSAuthenticatorResponseCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSBasicCredentialCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSBlobCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSCSSRuleCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSCallbackData.cpp:
        (WebCore::JSCallbackData::invokeCallback):
        * bindings/js/JSCustomElementInterface.cpp:
        (WebCore::JSCustomElementInterface::tryToConstructCustomElement):
        (WebCore::constructCustomElementSynchronously):
        (WebCore::JSCustomElementInterface::upgradeElement):
        (WebCore::JSCustomElementInterface::invokeCallback):
        (WebCore::JSCustomElementInterface::invokeAdoptedCallback):
        (WebCore::JSCustomElementInterface::invokeAttributeChangedCallback):
        * bindings/js/JSCustomElementInterface.h:
        (WebCore::JSCustomElementInterface::invokeCallback):
        * bindings/js/JSCustomElementRegistryCustom.cpp:
        (WebCore::getCustomElementCallback):
        (WebCore::validateCustomElementNameAndThrowIfNeeded):
        (WebCore::JSCustomElementRegistry::define):
        (WebCore::whenDefinedPromise):
        (WebCore::JSCustomElementRegistry::whenDefined):
        * bindings/js/JSCustomEventCustom.cpp:
        (WebCore::JSCustomEvent::detail const):
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::create):
        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
        * bindings/js/JSCustomXPathNSResolver.h:
        * bindings/js/JSDOMAbstractOperations.h:
        (WebCore::isVisibleNamedProperty):
        (WebCore::accessVisibleNamedProperty):
        * bindings/js/JSDOMAttribute.h:
        (WebCore::IDLAttribute::set):
        (WebCore::IDLAttribute::setStatic):
        (WebCore::IDLAttribute::get):
        (WebCore::IDLAttribute::getStatic):
        (WebCore::AttributeSetter::call):
        * bindings/js/JSDOMBindingSecurity.cpp:
        (WebCore::canAccessDocument):
        (WebCore::BindingSecurity::shouldAllowAccessToFrame):
        (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow):
        (WebCore::BindingSecurity::shouldAllowAccessToNode):
        * bindings/js/JSDOMBindingSecurity.h:
        (WebCore::BindingSecurity::checkSecurityForNode):
        * bindings/js/JSDOMBuiltinConstructor.h:
        (WebCore::JSDOMBuiltinConstructor<JSClass>::callConstructor):
        (WebCore::JSDOMBuiltinConstructor<JSClass>::construct):
        * bindings/js/JSDOMBuiltinConstructorBase.cpp:
        (WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments):
        * bindings/js/JSDOMBuiltinConstructorBase.h:
        * bindings/js/JSDOMConstructorBase.cpp:
        (WebCore::callThrowTypeError):
        (WebCore::JSDOMConstructorBase::toStringName):
        * bindings/js/JSDOMConstructorBase.h:
        * bindings/js/JSDOMConstructorNotConstructable.h:
        (WebCore::JSDOMConstructorNotConstructable::callThrowTypeError):
        * bindings/js/JSDOMConvertAny.h:
        (WebCore::Converter<IDLAny>::convert):
        (WebCore::VariadicConverter<IDLAny>::convert):
        * bindings/js/JSDOMConvertBase.h:
        (WebCore::DefaultExceptionThrower::operator()):
        (WebCore::convert):
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSDOMConvertBoolean.h:
        (WebCore::Converter<IDLBoolean>::convert):
        * bindings/js/JSDOMConvertBufferSource.h:
        (WebCore::toJS):
        (WebCore::Detail::BufferSourceConverter::convert):
        (WebCore::Converter<IDLArrayBuffer>::convert):
        (WebCore::JSConverter<IDLArrayBuffer>::convert):
        (WebCore::Converter<IDLDataView>::convert):
        (WebCore::JSConverter<IDLDataView>::convert):
        (WebCore::Converter<IDLInt8Array>::convert):
        (WebCore::JSConverter<IDLInt8Array>::convert):
        (WebCore::Converter<IDLInt16Array>::convert):
        (WebCore::JSConverter<IDLInt16Array>::convert):
        (WebCore::Converter<IDLInt32Array>::convert):
        (WebCore::JSConverter<IDLInt32Array>::convert):
        (WebCore::Converter<IDLUint8Array>::convert):
        (WebCore::JSConverter<IDLUint8Array>::convert):
        (WebCore::Converter<IDLUint16Array>::convert):
        (WebCore::JSConverter<IDLUint16Array>::convert):
        (WebCore::Converter<IDLUint32Array>::convert):
        (WebCore::JSConverter<IDLUint32Array>::convert):
        (WebCore::Converter<IDLUint8ClampedArray>::convert):
        (WebCore::JSConverter<IDLUint8ClampedArray>::convert):
        (WebCore::Converter<IDLFloat32Array>::convert):
        (WebCore::JSConverter<IDLFloat32Array>::convert):
        (WebCore::Converter<IDLFloat64Array>::convert):
        (WebCore::JSConverter<IDLFloat64Array>::convert):
        (WebCore::Converter<IDLArrayBufferView>::convert):
        (WebCore::JSConverter<IDLArrayBufferView>::convert):
        * bindings/js/JSDOMConvertCallbacks.h:
        (WebCore::Converter<IDLCallbackFunction<T>>::convert):
        (WebCore::Converter<IDLCallbackInterface<T>>::convert):
        * bindings/js/JSDOMConvertDate.cpp:
        (WebCore::jsDate):
        (WebCore::valueToDate):
        * bindings/js/JSDOMConvertDate.h:
        (WebCore::Converter<IDLDate>::convert):
        (WebCore::JSConverter<IDLDate>::convert):
        * bindings/js/JSDOMConvertDictionary.h:
        (WebCore::Converter<IDLDictionary<T>>::convert):
        (WebCore::JSConverter<IDLDictionary<T>>::convert):
        * bindings/js/JSDOMConvertEnumeration.h:
        (WebCore::Converter<IDLEnumeration<T>>::convert):
        (WebCore::JSConverter<IDLEnumeration<T>>::convert):
        * bindings/js/JSDOMConvertEventListener.h:
        (WebCore::Converter<IDLEventListener<T>>::convert):
        * bindings/js/JSDOMConvertIndexedDB.h:
        (WebCore::JSConverter<IDLIDBKey>::convert):
        (WebCore::JSConverter<IDLIDBKeyData>::convert):
        (WebCore::JSConverter<IDLIDBValue>::convert):
        * bindings/js/JSDOMConvertInterface.h:
        (WebCore::JSToWrappedOverloader::toWrapped):
        (WebCore::Converter<IDLInterface<T>>::convert):
        (WebCore::JSConverter<IDLInterface<T>>::convert):
        (WebCore::JSConverter<IDLInterface<T>>::convertNewlyCreated):
        (WebCore::VariadicConverter<IDLInterface<T>>::convert):
        * bindings/js/JSDOMConvertJSON.h:
        (WebCore::Converter<IDLJSON>::convert):
        (WebCore::JSConverter<IDLJSON>::convert):
        * bindings/js/JSDOMConvertNull.h:
        (WebCore::Converter<IDLNull>::convert):
        * bindings/js/JSDOMConvertNullable.h:
        (WebCore::Converter<IDLNullable<T>>::convert):
        (WebCore::JSConverter<IDLNullable<T>>::convert):
        (WebCore::JSConverter<IDLNullable<T>>::convertNewlyCreated):
        * bindings/js/JSDOMConvertNumbers.cpp:
        (WebCore::enforceRange):
        (WebCore::toSmallerInt):
        (WebCore::toSmallerUInt):
        (WebCore::convertToIntegerEnforceRange<int8_t>):
        (WebCore::convertToIntegerEnforceRange<uint8_t>):
        (WebCore::convertToIntegerClamp<int8_t>):
        (WebCore::convertToIntegerClamp<uint8_t>):
        (WebCore::convertToInteger<int8_t>):
        (WebCore::convertToInteger<uint8_t>):
        (WebCore::convertToIntegerEnforceRange<int16_t>):
        (WebCore::convertToIntegerEnforceRange<uint16_t>):
        (WebCore::convertToIntegerClamp<int16_t>):
        (WebCore::convertToIntegerClamp<uint16_t>):
        (WebCore::convertToInteger<int16_t>):
        (WebCore::convertToInteger<uint16_t>):
        (WebCore::convertToIntegerEnforceRange<int32_t>):
        (WebCore::convertToIntegerEnforceRange<uint32_t>):
        (WebCore::convertToIntegerClamp<int32_t>):
        (WebCore::convertToIntegerClamp<uint32_t>):
        (WebCore::convertToInteger<int32_t>):
        (WebCore::convertToInteger<uint32_t>):
        (WebCore::convertToIntegerEnforceRange<int64_t>):
        (WebCore::convertToIntegerEnforceRange<uint64_t>):
        (WebCore::convertToIntegerClamp<int64_t>):
        (WebCore::convertToIntegerClamp<uint64_t>):
        (WebCore::convertToInteger<int64_t>):
        (WebCore::convertToInteger<uint64_t>):
        * bindings/js/JSDOMConvertNumbers.h:
        (WebCore::Converter<IDLByte>::convert):
        (WebCore::Converter<IDLOctet>::convert):
        (WebCore::Converter<IDLShort>::convert):
        (WebCore::Converter<IDLUnsignedShort>::convert):
        (WebCore::Converter<IDLLong>::convert):
        (WebCore::Converter<IDLUnsignedLong>::convert):
        (WebCore::Converter<IDLLongLong>::convert):
        (WebCore::Converter<IDLUnsignedLongLong>::convert):
        (WebCore::Converter<IDLClampAdaptor<T>>::convert):
        (WebCore::Converter<IDLEnforceRangeAdaptor<T>>::convert):
        (WebCore::Converter<IDLFloat>::convert):
        (WebCore::Converter<IDLUnrestrictedFloat>::convert):
        (WebCore::Converter<IDLDouble>::convert):
        (WebCore::Converter<IDLUnrestrictedDouble>::convert):
        * bindings/js/JSDOMConvertObject.h:
        (WebCore::Converter<IDLObject>::convert):
        * bindings/js/JSDOMConvertPromise.h:
        (WebCore::Converter<IDLPromise<T>>::convert):
        (WebCore::JSConverter<IDLPromise<T>>::convert):
        * bindings/js/JSDOMConvertRecord.h:
        (WebCore::Detail::IdentifierConverter<IDLDOMString>::convert):
        (WebCore::Detail::IdentifierConverter<IDLByteString>::convert):
        (WebCore::Detail::IdentifierConverter<IDLUSVString>::convert):
        * bindings/js/JSDOMConvertScheduledAction.h:
        (WebCore::Converter<IDLScheduledAction>::convert):
        * bindings/js/JSDOMConvertSequences.h:
        (WebCore::Detail::GenericSequenceConverter::convert):
        (WebCore::Detail::NumericSequenceConverter::convertArray):
        (WebCore::Detail::NumericSequenceConverter::convert):
        (WebCore::Detail::SequenceConverter::convertArray):
        (WebCore::Detail::SequenceConverter::convert):
        (WebCore::Detail::SequenceConverter<IDLLong>::convert):
        (WebCore::Detail::SequenceConverter<IDLFloat>::convert):
        (WebCore::Detail::SequenceConverter<IDLUnrestrictedFloat>::convert):
        (WebCore::Detail::SequenceConverter<IDLDouble>::convert):
        (WebCore::Detail::SequenceConverter<IDLUnrestrictedDouble>::convert):
        (WebCore::Converter<IDLSequence<T>>::convert):
        (WebCore::JSConverter<IDLSequence<T>>::convert):
        (WebCore::Converter<IDLFrozenArray<T>>::convert):
        (WebCore::JSConverter<IDLFrozenArray<T>>::convert):
        * bindings/js/JSDOMConvertSerializedScriptValue.h:
        (WebCore::Converter<IDLSerializedScriptValue<T>>::convert):
        (WebCore::JSConverter<IDLSerializedScriptValue<T>>::convert):
        * bindings/js/JSDOMConvertStrings.cpp:
        (WebCore::stringToByteString):
        (WebCore::identifierToByteString):
        (WebCore::valueToByteString):
        (WebCore::identifierToUSVString):
        (WebCore::valueToUSVString):
        * bindings/js/JSDOMConvertStrings.h:
        (WebCore::Converter<IDLDOMString>::convert):
        (WebCore::JSConverter<IDLDOMString>::convert):
        (WebCore::Converter<IDLByteString>::convert):
        (WebCore::JSConverter<IDLByteString>::convert):
        (WebCore::Converter<IDLUSVString>::convert):
        (WebCore::JSConverter<IDLUSVString>::convert):
        (WebCore::Converter<IDLTreatNullAsEmptyAdaptor<T>>::convert):
        (WebCore::JSConverter<IDLTreatNullAsEmptyAdaptor<T>>::convert):
        (WebCore::Converter<IDLAtomStringAdaptor<T>>::convert):
        (WebCore::JSConverter<IDLAtomStringAdaptor<T>>::convert):
        (WebCore::Converter<IDLRequiresExistingAtomStringAdaptor<T>>::convert):
        (WebCore::JSConverter<IDLRequiresExistingAtomStringAdaptor<T>>::convert):
        * bindings/js/JSDOMConvertUnion.h:
        * bindings/js/JSDOMConvertVariadic.h:
        (WebCore::VariadicConverter::convert):
        (WebCore::convertVariadicArguments):
        * bindings/js/JSDOMConvertWebGL.cpp:
        (WebCore::convertToJSValue):
        * bindings/js/JSDOMConvertWebGL.h:
        (WebCore::convertToJSValue):
        (WebCore::JSConverter<IDLWebGLAny>::convert):
        (WebCore::JSConverter<IDLWebGLExtension>::convert):
        * bindings/js/JSDOMConvertXPathNSResolver.h:
        (WebCore::Converter<IDLXPathNSResolver<T>>::convert):
        (WebCore::JSConverter<IDLXPathNSResolver<T>>::convert):
        (WebCore::JSConverter<IDLXPathNSResolver<T>>::convertNewlyCreated):
        * bindings/js/JSDOMExceptionHandling.cpp:
        (WebCore::reportException):
        (WebCore::retrieveErrorMessage):
        (WebCore::reportCurrentException):
        (WebCore::createDOMException):
        (WebCore::propagateExceptionSlowPath):
        (WebCore::throwTypeError):
        (WebCore::throwNotSupportedError):
        (WebCore::throwInvalidStateError):
        (WebCore::throwSecurityError):
        (WebCore::throwArgumentMustBeEnumError):
        (WebCore::throwArgumentMustBeFunctionError):
        (WebCore::throwArgumentTypeError):
        (WebCore::throwAttributeTypeError):
        (WebCore::throwRequiredMemberTypeError):
        (WebCore::throwConstructorScriptExecutionContextUnavailableError):
        (WebCore::throwSequenceTypeError):
        (WebCore::throwNonFiniteTypeError):
        (WebCore::throwGetterTypeError):
        (WebCore::rejectPromiseWithGetterTypeError):
        (WebCore::throwSetterTypeError):
        (WebCore::throwThisTypeError):
        (WebCore::rejectPromiseWithThisTypeError):
        (WebCore::throwDOMSyntaxError):
        (WebCore::throwDataCloneError):
        * bindings/js/JSDOMExceptionHandling.h:
        (WebCore::propagateException):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::makeThisTypeErrorForBuiltins):
        (WebCore::makeGetterTypeErrorForBuiltins):
        (WebCore::JSDOMGlobalObject::promiseRejectionTracker):
        (WebCore::callerGlobalObject):
        * bindings/js/JSDOMGlobalObject.h:
        * bindings/js/JSDOMGlobalObjectTask.cpp:
        * bindings/js/JSDOMIterator.cpp:
        (WebCore::addValueIterableMethods):
        * bindings/js/JSDOMIterator.h:
        (WebCore::jsPair):
        (WebCore::IteratorTraits>::asJS):
        (WebCore::appendForEachArguments):
        (WebCore::iteratorForEach):
        (WebCore::IteratorTraits>::next):
        * bindings/js/JSDOMMapLike.cpp:
        (WebCore::getBackingMap):
        (WebCore::createBackingMap):
        (WebCore::forwardAttributeGetterToBackingMap):
        (WebCore::forwardFunctionCallToBackingMap):
        (WebCore::forwardForEachCallToBackingMap):
        * bindings/js/JSDOMMapLike.h:
        (WebCore::DOMMapLike::set):
        (WebCore::synchronizeBackingMap):
        (WebCore::forwardSizeToMapLike):
        (WebCore::forwardEntriesToMapLike):
        (WebCore::forwardKeysToMapLike):
        (WebCore::forwardValuesToMapLike):
        (WebCore::forwardClearToMapLike):
        (WebCore::forwardForEachToMapLike):
        (WebCore::forwardGetToMapLike):
        (WebCore::forwardHasToMapLike):
        (WebCore::forwardAddToMapLike):
        (WebCore::forwardDeleteToMapLike):
        * bindings/js/JSDOMOperation.h:
        (WebCore::IDLOperation::call):
        (WebCore::IDLOperation::callStatic):
        * bindings/js/JSDOMOperationReturningPromise.h:
        (WebCore::IDLOperationReturningPromise::call):
        (WebCore::IDLOperationReturningPromise::callReturningOwnPromise):
        (WebCore::IDLOperationReturningPromise::callStatic):
        (WebCore::IDLOperationReturningPromise::callStaticReturningOwnPromise):
        * bindings/js/JSDOMPromise.cpp:
        (WebCore::callFunction):
        (WebCore::DOMPromise::whenPromiseIsSettled):
        (WebCore::DOMPromise::result const):
        (WebCore::DOMPromise::status const):
        * bindings/js/JSDOMPromiseDeferred.cpp:
        (WebCore::DeferredPromise::callFunction):
        (WebCore::DeferredPromise::reject):
        (WebCore::rejectPromiseWithExceptionIfAny):
        (WebCore::createDeferredPromise):
        (WebCore::createRejectedPromiseWithTypeError):
        (WebCore::parseAsJSON):
        (WebCore::fulfillPromiseWithJSON):
        (WebCore::fulfillPromiseWithArrayBuffer):
        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DeferredPromise::create):
        (WebCore::DeferredPromise::resolve):
        (WebCore::DeferredPromise::resolveWithNewlyCreated):
        (WebCore::DeferredPromise::resolveCallbackValueWithNewlyCreated):
        (WebCore::DeferredPromise::reject):
        (WebCore::DeferredPromise::resolveWithCallback):
        (WebCore::DeferredPromise::rejectWithCallback):
        (WebCore::callPromiseFunction):
        (WebCore::bindingPromiseFunctionAdapter):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::updateDocument):
        (WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage):
        (WebCore::toJS):
        (WebCore::incumbentDOMWindow):
        (WebCore::activeDOMWindow):
        (WebCore::firstDOMWindow):
        (WebCore::responsibleDocument):
        (WebCore::JSDOMWindowBase::moduleLoaderResolve):
        (WebCore::JSDOMWindowBase::moduleLoaderFetch):
        (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
        (WebCore::JSDOMWindowBase::moduleLoaderImportModule):
        (WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties):
        (WebCore::tryAllocate):
        (WebCore::isResponseCorrect):
        (WebCore::handleResponseOnStreamingAction):
        (WebCore::JSDOMWindowBase::compileStreaming):
        (WebCore::JSDOMWindowBase::instantiateStreaming):
        * bindings/js/JSDOMWindowBase.h:
        (WebCore::toJS):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::jsDOMWindowWebKit):
        (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
        (WebCore::JSDOMWindow::getOwnPropertySlot):
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        (WebCore::JSDOMWindow::doPutPropertySecurityCheck):
        (WebCore::JSDOMWindow::put):
        (WebCore::JSDOMWindow::putByIndex):
        (WebCore::JSDOMWindow::deleteProperty):
        (WebCore::JSDOMWindow::deletePropertyByIndex):
        (WebCore::addCrossOriginOwnPropertyNames):
        (WebCore::addScopedChildrenIndexes):
        (WebCore::JSDOMWindow::getOwnPropertyNames):
        (WebCore::JSDOMWindow::defineOwnProperty):
        (WebCore::JSDOMWindow::getPrototype):
        (WebCore::JSDOMWindow::preventExtensions):
        (WebCore::JSDOMWindow::toStringName):
        (WebCore::JSDOMWindow::event const):
        (WebCore::DialogHandler::DialogHandler):
        (WebCore::DialogHandler::dialogCreated):
        (WebCore::DialogHandler::returnValue const):
        (WebCore::JSDOMWindow::showModalDialog):
        (WebCore::JSDOMWindow::queueMicrotask):
        (WebCore::JSDOMWindow::setOpener):
        (WebCore::JSDOMWindow::self const):
        (WebCore::JSDOMWindow::window const):
        (WebCore::JSDOMWindow::frames const):
        (WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody):
        (WebCore::IDLOperation<JSDOMWindow>::cast):
        (WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
        (WebCore::JSDOMWindow::openDatabase const):
        (WebCore::JSDOMWindow::setOpenDatabase):
        * bindings/js/JSDOMWindowCustom.h:
        * bindings/js/JSDOMWindowProperties.cpp:
        (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
        (WebCore::JSDOMWindowProperties::getOwnPropertySlot):
        (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
        * bindings/js/JSDOMWindowProperties.h:
        * bindings/js/JSDOMWrapper.cpp:
        (WebCore::cloneAcrossWorlds):
        * bindings/js/JSDOMWrapper.h:
        * bindings/js/JSDOMWrapperCache.h:
        (WebCore::deprecatedGlobalObjectForPrototype):
        (WebCore::deprecatedGetDOMStructure):
        (WebCore::wrap):
        * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::createNewDocumentWrapper):
        (WebCore::cachedDocumentWrapper):
        (WebCore::reportMemoryForDocumentIfFrameless):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSDocumentCustom.h:
        * bindings/js/JSDocumentFragmentCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSErrorHandler.cpp:
        (WebCore::JSErrorHandler::handleEvent):
        * bindings/js/JSErrorHandler.h:
        (WebCore::createJSErrorHandler):
        * bindings/js/JSEventCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        (WebCore::createEventListenerForEventHandlerAttribute):
        (WebCore::setEventHandlerAttribute):
        (WebCore::setWindowEventHandlerAttribute):
        (WebCore::setDocumentEventHandlerAttribute):
        * bindings/js/JSEventListener.h:
        * bindings/js/JSEventTargetCustom.h:
        (WebCore::IDLOperation<JSEventTarget>::call):
        * bindings/js/JSExecState.cpp:
        (WebCore::JSExecState::didLeaveScriptContext):
        (WebCore::functionCallHandlerFromAnyThread):
        (WebCore::evaluateHandlerFromAnyThread):
        * bindings/js/JSExecState.h:
        (WebCore::JSExecState::currentState):
        (WebCore::JSExecState::call):
        (WebCore::JSExecState::evaluate):
        (WebCore::JSExecState::profiledCall):
        (WebCore::JSExecState::profiledEvaluate):
        (WebCore::JSExecState::runTask):
        (WebCore::JSExecState::loadModule):
        (WebCore::JSExecState::linkAndEvaluateModule):
        (WebCore::JSExecState::JSExecState):
        (WebCore::JSExecState::~JSExecState):
        (WebCore::JSExecState::setCurrentState):
        * bindings/js/JSExtendableMessageEventCustom.cpp:
        (WebCore::constructJSExtendableMessageEvent):
        (WebCore::JSExtendableMessageEvent::data const):
        * bindings/js/JSFileSystemEntryCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSHTMLCollectionCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSHTMLElementCustom.cpp:
        (WebCore::constructJSHTMLElement):
        (WebCore::JSHTMLElement::pushEventHandlerScope const):
        * bindings/js/JSHistoryCustom.cpp:
        (WebCore::JSHistory::state const):
        * bindings/js/JSIDBCursorCustom.cpp:
        (WebCore::JSIDBCursor::key const):
        (WebCore::JSIDBCursor::primaryKey const):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSIDBCursorWithValueCustom.cpp:
        (WebCore::JSIDBCursorWithValue::value const):
        * bindings/js/JSIDBRequestCustom.cpp:
        (WebCore::JSIDBRequest::result const):
        * bindings/js/JSImageDataCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::initializeJSFunction const):
        * bindings/js/JSLocationCustom.cpp:
        (WebCore::getOwnPropertySlotCommon):
        (WebCore::JSLocation::getOwnPropertySlot):
        (WebCore::JSLocation::getOwnPropertySlotByIndex):
        (WebCore::putCommon):
        (WebCore::JSLocation::doPutPropertySecurityCheck):
        (WebCore::JSLocation::put):
        (WebCore::JSLocation::putByIndex):
        (WebCore::JSLocation::deleteProperty):
        (WebCore::JSLocation::deletePropertyByIndex):
        (WebCore::JSLocation::getOwnPropertyNames):
        (WebCore::JSLocation::defineOwnProperty):
        (WebCore::JSLocation::getPrototype):
        (WebCore::JSLocation::preventExtensions):
        (WebCore::JSLocation::toStringName):
        (WebCore::JSLocationPrototype::put):
        (WebCore::JSLocationPrototype::defineOwnProperty):
        * bindings/js/JSMediaStreamTrackCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSMessageEventCustom.cpp:
        (WebCore::JSMessageEvent::ports const):
        (WebCore::JSMessageEvent::data const):
        * bindings/js/JSMicrotaskCallback.h:
        (WebCore::JSMicrotaskCallback::call):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::pushEventHandlerScope const):
        (WebCore::createWrapperInline):
        (WebCore::createWrapper):
        (WebCore::toJSNewlyCreated):
        (WebCore::willCreatePossiblyOrphanedTreeByRemovalSlowCase):
        * bindings/js/JSNodeCustom.h:
        (WebCore::toJS):
        (WebCore::JSNode::nodeType const):
        * bindings/js/JSNodeListCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSNodeListCustom.h:
        (WebCore::toJS):
        * bindings/js/JSPaymentMethodChangeEventCustom.cpp:
        (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
        * bindings/js/JSPaymentResponseCustom.cpp:
        (WebCore::JSPaymentResponse::details const):
        * bindings/js/JSPerformanceEntryCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSPluginElementFunctions.cpp:
        (WebCore::pluginScriptObject):
        (WebCore::pluginElementPropertyGetter):
        (WebCore::pluginElementCustomGetOwnPropertySlot):
        (WebCore::pluginElementCustomPut):
        (WebCore::callPlugin):
        * bindings/js/JSPluginElementFunctions.h:
        * bindings/js/JSPopStateEventCustom.cpp:
        (WebCore::JSPopStateEvent::state const):
        * bindings/js/JSReadableStreamSourceCustom.cpp:
        (WebCore::JSReadableStreamSource::start):
        (WebCore::JSReadableStreamSource::pull):
        (WebCore::JSReadableStreamSource::controller const):
        * bindings/js/JSRemoteDOMWindowCustom.cpp:
        (WebCore::JSRemoteDOMWindow::getOwnPropertySlot):
        (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex):
        (WebCore::JSRemoteDOMWindow::put):
        (WebCore::JSRemoteDOMWindow::putByIndex):
        (WebCore::JSRemoteDOMWindow::deleteProperty):
        (WebCore::JSRemoteDOMWindow::deletePropertyByIndex):
        (WebCore::JSRemoteDOMWindow::getOwnPropertyNames):
        (WebCore::JSRemoteDOMWindow::defineOwnProperty):
        (WebCore::JSRemoteDOMWindow::getPrototype):
        (WebCore::JSRemoteDOMWindow::preventExtensions):
        (WebCore::JSRemoteDOMWindow::toStringName):
        * bindings/js/JSSVGPathSegCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSServiceWorkerClientCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSStyleSheetCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSTextCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSTextTrackCueCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSTrackCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSTrackCustom.h:
        * bindings/js/JSTypedOMCSSStyleValueCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSValueInWrappedObject.h:
        (WebCore::cachedPropertyValue):
        * bindings/js/JSWebAnimationCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        (WebCore::constructJSWebAnimation):
        * bindings/js/JSWindowProxy.cpp:
        (WebCore::toJS):
        * bindings/js/JSWindowProxy.h:
        (WebCore::toJS):
        * bindings/js/JSWorkerGlobalScopeBase.cpp:
        (WebCore::toJS):
        * bindings/js/JSWorkerGlobalScopeBase.h:
        (WebCore::toJS):
        * bindings/js/JSWorkerGlobalScopeCustom.cpp:
        (WebCore::JSWorkerGlobalScope::queueMicrotask):
        * bindings/js/JSWorkletGlobalScopeBase.cpp:
        (WebCore::toJS):
        * bindings/js/JSWorkletGlobalScopeBase.h:
        (WebCore::toJS):
        * bindings/js/JSXMLDocumentCustom.cpp:
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::response const):
        * bindings/js/JSXPathNSResolverCustom.cpp:
        (WebCore::JSXPathNSResolver::toWrapped):
        * bindings/js/ReadableStream.cpp:
        (WebCore::ReadableStream::create):
        (WebCore::ReadableStreamInternal::callFunction):
        (WebCore::ReadableStream::pipeTo):
        (WebCore::ReadableStream::tee):
        (WebCore::ReadableStream::lock):
        (WebCore::checkReadableStream):
        (WebCore::ReadableStream::isDisturbed):
        * bindings/js/ReadableStream.h:
        (WebCore::JSReadableStreamWrapperConverter::toWrapped):
        (WebCore::toJS):
        * bindings/js/ReadableStreamDefaultController.cpp:
        (WebCore::readableStreamCallFunction):
        (WebCore::ReadableStreamDefaultController::invoke):
        * bindings/js/ReadableStreamDefaultController.h:
        (WebCore::ReadableStreamDefaultController::close):
        (WebCore::ReadableStreamDefaultController::error):
        (WebCore::ReadableStreamDefaultController::enqueue):
        (WebCore::ReadableStreamDefaultController::globalExec const): Deleted.
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::executeFunctionInContext):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluateInWorld):
        (WebCore::ScriptController::loadModuleScriptInWorld):
        (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
        (WebCore::ScriptController::evaluateModule):
        (WebCore::jsValueToModuleKey):
        (WebCore::ScriptController::setupModuleScriptHandlers):
        (WebCore::ScriptController::canAccessFromCurrentOrigin):
        (WebCore::ScriptController::collectIsolatedContexts):
        (WebCore::ScriptController::jsObjectForPluginElement):
        (WebCore::ScriptController::executeIfJavaScriptURL):
        * bindings/js/ScriptController.h:
        * bindings/js/ScriptControllerMac.mm:
        (WebCore::ScriptController::javaScriptContext):
        * bindings/js/ScriptModuleLoader.cpp:
        (WebCore::ScriptModuleLoader::resolve):
        (WebCore::rejectToPropagateNetworkError):
        (WebCore::ScriptModuleLoader::fetch):
        (WebCore::ScriptModuleLoader::moduleURL):
        (WebCore::ScriptModuleLoader::evaluate):
        (WebCore::rejectPromise):
        (WebCore::ScriptModuleLoader::importModule):
        (WebCore::ScriptModuleLoader::createImportMetaProperties):
        (WebCore::ScriptModuleLoader::notifyFinished):
        * bindings/js/ScriptModuleLoader.h:
        * bindings/js/ScriptState.cpp:
        (WebCore::domWindowFromExecState):
        (WebCore::frameFromExecState):
        (WebCore::scriptExecutionContextFromExecState):
        (WebCore::mainWorldExecState):
        (WebCore::execStateFromNode):
        (WebCore::execStateFromPage):
        (WebCore::execStateFromWorkerGlobalScope):
        (WebCore::execStateFromWorkletGlobalScope):
        * bindings/js/ScriptState.h:
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneBase::CloneBase):
        (WebCore::CloneBase::shouldTerminate):
        (WebCore::wrapCryptoKey):
        (WebCore::unwrapCryptoKey):
        (WebCore::CloneSerializer::serialize):
        (WebCore::CloneSerializer::CloneSerializer):
        (WebCore::CloneSerializer::fillTransferMap):
        (WebCore::CloneSerializer::getProperty):
        (WebCore::CloneSerializer::toJSArrayBuffer):
        (WebCore::CloneSerializer::dumpArrayBufferView):
        (WebCore::CloneSerializer::dumpDOMPoint):
        (WebCore::CloneSerializer::dumpDOMRect):
        (WebCore::CloneSerializer::dumpDOMMatrix):
        (WebCore::CloneSerializer::dumpIfTerminal):
        (WebCore::CloneSerializer::write):
        (WebCore::CloneDeserializer::deserialize):
        (WebCore::CloneDeserializer::CachedString::jsString):
        (WebCore::CloneDeserializer::CloneDeserializer):
        (WebCore::CloneDeserializer::putProperty):
        (WebCore::CloneDeserializer::readArrayBufferView):
        (WebCore::CloneDeserializer::getJSValue):
        (WebCore::CloneDeserializer::readDOMPoint):
        (WebCore::CloneDeserializer::readDOMMatrix):
        (WebCore::CloneDeserializer::readDOMRect):
        (WebCore::CloneDeserializer::readDOMQuad):
        (WebCore::CloneDeserializer::readRTCCertificate):
        (WebCore::CloneDeserializer::readTerminal):
        (WebCore::maybeThrowExceptionIfSerializationFailed):
        (WebCore::SerializedScriptValue::create):
        (WebCore::SerializedScriptValue::deserialize):
        * bindings/js/SerializedScriptValue.h:
        * bindings/js/StructuredClone.cpp:
        (WebCore::cloneArrayBufferImpl):
        (WebCore::structuredCloneArrayBufferView):
        * bindings/js/StructuredClone.h:
        * bindings/js/WebCoreTypedArrayController.cpp:
        (WebCore::WebCoreTypedArrayController::toJS):
        * bindings/js/WebCoreTypedArrayController.h:
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        (WebCore::WorkerScriptController::setException):
        (WebCore::WorkerScriptController::scheduleExecutionTermination):
        (WebCore::WorkerScriptController::attachDebugger):
        (WebCore::WorkerScriptController::detachDebugger):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateGetOwnPropertySlot):
        (GenerateGetOwnPropertySlotByIndex):
        (GenerateGetOwnPropertyNames):
        (GenerateInvokeIndexedPropertySetter):
        (GenerateInvokeNamedPropertySetter):
        (GeneratePut):
        (GeneratePutByIndex):
        (GenerateDefineOwnProperty):
        (GenerateDeletePropertyCommon):
        (GenerateDeleteProperty):
        (GenerateDeletePropertyByIndex):
        (GetArgumentExceptionFunction):
        (GetArgumentExceptionThrower):
        (GetAttributeExceptionFunction):
        (GetAttributeExceptionThrower):
        (AddAdditionalArgumentsForImplementationCall):
        (GenerateEnumerationImplementationContent):
        (GenerateEnumerationHeaderContent):
        (GenerateDefaultValue):
        (GenerateDictionaryHeaderContent):
        (GenerateDictionaryImplementationContent):
        (GenerateHeader):
        (GenerateOverloadDispatcher):
        (addUnscopableProperties):
        (GenerateImplementation):
        (GenerateAttributeGetterBodyDefinition):
        (GenerateAttributeGetterTrampolineDefinition):
        (GenerateAttributeSetterBodyDefinition):
        (GenerateAttributeSetterTrampolineDefinition):
        (GenerateOperationTrampolineDefinition):
        (GenerateOperationBodyDefinition):
        (GenerateOperationDefinition):
        (GenerateSerializerDefinition):
        (GenerateLegacyCallerDefinitions):
        (GenerateLegacyCallerDefinition):
        (GenerateCallWithUsingReferences):
        (GenerateCallWithUsingPointers):
        (GenerateConstructorCallWithUsingPointers):
        (GenerateCallWith):
        (GenerateArgumentsCountCheck):
        (GenerateParametersCheck):
        (GenerateCallbackImplementationContent):
        (GenerateImplementationFunctionCall):
        (GenerateImplementationCustomFunctionCall):
        (GenerateIterableDefinition):
        (JSValueToNative):
        (ToNativeForFunctionWithoutTypeCheck):
        (NativeToJSValueDOMConvertNeedsState):
        (NativeToJSValueDOMConvertNeedsGlobalObject):
        (NativeToJSValueUsingReferences):
        (NativeToJSValueUsingPointers):
        (NativeToJSValue):
        (GeneratePrototypeDeclaration):
        (GenerateConstructorDefinitions):
        (GenerateConstructorDefinition):
        (GenerateConstructorHelperMethods):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::jsInterfaceNameConstructor):
        (WebCore::setJSInterfaceNameConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSInterfaceName.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLike::finishCreation):
        (WebCore::IDLAttribute<JSMapLike>::cast):
        (WebCore::IDLOperation<JSMapLike>::cast):
        (WebCore::jsMapLikeConstructor):
        (WebCore::setJSMapLikeConstructor):
        (WebCore::jsMapLikeSizeGetter):
        (WebCore::jsMapLikeSize):
        (WebCore::jsMapLikePrototypeFunctionGetBody):
        (WebCore::jsMapLikePrototypeFunctionGet):
        (WebCore::jsMapLikePrototypeFunctionHasBody):
        (WebCore::jsMapLikePrototypeFunctionHas):
        (WebCore::jsMapLikePrototypeFunctionEntriesBody):
        (WebCore::jsMapLikePrototypeFunctionEntries):
        (WebCore::jsMapLikePrototypeFunctionKeysBody):
        (WebCore::jsMapLikePrototypeFunctionKeys):
        (WebCore::jsMapLikePrototypeFunctionValuesBody):
        (WebCore::jsMapLikePrototypeFunctionValues):
        (WebCore::jsMapLikePrototypeFunctionForEachBody):
        (WebCore::jsMapLikePrototypeFunctionForEach):
        (WebCore::jsMapLikePrototypeFunctionAddBody):
        (WebCore::jsMapLikePrototypeFunctionAdd):
        (WebCore::jsMapLikePrototypeFunctionClearBody):
        (WebCore::jsMapLikePrototypeFunctionClear):
        (WebCore::jsMapLikePrototypeFunctionDeleteBody):
        (WebCore::jsMapLikePrototypeFunctionDelete):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSMapLike.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLike::finishCreation):
        (WebCore::IDLAttribute<JSReadOnlyMapLike>::cast):
        (WebCore::IDLOperation<JSReadOnlyMapLike>::cast):
        (WebCore::jsReadOnlyMapLikeConstructor):
        (WebCore::setJSReadOnlyMapLikeConstructor):
        (WebCore::jsReadOnlyMapLikeSizeGetter):
        (WebCore::jsReadOnlyMapLikeSize):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionGetBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionGet):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionHasBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionHas):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionEntriesBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionEntries):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionKeysBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionKeys):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionValuesBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionValues):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionForEachBody):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionForEach):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::IDLAttribute<JSTestActiveDOMObject>::cast):
        (WebCore::IDLOperation<JSTestActiveDOMObject>::cast):
        (WebCore::jsTestActiveDOMObjectConstructor):
        (WebCore::setJSTestActiveDOMObjectConstructor):
        (WebCore::jsTestActiveDOMObjectExcitingAttrGetter):
        (WebCore::jsTestActiveDOMObjectExcitingAttr):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessageBody):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::IDLAttribute<JSTestCEReactions>::cast):
        (WebCore::IDLOperation<JSTestCEReactions>::cast):
        (WebCore::jsTestCEReactionsConstructor):
        (WebCore::setJSTestCEReactionsConstructor):
        (WebCore::jsTestCEReactionsAttributeWithCEReactionsGetter):
        (WebCore::jsTestCEReactionsAttributeWithCEReactions):
        (WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter):
        (WebCore::setJSTestCEReactionsAttributeWithCEReactions):
        (WebCore::jsTestCEReactionsReflectAttributeWithCEReactionsGetter):
        (WebCore::jsTestCEReactionsReflectAttributeWithCEReactions):
        (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter):
        (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactions):
        (WebCore::jsTestCEReactionsStringifierAttributeGetter):
        (WebCore::jsTestCEReactionsStringifierAttribute):
        (WebCore::setJSTestCEReactionsStringifierAttributeSetter):
        (WebCore::setJSTestCEReactionsStringifierAttribute):
        (WebCore::jsTestCEReactionsAttributeWithCEReactionsNotNeededGetter):
        (WebCore::jsTestCEReactionsAttributeWithCEReactionsNotNeeded):
        (WebCore::setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter):
        (WebCore::setJSTestCEReactionsAttributeWithCEReactionsNotNeeded):
        (WebCore::jsTestCEReactionsReflectAttributeWithCEReactionsNotNeededGetter):
        (WebCore::jsTestCEReactionsReflectAttributeWithCEReactionsNotNeeded):
        (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter):
        (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeeded):
        (WebCore::jsTestCEReactionsStringifierAttributeNotNeededGetter):
        (WebCore::jsTestCEReactionsStringifierAttributeNotNeeded):
        (WebCore::setJSTestCEReactionsStringifierAttributeNotNeededSetter):
        (WebCore::setJSTestCEReactionsStringifierAttributeNotNeeded):
        (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsBody):
        (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactions):
        (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeededBody):
        (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeeded):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestCEReactions.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::IDLAttribute<JSTestCEReactionsStringifier>::cast):
        (WebCore::IDLOperation<JSTestCEReactionsStringifier>::cast):
        (WebCore::jsTestCEReactionsStringifierConstructor):
        (WebCore::setJSTestCEReactionsStringifierConstructor):
        (WebCore::jsTestCEReactionsStringifierValueGetter):
        (WebCore::jsTestCEReactionsStringifierValue):
        (WebCore::setJSTestCEReactionsStringifierValueSetter):
        (WebCore::setJSTestCEReactionsStringifierValue):
        (WebCore::jsTestCEReactionsStringifierValueWithoutReactionsGetter):
        (WebCore::jsTestCEReactionsStringifierValueWithoutReactions):
        (WebCore::setJSTestCEReactionsStringifierValueWithoutReactionsSetter):
        (WebCore::setJSTestCEReactionsStringifierValueWithoutReactions):
        (WebCore::jsTestCEReactionsStringifierPrototypeFunctionToStringBody):
        (WebCore::jsTestCEReactionsStringifierPrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::IDLAttribute<JSTestCallTracer>::cast):
        (WebCore::IDLOperation<JSTestCallTracer>::cast):
        (WebCore::jsTestCallTracerConstructor):
        (WebCore::setJSTestCallTracerConstructor):
        (WebCore::jsTestCallTracerTestAttributeInterfaceGetter):
        (WebCore::jsTestCallTracerTestAttributeInterface):
        (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
        (WebCore::setJSTestCallTracerTestAttributeInterface):
        (WebCore::jsTestCallTracerTestAttributeSpecifiedGetter):
        (WebCore::jsTestCallTracerTestAttributeSpecified):
        (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
        (WebCore::setJSTestCallTracerTestAttributeSpecified):
        (WebCore::jsTestCallTracerTestAttributeWithVariantGetter):
        (WebCore::jsTestCallTracerTestAttributeWithVariant):
        (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
        (WebCore::setJSTestCallTracerTestAttributeWithVariant):
        (WebCore::jsTestCallTracerTestReadonlyAttributeGetter):
        (WebCore::jsTestCallTracerTestReadonlyAttribute):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterface):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecified):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArguments):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgumentBody):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgument):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestCallTracer.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
        (WebCore::JSTestCallbackFunction::handleEvent):
        * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
        (WebCore::JSTestCallbackFunctionRethrow::handleEvent):
        * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
        (WebCore::JSTestCallbackFunctionWithThisObject::handleEvent):
        * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
        (WebCore::JSTestCallbackFunctionWithTypedefs::handleEvent):
        * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
        (WebCore::convertEnumerationToJS):
        (WebCore::parseEnumeration<TestCallbackInterface::Enum>):
        (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
        (WebCore::JSTestCallbackInterface::callbackWithNoParam):
        (WebCore::JSTestCallbackInterface::callbackWithArrayParam):
        (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam):
        (WebCore::JSTestCallbackInterface::callbackWithStringList):
        (WebCore::JSTestCallbackInterface::callbackWithBoolean):
        (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass):
        (WebCore::JSTestCallbackInterface::callbackWithAReturnValue):
        (WebCore::JSTestCallbackInterface::callbackThatRethrowsExceptions):
        (WebCore::JSTestCallbackInterface::callbackThatSkipsInvokeCheck):
        (WebCore::JSTestCallbackInterface::callbackWithThisObject):
        * bindings/scripts/test/JS/JSTestCallbackInterface.h:
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::jsTestClassWithJSBuiltinConstructorConstructor):
        (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::IDLAttribute<JSTestDOMJIT>::cast):
        (WebCore::IDLOperation<JSTestDOMJIT>::cast):
        (WebCore::jsTestDOMJITConstructor):
        (WebCore::setJSTestDOMJITConstructor):
        (WebCore::jsTestDOMJITAnyAttrGetter):
        (WebCore::jsTestDOMJITAnyAttr):
        (WebCore::jsTestDOMJITBooleanAttrGetter):
        (WebCore::jsTestDOMJITBooleanAttr):
        (WebCore::jsTestDOMJITByteAttrGetter):
        (WebCore::jsTestDOMJITByteAttr):
        (WebCore::jsTestDOMJITOctetAttrGetter):
        (WebCore::jsTestDOMJITOctetAttr):
        (WebCore::jsTestDOMJITShortAttrGetter):
        (WebCore::jsTestDOMJITShortAttr):
        (WebCore::jsTestDOMJITUnsignedShortAttrGetter):
        (WebCore::jsTestDOMJITUnsignedShortAttr):
        (WebCore::jsTestDOMJITLongAttrGetter):
        (WebCore::jsTestDOMJITLongAttr):
        (WebCore::jsTestDOMJITUnsignedLongAttrGetter):
        (WebCore::jsTestDOMJITUnsignedLongAttr):
        (WebCore::jsTestDOMJITLongLongAttrGetter):
        (WebCore::jsTestDOMJITLongLongAttr):
        (WebCore::jsTestDOMJITUnsignedLongLongAttrGetter):
        (WebCore::jsTestDOMJITUnsignedLongLongAttr):
        (WebCore::jsTestDOMJITFloatAttrGetter):
        (WebCore::jsTestDOMJITFloatAttr):
        (WebCore::jsTestDOMJITUnrestrictedFloatAttrGetter):
        (WebCore::jsTestDOMJITUnrestrictedFloatAttr):
        (WebCore::jsTestDOMJITDoubleAttrGetter):
        (WebCore::jsTestDOMJITDoubleAttr):
        (WebCore::jsTestDOMJITUnrestrictedDoubleAttrGetter):
        (WebCore::jsTestDOMJITUnrestrictedDoubleAttr):
        (WebCore::jsTestDOMJITDomStringAttrGetter):
        (WebCore::jsTestDOMJITDomStringAttr):
        (WebCore::jsTestDOMJITByteStringAttrGetter):
        (WebCore::jsTestDOMJITByteStringAttr):
        (WebCore::jsTestDOMJITUsvStringAttrGetter):
        (WebCore::jsTestDOMJITUsvStringAttr):
        (WebCore::jsTestDOMJITNodeAttrGetter):
        (WebCore::jsTestDOMJITNodeAttr):
        (WebCore::jsTestDOMJITBooleanNullableAttrGetter):
        (WebCore::jsTestDOMJITBooleanNullableAttr):
        (WebCore::jsTestDOMJITByteNullableAttrGetter):
        (WebCore::jsTestDOMJITByteNullableAttr):
        (WebCore::jsTestDOMJITOctetNullableAttrGetter):
        (WebCore::jsTestDOMJITOctetNullableAttr):
        (WebCore::jsTestDOMJITShortNullableAttrGetter):
        (WebCore::jsTestDOMJITShortNullableAttr):
        (WebCore::jsTestDOMJITUnsignedShortNullableAttrGetter):
        (WebCore::jsTestDOMJITUnsignedShortNullableAttr):
        (WebCore::jsTestDOMJITLongNullableAttrGetter):
        (WebCore::jsTestDOMJITLongNullableAttr):
        (WebCore::jsTestDOMJITUnsignedLongNullableAttrGetter):
        (WebCore::jsTestDOMJITUnsignedLongNullableAttr):
        (WebCore::jsTestDOMJITLongLongNullableAttrGetter):
        (WebCore::jsTestDOMJITLongLongNullableAttr):
        (WebCore::jsTestDOMJITUnsignedLongLongNullableAttrGetter):
        (WebCore::jsTestDOMJITUnsignedLongLongNullableAttr):
        (WebCore::jsTestDOMJITFloatNullableAttrGetter):
        (WebCore::jsTestDOMJITFloatNullableAttr):
        (WebCore::jsTestDOMJITUnrestrictedFloatNullableAttrGetter):
        (WebCore::jsTestDOMJITUnrestrictedFloatNullableAttr):
        (WebCore::jsTestDOMJITDoubleNullableAttrGetter):
        (WebCore::jsTestDOMJITDoubleNullableAttr):
        (WebCore::jsTestDOMJITUnrestrictedDoubleNullableAttrGetter):
        (WebCore::jsTestDOMJITUnrestrictedDoubleNullableAttr):
        (WebCore::jsTestDOMJITDomStringNullableAttrGetter):
        (WebCore::jsTestDOMJITDomStringNullableAttr):
        (WebCore::jsTestDOMJITByteStringNullableAttrGetter):
        (WebCore::jsTestDOMJITByteStringNullableAttr):
        (WebCore::jsTestDOMJITUsvStringNullableAttrGetter):
        (WebCore::jsTestDOMJITUsvStringNullableAttr):
        (WebCore::jsTestDOMJITNodeNullableAttrGetter):
        (WebCore::jsTestDOMJITNodeNullableAttr):
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttribute):
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionItemBody):
        (WebCore::jsTestDOMJITPrototypeFunctionItem):
        (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeBody):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttribute):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementById):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameBody):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByName):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
        * bindings/scripts/test/JS/JSTestDerivedDictionary.cpp:
        (WebCore::convertDictionary<TestDerivedDictionary>):
        (WebCore::convertDictionaryToJS):
        * bindings/scripts/test/JS/JSTestDerivedDictionary.h:
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
        (WebCore::IDLAttribute<JSTestEnabledBySetting>::cast):
        (WebCore::IDLOperation<JSTestEnabledBySetting>::cast):
        (WebCore::jsTestEnabledBySettingConstructor):
        (WebCore::setJSTestEnabledBySettingConstructor):
        (WebCore::jsTestEnabledBySettingTestSubObjEnabledBySettingConstructorGetter):
        (WebCore::jsTestEnabledBySettingTestSubObjEnabledBySettingConstructor):
        (WebCore::setJSTestEnabledBySettingTestSubObjEnabledBySettingConstructorSetter):
        (WebCore::setJSTestEnabledBySettingTestSubObjEnabledBySettingConstructor):
        (WebCore::jsTestEnabledBySettingEnabledBySettingAttributeGetter):
        (WebCore::jsTestEnabledBySettingEnabledBySettingAttribute):
        (WebCore::setJSTestEnabledBySettingEnabledBySettingAttributeSetter):
        (WebCore::setJSTestEnabledBySettingEnabledBySettingAttribute):
        (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperationBody):
        (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperation):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::IDLAttribute<JSTestEnabledForContext>::cast):
        (WebCore::jsTestEnabledForContextConstructor):
        (WebCore::setJSTestEnabledForContextConstructor):
        (WebCore::jsTestEnabledForContextTestSubObjEnabledForContextConstructorGetter):
        (WebCore::jsTestEnabledForContextTestSubObjEnabledForContextConstructor):
        (WebCore::setJSTestEnabledForContextTestSubObjEnabledForContextConstructorSetter):
        (WebCore::setJSTestEnabledForContextTestSubObjEnabledForContextConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestEnabledForContext.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::convertDictionary<TestEventConstructor::Init>):
        (WebCore::JSTestEventConstructorConstructor::construct):
        (WebCore::IDLAttribute<JSTestEventConstructor>::cast):
        (WebCore::jsTestEventConstructorConstructor):
        (WebCore::setJSTestEventConstructorConstructor):
        (WebCore::jsTestEventConstructorAttr1Getter):
        (WebCore::jsTestEventConstructorAttr1):
        (WebCore::jsTestEventConstructorAttr2Getter):
        (WebCore::jsTestEventConstructorAttr2):
        (WebCore::jsTestEventConstructorAttr3Getter):
        (WebCore::jsTestEventConstructorAttr3):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestEventConstructor.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTarget::getOwnPropertySlot):
        (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
        (WebCore::JSTestEventTarget::getOwnPropertyNames):
        (WebCore::IDLOperation<JSTestEventTarget>::cast):
        (WebCore::jsTestEventTargetConstructor):
        (WebCore::setJSTestEventTargetConstructor):
        (WebCore::jsTestEventTargetPrototypeFunctionItemBody):
        (WebCore::jsTestEventTargetPrototypeFunctionItem):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::IDLAttribute<JSTestException>::cast):
        (WebCore::jsTestExceptionConstructor):
        (WebCore::setJSTestExceptionConstructor):
        (WebCore::jsTestExceptionNameGetter):
        (WebCore::jsTestExceptionName):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestException.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
        (WebCore::IDLAttribute<JSTestGenerateIsReachable>::cast):
        (WebCore::jsTestGenerateIsReachableConstructor):
        (WebCore::setJSTestGenerateIsReachableConstructor):
        (WebCore::jsTestGenerateIsReachableASecretAttributeGetter):
        (WebCore::jsTestGenerateIsReachableASecretAttribute):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::IDLAttribute<JSTestGlobalObject>::cast):
        (WebCore::IDLOperation<JSTestGlobalObject>::cast):
        (WebCore::jsTestGlobalObjectConstructor):
        (WebCore::setJSTestGlobalObjectConstructor):
        (WebCore::jsTestGlobalObjectRegularAttributeGetter):
        (WebCore::jsTestGlobalObjectRegularAttribute):
        (WebCore::setJSTestGlobalObjectRegularAttributeSetter):
        (WebCore::setJSTestGlobalObjectRegularAttribute):
        (WebCore::jsTestGlobalObjectPublicAndPrivateAttributeGetter):
        (WebCore::jsTestGlobalObjectPublicAndPrivateAttribute):
        (WebCore::setJSTestGlobalObjectPublicAndPrivateAttributeSetter):
        (WebCore::setJSTestGlobalObjectPublicAndPrivateAttribute):
        (WebCore::jsTestGlobalObjectPublicAndPrivateConditionalAttributeGetter):
        (WebCore::jsTestGlobalObjectPublicAndPrivateConditionalAttribute):
        (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttributeSetter):
        (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttribute):
        (WebCore::jsTestGlobalObjectEnabledAtRuntimeAttributeGetter):
        (WebCore::jsTestGlobalObjectEnabledAtRuntimeAttribute):
        (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttributeSetter):
        (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttribute):
        (WebCore::jsTestGlobalObjectTestCEReactionsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestCEReactionsConstructor):
        (WebCore::setJSTestGlobalObjectTestCEReactionsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCEReactionsConstructor):
        (WebCore::jsTestGlobalObjectTestCEReactionsStringifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestCEReactionsStringifierConstructor):
        (WebCore::setJSTestGlobalObjectTestCEReactionsStringifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCEReactionsStringifierConstructor):
        (WebCore::jsTestGlobalObjectTestCallTracerConstructorGetter):
        (WebCore::jsTestGlobalObjectTestCallTracerConstructor):
        (WebCore::setJSTestGlobalObjectTestCallTracerConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCallTracerConstructor):
        (WebCore::jsTestGlobalObjectTestCallbackInterfaceConstructorGetter):
        (WebCore::jsTestGlobalObjectTestCallbackInterfaceConstructor):
        (WebCore::setJSTestGlobalObjectTestCallbackInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCallbackInterfaceConstructor):
        (WebCore::jsTestGlobalObjectTestClassWithJSBuiltinConstructorConstructorGetter):
        (WebCore::jsTestGlobalObjectTestClassWithJSBuiltinConstructorConstructor):
        (WebCore::setJSTestGlobalObjectTestClassWithJSBuiltinConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestClassWithJSBuiltinConstructorConstructor):
        (WebCore::jsTestGlobalObjectTestDOMJITConstructorGetter):
        (WebCore::jsTestGlobalObjectTestDOMJITConstructor):
        (WebCore::setJSTestGlobalObjectTestDOMJITConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestDOMJITConstructor):
        (WebCore::jsTestGlobalObjectTestDomainSecurityConstructorGetter):
        (WebCore::jsTestGlobalObjectTestDomainSecurityConstructor):
        (WebCore::setJSTestGlobalObjectTestDomainSecurityConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestDomainSecurityConstructor):
        (WebCore::jsTestGlobalObjectTestEnabledBySettingConstructorGetter):
        (WebCore::jsTestGlobalObjectTestEnabledBySettingConstructor):
        (WebCore::setJSTestGlobalObjectTestEnabledBySettingConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEnabledBySettingConstructor):
        (WebCore::jsTestGlobalObjectTestEnabledForContextConstructorGetter):
        (WebCore::jsTestGlobalObjectTestEnabledForContextConstructor):
        (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructor):
        (WebCore::jsTestGlobalObjectTestEventConstructorConstructorGetter):
        (WebCore::jsTestGlobalObjectTestEventConstructorConstructor):
        (WebCore::setJSTestGlobalObjectTestEventConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEventConstructorConstructor):
        (WebCore::jsTestGlobalObjectTestEventTargetConstructorGetter):
        (WebCore::jsTestGlobalObjectTestEventTargetConstructor):
        (WebCore::setJSTestGlobalObjectTestEventTargetConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEventTargetConstructor):
        (WebCore::jsTestGlobalObjectTestExceptionConstructorGetter):
        (WebCore::jsTestGlobalObjectTestExceptionConstructor):
        (WebCore::setJSTestGlobalObjectTestExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestExceptionConstructor):
        (WebCore::jsTestGlobalObjectTestGenerateIsReachableConstructorGetter):
        (WebCore::jsTestGlobalObjectTestGenerateIsReachableConstructor):
        (WebCore::setJSTestGlobalObjectTestGenerateIsReachableConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestGenerateIsReachableConstructor):
        (WebCore::jsTestGlobalObjectTestGlobalObjectConstructorGetter):
        (WebCore::jsTestGlobalObjectTestGlobalObjectConstructor):
        (WebCore::setJSTestGlobalObjectTestGlobalObjectConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestGlobalObjectConstructor):
        (WebCore::jsTestGlobalObjectTestIndexedSetterNoIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestIndexedSetterNoIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterNoIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestIndexedSetterThrowingExceptionConstructorGetter):
        (WebCore::jsTestGlobalObjectTestIndexedSetterThrowingExceptionConstructor):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterThrowingExceptionConstructor):
        (WebCore::jsTestGlobalObjectTestIndexedSetterWithIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestIndexedSetterWithIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterWithIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestInterfaceConstructorGetter):
        (WebCore::jsTestGlobalObjectTestInterfaceConstructor):
        (WebCore::setJSTestGlobalObjectTestInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestInterfaceConstructor):
        (WebCore::jsTestGlobalObjectTestInterfaceLeadingUnderscoreConstructorGetter):
        (WebCore::jsTestGlobalObjectTestInterfaceLeadingUnderscoreConstructor):
        (WebCore::setJSTestGlobalObjectTestInterfaceLeadingUnderscoreConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestInterfaceLeadingUnderscoreConstructor):
        (WebCore::jsTestGlobalObjectTestIterableConstructorGetter):
        (WebCore::jsTestGlobalObjectTestIterableConstructor):
        (WebCore::setJSTestGlobalObjectTestIterableConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIterableConstructor):
        (WebCore::jsTestGlobalObjectTestJSBuiltinConstructorConstructorGetter):
        (WebCore::jsTestGlobalObjectTestJSBuiltinConstructorConstructor):
        (WebCore::setJSTestGlobalObjectTestJSBuiltinConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestJSBuiltinConstructorConstructor):
        (WebCore::jsTestGlobalObjectTestMapLikeConstructorGetter):
        (WebCore::jsTestGlobalObjectTestMapLikeConstructor):
        (WebCore::setJSTestGlobalObjectTestMapLikeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestMapLikeConstructor):
        (WebCore::jsTestGlobalObjectTestMediaQueryListListenerConstructorGetter):
        (WebCore::jsTestGlobalObjectTestMediaQueryListListenerConstructor):
        (WebCore::setJSTestGlobalObjectTestMediaQueryListListenerConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestMediaQueryListListenerConstructor):
        (WebCore::jsTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructor):
        (WebCore::jsTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedConstructorConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedConstructorConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedConstructorConstructor):
        (WebCore::jsTestGlobalObjectAudioConstructorGetter):
        (WebCore::jsTestGlobalObjectAudioConstructor):
        (WebCore::setJSTestGlobalObjectAudioConstructorSetter):
        (WebCore::setJSTestGlobalObjectAudioConstructor):
        (WebCore::jsTestGlobalObjectTestNamedDeleterNoIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedDeleterNoIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterNoIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedDeleterThrowingExceptionConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedDeleterThrowingExceptionConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterThrowingExceptionConstructor):
        (WebCore::jsTestGlobalObjectTestNamedDeleterWithIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedDeleterWithIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructor):
        (WebCore::jsTestGlobalObjectTestNamedGetterCallWithConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedGetterCallWithConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedGetterCallWithConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedGetterCallWithConstructor):
        (WebCore::jsTestGlobalObjectTestNamedGetterNoIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedGetterNoIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedGetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedGetterNoIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedGetterWithIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedGetterWithIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedGetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedGetterWithIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterNoIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterNoIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterNoIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterThrowingExceptionConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterThrowingExceptionConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterThrowingExceptionConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithIdentifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithIdentifierConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIdentifierConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithIndexedGetterConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithIndexedGetterConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructor):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):
        (WebCore::jsTestGlobalObjectTestOverloadedConstructorsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestOverloadedConstructorsConstructor):
        (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsConstructor):
        (WebCore::jsTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructorGetter):
        (WebCore::jsTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructor):
        (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructor):
        (WebCore::jsTestGlobalObjectTestOverrideBuiltinsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestOverrideBuiltinsConstructor):
        (WebCore::setJSTestGlobalObjectTestOverrideBuiltinsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestOverrideBuiltinsConstructor):
        (WebCore::jsTestGlobalObjectTestPluginInterfaceConstructorGetter):
        (WebCore::jsTestGlobalObjectTestPluginInterfaceConstructor):
        (WebCore::setJSTestGlobalObjectTestPluginInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestPluginInterfaceConstructor):
        (WebCore::jsTestGlobalObjectTestReadOnlyMapLikeConstructorGetter):
        (WebCore::jsTestGlobalObjectTestReadOnlyMapLikeConstructor):
        (WebCore::setJSTestGlobalObjectTestReadOnlyMapLikeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestReadOnlyMapLikeConstructor):
        (WebCore::jsTestGlobalObjectTestReportExtraMemoryCostConstructorGetter):
        (WebCore::jsTestGlobalObjectTestReportExtraMemoryCostConstructor):
        (WebCore::setJSTestGlobalObjectTestReportExtraMemoryCostConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestReportExtraMemoryCostConstructor):
        (WebCore::jsTestGlobalObjectTestSerializationConstructorGetter):
        (WebCore::jsTestGlobalObjectTestSerializationConstructor):
        (WebCore::setJSTestGlobalObjectTestSerializationConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationConstructor):
        (WebCore::jsTestGlobalObjectTestSerializationIndirectInheritanceConstructorGetter):
        (WebCore::jsTestGlobalObjectTestSerializationIndirectInheritanceConstructor):
        (WebCore::setJSTestGlobalObjectTestSerializationIndirectInheritanceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationIndirectInheritanceConstructor):
        (WebCore::jsTestGlobalObjectTestSerializationInheritConstructorGetter):
        (WebCore::jsTestGlobalObjectTestSerializationInheritConstructor):
        (WebCore::setJSTestGlobalObjectTestSerializationInheritConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationInheritConstructor):
        (WebCore::jsTestGlobalObjectTestSerializationInheritFinalConstructorGetter):
        (WebCore::jsTestGlobalObjectTestSerializationInheritFinalConstructor):
        (WebCore::setJSTestGlobalObjectTestSerializationInheritFinalConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationInheritFinalConstructor):
        (WebCore::jsTestGlobalObjectTestSerializedScriptValueInterfaceConstructorGetter):
        (WebCore::jsTestGlobalObjectTestSerializedScriptValueInterfaceConstructor):
        (WebCore::setJSTestGlobalObjectTestSerializedScriptValueInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializedScriptValueInterfaceConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierAnonymousOperationConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierAnonymousOperationConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierAnonymousOperationConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierAnonymousOperationConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierNamedOperationConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierNamedOperationConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierNamedOperationConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierNamedOperationConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierOperationImplementedAsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierOperationImplementedAsConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierOperationImplementedAsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierOperationImplementedAsConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierOperationNamedToStringConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierOperationNamedToStringConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierOperationNamedToStringConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierOperationNamedToStringConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierReadOnlyAttributeConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierReadOnlyAttributeConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierReadOnlyAttributeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierReadOnlyAttributeConstructor):
        (WebCore::jsTestGlobalObjectTestStringifierReadWriteAttributeConstructorGetter):
        (WebCore::jsTestGlobalObjectTestStringifierReadWriteAttributeConstructor):
        (WebCore::setJSTestGlobalObjectTestStringifierReadWriteAttributeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierReadWriteAttributeConstructor):
        (WebCore::jsTestGlobalObjectTestTypedefsConstructorGetter):
        (WebCore::jsTestGlobalObjectTestTypedefsConstructor):
        (WebCore::setJSTestGlobalObjectTestTypedefsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestTypedefsConstructor):
        (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperationBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1Body):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2Body):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperationOverloadDispatcher):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
        (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStaticBody):
        (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStatic):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorld):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabled):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabledBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabled):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunctionBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
        (WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResultBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
        (WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBoolean):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBoolean):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertySlot):
        (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestIndexedSetterNoIdentifier::put):
        (WebCore::JSTestIndexedSetterNoIdentifier::putByIndex):
        (WebCore::JSTestIndexedSetterNoIdentifier::defineOwnProperty):
        (WebCore::jsTestIndexedSetterNoIdentifierConstructor):
        (WebCore::setJSTestIndexedSetterNoIdentifierConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertySlot):
        (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestIndexedSetterThrowingException::put):
        (WebCore::JSTestIndexedSetterThrowingException::putByIndex):
        (WebCore::JSTestIndexedSetterThrowingException::defineOwnProperty):
        (WebCore::jsTestIndexedSetterThrowingExceptionConstructor):
        (WebCore::setJSTestIndexedSetterThrowingExceptionConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertySlot):
        (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestIndexedSetterWithIdentifier::put):
        (WebCore::JSTestIndexedSetterWithIdentifier::putByIndex):
        (WebCore::JSTestIndexedSetterWithIdentifier::defineOwnProperty):
        (WebCore::IDLOperation<JSTestIndexedSetterWithIdentifier>::cast):
        (WebCore::jsTestIndexedSetterWithIdentifierConstructor):
        (WebCore::setJSTestIndexedSetterWithIdentifierConstructor):
        (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
        (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetter):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestInheritedDictionary.cpp:
        (WebCore::convertDictionary<TestInheritedDictionary>):
        (WebCore::convertDictionaryToJS):
        * bindings/scripts/test/JS/JSTestInheritedDictionary.h:
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::construct):
        (WebCore::IDLAttribute<JSTestInterface>::cast):
        (WebCore::IDLOperation<JSTestInterface>::cast):
        (WebCore::jsTestInterfaceConstructor):
        (WebCore::setJSTestInterfaceConstructor):
        (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter):
        (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
        (WebCore::jsTestInterfaceConstructorImplementsStaticAttrGetter):
        (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
        (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter):
        (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
        (WebCore::jsTestInterfaceImplementsStr1Getter):
        (WebCore::jsTestInterfaceImplementsStr1):
        (WebCore::jsTestInterfaceImplementsStr2Getter):
        (WebCore::jsTestInterfaceImplementsStr2):
        (WebCore::setJSTestInterfaceImplementsStr2Setter):
        (WebCore::setJSTestInterfaceImplementsStr2):
        (WebCore::jsTestInterfaceImplementsStr3Getter):
        (WebCore::jsTestInterfaceImplementsStr3):
        (WebCore::setJSTestInterfaceImplementsStr3Setter):
        (WebCore::setJSTestInterfaceImplementsStr3):
        (WebCore::jsTestInterfaceImplementsNodeGetter):
        (WebCore::jsTestInterfaceImplementsNode):
        (WebCore::setJSTestInterfaceImplementsNodeSetter):
        (WebCore::setJSTestInterfaceImplementsNode):
        (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttrGetter):
        (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
        (WebCore::jsTestInterfaceConstructorSupplementalStaticAttrGetter):
        (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
        (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttrSetter):
        (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
        (WebCore::jsTestInterfaceSupplementalStr1Getter):
        (WebCore::jsTestInterfaceSupplementalStr1):
        (WebCore::jsTestInterfaceSupplementalStr2Getter):
        (WebCore::jsTestInterfaceSupplementalStr2):
        (WebCore::setJSTestInterfaceSupplementalStr2Setter):
        (WebCore::setJSTestInterfaceSupplementalStr2):
        (WebCore::jsTestInterfaceSupplementalStr3Getter):
        (WebCore::jsTestInterfaceSupplementalStr3):
        (WebCore::setJSTestInterfaceSupplementalStr3Setter):
        (WebCore::setJSTestInterfaceSupplementalStr3):
        (WebCore::jsTestInterfaceSupplementalNodeGetter):
        (WebCore::jsTestInterfaceSupplementalNode):
        (WebCore::setJSTestInterfaceSupplementalNodeSetter):
        (WebCore::setJSTestInterfaceSupplementalNode):
        (WebCore::jsTestInterfaceReflectAttributeGetter):
        (WebCore::jsTestInterfaceReflectAttribute):
        (WebCore::setJSTestInterfaceReflectAttributeSetter):
        (WebCore::setJSTestInterfaceReflectAttribute):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1Body):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3Body):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
        (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4Body):
        (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
        (WebCore::jsTestInterfacePrototypeFunctionTakeNodesBody):
        (WebCore::jsTestInterfacePrototypeFunctionTakeNodes):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1Body):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2Body):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3Body):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
        (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4Body):
        (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestInterface.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::IDLAttribute<JSTestInterfaceLeadingUnderscore>::cast):
        (WebCore::jsTestInterfaceLeadingUnderscoreConstructor):
        (WebCore::setJSTestInterfaceLeadingUnderscoreConstructor):
        (WebCore::jsTestInterfaceLeadingUnderscoreReadonlyGetter):
        (WebCore::jsTestInterfaceLeadingUnderscoreReadonly):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::IDLOperation<JSTestIterable>::cast):
        (WebCore::jsTestIterableConstructor):
        (WebCore::setJSTestIterableConstructor):
        (WebCore::jsTestIterablePrototypeFunctionEntriesCaller):
        (WebCore::jsTestIterablePrototypeFunctionEntries):
        (WebCore::jsTestIterablePrototypeFunctionKeysCaller):
        (WebCore::jsTestIterablePrototypeFunctionKeys):
        (WebCore::jsTestIterablePrototypeFunctionValuesCaller):
        (WebCore::jsTestIterablePrototypeFunctionValues):
        (WebCore::jsTestIterablePrototypeFunctionForEachCaller):
        (WebCore::jsTestIterablePrototypeFunctionForEach):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestIterable.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::IDLAttribute<JSTestJSBuiltinConstructor>::cast):
        (WebCore::IDLOperation<JSTestJSBuiltinConstructor>::cast):
        (WebCore::jsTestJSBuiltinConstructorConstructor):
        (WebCore::setJSTestJSBuiltinConstructorConstructor):
        (WebCore::jsTestJSBuiltinConstructorTestAttributeCustomGetter):
        (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
        (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustomGetter):
        (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
        (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustomSetter):
        (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
        (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunctionBody):
        (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::IDLOperation<JSTestMediaQueryListListener>::cast):
        (WebCore::jsTestMediaQueryListListenerConstructor):
        (WebCore::setJSTestMediaQueryListListenerConstructor):
        (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethodBody):
        (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::put):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::defineOwnProperty):
        (WebCore::jsTestNamedAndIndexedSetterNoIdentifierConstructor):
        (WebCore::setJSTestNamedAndIndexedSetterNoIdentifierConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlot):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::put):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::defineOwnProperty):
        (WebCore::jsTestNamedAndIndexedSetterThrowingExceptionConstructor):
        (WebCore::setJSTestNamedAndIndexedSetterThrowingExceptionConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::put):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::defineOwnProperty):
        (WebCore::IDLOperation<JSTestNamedAndIndexedSetterWithIdentifier>::cast):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierConstructor):
        (WebCore::setJSTestNamedAndIndexedSetterWithIdentifierConstructor):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetter):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetterBody):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetter):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorNamedConstructor::construct):
        (WebCore::jsTestNamedConstructorConstructor):
        (WebCore::setJSTestNamedConstructorConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedConstructor.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterNoIdentifier::deleteProperty):
        (WebCore::JSTestNamedDeleterNoIdentifier::deletePropertyByIndex):
        (WebCore::jsTestNamedDeleterNoIdentifierConstructor):
        (WebCore::setJSTestNamedDeleterNoIdentifierConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlot):
        (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterThrowingException::deleteProperty):
        (WebCore::JSTestNamedDeleterThrowingException::deletePropertyByIndex):
        (WebCore::jsTestNamedDeleterThrowingExceptionConstructor):
        (WebCore::setJSTestNamedDeleterThrowingExceptionConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterWithIdentifier::deleteProperty):
        (WebCore::JSTestNamedDeleterWithIdentifier::deletePropertyByIndex):
        (WebCore::IDLOperation<JSTestNamedDeleterWithIdentifier>::cast):
        (WebCore::jsTestNamedDeleterWithIdentifierConstructor):
        (WebCore::setJSTestNamedDeleterWithIdentifierConstructor):
        (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleterBody):
        (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleter):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlot):
        (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterWithIndexedGetter::deleteProperty):
        (WebCore::JSTestNamedDeleterWithIndexedGetter::deletePropertyByIndex):
        (WebCore::jsTestNamedDeleterWithIndexedGetterConstructor):
        (WebCore::setJSTestNamedDeleterWithIndexedGetterConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlot):
        (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedGetterCallWith::getOwnPropertyNames):
        (WebCore::jsTestNamedGetterCallWithConstructor):
        (WebCore::setJSTestNamedGetterCallWithConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertyNames):
        (WebCore::jsTestNamedGetterNoIdentifierConstructor):
        (WebCore::setJSTestNamedGetterNoIdentifierConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertyNames):
        (WebCore::IDLOperation<JSTestNamedGetterWithIdentifier>::cast):
        (WebCore::jsTestNamedGetterWithIdentifierConstructor):
        (WebCore::setJSTestNamedGetterWithIdentifierConstructor):
        (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterNameBody):
        (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterName):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterNoIdentifier::put):
        (WebCore::JSTestNamedSetterNoIdentifier::putByIndex):
        (WebCore::JSTestNamedSetterNoIdentifier::defineOwnProperty):
        (WebCore::jsTestNamedSetterNoIdentifierConstructor):
        (WebCore::setJSTestNamedSetterNoIdentifierConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterThrowingException::put):
        (WebCore::JSTestNamedSetterThrowingException::putByIndex):
        (WebCore::JSTestNamedSetterThrowingException::defineOwnProperty):
        (WebCore::jsTestNamedSetterThrowingExceptionConstructor):
        (WebCore::setJSTestNamedSetterThrowingExceptionConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithIdentifier::put):
        (WebCore::JSTestNamedSetterWithIdentifier::putByIndex):
        (WebCore::JSTestNamedSetterWithIdentifier::defineOwnProperty):
        (WebCore::IDLOperation<JSTestNamedSetterWithIdentifier>::cast):
        (WebCore::jsTestNamedSetterWithIdentifierConstructor):
        (WebCore::setJSTestNamedSetterWithIdentifierConstructor):
        (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetter):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithIndexedGetter::put):
        (WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex):
        (WebCore::JSTestNamedSetterWithIndexedGetter::defineOwnProperty):
        (WebCore::IDLOperation<JSTestNamedSetterWithIndexedGetter>::cast):
        (WebCore::jsTestNamedSetterWithIndexedGetterConstructor):
        (WebCore::setJSTestNamedSetterWithIndexedGetterConstructor):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetter):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetter):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::put):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::defineOwnProperty):
        (WebCore::IDLOperation<JSTestNamedSetterWithIndexedGetterAndSetter>::cast):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterConstructor):
        (WebCore::setJSTestNamedSetterWithIndexedGetterAndSetterConstructor):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetterBody):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetter):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter1Body):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter2Body):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetterOverloadDispatcher):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::put):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::putByIndex):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::defineOwnProperty):
        (WebCore::jsTestNamedSetterWithOverrideBuiltinsConstructor):
        (WebCore::setJSTestNamedSetterWithOverrideBuiltinsConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::put):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::putByIndex):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::defineOwnProperty):
        (WebCore::IDLAttribute<JSTestNamedSetterWithUnforgableProperties>::cast):
        (WebCore::IDLOperation<JSTestNamedSetterWithUnforgableProperties>::cast):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesConstructor):
        (WebCore::setJSTestNamedSetterWithUnforgablePropertiesConstructor):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesUnforgeableAttributeGetter):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesUnforgeableAttribute):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesInstanceFunctionUnforgeableOperationBody):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesInstanceFunctionUnforgeableOperation):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlot):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::put):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::putByIndex):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::defineOwnProperty):
        (WebCore::IDLAttribute<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::cast):
        (WebCore::IDLOperation<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::cast):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):
        (WebCore::setJSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttributeGetter):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperationBody):
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperation):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNodeConstructor::construct):
        (WebCore::JSTestNodePrototype::finishCreation):
        (WebCore::IDLAttribute<JSTestNode>::cast):
        (WebCore::IDLOperation<JSTestNode>::cast):
        (WebCore::jsTestNodeConstructor):
        (WebCore::setJSTestNodeConstructor):
        (WebCore::jsTestNodeNameGetter):
        (WebCore::jsTestNodeName):
        (WebCore::setJSTestNodeNameSetter):
        (WebCore::setJSTestNodeName):
        (WebCore::jsTestNodePrototypeFunctionTestWorkerPromiseBody):
        (WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
        (WebCore::jsTestNodePrototypeFunctionCalculateSecretResultBody):
        (WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
        (WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
        (WebCore::jsTestNodePrototypeFunctionGetSecretBoolean):
        (WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
        (WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBoolean):
        (WebCore::jsTestNodePrototypeFunctionEntriesCaller):
        (WebCore::jsTestNodePrototypeFunctionEntries):
        (WebCore::jsTestNodePrototypeFunctionKeysCaller):
        (WebCore::jsTestNodePrototypeFunctionKeys):
        (WebCore::jsTestNodePrototypeFunctionValuesCaller):
        (WebCore::jsTestNodePrototypeFunctionValues):
        (WebCore::jsTestNodePrototypeFunctionForEachCaller):
        (WebCore::jsTestNodePrototypeFunctionForEach):
        (WebCore::JSTestNode::serialize):
        (WebCore::jsTestNodePrototypeFunctionToJSONBody):
        (WebCore::jsTestNodePrototypeFunctionToJSON):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestNode.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::convertEnumerationToJS):
        (WebCore::parseEnumeration<TestObj::EnumType>):
        (WebCore::parseEnumeration<TestObj::Optional>):
        (WebCore::parseEnumeration<AlternateEnumName>):
        (WebCore::parseEnumeration<TestObj::EnumA>):
        (WebCore::parseEnumeration<TestObj::EnumB>):
        (WebCore::parseEnumeration<TestObj::EnumC>):
        (WebCore::parseEnumeration<TestObj::Kind>):
        (WebCore::parseEnumeration<TestObj::Size>):
        (WebCore::parseEnumeration<TestObj::Confidence>):
        (WebCore::convertDictionary<TestObj::Dictionary>):
        (WebCore::convertDictionaryToJS):
        (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
        (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
        (WebCore::convertDictionary<AlternateDictionaryName>):
        (WebCore::convertDictionary<TestObj::ParentDictionary>):
        (WebCore::convertDictionary<TestObj::ChildDictionary>):
        (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
        (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
        (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
        (WebCore::JSTestObjConstructor::construct):
        (WebCore::JSTestObjConstructor::initializeProperties):
        (WebCore::JSTestObjPrototype::finishCreation):
        (WebCore::JSTestObj::getOwnPropertySlot):
        (WebCore::JSTestObj::getOwnPropertySlotByIndex):
        (WebCore::JSTestObj::getOwnPropertyNames):
        (WebCore::callJSTestObj1):
        (WebCore::callJSTestObj2):
        (WebCore::callJSTestObj3):
        (WebCore::callJSTestObj):
        (WebCore::IDLAttribute<JSTestObj>::cast):
        (WebCore::IDLOperation<JSTestObj>::cast):
        (WebCore::jsTestObjConstructor):
        (WebCore::setJSTestObjConstructor):
        (WebCore::jsTestObjReadOnlyLongAttrGetter):
        (WebCore::jsTestObjReadOnlyLongAttr):
        (WebCore::jsTestObjReadOnlyStringAttrGetter):
        (WebCore::jsTestObjReadOnlyStringAttr):
        (WebCore::jsTestObjReadOnlyTestObjAttrGetter):
        (WebCore::jsTestObjReadOnlyTestObjAttr):
        (WebCore::jsTestObjConstructorStaticReadOnlyLongAttrGetter):
        (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
        (WebCore::jsTestObjConstructorStaticStringAttrGetter):
        (WebCore::jsTestObjConstructorStaticStringAttr):
        (WebCore::setJSTestObjConstructorStaticStringAttrSetter):
        (WebCore::setJSTestObjConstructorStaticStringAttr):
        (WebCore::jsTestObjConstructorTestSubObjGetter):
        (WebCore::jsTestObjConstructorTestSubObj):
        (WebCore::jsTestObjConstructorTestStaticReadonlyObjGetter):
        (WebCore::jsTestObjConstructorTestStaticReadonlyObj):
        (WebCore::jsTestObjEnumAttrGetter):
        (WebCore::jsTestObjEnumAttr):
        (WebCore::setJSTestObjEnumAttrSetter):
        (WebCore::setJSTestObjEnumAttr):
        (WebCore::jsTestObjByteAttrGetter):
        (WebCore::jsTestObjByteAttr):
        (WebCore::setJSTestObjByteAttrSetter):
        (WebCore::setJSTestObjByteAttr):
        (WebCore::jsTestObjOctetAttrGetter):
        (WebCore::jsTestObjOctetAttr):
        (WebCore::setJSTestObjOctetAttrSetter):
        (WebCore::setJSTestObjOctetAttr):
        (WebCore::jsTestObjShortAttrGetter):
        (WebCore::jsTestObjShortAttr):
        (WebCore::setJSTestObjShortAttrSetter):
        (WebCore::setJSTestObjShortAttr):
        (WebCore::jsTestObjClampedShortAttrGetter):
        (WebCore::jsTestObjClampedShortAttr):
        (WebCore::setJSTestObjClampedShortAttrSetter):
        (WebCore::setJSTestObjClampedShortAttr):
        (WebCore::jsTestObjEnforceRangeShortAttrGetter):
        (WebCore::jsTestObjEnforceRangeShortAttr):
        (WebCore::setJSTestObjEnforceRangeShortAttrSetter):
        (WebCore::setJSTestObjEnforceRangeShortAttr):
        (WebCore::jsTestObjUnsignedShortAttrGetter):
        (WebCore::jsTestObjUnsignedShortAttr):
        (WebCore::setJSTestObjUnsignedShortAttrSetter):
        (WebCore::setJSTestObjUnsignedShortAttr):
        (WebCore::jsTestObjLongAttrGetter):
        (WebCore::jsTestObjLongAttr):
        (WebCore::setJSTestObjLongAttrSetter):
        (WebCore::setJSTestObjLongAttr):
        (WebCore::jsTestObjLongLongAttrGetter):
        (WebCore::jsTestObjLongLongAttr):
        (WebCore::setJSTestObjLongLongAttrSetter):
        (WebCore::setJSTestObjLongLongAttr):
        (WebCore::jsTestObjUnsignedLongLongAttrGetter):
        (WebCore::jsTestObjUnsignedLongLongAttr):
        (WebCore::setJSTestObjUnsignedLongLongAttrSetter):
        (WebCore::setJSTestObjUnsignedLongLongAttr):
        (WebCore::jsTestObjStringAttrGetter):
        (WebCore::jsTestObjStringAttr):
        (WebCore::setJSTestObjStringAttrSetter):
        (WebCore::setJSTestObjStringAttr):
        (WebCore::jsTestObjUsvstringAttrGetter):
        (WebCore::jsTestObjUsvstringAttr):
        (WebCore::setJSTestObjUsvstringAttrSetter):
        (WebCore::setJSTestObjUsvstringAttr):
        (WebCore::jsTestObjTestObjAttrGetter):
        (WebCore::jsTestObjTestObjAttr):
        (WebCore::setJSTestObjTestObjAttrSetter):
        (WebCore::setJSTestObjTestObjAttr):
        (WebCore::jsTestObjTestNullableObjAttrGetter):
        (WebCore::jsTestObjTestNullableObjAttr):
        (WebCore::setJSTestObjTestNullableObjAttrSetter):
        (WebCore::setJSTestObjTestNullableObjAttr):
        (WebCore::jsTestObjLenientTestObjAttrGetter):
        (WebCore::jsTestObjLenientTestObjAttr):
        (WebCore::setJSTestObjLenientTestObjAttrSetter):
        (WebCore::setJSTestObjLenientTestObjAttr):
        (WebCore::jsTestObjUnforgeableAttrGetter):
        (WebCore::jsTestObjUnforgeableAttr):
        (WebCore::jsTestObjStringAttrTreatingNullAsEmptyStringGetter):
        (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString):
        (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyStringSetter):
        (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyString):
        (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyStringGetter):
        (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyString):
        (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyStringSetter):
        (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyString):
        (WebCore::jsTestObjByteStringAttrTreatingNullAsEmptyStringGetter):
        (WebCore::jsTestObjByteStringAttrTreatingNullAsEmptyString):
        (WebCore::setJSTestObjByteStringAttrTreatingNullAsEmptyStringSetter):
        (WebCore::setJSTestObjByteStringAttrTreatingNullAsEmptyString):
        (WebCore::jsTestObjStringLongRecordAttrGetter):
        (WebCore::jsTestObjStringLongRecordAttr):
        (WebCore::setJSTestObjStringLongRecordAttrSetter):
        (WebCore::setJSTestObjStringLongRecordAttr):
        (WebCore::jsTestObjUsvstringLongRecordAttrGetter):
        (WebCore::jsTestObjUsvstringLongRecordAttr):
        (WebCore::setJSTestObjUsvstringLongRecordAttrSetter):
        (WebCore::setJSTestObjUsvstringLongRecordAttr):
        (WebCore::jsTestObjStringObjRecordAttrGetter):
        (WebCore::jsTestObjStringObjRecordAttr):
        (WebCore::setJSTestObjStringObjRecordAttrSetter):
        (WebCore::setJSTestObjStringObjRecordAttr):
        (WebCore::jsTestObjStringNullableObjRecordAttrGetter):
        (WebCore::jsTestObjStringNullableObjRecordAttr):
        (WebCore::setJSTestObjStringNullableObjRecordAttrSetter):
        (WebCore::setJSTestObjStringNullableObjRecordAttr):
        (WebCore::jsTestObjStringVoidCallbackRecordAttrGetter):
        (WebCore::jsTestObjStringVoidCallbackRecordAttr):
        (WebCore::setJSTestObjStringVoidCallbackRecordAttrSetter):
        (WebCore::setJSTestObjStringVoidCallbackRecordAttr):
        (WebCore::jsTestObjDictionaryAttrGetter):
        (WebCore::jsTestObjDictionaryAttr):
        (WebCore::setJSTestObjDictionaryAttrSetter):
        (WebCore::setJSTestObjDictionaryAttr):
        (WebCore::jsTestObjNullableDictionaryAttrGetter):
        (WebCore::jsTestObjNullableDictionaryAttr):
        (WebCore::setJSTestObjNullableDictionaryAttrSetter):
        (WebCore::setJSTestObjNullableDictionaryAttr):
        (WebCore::jsTestObjAnnotatedTypeInUnionAttrGetter):
        (WebCore::jsTestObjAnnotatedTypeInUnionAttr):
        (WebCore::setJSTestObjAnnotatedTypeInUnionAttrSetter):
        (WebCore::setJSTestObjAnnotatedTypeInUnionAttr):
        (WebCore::jsTestObjAnnotatedTypeInSequenceAttrGetter):
        (WebCore::jsTestObjAnnotatedTypeInSequenceAttr):
        (WebCore::setJSTestObjAnnotatedTypeInSequenceAttrSetter):
        (WebCore::setJSTestObjAnnotatedTypeInSequenceAttr):
        (WebCore::jsTestObjImplementationEnumAttrGetter):
        (WebCore::jsTestObjImplementationEnumAttr):
        (WebCore::setJSTestObjImplementationEnumAttrSetter):
        (WebCore::setJSTestObjImplementationEnumAttr):
        (WebCore::jsTestObjMediaDevicesGetter):
        (WebCore::jsTestObjMediaDevices):
        (WebCore::jsTestObjServiceWorkersGetter):
        (WebCore::jsTestObjServiceWorkers):
        (WebCore::jsTestObjXMLObjAttrGetter):
        (WebCore::jsTestObjXMLObjAttr):
        (WebCore::setJSTestObjXMLObjAttrSetter):
        (WebCore::setJSTestObjXMLObjAttr):
        (WebCore::jsTestObjCreateGetter):
        (WebCore::jsTestObjCreate):
        (WebCore::setJSTestObjCreateSetter):
        (WebCore::setJSTestObjCreate):
        (WebCore::jsTestObjReflectedStringAttrGetter):
        (WebCore::jsTestObjReflectedStringAttr):
        (WebCore::setJSTestObjReflectedStringAttrSetter):
        (WebCore::setJSTestObjReflectedStringAttr):
        (WebCore::jsTestObjReflectedUSVStringAttrGetter):
        (WebCore::jsTestObjReflectedUSVStringAttr):
        (WebCore::setJSTestObjReflectedUSVStringAttrSetter):
        (WebCore::setJSTestObjReflectedUSVStringAttr):
        (WebCore::jsTestObjReflectedIntegralAttrGetter):
        (WebCore::jsTestObjReflectedIntegralAttr):
        (WebCore::setJSTestObjReflectedIntegralAttrSetter):
        (WebCore::setJSTestObjReflectedIntegralAttr):
        (WebCore::jsTestObjReflectedUnsignedIntegralAttrGetter):
        (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
        (WebCore::setJSTestObjReflectedUnsignedIntegralAttrSetter):
        (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
        (WebCore::jsTestObjReflectedBooleanAttrGetter):
        (WebCore::jsTestObjReflectedBooleanAttr):
        (WebCore::setJSTestObjReflectedBooleanAttrSetter):
        (WebCore::setJSTestObjReflectedBooleanAttr):
        (WebCore::jsTestObjReflectedURLAttrGetter):
        (WebCore::jsTestObjReflectedURLAttr):
        (WebCore::setJSTestObjReflectedURLAttrSetter):
        (WebCore::setJSTestObjReflectedURLAttr):
        (WebCore::jsTestObjReflectedUSVURLAttrGetter):
        (WebCore::jsTestObjReflectedUSVURLAttr):
        (WebCore::setJSTestObjReflectedUSVURLAttrSetter):
        (WebCore::setJSTestObjReflectedUSVURLAttr):
        (WebCore::jsTestObjReflectedCustomIntegralAttrGetter):
        (WebCore::jsTestObjReflectedCustomIntegralAttr):
        (WebCore::setJSTestObjReflectedCustomIntegralAttrSetter):
        (WebCore::setJSTestObjReflectedCustomIntegralAttr):
        (WebCore::jsTestObjReflectedCustomBooleanAttrGetter):
        (WebCore::jsTestObjReflectedCustomBooleanAttr):
        (WebCore::setJSTestObjReflectedCustomBooleanAttrSetter):
        (WebCore::setJSTestObjReflectedCustomBooleanAttr):
        (WebCore::jsTestObjReflectedCustomURLAttrGetter):
        (WebCore::jsTestObjReflectedCustomURLAttr):
        (WebCore::setJSTestObjReflectedCustomURLAttrSetter):
        (WebCore::setJSTestObjReflectedCustomURLAttr):
        (WebCore::jsTestObjEnabledAtRuntimeAttributeGetter):
        (WebCore::jsTestObjEnabledAtRuntimeAttribute):
        (WebCore::setJSTestObjEnabledAtRuntimeAttributeSetter):
        (WebCore::setJSTestObjEnabledAtRuntimeAttribute):
        (WebCore::jsTestObjConstructorEnabledAtRuntimeAttributeStaticGetter):
        (WebCore::jsTestObjConstructorEnabledAtRuntimeAttributeStatic):
        (WebCore::setJSTestObjConstructorEnabledAtRuntimeAttributeStaticSetter):
        (WebCore::setJSTestObjConstructorEnabledAtRuntimeAttributeStatic):
        (WebCore::jsTestObjTypedArrayAttrGetter):
        (WebCore::jsTestObjTypedArrayAttr):
        (WebCore::setJSTestObjTypedArrayAttrSetter):
        (WebCore::setJSTestObjTypedArrayAttr):
        (WebCore::jsTestObjCustomAttrGetter):
        (WebCore::jsTestObjCustomAttr):
        (WebCore::setJSTestObjCustomAttrSetter):
        (WebCore::setJSTestObjCustomAttr):
        (WebCore::jsTestObjOnfooGetter):
        (WebCore::jsTestObjOnfoo):
        (WebCore::setJSTestObjOnfooSetter):
        (WebCore::setJSTestObjOnfoo):
        (WebCore::jsTestObjOnwebkitfooGetter):
        (WebCore::jsTestObjOnwebkitfoo):
        (WebCore::setJSTestObjOnwebkitfooSetter):
        (WebCore::setJSTestObjOnwebkitfoo):
        (WebCore::jsTestObjWithExecStateAttributeGetter):
        (WebCore::jsTestObjWithExecStateAttribute):
        (WebCore::setJSTestObjWithExecStateAttributeSetter):
        (WebCore::setJSTestObjWithExecStateAttribute):
        (WebCore::jsTestObjWithCallWithAndSetterCallWithAttributeGetter):
        (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
        (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttributeSetter):
        (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
        (WebCore::jsTestObjWithScriptExecutionContextAttributeGetter):
        (WebCore::jsTestObjWithScriptExecutionContextAttribute):
        (WebCore::setJSTestObjWithScriptExecutionContextAttributeSetter):
        (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
        (WebCore::jsTestObjWithScriptExecutionContextAndExecStateAttributeGetter):
        (WebCore::jsTestObjWithScriptExecutionContextAndExecStateAttribute):
        (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttributeSetter):
        (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttribute):
        (WebCore::jsTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeGetter):
        (WebCore::jsTestObjWithScriptExecutionContextAndExecStateWithSpacesAttribute):
        (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeSetter):
        (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttribute):
        (WebCore::jsTestObjConditionalAttr1Getter):
        (WebCore::jsTestObjConditionalAttr1):
        (WebCore::setJSTestObjConditionalAttr1Setter):
        (WebCore::setJSTestObjConditionalAttr1):
        (WebCore::jsTestObjConditionalAttr2Getter):
        (WebCore::jsTestObjConditionalAttr2):
        (WebCore::setJSTestObjConditionalAttr2Setter):
        (WebCore::setJSTestObjConditionalAttr2):
        (WebCore::jsTestObjConditionalAttr3Getter):
        (WebCore::jsTestObjConditionalAttr3):
        (WebCore::setJSTestObjConditionalAttr3Setter):
        (WebCore::setJSTestObjConditionalAttr3):
        (WebCore::jsTestObjConditionalAttr4ConstructorGetter):
        (WebCore::jsTestObjConditionalAttr4Constructor):
        (WebCore::setJSTestObjConditionalAttr4ConstructorSetter):
        (WebCore::setJSTestObjConditionalAttr4Constructor):
        (WebCore::jsTestObjConditionalAttr5ConstructorGetter):
        (WebCore::jsTestObjConditionalAttr5Constructor):
        (WebCore::setJSTestObjConditionalAttr5ConstructorSetter):
        (WebCore::setJSTestObjConditionalAttr5Constructor):
        (WebCore::jsTestObjConditionalAttr6ConstructorGetter):
        (WebCore::jsTestObjConditionalAttr6Constructor):
        (WebCore::setJSTestObjConditionalAttr6ConstructorSetter):
        (WebCore::setJSTestObjConditionalAttr6Constructor):
        (WebCore::jsTestObjCachedAttribute1Getter):
        (WebCore::jsTestObjCachedAttribute1):
        (WebCore::jsTestObjCachedAttribute2Getter):
        (WebCore::jsTestObjCachedAttribute2):
        (WebCore::jsTestObjCachedAttribute3Getter):
        (WebCore::jsTestObjCachedAttribute3):
        (WebCore::jsTestObjAnyAttributeGetter):
        (WebCore::jsTestObjAnyAttribute):
        (WebCore::setJSTestObjAnyAttributeSetter):
        (WebCore::setJSTestObjAnyAttribute):
        (WebCore::jsTestObjObjectAttributeGetter):
        (WebCore::jsTestObjObjectAttribute):
        (WebCore::setJSTestObjObjectAttributeSetter):
        (WebCore::setJSTestObjObjectAttribute):
        (WebCore::jsTestObjContentDocumentGetter):
        (WebCore::jsTestObjContentDocument):
        (WebCore::jsTestObjMutablePointGetter):
        (WebCore::jsTestObjMutablePoint):
        (WebCore::setJSTestObjMutablePointSetter):
        (WebCore::setJSTestObjMutablePoint):
        (WebCore::jsTestObjStrawberryGetter):
        (WebCore::jsTestObjStrawberry):
        (WebCore::setJSTestObjStrawberrySetter):
        (WebCore::setJSTestObjStrawberry):
        (WebCore::jsTestObjDescriptionGetter):
        (WebCore::jsTestObjDescription):
        (WebCore::jsTestObjIdGetter):
        (WebCore::jsTestObjId):
        (WebCore::setJSTestObjIdSetter):
        (WebCore::setJSTestObjId):
        (WebCore::jsTestObjHashGetter):
        (WebCore::jsTestObjHash):
        (WebCore::jsTestObjReplaceableAttributeGetter):
        (WebCore::jsTestObjReplaceableAttribute):
        (WebCore::setJSTestObjReplaceableAttributeSetter):
        (WebCore::setJSTestObjReplaceableAttribute):
        (WebCore::jsTestObjNullableDoubleAttributeGetter):
        (WebCore::jsTestObjNullableDoubleAttribute):
        (WebCore::jsTestObjNullableLongAttributeGetter):
        (WebCore::jsTestObjNullableLongAttribute):
        (WebCore::jsTestObjNullableBooleanAttributeGetter):
        (WebCore::jsTestObjNullableBooleanAttribute):
        (WebCore::jsTestObjNullableStringAttributeGetter):
        (WebCore::jsTestObjNullableStringAttribute):
        (WebCore::jsTestObjNullableLongSettableAttributeGetter):
        (WebCore::jsTestObjNullableLongSettableAttribute):
        (WebCore::setJSTestObjNullableLongSettableAttributeSetter):
        (WebCore::setJSTestObjNullableLongSettableAttribute):
        (WebCore::jsTestObjNullableStringSettableAttributeGetter):
        (WebCore::jsTestObjNullableStringSettableAttribute):
        (WebCore::setJSTestObjNullableStringSettableAttributeSetter):
        (WebCore::setJSTestObjNullableStringSettableAttribute):
        (WebCore::jsTestObjNullableUSVStringSettableAttributeGetter):
        (WebCore::jsTestObjNullableUSVStringSettableAttribute):
        (WebCore::setJSTestObjNullableUSVStringSettableAttributeSetter):
        (WebCore::setJSTestObjNullableUSVStringSettableAttribute):
        (WebCore::jsTestObjNullableByteStringSettableAttributeGetter):
        (WebCore::jsTestObjNullableByteStringSettableAttribute):
        (WebCore::setJSTestObjNullableByteStringSettableAttributeSetter):
        (WebCore::setJSTestObjNullableByteStringSettableAttribute):
        (WebCore::jsTestObjAttributeGetter):
        (WebCore::jsTestObjAttribute):
        (WebCore::jsTestObjAttributeWithReservedEnumTypeGetter):
        (WebCore::jsTestObjAttributeWithReservedEnumType):
        (WebCore::setJSTestObjAttributeWithReservedEnumTypeSetter):
        (WebCore::setJSTestObjAttributeWithReservedEnumType):
        (WebCore::jsTestObjTestReadOnlyVoidPromiseAttributeGetter):
        (WebCore::jsTestObjTestReadOnlyVoidPromiseAttribute):
        (WebCore::jsTestObjTestReadOnlyPromiseAttributeGetter):
        (WebCore::jsTestObjTestReadOnlyPromiseAttribute):
        (WebCore::jsTestObjPutForwardsAttributeGetter):
        (WebCore::jsTestObjPutForwardsAttribute):
        (WebCore::setJSTestObjPutForwardsAttributeSetter):
        (WebCore::setJSTestObjPutForwardsAttribute):
        (WebCore::jsTestObjPutForwardsNullableAttributeGetter):
        (WebCore::jsTestObjPutForwardsNullableAttribute):
        (WebCore::setJSTestObjPutForwardsNullableAttributeSetter):
        (WebCore::setJSTestObjPutForwardsNullableAttribute):
        (WebCore::jsTestObjStringifierAttributeGetter):
        (WebCore::jsTestObjStringifierAttribute):
        (WebCore::setJSTestObjStringifierAttributeSetter):
        (WebCore::setJSTestObjStringifierAttribute):
        (WebCore::jsTestObjConditionallyReadWriteAttributeGetter):
        (WebCore::jsTestObjConditionallyReadWriteAttribute):
        (WebCore::setJSTestObjConditionallyReadWriteAttributeSetter):
        (WebCore::setJSTestObjConditionallyReadWriteAttribute):
        (WebCore::jsTestObjConditionalAndConditionallyReadWriteAttributeGetter):
        (WebCore::jsTestObjConditionalAndConditionallyReadWriteAttribute):
        (WebCore::setJSTestObjConditionalAndConditionallyReadWriteAttributeSetter):
        (WebCore::setJSTestObjConditionalAndConditionallyReadWriteAttribute):
        (WebCore::jsTestObjConditionallyExposedToWindowAttributeGetter):
        (WebCore::jsTestObjConditionallyExposedToWindowAttribute):
        (WebCore::setJSTestObjConditionallyExposedToWindowAttributeSetter):
        (WebCore::setJSTestObjConditionallyExposedToWindowAttribute):
        (WebCore::jsTestObjConditionallyExposedToWorkerAttributeGetter):
        (WebCore::jsTestObjConditionallyExposedToWorkerAttribute):
        (WebCore::setJSTestObjConditionallyExposedToWorkerAttributeSetter):
        (WebCore::setJSTestObjConditionallyExposedToWorkerAttribute):
        (WebCore::jsTestObjConditionallyExposedToWindowAndWorkerAttributeGetter):
        (WebCore::jsTestObjConditionallyExposedToWindowAndWorkerAttribute):
        (WebCore::setJSTestObjConditionallyExposedToWindowAndWorkerAttributeSetter):
        (WebCore::setJSTestObjConditionallyExposedToWindowAndWorkerAttribute):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1Body):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2Body):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperationOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation):
        (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStaticBody):
        (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStatic):
        (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabledBody):
        (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabled):
        (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodBody):
        (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethod):
        (WebCore::jsTestObjPrototypeFunctionCalculateSecretResultBody):
        (WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
        (WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionGetSecretBoolean):
        (WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBoolean):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVoidMethod):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionByteMethodBody):
        (WebCore::jsTestObjPrototypeFunctionByteMethod):
        (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodBody):
        (WebCore::jsTestObjPrototypeFunctionOctetMethod):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionLongMethodBody):
        (WebCore::jsTestObjPrototypeFunctionLongMethod):
        (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionObjMethodBody):
        (WebCore::jsTestObjPrototypeFunctionObjMethod):
        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
        (WebCore::jsTestObjInstanceFunctionUnforgeableMethodBody):
        (WebCore::jsTestObjInstanceFunctionUnforgeableMethod):
        (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameterBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
        (WebCore::jsTestObjPrototypeFunctionNullableStringMethodBody):
        (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
        (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethodBody):
        (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethodBody):
        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
        (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrowsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionSerializedValueBody):
        (WebCore::jsTestObjPrototypeFunctionSerializedValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithRecordBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithRecord):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithException):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLong):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObjectBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObject):
        (WebCore::jsTestObjPrototypeFunctionCustomMethodBody):
        (WebCore::jsTestObjPrototypeFunctionCustomMethod):
        (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgsBody):
        (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionPrivateMethodBody):
        (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
        (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethodBody):
        (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod):
        (WebCore::jsTestObjPrototypeFunctionAddEventListenerBody):
        (WebCore::jsTestObjPrototypeFunctionAddEventListener):
        (WebCore::jsTestObjPrototypeFunctionRemoveEventListenerBody):
        (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidBody):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateVoid):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObjBody):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObj):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidException):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObjExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObjException):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextBody):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateBody):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecState):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjException):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpacesBody):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpaces):
        (WebCore::jsTestObjPrototypeFunctionWithDocumentArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
        (WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgument):
        (WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgument):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNull):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaNBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLong):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZeroBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZeroBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequence):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBoolean):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalseBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAnyBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAny):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObjectBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObject):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNullBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolverBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecord):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromise):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArgBody):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod1Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod2Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod3Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod13Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameterOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnionOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnionsOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnionOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnionOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnionOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter1Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter2Body):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameterOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter):
        (WebCore::jsTestObjConstructorFunctionClassMethodBody):
        (WebCore::jsTestObjConstructorFunctionClassMethod):
        (WebCore::jsTestObjConstructorFunctionClassMethodWithOptionalBody):
        (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
        (WebCore::jsTestObjConstructorFunctionClassMethod2Body):
        (WebCore::jsTestObjConstructorFunctionClassMethod2):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod11Body):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod12Body):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod1OverloadDispatcher):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptional):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalBody):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
        (WebCore::jsTestObjPrototypeFunctionStringArrayFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
        (WebCore::jsTestObjPrototypeFunctionDomStringListFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
        (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameterBody):
        (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameter):
        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequenceBody):
        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
        (WebCore::jsTestObjPrototypeFunctionGetElementByIdBody):
        (WebCore::jsTestObjPrototypeFunctionGetElementById):
        (WebCore::jsTestObjPrototypeFunctionGetSVGDocumentBody):
        (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
        (WebCore::jsTestObjPrototypeFunctionConvert1Body):
        (WebCore::jsTestObjPrototypeFunctionConvert1):
        (WebCore::jsTestObjPrototypeFunctionConvert2Body):
        (WebCore::jsTestObjPrototypeFunctionConvert2):
        (WebCore::jsTestObjPrototypeFunctionConvert3Body):
        (WebCore::jsTestObjPrototypeFunctionConvert3):
        (WebCore::jsTestObjPrototypeFunctionConvert4Body):
        (WebCore::jsTestObjPrototypeFunctionConvert4):
        (WebCore::jsTestObjPrototypeFunctionMutablePointFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
        (WebCore::jsTestObjPrototypeFunctionOrangeBody):
        (WebCore::jsTestObjPrototypeFunctionOrange):
        (WebCore::jsTestObjPrototypeFunctionVariadicStringMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
        (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
        (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
        (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethodBody):
        (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethod):
        (WebCore::jsTestObjPrototypeFunctionAnyBody):
        (WebCore::jsTestObjPrototypeFunctionAny):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentBody):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Body):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Body):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunctionOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionBody):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionBody):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestCustomPromiseFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionTestCustomPromiseFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticCustomPromiseFunctionBody):
        (WebCore::jsTestObjConstructorFunctionTestStaticCustomPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestCustomReturnsOwnPromiseFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionTestCustomReturnsOwnPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunction):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload1Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload2Body):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverloadOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1Body):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2Body):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverloadOverloadDispatcher):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload):
        (WebCore::jsTestObjPrototypeFunctionAttachShadowRootBody):
        (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot):
        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterBody):
        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter):
        (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterBody):
        (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
        (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamedBody):
        (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamed):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimization):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithException):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowFunction):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunction):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunctionBody):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunction):
        (WebCore::jsTestObjPrototypeFunctionToStringBody):
        (WebCore::jsTestObjPrototypeFunctionToString):
        (WebCore::JSTestObj::serialize):
        (WebCore::jsTestObjPrototypeFunctionToJSONBody):
        (WebCore::jsTestObjPrototypeFunctionToJSON):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestObj.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::constructJSTestOverloadedConstructors1):
        (WebCore::constructJSTestOverloadedConstructors2):
        (WebCore::constructJSTestOverloadedConstructors3):
        (WebCore::constructJSTestOverloadedConstructors4):
        (WebCore::constructJSTestOverloadedConstructors5):
        (WebCore::JSTestOverloadedConstructorsConstructor::construct):
        (WebCore::jsTestOverloadedConstructorsConstructor):
        (WebCore::setJSTestOverloadedConstructorsConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
        (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
        (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::construct):
        (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor):
        (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
        (WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
        (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
        (WebCore::IDLOperation<JSTestOverrideBuiltins>::cast):
        (WebCore::jsTestOverrideBuiltinsConstructor):
        (WebCore::setJSTestOverrideBuiltinsConstructor):
        (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItemBody):
        (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterface::getOwnPropertySlot):
        (WebCore::JSTestPluginInterface::getOwnPropertySlotByIndex):
        (WebCore::JSTestPluginInterface::put):
        (WebCore::JSTestPluginInterface::putByIndex):
        (WebCore::jsTestPluginInterfaceConstructor):
        (WebCore::setJSTestPluginInterfaceConstructor):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestPluginInterface.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
        (WebCore::JSTestPromiseRejectionEventConstructor::construct):
        (WebCore::IDLAttribute<JSTestPromiseRejectionEvent>::cast):
        (WebCore::jsTestPromiseRejectionEventConstructor):
        (WebCore::setJSTestPromiseRejectionEventConstructor):
        (WebCore::jsTestPromiseRejectionEventPromiseGetter):
        (WebCore::jsTestPromiseRejectionEventPromise):
        (WebCore::jsTestPromiseRejectionEventReasonGetter):
        (WebCore::jsTestPromiseRejectionEventReason):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::IDLAttribute<JSTestSerialization>::cast):
        (WebCore::IDLOperation<JSTestSerialization>::cast):
        (WebCore::jsTestSerializationConstructor):
        (WebCore::setJSTestSerializationConstructor):
        (WebCore::jsTestSerializationFirstStringAttributeGetter):
        (WebCore::jsTestSerializationFirstStringAttribute):
        (WebCore::setJSTestSerializationFirstStringAttributeSetter):
        (WebCore::setJSTestSerializationFirstStringAttribute):
        (WebCore::jsTestSerializationSecondLongAttributeGetter):
        (WebCore::jsTestSerializationSecondLongAttribute):
        (WebCore::setJSTestSerializationSecondLongAttributeSetter):
        (WebCore::setJSTestSerializationSecondLongAttribute):
        (WebCore::jsTestSerializationThirdUnserializableAttributeGetter):
        (WebCore::jsTestSerializationThirdUnserializableAttribute):
        (WebCore::setJSTestSerializationThirdUnserializableAttributeSetter):
        (WebCore::setJSTestSerializationThirdUnserializableAttribute):
        (WebCore::jsTestSerializationFourthUnrestrictedDoubleAttributeGetter):
        (WebCore::jsTestSerializationFourthUnrestrictedDoubleAttribute):
        (WebCore::setJSTestSerializationFourthUnrestrictedDoubleAttributeSetter):
        (WebCore::setJSTestSerializationFourthUnrestrictedDoubleAttribute):
        (WebCore::jsTestSerializationFifthLongAttributeGetter):
        (WebCore::jsTestSerializationFifthLongAttribute):
        (WebCore::setJSTestSerializationFifthLongAttributeSetter):
        (WebCore::setJSTestSerializationFifthLongAttribute):
        (WebCore::jsTestSerializationSixthTypedefAttributeGetter):
        (WebCore::jsTestSerializationSixthTypedefAttribute):
        (WebCore::setJSTestSerializationSixthTypedefAttributeSetter):
        (WebCore::setJSTestSerializationSixthTypedefAttribute):
        (WebCore::jsTestSerializationSeventhDirectlySerializableAttributeGetter):
        (WebCore::jsTestSerializationSeventhDirectlySerializableAttribute):
        (WebCore::setJSTestSerializationSeventhDirectlySerializableAttributeSetter):
        (WebCore::setJSTestSerializationSeventhDirectlySerializableAttribute):
        (WebCore::jsTestSerializationEighthIndirectlyAttributeGetter):
        (WebCore::jsTestSerializationEighthIndirectlyAttribute):
        (WebCore::setJSTestSerializationEighthIndirectlyAttributeSetter):
        (WebCore::setJSTestSerializationEighthIndirectlyAttribute):
        (WebCore::jsTestSerializationNinthOptionalDirectlySerializableAttributeGetter):
        (WebCore::jsTestSerializationNinthOptionalDirectlySerializableAttribute):
        (WebCore::setJSTestSerializationNinthOptionalDirectlySerializableAttributeSetter):
        (WebCore::setJSTestSerializationNinthOptionalDirectlySerializableAttribute):
        (WebCore::jsTestSerializationTenthFrozenArrayAttributeGetter):
        (WebCore::jsTestSerializationTenthFrozenArrayAttribute):
        (WebCore::setJSTestSerializationTenthFrozenArrayAttributeSetter):
        (WebCore::setJSTestSerializationTenthFrozenArrayAttribute):
        (WebCore::jsTestSerializationEleventhSequenceAttributeGetter):
        (WebCore::jsTestSerializationEleventhSequenceAttribute):
        (WebCore::setJSTestSerializationEleventhSequenceAttributeSetter):
        (WebCore::setJSTestSerializationEleventhSequenceAttribute):
        (WebCore::jsTestSerializationTwelfthInterfaceSequenceAttributeGetter):
        (WebCore::jsTestSerializationTwelfthInterfaceSequenceAttribute):
        (WebCore::setJSTestSerializationTwelfthInterfaceSequenceAttributeSetter):
        (WebCore::setJSTestSerializationTwelfthInterfaceSequenceAttribute):
        (WebCore::JSTestSerialization::serialize):
        (WebCore::jsTestSerializationPrototypeFunctionToJSONBody):
        (WebCore::jsTestSerializationPrototypeFunctionToJSON):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestSerialization.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::jsTestSerializationIndirectInheritanceConstructor):
        (WebCore::setJSTestSerializationIndirectInheritanceConstructor):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::IDLAttribute<JSTestSerializationInherit>::cast):
        (WebCore::IDLOperation<JSTestSerializationInherit>::cast):
        (WebCore::jsTestSerializationInheritConstructor):
        (WebCore::setJSTestSerializationInheritConstructor):
        (WebCore::jsTestSerializationInheritInheritLongAttributeGetter):
        (WebCore::jsTestSerializationInheritInheritLongAttribute):
        (WebCore::setJSTestSerializationInheritInheritLongAttributeSetter):
        (WebCore::setJSTestSerializationInheritInheritLongAttribute):
        (WebCore::JSTestSerializationInherit::serialize):
        (WebCore::jsTestSerializationInheritPrototypeFunctionToJSONBody):
        (WebCore::jsTestSerializationInheritPrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestSerializationInherit.h:
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::IDLAttribute<JSTestSerializationInheritFinal>::cast):
        (WebCore::IDLOperation<JSTestSerializationInheritFinal>::cast):
        (WebCore::jsTestSerializationInheritFinalConstructor):
        (WebCore::setJSTestSerializationInheritFinalConstructor):
        (WebCore::jsTestSerializationInheritFinalFinalLongAttributeFooGetter):
        (WebCore::jsTestSerializationInheritFinalFinalLongAttributeFoo):
        (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeFooSetter):
        (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeFoo):
        (WebCore::jsTestSerializationInheritFinalFinalLongAttributeBarGetter):
        (WebCore::jsTestSerializationInheritFinalFinalLongAttributeBar):
        (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeBarSetter):
        (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeBar):
        (WebCore::JSTestSerializationInheritFinal::serialize):
        (WebCore::jsTestSerializationInheritFinalPrototypeFunctionToJSONBody):
        (WebCore::jsTestSerializationInheritFinalPrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::IDLAttribute<JSTestSerializedScriptValueInterface>::cast):
        (WebCore::IDLOperation<JSTestSerializedScriptValueInterface>::cast):
        (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
        (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
        (WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
        (WebCore::jsTestSerializedScriptValueInterfaceValue):
        (WebCore::setJSTestSerializedScriptValueInterfaceValueSetter):
        (WebCore::setJSTestSerializedScriptValueInterfaceValue):
        (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
        (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
        (WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
        (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
        (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueSetter):
        (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
        (WebCore::jsTestSerializedScriptValueInterfacePortsGetter):
        (WebCore::jsTestSerializedScriptValueInterfacePorts):
        (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
        (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionBody):
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunction):
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturningBody):
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturning):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
        (WebCore::convertDictionary<DictionaryImplName>):
        (WebCore::convertDictionaryToJS):
        (WebCore::convertEnumerationToJS):
        (WebCore::parseEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>):
        * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
        * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
        (WebCore::convertEnumerationToJS):
        (WebCore::parseEnumeration<TestStandaloneEnumeration>):
        * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h:
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::IDLOperation<JSTestStringifier>::cast):
        (WebCore::jsTestStringifierConstructor):
        (WebCore::setJSTestStringifierConstructor):
        (WebCore::jsTestStringifierPrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierPrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifier.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::IDLOperation<JSTestStringifierAnonymousOperation>::cast):
        (WebCore::jsTestStringifierAnonymousOperationConstructor):
        (WebCore::setJSTestStringifierAnonymousOperationConstructor):
        (WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::IDLOperation<JSTestStringifierNamedOperation>::cast):
        (WebCore::jsTestStringifierNamedOperationConstructor):
        (WebCore::setJSTestStringifierNamedOperationConstructor):
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifierBody):
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifier):
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::IDLOperation<JSTestStringifierOperationImplementedAs>::cast):
        (WebCore::jsTestStringifierOperationImplementedAsConstructor):
        (WebCore::setJSTestStringifierOperationImplementedAsConstructor):
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifierBody):
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifier):
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::IDLOperation<JSTestStringifierOperationNamedToString>::cast):
        (WebCore::jsTestStringifierOperationNamedToStringConstructor):
        (WebCore::setJSTestStringifierOperationNamedToStringConstructor):
        (WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::IDLAttribute<JSTestStringifierReadOnlyAttribute>::cast):
        (WebCore::IDLOperation<JSTestStringifierReadOnlyAttribute>::cast):
        (WebCore::jsTestStringifierReadOnlyAttributeConstructor):
        (WebCore::setJSTestStringifierReadOnlyAttributeConstructor):
        (WebCore::jsTestStringifierReadOnlyAttributeIdentifierGetter):
        (WebCore::jsTestStringifierReadOnlyAttributeIdentifier):
        (WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::IDLAttribute<JSTestStringifierReadWriteAttribute>::cast):
        (WebCore::IDLOperation<JSTestStringifierReadWriteAttribute>::cast):
        (WebCore::jsTestStringifierReadWriteAttributeConstructor):
        (WebCore::setJSTestStringifierReadWriteAttributeConstructor):
        (WebCore::jsTestStringifierReadWriteAttributeIdentifierGetter):
        (WebCore::jsTestStringifierReadWriteAttributeIdentifier):
        (WebCore::setJSTestStringifierReadWriteAttributeIdentifierSetter):
        (WebCore::setJSTestStringifierReadWriteAttributeIdentifier):
        (WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToStringBody):
        (WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToString):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::construct):
        (WebCore::IDLAttribute<JSTestTypedefs>::cast):
        (WebCore::IDLOperation<JSTestTypedefs>::cast):
        (WebCore::jsTestTypedefsConstructor):
        (WebCore::setJSTestTypedefsConstructor):
        (WebCore::jsTestTypedefsUnsignedLongLongAttrGetter):
        (WebCore::jsTestTypedefsUnsignedLongLongAttr):
        (WebCore::setJSTestTypedefsUnsignedLongLongAttrSetter):
        (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
        (WebCore::jsTestTypedefsSerializedScriptValueGetter):
        (WebCore::jsTestTypedefsSerializedScriptValue):
        (WebCore::setJSTestTypedefsSerializedScriptValueSetter):
        (WebCore::setJSTestTypedefsSerializedScriptValue):
        (WebCore::jsTestTypedefsConstructorTestSubObjGetter):
        (WebCore::jsTestTypedefsConstructorTestSubObj):
        (WebCore::jsTestTypedefsAttributeWithClampGetter):
        (WebCore::jsTestTypedefsAttributeWithClamp):
        (WebCore::setJSTestTypedefsAttributeWithClampSetter):
        (WebCore::setJSTestTypedefsAttributeWithClamp):
        (WebCore::jsTestTypedefsAttributeWithClampInTypedefGetter):
        (WebCore::jsTestTypedefsAttributeWithClampInTypedef):
        (WebCore::setJSTestTypedefsAttributeWithClampInTypedefSetter):
        (WebCore::setJSTestTypedefsAttributeWithClampInTypedef):
        (WebCore::jsTestTypedefsBufferSourceAttrGetter):
        (WebCore::jsTestTypedefsBufferSourceAttr):
        (WebCore::setJSTestTypedefsBufferSourceAttrSetter):
        (WebCore::setJSTestTypedefsBufferSourceAttr):
        (WebCore::jsTestTypedefsDomTimeStampAttrGetter):
        (WebCore::jsTestTypedefsDomTimeStampAttr):
        (WebCore::setJSTestTypedefsDomTimeStampAttrSetter):
        (WebCore::setJSTestTypedefsDomTimeStampAttr):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFunc):
        (WebCore::jsTestTypedefsPrototypeFunctionSetShadowBody):
        (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg):
        (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg):
        (WebCore::jsTestTypedefsPrototypeFunctionUnionArgBody):
        (WebCore::jsTestTypedefsPrototypeFunctionUnionArg):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefBody):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef):
        (WebCore::jsTestTypedefsPrototypeFunctionPointFunctionBody):
        (WebCore::jsTestTypedefsPrototypeFunctionPointFunction):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunctionBody):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2Body):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2):
        (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresIncludeBody):
        (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithExceptionBody):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
        (WebCore::toJSNewlyCreated):
        (WebCore::toJS):
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        (WebCore::toJS):
        (WebCore::toJSNewlyCreated):
        * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
        (WebCore::JSTestVoidCallbackFunction::handleEvent):
        * bindings/scripts/test/TestObj.idl:
        * bindings/scripts/test/TestPromiseRejectionEvent.idl:
        * bridge/NP_jsobject.cpp:
        (JSC::getListFromVariantArgs):
        * bridge/c/c_instance.cpp:
        (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
        (JSC::Bindings::CInstance::newRuntimeObject):
        (JSC::Bindings::CRuntimeMethod::create):
        (JSC::Bindings::CInstance::getMethod):
        (JSC::Bindings::CInstance::invokeMethod):
        (JSC::Bindings::CInstance::invokeDefaultMethod):
        (JSC::Bindings::CInstance::invokeConstruct):
        (JSC::Bindings::CInstance::defaultValue const):
        (JSC::Bindings::CInstance::stringValue const):
        (JSC::Bindings::CInstance::numberValue const):
        (JSC::Bindings::CInstance::valueOf const):
        (JSC::Bindings::CInstance::toJSPrimitive const):
        (JSC::Bindings::CInstance::getPropertyNames):
        * bridge/c/c_instance.h:
        * bridge/c/c_runtime.cpp:
        (JSC::Bindings::CField::valueFromInstance const):
        (JSC::Bindings::CField::setValueToInstance const):
        * bridge/c/c_runtime.h:
        * bridge/c/c_utility.cpp:
        (JSC::Bindings::convertValueToNPVariant):
        (JSC::Bindings::convertNPVariantToValue):
        (JSC::Bindings::identifierFromNPIdentifier):
        * bridge/c/c_utility.h:
        * bridge/jsc/BridgeJSC.cpp:
        (JSC::Bindings::Instance::createRuntimeObject):
        (JSC::Bindings::Instance::newRuntimeObject):
        * bridge/jsc/BridgeJSC.h:
        (JSC::Bindings::Class::fallbackObject):
        (JSC::Bindings::Instance::setValueOfUndefinedField):
        (JSC::Bindings::Instance::invokeDefaultMethod):
        (JSC::Bindings::Instance::invokeConstruct):
        (JSC::Bindings::Instance::getPropertyNames):
        (JSC::Bindings::Instance::getOwnPropertySlot):
        (JSC::Bindings::Instance::put):
        * bridge/objc/WebScriptObject.mm:
        (WebCore::addExceptionToConsole):
        (-[WebScriptObject _isSafeScript]):
        (-[WebScriptObject _globalContextRef]):
        (getListFromNSArray):
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject evaluateWebScript:]):
        (-[WebScriptObject setValue:forKey:]):
        (-[WebScriptObject valueForKey:]):
        (-[WebScriptObject removeWebScriptKey:]):
        (-[WebScriptObject hasWebScriptKey:]):
        (-[WebScriptObject stringRepresentation]):
        (-[WebScriptObject webScriptValueAtIndex:]):
        (-[WebScriptObject setWebScriptValueAtIndex:value:]):
        (-[WebScriptObject JSObject]):
        (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
        * bridge/objc/objc_class.h:
        * bridge/objc/objc_class.mm:
        (JSC::Bindings::ObjcClass::fallbackObject):
        * bridge/objc/objc_instance.h:
        * bridge/objc/objc_instance.mm:
        (ObjcInstance::newRuntimeObject):
        (ObjcInstance::moveGlobalExceptionToExecState):
        (ObjCRuntimeMethod::create):
        (ObjcInstance::invokeMethod):
        (ObjcInstance::invokeObjcMethod):
        (ObjcInstance::invokeDefaultMethod):
        (ObjcInstance::setValueOfUndefinedField):
        (ObjcInstance::getValueOfUndefinedField const):
        (ObjcInstance::defaultValue const):
        (ObjcInstance::stringValue const):
        (ObjcInstance::numberValue const):
        (ObjcInstance::valueOf const):
        * bridge/objc/objc_runtime.h:
        (JSC::Bindings::ObjcFallbackObjectImp::create):
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::ObjcField::valueFromInstance const):
        (JSC::Bindings::convertValueToObjcObject):
        (JSC::Bindings::ObjcField::setValueToInstance const):
        (JSC::Bindings::ObjcArray::setValueAt const):
        (JSC::Bindings::ObjcArray::valueAt const):
        (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
        (JSC::Bindings::ObjcFallbackObjectImp::put):
        (JSC::Bindings::callObjCFallbackObject):
        (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):
        (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
        (JSC::Bindings::ObjcFallbackObjectImp::toBoolean const):
        * bridge/objc/objc_utility.h:
        * bridge/objc/objc_utility.mm:
        (JSC::Bindings::convertValueToObjcValue):
        (JSC::Bindings::convertNSStringToString):
        (JSC::Bindings::convertObjcValueToValue):
        (JSC::Bindings::throwError):
        * bridge/runtime_array.cpp:
        (JSC::RuntimeArray::RuntimeArray):
        (JSC::RuntimeArray::lengthGetter):
        (JSC::RuntimeArray::getOwnPropertyNames):
        (JSC::RuntimeArray::getOwnPropertySlot):
        (JSC::RuntimeArray::getOwnPropertySlotByIndex):
        (JSC::RuntimeArray::put):
        (JSC::RuntimeArray::putByIndex):
        (JSC::RuntimeArray::deleteProperty):
        (JSC::RuntimeArray::deletePropertyByIndex):
        * bridge/runtime_array.h:
        (JSC::RuntimeArray::create):
        * bridge/runtime_method.cpp:
        (JSC::RuntimeMethod::lengthGetter):
        (JSC::RuntimeMethod::getOwnPropertySlot):
        (JSC::callRuntimeMethod):
        * bridge/runtime_method.h:
        * bridge/runtime_object.cpp:
        (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
        (JSC::Bindings::RuntimeObject::fieldGetter):
        (JSC::Bindings::RuntimeObject::methodGetter):
        (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
        (JSC::Bindings::RuntimeObject::put):
        (JSC::Bindings::RuntimeObject::deleteProperty):
        (JSC::Bindings::RuntimeObject::defaultValue):
        (JSC::Bindings::callRuntimeObject):
        (JSC::Bindings::callRuntimeConstructor):
        (JSC::Bindings::RuntimeObject::getOwnPropertyNames):
        (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
        * bridge/runtime_object.h:
        * bridge/testbindings.cpp:
        (main):
        * bridge/testbindings.mm:
        (main):
        * contentextensions/ContentExtensionParser.cpp:
        (WebCore::ContentExtensions::getStringList):
        (WebCore::ContentExtensions::getDomainList):
        (WebCore::ContentExtensions::getTypeFlags):
        (WebCore::ContentExtensions::loadTrigger):
        (WebCore::ContentExtensions::loadAction):
        (WebCore::ContentExtensions::loadRule):
        (WebCore::ContentExtensions::loadEncodedRules):
        (WebCore::ContentExtensions::parseRuleList):
        * crypto/SubtleCrypto.cpp:
        (WebCore::toHashIdentifier):
        (WebCore::normalizeCryptoAlgorithmParameters):
        (WebCore::SubtleCrypto::encrypt):
        (WebCore::SubtleCrypto::decrypt):
        (WebCore::SubtleCrypto::sign):
        (WebCore::SubtleCrypto::verify):
        (WebCore::SubtleCrypto::digest):
        (WebCore::SubtleCrypto::generateKey):
        (WebCore::SubtleCrypto::deriveKey):
        (WebCore::SubtleCrypto::deriveBits):
        (WebCore::SubtleCrypto::importKey):
        (WebCore::SubtleCrypto::wrapKey):
        (WebCore::SubtleCrypto::unwrapKey):
        * crypto/SubtleCrypto.h:
        * crypto/SubtleCrypto.idl:
        * css/CSSFontFace.h:
        * dom/CustomElementReactionQueue.cpp:
        (WebCore::CustomElementReactionQueue::ElementQueue::processQueue):
        (WebCore::CustomElementReactionStack::processQueue):
        * dom/CustomElementReactionQueue.h:
        (WebCore::CustomElementReactionStack::CustomElementReactionStack):
        * dom/Document.cpp:
        (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
        (WebCore::Document::addMessage):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::shadowRootForBindings const):
        (WebCore::Element::animate):
        * dom/Element.h:
        * dom/Element.idl:
        * dom/ErrorEvent.cpp:
        (WebCore::ErrorEvent::error):
        (WebCore::ErrorEvent::trySerializeError):
        * dom/ErrorEvent.h:
        * dom/ErrorEvent.idl:
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::postMessage):
        * dom/MessagePort.h:
        * dom/MessagePort.idl:
        * dom/MouseEvent.cpp:
        (WebCore::MouseEvent::initMouseEventQuirk):
        * dom/MouseEvent.h:
        * dom/MouseEvent.idl:
        * dom/PopStateEvent.cpp:
        (WebCore::PopStateEvent::trySerializeState):
        * dom/PopStateEvent.h:
        * dom/RejectedPromiseTracker.cpp:
        (WebCore::createScriptCallStackFromReason):
        (WebCore::RejectedPromiseTracker::promiseRejected):
        (WebCore::RejectedPromiseTracker::promiseHandled):
        (WebCore::RejectedPromiseTracker::reportUnhandledRejections):
        * dom/RejectedPromiseTracker.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection):
        (WebCore::ScriptExecutionContext::addConsoleMessage):
        (WebCore::ScriptExecutionContext::execState):
        * dom/ScriptExecutionContext.h:
        * dom/make_event_factory.pl:
        (generateImplementation):
        * domjit/DOMJITHelpers.h:
        (WebCore::DOMJIT::toWrapperSlow):
        * domjit/DOMJITIDLConvert.h:
        (WebCore::DOMJIT::DirectConverter<IDLDOMString>::directConvert):
        (WebCore::DOMJIT::DirectConverter<IDLAtomStringAdaptor<IDLDOMString>>::directConvert):
        (WebCore::DOMJIT::DirectConverter<IDLRequiresExistingAtomStringAdaptor<IDLDOMString>>::directConvert):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::getContext):
        * html/HTMLCanvasElement.h:
        * html/HTMLCanvasElement.idl:
        * html/HTMLFrameElement.idl:
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::setLocation):
        * html/HTMLFrameElementBase.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::controllerJSValue):
        (WebCore::HTMLMediaElement::setupAndCallJS):
        (WebCore::HTMLMediaElement::updateCaptionContainer):
        (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
        (WebCore::HTMLMediaElement::setControllerJSProperty):
        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
        (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
        (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
        * html/HTMLMediaElement.h:
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
        * html/OffscreenCanvas.cpp:
        (WebCore::OffscreenCanvas::getContext):
        * html/OffscreenCanvas.h:
        * html/OffscreenCanvas.idl:
        * html/canvas/WebGLAny.h:
        * html/track/DataCue.cpp:
        (WebCore::DataCue::value const):
        (WebCore::DataCue::setValue):
        * html/track/DataCue.h:
        * html/track/DataCue.idl:
        * inspector/CommandLineAPIHost.cpp:
        (WebCore::CommandLineAPIHost::inspect):
        (WebCore::CommandLineAPIHost::getEventListeners):
        (WebCore::CommandLineAPIHost::InspectableObject::get):
        (WebCore::CommandLineAPIHost::inspectedObject):
        (WebCore::CommandLineAPIHost::wrapper):
        * inspector/CommandLineAPIHost.h:
        * inspector/CommandLineAPIHost.idl:
        * inspector/CommandLineAPIModule.cpp:
        (WebCore::CommandLineAPIModule::host const):
        * inspector/CommandLineAPIModule.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::resolveContext const):
        * inspector/InspectorCanvas.h:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::canAccessInspectedScriptState const):
        * inspector/InspectorController.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
        (WebCore::InspectorFrontendHost::showContextMenu):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didPostMessageImpl):
        (WebCore::InspectorInstrumentation::consoleCountImpl):
        (WebCore::InspectorInstrumentation::consoleCountResetImpl):
        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::startProfilingImpl):
        (WebCore::InspectorInstrumentation::stopProfilingImpl):
        (WebCore::InspectorInstrumentation::consoleStartRecordingCanvasImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didPostMessage):
        (WebCore::InspectorInstrumentation::consoleCount):
        (WebCore::InspectorInstrumentation::consoleCountReset):
        (WebCore::InspectorInstrumentation::startConsoleTiming):
        (WebCore::InspectorInstrumentation::logConsoleTiming):
        (WebCore::InspectorInstrumentation::stopConsoleTiming):
        (WebCore::InspectorInstrumentation::startProfiling):
        (WebCore::InspectorInstrumentation::stopProfiling):
        (WebCore::InspectorInstrumentation::consoleStartRecordingCanvas):
        * inspector/PageScriptDebugServer.cpp:
        (WebCore::PageScriptDebugServer::isContentScript const):
        (WebCore::PageScriptDebugServer::reportException const):
        * inspector/PageScriptDebugServer.h:
        * inspector/WebInjectedScriptHost.cpp:
        (WebCore::WebInjectedScriptHost::subtype):
        (WebCore::constructInternalProperty):
        (WebCore::objectForPaymentOptions):
        (WebCore::objectForPaymentCurrencyAmount):
        (WebCore::objectForPaymentItem):
        (WebCore::objectForPaymentShippingOption):
        (WebCore::objectForPaymentDetailsModifier):
        (WebCore::objectForPaymentDetails):
        (WebCore::WebInjectedScriptHost::getInternalProperties):
        * inspector/WebInjectedScriptHost.h:
        * inspector/WebInjectedScriptManager.cpp:
        (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
        * inspector/WorkerInspectorController.h:
        * inspector/WorkerScriptDebugServer.cpp:
        (WebCore::WorkerScriptDebugServer::reportException const):
        * inspector/WorkerScriptDebugServer.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::focusNode):
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
        (WebCore::InspectorDOMAgent::nodeAsScriptValue):
        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorIndexedDBAgent.cpp:
        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::webSocketAsScriptValue):
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::startFromConsole):
        (WebCore::InspectorTimelineAgent::stopFromConsole):
        (WebCore::InspectorTimelineAgent::breakpointActionProbe):
        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/WebConsoleAgent.cpp:
        (WebCore::WebConsoleAgent::frameWindowDiscarded):
        * inspector/agents/WebDebuggerAgent.cpp:
        (WebCore::WebDebuggerAgent::didAddEventListener):
        (WebCore::WebDebuggerAgent::didPostMessage):
        * inspector/agents/WebDebuggerAgent.h:
        * inspector/agents/page/PageAuditAgent.cpp:
        (WebCore::PageAuditAgent::injectedScriptForEval):
        (WebCore::PageAuditAgent::populateAuditObject):
        * inspector/agents/page/PageAuditAgent.h:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::breakpointActionLog):
        (WebCore::PageDebuggerAgent::injectedScriptForEval):
        (WebCore::PageDebuggerAgent::didRequestAnimationFrame):
        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::injectedScriptForEval):
        (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
        (WebCore::PageRuntimeAgent::notifyContextCreated):
        * inspector/agents/page/PageRuntimeAgent.h:
        * inspector/agents/worker/WorkerAuditAgent.cpp:
        (WebCore::WorkerAuditAgent::injectedScriptForEval):
        * inspector/agents/worker/WorkerDebuggerAgent.cpp:
        (WebCore::WorkerDebuggerAgent::breakpointActionLog):
        (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
        * inspector/agents/worker/WorkerDebuggerAgent.h:
        * inspector/agents/worker/WorkerRuntimeAgent.cpp:
        (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::postMessage):
        (WebCore::DOMWindow::setTimeout):
        (WebCore::DOMWindow::setInterval):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::addMessage):
        (WebCore::PageConsoleClient::messageWithTypeAndLevel):
        (WebCore::PageConsoleClient::count):
        (WebCore::PageConsoleClient::countReset):
        (WebCore::PageConsoleClient::profile):
        (WebCore::PageConsoleClient::profileEnd):
        (WebCore::PageConsoleClient::takeHeapSnapshot):
        (WebCore::PageConsoleClient::time):
        (WebCore::PageConsoleClient::timeLog):
        (WebCore::PageConsoleClient::timeEnd):
        (WebCore::PageConsoleClient::timeStamp):
        (WebCore::PageConsoleClient::record):
        (WebCore::PageConsoleClient::recordEnd):
        (WebCore::PageConsoleClient::screenshot):
        * page/PageConsoleClient.h:
        * page/RemoteDOMWindow.cpp:
        (WebCore::RemoteDOMWindow::postMessage):
        * page/RemoteDOMWindow.h:
        * page/RemoteDOMWindow.idl:
        * page/WindowOrWorkerGlobalScope.idl:
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::allowEval const):
        (WebCore::ContentSecurityPolicy::reportViolation const):
        (WebCore::ContentSecurityPolicy::logToConsole const):
        * page/csp/ContentSecurityPolicy.h:
        * platform/SerializedPlatformRepresentation.h:
        * platform/ThreadGlobalData.h:
        (WebCore::ThreadGlobalData::ThreadGlobalData::currentState const):
        (WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState):
        * platform/graphics/CustomPaintImage.cpp:
        (WebCore::CustomPaintImage::doCustomPaint):
        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
        * platform/mac/SerializedPlatformRepresentationMac.h:
        * platform/mac/SerializedPlatformRepresentationMac.mm:
        (WebCore::SerializedPlatformRepresentationMac::deserialize const):
        (WebCore::jsValueWithDataInContext):
        * platform/mock/mediasource/MockBox.cpp:
        * plugins/PluginViewBase.h:
        * testing/Internals.cpp:
        (WebCore::Internals::parserMetaData):
        (WebCore::Internals::isFromCurrentWorld const):
        (WebCore::Internals::isReadableStreamDisturbed):
        (WebCore::Internals::cloneArrayBuffer):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::injectInternalsObject):
        (WebCoreTestSupport::resetInternalsObject):
        * workers/DedicatedWorkerGlobalScope.cpp:
        (WebCore::DedicatedWorkerGlobalScope::postMessage):
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/DedicatedWorkerGlobalScope.idl:
        * workers/Worker.cpp:
        (WebCore::Worker::postMessage):
        * workers/Worker.h:
        * workers/Worker.idl:
        * workers/WorkerConsoleClient.cpp:
        (WebCore::WorkerConsoleClient::messageWithTypeAndLevel):
        (WebCore::WorkerConsoleClient::count):
        (WebCore::WorkerConsoleClient::countReset):
        (WebCore::WorkerConsoleClient::time):
        (WebCore::WorkerConsoleClient::timeLog):
        (WebCore::WorkerConsoleClient::timeEnd):
        (WebCore::WorkerConsoleClient::profile):
        (WebCore::WorkerConsoleClient::profileEnd):
        (WebCore::WorkerConsoleClient::takeHeapSnapshot):
        (WebCore::WorkerConsoleClient::timeStamp):
        (WebCore::WorkerConsoleClient::record):
        (WebCore::WorkerConsoleClient::recordEnd):
        (WebCore::WorkerConsoleClient::screenshot):
        * workers/WorkerConsoleClient.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::setTimeout):
        (WebCore::WorkerGlobalScope::setInterval):
        (WebCore::WorkerGlobalScope::addMessage):
        * workers/WorkerGlobalScope.h:
        * workers/service/ExtendableEvent.cpp:
        * workers/service/ExtendableMessageEvent.cpp:
        (WebCore::ExtendableMessageEvent::ExtendableMessageEvent):
        * workers/service/ExtendableMessageEvent.h:
        * workers/service/FetchEvent.cpp:
        (WebCore::FetchEvent::promiseIsSettled):
        * worklets/PaintWorkletGlobalScope.cpp:
        (WebCore::PaintWorkletGlobalScope::registerPaint):
        * worklets/PaintWorkletGlobalScope.h:
        * worklets/PaintWorkletGlobalScope.idl:
        * worklets/WorkletConsoleClient.cpp:
        (WebCore::WorkletConsoleClient::messageWithTypeAndLevel):
        (WebCore::WorkletConsoleClient::count):
        (WebCore::WorkletConsoleClient::countReset):
        (WebCore::WorkletConsoleClient::time):
        (WebCore::WorkletConsoleClient::timeLog):
        (WebCore::WorkletConsoleClient::timeEnd):
        (WebCore::WorkletConsoleClient::profile):
        (WebCore::WorkletConsoleClient::profileEnd):
        (WebCore::WorkletConsoleClient::takeHeapSnapshot):
        (WebCore::WorkletConsoleClient::timeStamp):
        (WebCore::WorkletConsoleClient::record):
        (WebCore::WorkletConsoleClient::recordEnd):
        (WebCore::WorkletConsoleClient::screenshot):
        * worklets/WorkletConsoleClient.h:
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::addMessage):
        * worklets/WorkletGlobalScope.h:
        * worklets/WorkletScriptController.cpp:
        (WebCore::WorkletScriptController::evaluate):
        (WebCore::WorkletScriptController::setException):

2019-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>

        imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https.html is flaky
        https://bugs.webkit.org/show_bug.cgi?id=203181

        Reviewed by Ryosuke Niwa.

        This test is flaky because its results currently vary depending on whether content already exists on the
        platform pasteboard. In this test, the page is able to read items from the clipboard since DOM paste and
        programmatic clipboard access are enabled when running layout tests. However, in the case where the pasteboard
        is empty, we end up rejecting the promise due to an early return in Clipboard::read(). In contrast, when the
        pasteboard has at least one item, we'll end up resolving the promise with a sequence of ClipboardItems, which
        then causes the test to fail because it expects this result to be a DataTransfer instead (which, at time of
        writing, is incorrect w.r.t. the async clipboard spec).

        To fix this, we remove this early return that rejects the promise when there are no pasteboard items, and
        instead allow the promise to resolve with no items. However, simply removing this check would mean that if the
        pasteboard change count changes between the start of the call to Clipboard.read() and retrieval of item
        information from the platform pasteboard, we'll no longer reject the promimse as expected. This is because we
        currently iterate through each of the items and check that the item's change count matches, so if there are no
        items, we simply avoid checking the change count.

        We address this by instead sending the expected change count along with the request for allPasteboardItemInfo(),
        and refactoring the implementation of allPasteboardItemInfo (and informationForItemAtIndex) to instead check
        this expected change count against the current change count of the pasteboard.

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::read):

        Remove the `allInfo.isEmpty()` early return, and also remove a FIXME that is addressed by this refactoring.

        * Modules/async-clipboard/Clipboard.h:
        * platform/Pasteboard.cpp:
        (WebCore::Pasteboard::allPasteboardItemInfo const):
        (WebCore::Pasteboard::pasteboardItemInfo const):

        Make these methods require a changeCount; also, make these return optional results.

        * platform/Pasteboard.h:
        (WebCore::Pasteboard::changeCount const):
        * platform/PasteboardItemInfo.h:
        (WebCore::PasteboardItemInfo::encode const):
        (WebCore::PasteboardItemInfo::decode):

        Remove PasteboardItemInfo's changeCount, now that the check occurs in the client layer.

        * platform/PasteboardStrategy.h:
        * platform/PlatformPasteboard.h:
        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::Pasteboard::fileContentState):
        (WebCore::Pasteboard::changeCount const):
        * platform/cocoa/PlatformPasteboardCocoa.mm:
        (WebCore::PlatformPasteboard::allPasteboardItemInfo):
        * platform/gtk/PlatformPasteboardGtk.cpp:
        (WebCore::PlatformPasteboard::write):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::changeCountForPasteboard):
        (WebCore::Pasteboard::Pasteboard):
        (WebCore::Pasteboard::read):
        (WebCore::Pasteboard::readRespectingUTIFidelities):
        (WebCore::Pasteboard::readPlatformValuesAsStrings):

        Normalize changeCount to be a `int64_t`, which matches iOS and macOS platforms. Before this patch, the notion of
        changeCount is very ill-defined, with some call sites expecting `long` types, other call sites expecting
        `int`, and yet others expecting `uint64_t`. This changes all of these to expect `int64_t`.

        (WebCore::Pasteboard::readFilePaths):

        Refactor these methods to bail when the resulting item information has no value (i.e. WTF::nullopt).

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::informationForItemAtIndex):
        (WebCore::PlatformPasteboard::copy):
        (WebCore::PlatformPasteboard::addTypes):
        (WebCore::PlatformPasteboard::setTypes):
        (WebCore::PlatformPasteboard::setBufferForType):
        (WebCore::PlatformPasteboard::setURL):
        (WebCore::PlatformPasteboard::setStringForType):
        (WebCore::PlatformPasteboard::changeCount const):
        (WebCore::PlatformPasteboard::setColor):
        (WebCore::PlatformPasteboard::write):
        * platform/libwpe/PlatformPasteboardLibWPE.cpp:
        (WebCore::PlatformPasteboard::write):
        * platform/mac/PasteboardMac.mm:
        (WebCore::writeURLForTypes):
        (WebCore::writeFileWrapperAsRTFDAttachment):
        (WebCore::Pasteboard::read):
        (WebCore::Pasteboard::readPlatformValuesAsStrings):
        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::write):
        (WebCore::PlatformPasteboard::changeCount const):
        (WebCore::PlatformPasteboard::copy):
        (WebCore::PlatformPasteboard::addTypes):
        (WebCore::PlatformPasteboard::setTypes):
        (WebCore::PlatformPasteboard::setBufferForType):
        (WebCore::PlatformPasteboard::setURL):
        (WebCore::PlatformPasteboard::setColor):
        (WebCore::PlatformPasteboard::setStringForType):
        (WebCore::PlatformPasteboard::informationForItemAtIndex):

2019-10-21  Chris Dumez  <cdumez@apple.com>

        Suspend dedicated worker threads while in the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203186
        <rdar://problem/56447493>

        Reviewed by Ryosuke Niwa.

        When a page with a (dedicated) Worker enters the back/forward cache, we now
        pause the worker thread, and resume it only when taking the page out of the
        back/forward cache. This avoids having the worker use CPU while the page is
        in the cache.

        * workers/Worker.cpp:
        (WebCore::Worker::suspend):
        (WebCore::Worker::resume):
        * workers/Worker.h:
        * workers/WorkerGlobalScopeProxy.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::suspend):
        (WebCore::WorkerMessagingProxy::resume):
        (WebCore::WorkerMessagingProxy::workerThreadCreated):
        * workers/WorkerMessagingProxy.h:
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::WorkerThread):
        (WebCore::WorkerThread::suspend):
        (WebCore::WorkerThread::resume):
        (WebCore::WorkerThread::stop):
        * workers/WorkerThread.h:

2019-10-21  Tim Horton  <timothy_horton@apple.com>

        Fix the build

        * platform/mock/MockAudioDestinationCocoa.cpp:
        * platform/mock/MockAudioDestinationCocoa.h:

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

        [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI
        https://bugs.webkit.org/show_bug.cgi?id=203129

        Reviewed by Tim Horton.

        https://github.com/w3c/csswg-drafts/issues/4107 resolved to name these new fonts
        ui-serif, ui-monospaced, and ui-rounded. This patch renames them, and removes the SPI
        to access these fonts.

        Tests: fast/text/design-system-ui*.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const): Deleted.
        * css/CSSFontFace.h:
        * css/CSSFontFaceSource.cpp:
        (WebCore::CSSFontFaceSource::load):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::initializeFontStyle):
        * page/Settings.yaml:
        * platform/graphics/FontCache.h:
        (WebCore::FontDescriptionKey::makeFlagsKey):
        * platform/graphics/FontDescription.cpp:
        (WebCore::m_shouldAllowUserInstalledFonts):
        (WebCore::m_shouldAllowDesignSystemUIFonts): Deleted.
        * platform/graphics/FontDescription.h:
        (WebCore::FontDescription::shouldAllowUserInstalledFonts const):
        (WebCore::FontDescription::setShouldAllowUserInstalledFonts):
        (WebCore::FontDescription::operator== const):
        (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const): Deleted.
        (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts): Deleted.
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::platformFontLookupWithFamily):
        (WebCore::fontWithFamilySpecialCase):
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::matchSystemFontUse):
        (WebCore::FontCascadeDescription::effectiveFamilyCount const):
        (WebCore::FontCascadeDescription::effectiveFamilyAt const):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
        * style/StyleResolveForDocument.cpp:
        (WebCore::Style::resolveForDocument):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):

2019-10-21  youenn fablet  <youenn@apple.com>

        Move service worker registration matching for navigation loads to network process
        https://bugs.webkit.org/show_bug.cgi?id=203144

        Reviewed by Chris Dumez.

        For regular loads, we no longer match service worker registration explicitly.
        This is now done by NetworkResourceLoader explicitly.
        We still need to explicitely match registrations in those two cases:
        - There is an app cache resource that can be used. We will use it only if there is no registration.
        - There is a resource from the meory cache that can be used. We will match the registration to make sure 
        the document is controlled by the right service worker. The load will still be served from the memory cache.

        Since DocumentLoader is no longer matching registration, we need a way from NetworkProcess to inform that there is 
        a matching registration and that the document is controlled.
        For that purpose, DocumentLoader is adding itself in a global map with the temporary document identifier as the key.
        Adding to the map happens when loading the main resource and removal from the map happens when destroying the DocumentLoader.
        For this to happen properly, the temporary document identifier is kept the same for the lifetime of the DocumentLoader.

        Registration matching was postponed until service worker registration is done.
        Since we no longer do registration matching in WebProcess, we need to wait in NetworkProcess for that to happen.
        We introduce a way for SWServer to notify when import is completed for that purpose.

        Covered by existing tests.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::fromTemporaryDocumentIdentifier):
        (WebCore::DocumentLoader::~DocumentLoader):
        (WebCore::DocumentLoader::setControllingServiceWorkerRegistration):
        (WebCore::DocumentLoader::redirectReceived):
        (WebCore::DocumentLoader::responseReceived):
        (WebCore::DocumentLoader::startLoadingMainResource):
        (WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
        (WebCore::DocumentLoader::loadMainResource):
        * loader/DocumentLoader.h:
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::canLoadMainResource):
        * loader/appcache/ApplicationCacheHost.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::~SWServer):
        (WebCore::SWServer::registrationStoreImportComplete):
        (WebCore::SWServer::whenImportIsCompleted):
        (WebCore::SWServer::doRegistrationMatching):
        * workers/service/server/SWServer.h:
        (WebCore::SWServer::isImportCompleted const):

2019-10-21  Sihui Liu  <sihui_liu@apple.com>

        Remove IDBBackingStoreTemporaryFileHandler
        https://bugs.webkit.org/show_bug.cgi?id=203128

        Reviewed by Alex Christensen.

        IDBBackingStoreTemporaryFileHandler has only one member function, and implementation of that is to delete
        files. To keep the same behavior, we can remove this class and delete the temporary files at the places where 
        objects of this class were used.

        By doing this, we no longer need to pass the NetworkProcess/InProcessIDBServer all the way down to 
        SQLiteIDBBackingStore that is used only on background thread.

        * Modules/indexeddb/server/IDBBackingStore.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::create):
        (WebCore::IDBServer::IDBServer::IDBServer):
        (WebCore::IDBServer::IDBServer::createBackingStore):
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        (WebCore::IDBServer::SQLiteIDBBackingStore::temporaryFileHandler const): Deleted.
        * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
        (WebCore::IDBServer::SQLiteIDBTransaction::moveBlobFilesIfNecessary):
        (WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
        (WebCore::IDBServer::SQLiteIDBTransaction::abort):
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::InProcessIDBServer::InProcessIDBServer):
        (WebCore::InProcessIDBServer::accessToTemporaryFileComplete): Deleted.
        * Modules/indexeddb/shared/InProcessIDBServer.h:

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

        Add MediaCapabilities support for DolbyVision codecs.
        https://bugs.webkit.org/show_bug.cgi?id=203170

        Reviewed by Eric Carlson.

        Test: media/dovi-codec-parameters.html

        Add support for parsing DolbyVision (DoVi) style codec profile strings.

        * platform/cocoa/VideoToolboxSoftLink.cpp:
        * platform/cocoa/VideoToolboxSoftLink.h:
        * platform/graphics/HEVCUtilities.cpp:
        (WebCore::codecStringForDoViCodecType):
        (WebCore::profileIDForAlphabeticDoViProfile):
        (WebCore::isValidDoViProfileID):
        (WebCore::maximumLevelIDForDoViProfileID):
        (WebCore::isValidProfileIDForCodecName):
        (WebCore::parseDoViCodecParameters):
        * platform/graphics/HEVCUtilities.h:
        * platform/graphics/cocoa/HEVCUtilitiesCocoa.h:
        * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:
        (WebCore::codecStringToCodecTypeMap):
        (WebCore::CFStringArrayToNumberVector):
        (WebCore::validateDoViParameters):
        * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
        (WebCore::createMediaPlayerDecodingConfigurationCocoa):
        * testing/Internals.cpp:
        (WebCore::Internals::parseDoViCodecParameters):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-21  Dean Jackson  <dino@apple.com>

        Dispatch AR event on the originating anchor element
        https://bugs.webkit.org/show_bug.cgi?id=203198
        <rdar://55743929>

        Reviewed by Simon Fraser.

        Expose an ElementContext on the SystemPreviewInfo, so that
        when something happens in the AR QuickLook an event can be
        fired on the originating <a> element.

        * dom/Document.cpp:
        (WebCore::Document::dispatchSystemPreviewActionEvent): Make sure
        we dispatch only to the HTMLAnchorElement.
        * dom/Document.h:
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::handleClick):
        * loader/FrameLoaderTypes.h:
        (WebCore::SystemPreviewInfo::encode const):
        (WebCore::SystemPreviewInfo::decode):
        * testing/Internals.cpp:
        (WebCore::Internals::elementIdentifier const):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-21  Dean Jackson  <dino@apple.com>

        Move ElementContext from WebKit to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=203210
        <rdar://problem/56475682>

        Reviewed by Simon Fraser.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/RadioButtonGroups.h:

2019-10-21  Alex Christensen  <achristensen@webkit.org>

        ServiceWorker tests should use TCPServer instead of WKURLSchemeHandler
        https://bugs.webkit.org/show_bug.cgi?id=203141

        Reviewed by Youenn Fablet.

        This makes the tests more like what users will see,
        and it allows us to not consult custom schemes when loading service workers,
        which is preventing us from moving logic to the NetworkProcess.  See bug 203055.
        Also, I now remove test-only code that's not used anymore.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::SWServer):
        (WebCore::SWServer::canHandleScheme const):
        * workers/service/server/SWServer.h:

2019-10-21  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Provide a flag for technology preview builds
        https://bugs.webkit.org/show_bug.cgi?id=203164
        <rdar://problem/56202164>

        Reviewed by Devin Rousso.

        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::isExperimentalBuild):
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.idl:

2019-10-21  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2]: Add 'auto' behavior to the 'width' and 'height' properties of the SVG <image> element
        https://bugs.webkit.org/show_bug.cgi?id=202013

        Reviewed by Simon Fraser.

        The spec page is: https://www.w3.org/TR/SVG/geometry.html#Sizing

        Handle the case if the 'width' or the 'height' of an SVG <image> or both
        are missing.

        Tests: svg/custom/image-width-height-auto-dynamic.svg
               svg/custom/image-width-height-auto-initial.svg
               svg/custom/image-width-height-length-initial.svg

        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::calculateObjectBoundingBox const):
        (WebCore::RenderSVGImage::updateImageViewport):
        * rendering/svg/RenderSVGImage.h:

2019-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Implement ClipboardItem.getType() for platform clipboard items
        https://bugs.webkit.org/show_bug.cgi?id=203168

        Reviewed by Tim Horton.

        This patch completes support for ClipboardItem.getType().

        Tests:  editing/async-clipboard/clipboard-change-data-while-getting-type.html
                editing/async-clipboard/clipboard-get-type-with-old-items.html
                editing/async-clipboard/clipboard-item-get-type-basic.html
                ClipboardTests.ReadMultipleItems

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::getType):

        Implement getType(). If the given clipboard item is being tracked as one of the active clipboard items, then
        allow it to read data from the platform pasteboard. We use existing pasteboard reading methods and classes
        (PasteboardPlainText and WebContentMarkupReader) to ask the platform pasteboard for text and markup data,
        respectively, and go through readURL() for "text/uri-list".

        Before exposing any data to the page, we additionally check that the change count of the pasteboard is still
        what we started with when setting up the current session. If this is not the case, we reject the promise and
        immediately clear out the session.

        (WebCore::Clipboard::activePasteboard):
        * Modules/async-clipboard/Clipboard.h:
        * dom/DataTransfer.h:

        Drive-by tweak: make the WebContentReadingPolicy enum class narrower.

        * platform/Pasteboard.h:

        Add an enum flag for allowing or ignoring the platform URL type when reading plain text from the platform
        pasteboard. We use this in Clipboard::getType() to ignore URLs on the platform pasteboard when plain text, since
        the plain text reader would otherwise prefer URLs over plain text by default, and read the URL type instead of
        the plain text type.

        * platform/StaticPasteboard.h:
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::Pasteboard::read):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::read):
        * platform/libwpe/PasteboardLibWPE.cpp:
        (WebCore::Pasteboard::read):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::read):
        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::read):

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

        Setting border-radius on <video> element clips top and left sections of video
        https://bugs.webkit.org/show_bug.cgi?id=202049
        <rdar://problem/55570024>

        Reviewed by Dean Jackson.

        updateClippingStrategy() is called both when we're setting a mask layer on m_layer,
        and on m_contentsClippingLayer, and they disagreed on the coordinate space that
        the rounded rect was in. r246845 fixed rounded-rect scrollers, but broke video.

        Fix by declaring that the rounded rect is relative to the bounds of the layer
        argument. We don't try to size the shape layer to the rounded rect, because in some
        configurations (e.g. scroller with left scrollbar) the rounded rect hangs outside
        the clipping layer.

        Test: compositing/video/video-border-radius-clipping.html

        * platform/graphics/FloatRoundedRect.h:
        (WebCore::FloatRoundedRect::setLocation):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateClippingStrategy):
        (WebCore::GraphicsLayerCA::updateContentsRects): The rounded rect is relative to the contentsClippingLayer,
        so set its location to zero.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateChildClippingStrategy): negate the offset, as we do in updateGeometry which
        has similar code.

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

        [iOS WK2] Support hiding iframe scrollbars via ::-webkit-scrollbar style
        https://bugs.webkit.org/show_bug.cgi?id=203178

        Reviewed by Dean Jackson.
        
        ::-webkit-scrollbar {
            display: none;
        }
        is supported for overflow:scroll, but not for iframes. To make the latter work,
        two fixes were necessary.
        
        First, FrameView had to implement horizontalScrollbarHiddenByStyle()/verticalScrollbarHiddenByStyle().
        This is a little tricky on iOS because we never create RenderScrollbars, so we have to consult
        pseudo-styles directly; a bit of refactoring makes that cleaner.
        
        Second, ScrollableAreaParameters was failing to check horizontalScrollbarHiddenByStyle/verticalScrollbarHiddenByStyle
        in operator==, meaning that these data often didn't make it to the UI process.

        Test: fast/scrolling/ios/scrollbar-hiding-iframes.html

        * page/FrameView.cpp:
        (WebCore::FrameView::rootElementForCustomScrollbarPartStyle const):
        (WebCore::FrameView::createScrollbar):
        (WebCore::FrameView::styleHidesScrollbarWithOrientation const):
        (WebCore::FrameView::horizontalScrollbarHiddenByStyle const):
        (WebCore::FrameView::verticalScrollbarHiddenByStyle const):
        (WebCore::FrameView::updateScrollCorner):
        * page/FrameView.h:
        * page/scrolling/ScrollingCoordinatorTypes.h:
        (WebCore::ScrollableAreaParameters::operator== const):
        * platform/Scrollbar.h:
        (WebCore::Scrollbar::isHiddenByStyle const):
        * rendering/RenderLayer.cpp:
        (WebCore::scrollbarHiddenByStyle):
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::getScrollbarPseudoStyle const):
        (WebCore::RenderScrollbar::isHiddenByStyle const):
        (WebCore::RenderScrollbar::getScrollbarPseudoStyle): Deleted.
        * rendering/RenderScrollbar.h:

2019-10-21  youenn fablet  <youenn@apple.com>

        Share code between AudioDestinationIOS and AudioDestinationMac
        https://bugs.webkit.org/show_bug.cgi?id=203047
        <rdar://problem/56340866>

        Reviewed by Eric Carlson.

        Introduce AudioDestinationCocoa to share code between iOS and Mac.
        Most code is now shared, except for the configuration of the audio unit which is slightly different between Mac and iOS.

        Introduce MockAudioDestinationCocoa to allow more code coverage of the shared code.
        This could also allow us to validate dynamic changes in frame rate, number of frames to process...
        Add Internals API to enable the mock destination.
 
        Covered by added test.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/audio/cocoa/AudioDestinationCocoa.cpp: Added.
        (WebCore::AudioDestination::create):
        (WebCore::AudioDestination::hardwareSampleRate):
        (WebCore::AudioDestination::maxChannelCount):
        (WebCore::AudioDestinationCocoa::AudioDestinationCocoa):
        (WebCore::AudioDestinationCocoa::~AudioDestinationCocoa):
        (WebCore::AudioDestinationCocoa::start):
        (WebCore::AudioDestinationCocoa::stop):
        (WebCore::AudioDestinationCocoa::setIsPlaying):
        (WebCore::AudioDestinationCocoa::setAudioStreamBasicDescription):
        (WebCore::assignAudioBuffersToBus):
        (WebCore::AudioDestinationCocoa::render):
        (WebCore::AudioDestinationCocoa::inputProc):
        * platform/audio/cocoa/AudioDestinationCocoa.h: Added.
        (WebCore::AudioDestinationCocoa::outputUnit):
        * platform/audio/ios/AudioDestinationIOS.cpp:
        (WebCore::AudioDestinationCocoa::configure):
        (WebCore::AudioDestinationCocoa::processBusAfterRender):
        * platform/audio/ios/AudioDestinationIOS.h: Removed.
        * platform/audio/mac/AudioDestinationMac.cpp:
        (WebCore::AudioDestinationCocoa::configure):
        (WebCore::AudioDestinationCocoa::processBusAfterRender):
        * platform/audio/mac/AudioDestinationMac.h: Removed.
        * platform/mock/MockAudioDestinationCocoa.cpp: Added.
        (WebCore::MockAudioDestinationCocoa::MockAudioDestinationCocoa):
        (WebCore::MockAudioDestinationCocoa::start):
        (WebCore::MockAudioDestinationCocoa::stop):
        (WebCore::MockAudioDestinationCocoa::tick):
        * platform/mock/MockAudioDestinationCocoa.h: Added.
        * testing/Internals.cpp:
        (WebCore::Internals::Internals):
        (WebCore::Internals::useMockAudioDestinationCocoa):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-21  Chris Dumez  <cdumez@apple.com>

        XMLHttpRequest should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203107
        <rdar://problem/56438647>

        Reviewed by Youenn Fablet.

        Improve XMLHttpRequest for back/forward cache suspension:
        1. We no longer cancel pending loads in the suspend() method as this may
           fire events.
        2. Simplify XMLHttpRequestProgressEventThrottle to use SuspendableTimers
           to dispatch events that are deferred by suspension or throttling.

        Test: http/tests/navigation/page-cache-xhr-in-loading-iframe.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::XMLHttpRequest):
        (WebCore::XMLHttpRequest::open):
        Add check to throw a InvalidStateError if the associated document is not fully active,
        as per https://xhr.spec.whatwg.org/#dom-xmlhttprequest-open (Step 2). This avoids
        dispatching events after ActiveDOMObject::stop() has been called and brings a few more
        passes on WPT tests.

        (WebCore::XMLHttpRequest::dispatchEvent):
        (WebCore::XMLHttpRequest::suspend):
        (WebCore::XMLHttpRequest::resume):
        (WebCore::XMLHttpRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
        (WebCore::XMLHttpRequest::resumeTimerFired): Deleted.
        * xml/XMLHttpRequest.h:
        * xml/XMLHttpRequestProgressEventThrottle.cpp:
        (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEvent):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventWhenPossible):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchProgressEvent):
        (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEventsAfterResuming):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEventTimerFired):
        (WebCore::XMLHttpRequestProgressEventThrottle::suspend):
        (WebCore::XMLHttpRequestProgressEventThrottle::resume):
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent): Deleted.
        (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents): Deleted.
        (WebCore::XMLHttpRequestProgressEventThrottle::fired): Deleted.
        (WebCore::XMLHttpRequestProgressEventThrottle::hasEventToDispatch const): Deleted.
        * xml/XMLHttpRequestProgressEventThrottle.h:

2019-10-21  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Revert WebKitMediaSrc rework temporarily
        https://bugs.webkit.org/show_bug.cgi?id=203078

        Reviewed by Carlos Garcia Campos.

        While the WebKitMediaSrc rework fixed a number of tests and introduced
        design improvements in MSE, it also exposed a number of bugs related
        to the playbin3 switch.

        Fixing these has been turned tricky, so in order to not keep known
        user-facing bugs, I'm reverting it for now until a workable solution
        is available.

        * platform/GStreamer.cmake:
        * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
        (WTF::refGPtr<GstMiniObject>): Deleted.
        (WTF::derefGPtr<GstMiniObject>): Deleted.
        * platform/graphics/gstreamer/GRefPtrGStreamer.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
        (WebCore::MediaPlayerPrivateGStreamer::paused const):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
        (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
        (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::configurePlaySink):
        (WebCore::MediaPlayerPrivateGStreamer::invalidateCachedPosition): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
        (WebCore::MediaPlayerPrivateGStreamerBase::sizeChanged):
        (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
        (WebCore::MediaPlayerPrivateGStreamerBase::naturalSizeFromCaps const): Deleted.
        (WebCore::MediaPlayerPrivateGStreamerBase::doSamplesHaveDifferentNaturalSizes const): Deleted.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
        (WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
        (WebCore::AppendPipeline::appsinkNewSample):
        (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
        * platform/graphics/gstreamer/mse/AppendPipeline.h:
        (WebCore::AppendPipeline::appsinkCaps):
        (WebCore::AppendPipeline::track):
        (WebCore::AppendPipeline::streamType):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::~MediaPlayerPrivateGStreamerMSE):
        (WebCore::MediaPlayerPrivateGStreamerMSE::load):
        (WebCore::MediaPlayerPrivateGStreamerMSE::pause):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::configurePlaySink):
        (WebCore::MediaPlayerPrivateGStreamerMSE::changePipelineState):
        (WebCore::MediaPlayerPrivateGStreamerMSE::notifySeekNeedsDataForTime):
        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updatePlaybackRate):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seeking const):
        (WebCore::MediaPlayerPrivateGStreamerMSE::setReadyState):
        (WebCore::MediaPlayerPrivateGStreamerMSE::waitForSeekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
        (WebCore::MediaPlayerPrivateGStreamerMSE::asyncStateChangeDone):
        (WebCore::MediaPlayerPrivateGStreamerMSE::mediaSourceClient):
        (WebCore::MediaPlayerPrivateGStreamerMSE::unblockDurationChanges):
        (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
        (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
        (WebCore::MediaPlayerPrivateGStreamerMSE::markEndOfStream):
        (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
        (WebCore::MediaPlayerPrivateGStreamerMSE::play): Deleted.
        (WebCore::MediaPlayerPrivateGStreamerMSE::reportSeekCompleted): Deleted.
        (WebCore::MediaPlayerPrivateGStreamerMSE::didEnd): Deleted.
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
        (WebCore::MediaSourceClientGStreamerMSE::addSourceBuffer):
        (WebCore::MediaSourceClientGStreamerMSE::markEndOfStream):
        (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
        (WebCore::MediaSourceClientGStreamerMSE::flush):
        (WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
        (WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
        (WebCore::MediaSourceClientGStreamerMSE::isReadyForMoreSamples): Deleted.
        (WebCore::MediaSourceClientGStreamerMSE::notifyClientWhenReadyForMoreSamples): Deleted.
        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
        (WebCore::MediaSourceGStreamer::markEndOfStream):
        (WebCore::MediaSourceGStreamer::unmarkEndOfStream):
        (WebCore::MediaSourceGStreamer::waitForSeekCompleted):
        (WebCore::MediaSourceGStreamer::seekCompleted):
        * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
        * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: Added.
        (getStreamByTrackId):
        (getStreamBySourceBufferPrivate):
        (pushSample):
        (WebCore::PlaybackPipeline::setWebKitMediaSrc):
        (WebCore::PlaybackPipeline::webKitMediaSrc):
        (WebCore::PlaybackPipeline::addSourceBuffer):
        (WebCore::PlaybackPipeline::removeSourceBuffer):
        (WebCore::PlaybackPipeline::attachTrack):
        (WebCore::PlaybackPipeline::reattachTrack):
        (WebCore::PlaybackPipeline::notifyDurationChanged):
        (WebCore::PlaybackPipeline::markEndOfStream):
        (WebCore::PlaybackPipeline::flush):
        (WebCore::PlaybackPipeline::enqueueSample):
        (WebCore::PlaybackPipeline::allSamplesInTrackEnqueued):
        (WebCore::PlaybackPipeline::pipeline):
        * platform/graphics/gstreamer/mse/PlaybackPipeline.h: Copied from Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h.
        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
        (WebCore::SourceBufferPrivateGStreamer::enqueueSample):
        (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples):
        (WebCore::SourceBufferPrivateGStreamer::setReadyForMoreSamples):
        (WebCore::SourceBufferPrivateGStreamer::notifyReadyForMoreSamples):
        (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
        (disabledAppsrcNeedData):
        (disabledAppsrcEnoughData):
        (disabledAppsrcSeekData):
        (enabledAppsrcEnoughData):
        (enabledAppsrcSeekData):
        (getStreamByAppsrc):
        (webkitMediaSrcChain):
        (webkit_media_src_init):
        (webKitMediaSrcFinalize):
        (webKitMediaSrcSetProperty):
        (webKitMediaSrcGetProperty):
        (webKitMediaSrcDoAsyncStart):
        (webKitMediaSrcDoAsyncDone):
        (webKitMediaSrcChangeState):
        (webKitMediaSrcGetSize):
        (webKitMediaSrcQueryWithParent):
        (webKitMediaSrcUpdatePresentationSize):
        (webKitMediaSrcLinkStreamToSrcPad):
        (webKitMediaSrcLinkSourcePad):
        (webKitMediaSrcFreeStream):
        (webKitMediaSrcCheckAllTracksConfigured):
        (webKitMediaSrcUriGetType):
        (webKitMediaSrcGetProtocols):
        (webKitMediaSrcGetUri):
        (webKitMediaSrcSetUri):
        (webKitMediaSrcUriHandlerInit):
        (seekNeedsDataMainThread):
        (notifyReadyForMoreSamplesMainThread):
        (webKitMediaSrcSetMediaPlayerPrivate):
        (webKitMediaSrcSetReadyForSamples):
        (webKitMediaSrcPrepareSeek):
        (WebKitMediaSrcPrivate::streamByName): Deleted.
        (): Deleted.
        (WTF::refGPtr<WebKitMediaSrcPad>): Deleted.
        (WTF::derefGPtr<WebKitMediaSrcPad>): Deleted.
        (webkit_media_src_pad_class_init): Deleted.
        (Stream::Stream): Deleted.
        (Stream::StreamingMembers::StreamingMembers): Deleted.
        (Stream::StreamingMembers::durationEnqueued const): Deleted.
        (findPipeline): Deleted.
        (webkit_media_src_class_init): Deleted.
        (debugProbe): Deleted.
        (copyCollectionAndAddStream): Deleted.
        (copyCollectionWithoutStream): Deleted.
        (gstStreamType): Deleted.
        (webKitMediaSrcAddStream): Deleted.
        (webKitMediaSrcRemoveStream): Deleted.
        (webKitMediaSrcActivateMode): Deleted.
        (webKitMediaSrcPadLinked): Deleted.
        (webKitMediaSrcStreamNotifyLowWaterLevel): Deleted.
        (webKitMediaSrcLoop): Deleted.
        (webKitMediaSrcEnqueueObject): Deleted.
        (webKitMediaSrcEnqueueSample): Deleted.
        (webKitMediaSrcEnqueueEvent): Deleted.
        (webKitMediaSrcEndOfStream): Deleted.
        (webKitMediaSrcIsReadyForMoreSamples): Deleted.
        (webKitMediaSrcNotifyWhenReadyForMoreSamples): Deleted.
        (webKitMediaSrcStreamFlushStart): Deleted.
        (webKitMediaSrcStreamFlushStop): Deleted.
        (webKitMediaSrcFlush): Deleted.
        (webKitMediaSrcSeek): Deleted.
        (countStreamsOfType): Deleted.
        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.h:
        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h: Added.

2019-10-21  Tim Horton  <timothy_horton@apple.com>

        Clean up some includes to improve WebKit2 build speed
        https://bugs.webkit.org/show_bug.cgi?id=203071

        Reviewed by Wenson Hsieh.

        No new tests, just shuffling code around.

        * bindings/js/WindowProxy.cpp:
        (WebCore::WindowProxy::WindowProxy):
        (WebCore::WindowProxy::~WindowProxy):
        (WebCore::WindowProxy::detachFromFrame):
        (WebCore::WindowProxy::destroyJSWindowProxy):
        (WebCore::WindowProxy::createJSWindowProxy):
        (WebCore::WindowProxy::jsWindowProxiesAsVector const):
        (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
        (WebCore::WindowProxy::setDOMWindow):
        (WebCore::WindowProxy::attachDebugger):
        (WebCore::WindowProxy::jsWindowProxies const):
        (WebCore::WindowProxy::releaseJSWindowProxies):
        (WebCore::WindowProxy::setJSWindowProxies):
        * bindings/js/WindowProxy.h:
        (WebCore::WindowProxy::existingJSWindowProxy const):
        (WebCore::WindowProxy::jsWindowProxies const): Deleted.
        (WebCore::WindowProxy::releaseJSWindowProxies): Deleted.
        (WebCore::WindowProxy::setJSWindowProxies): Deleted.
        * platform/graphics/cocoa/IOSurface.h:
        * platform/graphics/cocoa/IOSurface.mm:
        (WebCore::IOSurface::~IOSurface):

2019-10-21  Joonghun Park  <jh718.park@samsung.com>

        [GTK] Unreviewed. Fix build warning: unused parameter ‘Foo’ [-Wunused-parameter] since r251320.

        * dom/Element.cpp:
        (WebCore::shouldIgnoreMouseEvent):

2019-10-20  Chris Dumez  <cdumez@apple.com>

        Unreviewed, drop debug logging that was inadvertently committed with r251327.

        * history/BackForwardCache.cpp:

2019-10-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Make InlineTextItem reusable when 'segment break' behavior changes
        https://bugs.webkit.org/show_bug.cgi?id=203184
        <rdar://problem/56438945>

        Reviewed by Antti Koivisto.

        InlineTextItem::isWhitespace should dynamically check for 'preserve new line' behavior. This way we don't have to rebuild the inline item list
        when the related style property value changes.

        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::isWhitespaceCharacter):
        (WebCore::Layout::moveToNextNonWhitespacePosition):
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::createWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
        (WebCore::Layout::InlineTextItem::createSegmentBreakItem):
        (WebCore::Layout::InlineTextItem::createEmptyItem):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        (WebCore::Layout::InlineTextItem::split const):
        (WebCore::Layout::InlineTextItem::isWhitespace const):
        (WebCore::Layout::isSoftLineBreak): Deleted.
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::isSegmentBreak const):
        (WebCore::Layout::InlineTextItem::isWhitespace const): Deleted.

2019-10-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move the collapsed bit from InlineItems to runs
        https://bugs.webkit.org/show_bug.cgi?id=203183

        Reviewed by Antti Koivisto.
        <rdar://problem/56437181>

        Let's not store the collapsed bit on the InlineTextItem. All we need to know is whether the InlineTextItem content is collapsible or not.
        Also when only the white-space property changes (going from preserve whitespace to not and vice versa) we don't actually need to rebuild the
        InlinItem list since they don't carry any layout dependent information.
        This patch also fixes leading/trailing content preservation. 

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::canBeExtended const):
        (WebCore::Layout::shouldPreserveTrailingContent):
        (WebCore::Layout::shouldPreserveLeadingContent):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::isCollapsed const):
        (WebCore::Layout::Line::Run::setIsCollapsed):
        * layout/inlineformatting/InlineLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        (WebCore::Layout::InlineTextItem::split const):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::isCollapsible const):
        (WebCore::Layout::InlineTextItem::isCollapsed const): Deleted.
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::isTrimmableContent): Deleted.
        * layout/inlineformatting/text/TextUtil.h:

2019-10-19  Chris Dumez  <cdumez@apple.com>

        FileReader should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203106

        Reviewed by Geoffrey Garen.

        FileReader should not prevent entering the back/forward cache. To support this,
        its implementation now uses a SuspendableTaskQueue to dispatch events.

        Test: fast/files/file-reader-back-forward-cache.html

        * dom/ActiveDOMObject.cpp:
        (WebCore::ActiveDOMObject::isAllowedToRunScript const):
        * dom/ActiveDOMObject.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::FileReader):
        (WebCore::FileReader::stop):
        (WebCore::FileReader::hasPendingActivity const):
        (WebCore::FileReader::readInternal):
        (WebCore::FileReader::abort):
        (WebCore::FileReader::didStartLoading):
        (WebCore::FileReader::didReceiveData):
        (WebCore::FileReader::didFinishLoading):
        (WebCore::FileReader::didFail):
        (WebCore::FileReader::fireEvent):
        * fileapi/FileReader.h:

2019-10-19  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fix non-unified builds after r250857
        https://bugs.webkit.org/show_bug.cgi?id=203145

        Reviewed by Carlos Garcia Campos.

        No new tests needed.

        * Modules/async-clipboard/ClipboardItem.cpp: Add missing inclusion of the Clipboard.h header.
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: Add missing inclusion of the
        ClipboardItem.h header.
        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp: Add missing inclusions of
        the Clipboard.h, ClipboardItem.h, and JSDOMPromiseDeferred.h headers.
        * dom/AbstractEventLoop.h: Add missing inclusion of the wtf/RefCounted.h header.
        * dom/WindowEventLoop.h: Add missing inclusion of the DocumentIdentifier.h header.
        * dom/IdleCallbackController.h: Add missing forward-declaration for the Document class.
        * dom/RadioButtonGroups.h: Add needed inclusion of of the wtf/text/AtomStringHash.h header,
        needed because AtomString is used as key for a HashMap; remove the (now unneeded) of the
        wtf/Forward.h header.
        * page/WheelEventTestMonitor.cpp: Add missing inclusion of the wtf/OptionSet.h header.
        * rendering/style/ShadowData.cpp: Add missing inclusion of the wtf/text/TextStream.h header.

2019-10-19  Ryosuke Niwa  <rniwa@webkit.org>

        Integrate media query evaluation into HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=203134
        <rdar://problem/56396316>

        Reviewed by Antti Koivisto.

        Moved the code to call media query listeners to HTML5 event loop's step to update the rendering:
        https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering

        Tests: fast/media/mq-inverted-colors-live-update-for-listener.html
               fast/media/mq-prefers-reduced-motion-live-update-for-listener.html

        * css/MediaQueryMatcher.cpp:
        (WebCore::MediaQueryMatcher::evaluateAll): Renamed from styleResolverChanged.
        * css/MediaQueryMatcher.h:
        * dom/Document.cpp:
        (WebCore::Document::updateElementsAffectedByMediaQueries): Split from evaluateMediaQueryList.
        This function is still called right after each layout update so that picture element may start
        requesting newly selected image resources without having to wait for a rendering update.
        But this function will no longer execute arbitrary scripts.
        (WebCore::Document::evaluateMediaQueriesAndReportChanges): Split from evaluateMediaQueryList.
        Evaluates media query listeners.
        * dom/Document.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::setEmulatedMedia): Force the evaluation of media queries for now
        but this code should really be scheduling a rendering update instead so added a FIXME.
        * page/Frame.cpp:
        (WebCore::Frame::setPrinting): Evaluate media queries. We should consider invoking the full
        algorithm to update the rendering here. e.g. intersection observer may add more contents.
        * page/Page.cpp:
        (WebCore::Page::updateRendering): Call evaluateMediaQueriesAndReportChanges.

2019-10-18  Tim Horton  <timothy_horton@apple.com>

        macCatalyst: Cursor should send mouse events, not touch events
        https://bugs.webkit.org/show_bug.cgi?id=203175
        <rdar://problem/56321134>

        Reviewed by Simon Fraser.

        * dom/Element.cpp:
        (WebCore::shouldIgnoreMouseEvent):
        (WebCore::Element::dispatchMouseEvent):
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::reset):
        Share more code between platforms that support touch events and platforms that don't;
        we want to be able to dispatch pointer events that originate from mouse events
        in macCatalyst despite touch events being enabled (by virtue of being iOS WebKit),
        so un-ifdef that code.

2019-10-18  Simon Fraser  <simon.fraser@apple.com>

        Make it possible to query scrollbar pseudo-style without having a scrollbar
        https://bugs.webkit.org/show_bug.cgi?id=203174

        Reviewed by Tim Horton.

        A future patch needs the ability to query scrollbar pseudo-style without having
        a scrollbar, and it was ugly to pass a live RenderScrollbar into CSS style resolution
        functions. Instead, pass in a pure-data object that has information about the scrollbar.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::ruleMatches):
        * css/SelectorChecker.h:
        * css/SelectorCheckerTestFunctions.h:
        (WebCore::scrollbarMatchesEnabledPseudoClass):
        (WebCore::scrollbarMatchesDisabledPseudoClass):
        (WebCore::scrollbarMatchesHoverPseudoClass):
        (WebCore::scrollbarMatchesActivePseudoClass):
        (WebCore::scrollbarMatchesHorizontalPseudoClass):
        (WebCore::scrollbarMatchesVerticalPseudoClass):
        (WebCore::scrollbarMatchesDecrementPseudoClass):
        (WebCore::scrollbarMatchesIncrementPseudoClass):
        (WebCore::scrollbarMatchesStartPseudoClass):
        (WebCore::scrollbarMatchesEndPseudoClass):
        (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
        (WebCore::scrollbarMatchesSingleButtonPseudoClass):
        (WebCore::scrollbarMatchesNoButtonPseudoClass):
        (WebCore::scrollbarMatchesCornerPresentPseudoClass):
        * css/StyleResolver.h:
        (WebCore::PseudoStyleRequest::PseudoStyleRequest):
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::getScrollbarPseudoStyle):

2019-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2]: Remove the SVGExternalResourcesRequired interface
        https://bugs.webkit.org/show_bug.cgi?id=191293

        Reviewed by Simon Fraser.

        The spec page is: https://www.w3.org/TR/SVG/changes.html.

        r251290 made externalResourcesRequired have no effect on firing the load
        event. All the control was moved to SVGURIReference. This patch will remove
        this interface entirely to conform with SVG2 specs and other browsers.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::SVGAElement):
        (WebCore::SVGAElement::parseAttribute):
        (WebCore::SVGAElement::svgAttributeChanged):
        * svg/SVGAElement.h:
        * svg/SVGAElement.idl:
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::SVGAnimationElement):
        (WebCore::SVGAnimationElement::isSupportedAttribute):
        (WebCore::SVGAnimationElement::parseAttribute):
        * svg/SVGAnimationElement.h:
        * svg/SVGAnimationElement.idl:
        * svg/SVGCircleElement.cpp:
        (WebCore::SVGCircleElement::SVGCircleElement):
        (WebCore::SVGCircleElement::parseAttribute):
        (WebCore::SVGCircleElement::svgAttributeChanged):
        * svg/SVGCircleElement.h:
        * svg/SVGCircleElement.idl:
        * svg/SVGClipPathElement.cpp:
        (WebCore::SVGClipPathElement::SVGClipPathElement):
        (WebCore::SVGClipPathElement::parseAttribute):
        (WebCore::SVGClipPathElement::svgAttributeChanged):
        * svg/SVGClipPathElement.h:
        * svg/SVGClipPathElement.idl:
        * svg/SVGCursorElement.cpp:
        (WebCore::SVGCursorElement::SVGCursorElement):
        (WebCore::SVGCursorElement::parseAttribute):
        * svg/SVGCursorElement.h:
        * svg/SVGCursorElement.idl:
        * svg/SVGDefsElement.cpp:
        (WebCore::SVGDefsElement::SVGDefsElement):
        * svg/SVGDefsElement.h:
        * svg/SVGDefsElement.idl:
        * svg/SVGEllipseElement.cpp:
        (WebCore::SVGEllipseElement::SVGEllipseElement):
        (WebCore::SVGEllipseElement::parseAttribute):
        (WebCore::SVGEllipseElement::svgAttributeChanged):
        * svg/SVGEllipseElement.h:
        * svg/SVGEllipseElement.idl:
        * svg/SVGExternalResourcesRequired.cpp: Removed.
        * svg/SVGExternalResourcesRequired.h: Removed.
        * svg/SVGExternalResourcesRequired.idl: Removed.
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::SVGFEImageElement):
        (WebCore::SVGFEImageElement::parseAttribute):
        * svg/SVGFEImageElement.h:
        * svg/SVGFEImageElement.idl:
        * svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::SVGFilterElement):
        (WebCore::SVGFilterElement::parseAttribute):
        (WebCore::SVGFilterElement::svgAttributeChanged):
        * svg/SVGFilterElement.h:
        * svg/SVGFilterElement.idl:
        * svg/SVGFontElement.cpp:
        (WebCore::SVGFontElement::SVGFontElement):
        * svg/SVGFontElement.h:
        * svg/SVGForeignObjectElement.cpp:
        (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
        (WebCore::SVGForeignObjectElement::parseAttribute):
        (WebCore::SVGForeignObjectElement::svgAttributeChanged):
        * svg/SVGForeignObjectElement.h:
        * svg/SVGForeignObjectElement.idl:
        * svg/SVGGElement.cpp:
        (WebCore::SVGGElement::SVGGElement):
        (WebCore::SVGGElement::parseAttribute): Deleted.
        (WebCore::SVGGElement::svgAttributeChanged): Deleted.
        * svg/SVGGElement.h:
        * svg/SVGGElement.idl:
        * svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::SVGGradientElement):
        (WebCore::SVGGradientElement::parseAttribute):
        * svg/SVGGradientElement.h:
        * svg/SVGGradientElement.idl:
        * svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::SVGImageElement):
        (WebCore::SVGImageElement::parseAttribute):
        (WebCore::SVGImageElement::svgAttributeChanged):
        * svg/SVGImageElement.h:
        * svg/SVGImageElement.idl:
        * svg/SVGLineElement.cpp:
        (WebCore::SVGLineElement::SVGLineElement):
        (WebCore::SVGLineElement::parseAttribute):
        (WebCore::SVGLineElement::svgAttributeChanged):
        * svg/SVGLineElement.h:
        * svg/SVGLineElement.idl:
        * svg/SVGMPathElement.cpp:
        (WebCore::SVGMPathElement::SVGMPathElement):
        (WebCore::SVGMPathElement::parseAttribute):
        (WebCore::SVGMPathElement::svgAttributeChanged):
        * svg/SVGMPathElement.h:
        * svg/SVGMPathElement.idl:
        * svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::SVGMarkerElement):
        (WebCore::SVGMarkerElement::parseAttribute):
        (WebCore::SVGMarkerElement::svgAttributeChanged):
        * svg/SVGMarkerElement.h:
        * svg/SVGMarkerElement.idl:
        * svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::SVGMaskElement):
        (WebCore::SVGMaskElement::parseAttribute):
        (WebCore::SVGMaskElement::svgAttributeChanged):
        * svg/SVGMaskElement.h:
        * svg/SVGMaskElement.idl:
        * svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::SVGPathElement):
        (WebCore::SVGPathElement::parseAttribute):
        (WebCore::SVGPathElement::svgAttributeChanged):
        * svg/SVGPathElement.h:
        * svg/SVGPathElement.idl:
        * svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::SVGPatternElement):
        (WebCore::SVGPatternElement::parseAttribute):
        (WebCore::SVGPatternElement::svgAttributeChanged):
        * svg/SVGPatternElement.h:
        * svg/SVGPatternElement.idl:
        * svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::SVGPolyElement):
        (WebCore::SVGPolyElement::parseAttribute):
        (WebCore::SVGPolyElement::svgAttributeChanged):
        * svg/SVGPolyElement.h:
        * svg/SVGPolygonElement.idl:
        * svg/SVGPolylineElement.idl:
        * svg/SVGRectElement.cpp:
        (WebCore::SVGRectElement::SVGRectElement):
        (WebCore::SVGRectElement::parseAttribute):
        (WebCore::SVGRectElement::svgAttributeChanged):
        * svg/SVGRectElement.h:
        * svg/SVGRectElement.idl:
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::SVGSVGElement):
        (WebCore::SVGSVGElement::parseAttribute):
        (WebCore::SVGSVGElement::svgAttributeChanged):
        * svg/SVGSVGElement.h:
        * svg/SVGSVGElement.idl:
        * svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::SVGScriptElement):
        (WebCore::SVGScriptElement::parseAttribute):
        (WebCore::SVGScriptElement::svgAttributeChanged):
        * svg/SVGScriptElement.h:
        * svg/SVGScriptElement.idl:
        * svg/SVGSwitchElement.cpp:
        (WebCore::SVGSwitchElement::SVGSwitchElement):
        * svg/SVGSwitchElement.h:
        * svg/SVGSwitchElement.idl:
        * svg/SVGSymbolElement.cpp:
        (WebCore::SVGSymbolElement::SVGSymbolElement):
        (WebCore::SVGSymbolElement::parseAttribute):
        (WebCore::SVGSymbolElement::svgAttributeChanged): Deleted.
        * svg/SVGSymbolElement.h:
        * svg/SVGSymbolElement.idl:
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::SVGTextContentElement):
        (WebCore::SVGTextContentElement::parseAttribute):
        (WebCore::SVGTextContentElement::svgAttributeChanged):
        * svg/SVGTextContentElement.h:
        * svg/SVGTextContentElement.idl:
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::SVGUseElement):
        (WebCore::SVGUseElement::parseAttribute):
        (WebCore::SVGUseElement::svgAttributeChanged):
        * svg/SVGUseElement.h:
        * svg/SVGUseElement.idl:
        * svg/SVGViewElement.cpp:
        (WebCore::SVGViewElement::SVGViewElement):
        (WebCore::SVGViewElement::parseAttribute):
        (WebCore::SVGViewElement::svgAttributeChanged):
        * svg/SVGViewElement.h:
        * svg/SVGViewElement.idl:

2019-10-18  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Refactor Pasteboard::read() to take an optional item index
        https://bugs.webkit.org/show_bug.cgi?id=203161

        Reviewed by Tim Horton.

        Adds an optional `itemIndex` argument to Pasteboard::read(PasteboardPlainText&) and
        Pasteboard::read(PasteboardWebContentReader&, WebContentReadingPolicy). See below for more details.

        Tests:  CopyHTML.ItemTypesWhenCopyingWebContent
                PasteWebArchive.WebArchiveTypeIdentifier

        * editing/mac/EditorMac.mm:
        (WebCore::Editor::dataSelectionForPasteboard):

        Recognize "com.apple.webarchive" alongside "Apple Web Archive pasteboard type" when writing and reading from the
        platform pasteboard on macOS. We add support for this here because the existing private type cannot be written
        to an NSPasteboardItem, since it does not conform to a valid UTI format. Luckily, there already exists a UTI
        that represents a web archive, so we can use it instead.

        We need to write and read web archive data from NSPasteboardItem in order to support the case where there are
        multiple items in the pasteboard that contain different web archive data.

        * platform/Pasteboard.h:
        * platform/StaticPasteboard.h:
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::Pasteboard::read):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::read):

        Read the string from `itemIndex` if specified; otherwise, fall back to index 0. This could actually be fixed in
        the future to scan all pasteboard items for a suitable string instead of falling back on the first item, but for
        now, we maintain the existing behavior.

        (WebCore::Pasteboard::readRespectingUTIFidelities):

        If an `itemIndex` is specified, ignore all other item indices when looking for suitable content.

        * platform/libwpe/PasteboardLibWPE.cpp:
        (WebCore::Pasteboard::read):
        * platform/mac/DragDataMac.mm:
        (WebCore::DragData::containsCompatibleContent const):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::write):
        (WebCore::readStringAtPreferredItemIndex):
        (WebCore::readBufferAtPreferredItemIndex):

        Add helper methods to read strings and buffers from the pasteboard, at an optional `itemIndex` if specified.

        (WebCore::Pasteboard::read):

        Adopt the helper functions when reading plain text and web content, and respect the given `itemIndex`. To do
        this, we need to read both legacy and modern types from the pasteboard, instead of just legacy types. This is
        because NSPasteboardItem on macOS only accepts and provides data in the form of modern pasteboard types.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
        (WebCore::PlatformPasteboard::readBuffer const):
        (WebCore::PlatformPasteboard::readString const):

        Fix these methods to accept platform pasteboard types instead of MIME types, to match the behavior of existing
        readBuffer and readString methods in PlatformPasteboardIOS.

        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::read):

2019-10-18  Devin Rousso  <drousso@apple.com>

        [ASAN] Fix WebGPU tests after r250258
        https://bugs.webkit.org/show_bug.cgi?id=203133
        <rdar://problem/56379008>

        Reviewed by Joseph Pecoraro.

        * platform/graphics/gpu/GPUObjectBase.h:
        (WebCore::GPUObjectBase::~GPUObjectBase): Added.
        Add a default virtual destructor since this class class is the one that is `RefCounted` and
        the `WebGPUPipeline` subclass is virtual.

        * Modules/webgpu/WebGPUPipeline.h:
        (WebCore::WebGPUPipeline::scriptExecutionContext const): Deleted.
        * Modules/webgpu/WebGPUPipeline.cpp:
        (WebCore::WebGPUPipeline::WebGPUPipeline):
        (WebCore::WebGPUPipeline::contextDestroyed): Added.
        Make `WebGPUPipeline` a subclass of `ContextDestructionObserver` so that the raw pointer to
        the associated `ScriptExecutionContext` is properly cleared and isn't UAFd.

        * Modules/webgpu/WebGPUComputePipeline.h:
        * Modules/webgpu/WebGPUComputePipeline.cpp:
        (WebCore::WebGPUComputePipeline::create):
        (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
        (WebCore::WebGPUComputePipeline::cloneShaderModules):
        (WebCore::WebGPUComputePipeline::recompile):
        * Modules/webgpu/WebGPURenderPipeline.h:
        * Modules/webgpu/WebGPURenderPipeline.cpp:
        (WebCore::WebGPURenderPipeline::create):
        (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
        (WebCore::WebGPURenderPipeline::cloneShaderModules):
        (WebCore::WebGPURenderPipeline::recompile):
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createRenderPipeline):
        (WebCore::WebGPUDevice::createComputePipeline):
        Rework how Web Inspector preserves related shader modules so that there isn't as much wasted
        space in the class layout, as we can use the `RefPtr` itself instead of an `Optional`.

        * Modules/webgpu/WebGPUBuffer.idl:
        Now that `GPUObjectBase` has a virtual destructor, it has a vtable, which means that this
        object also does and therefore cannot be marked with `ImplementationLacksVTable`.

        * inspector/InspectorShaderProgram.cpp:
        (WebCore::shaderForType):
        (WebCore::InspectorShaderProgram::requestShaderSource):
        (WebCore::InspectorShaderProgram::updateShader):
        (WebCore::InspectorShaderProgram::buildObjectForShaderProgram):

2019-10-18  Ryosuke Niwa  <rniwa@webkit.org>

        Refactor AbstractEventLoop out of WindowEventLoop
        https://bugs.webkit.org/show_bug.cgi?id=203136
        <rdar://problem/56396749>

        Reviewed by Antti Koivisto.

        Extract AbstractEventLoop out of WindowEventLoop as a preparation for adding WorkerEventLoop.

        Also replaced m_activeTaskCount with a boolean m_isScheduledToRun since it doesn't need to count.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/AbstractEventLoop.cpp: Added.
        * dom/AbstractEventLoop.h: Added.
        (WebCore::AbstractEventLoop): Added.
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::WindowEventLoop): Deleted. Use the default constructor in the header instead.
        (WebCore::WindowEventLoop::queueTask):
        (WebCore::WindowEventLoop::suspend):
        (WebCore::WindowEventLoop::resume):
        (WebCore::WindowEventLoop::scheduleToRunIfNeeded): Extracted out of queueTask.
        (WebCore::WindowEventLoop::run):
        * dom/WindowEventLoop.h:

2019-10-18  Devin Rousso  <drousso@apple.com>

        Web Inspector: Elements: allow WebKit engineers to edit UserAgent shadow trees
        https://bugs.webkit.org/show_bug.cgi?id=203159

        Reviewed by Brian Burg.

        Test: inspector/dom/setAllowEditingUserAgentShadowTrees.html

        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::assertEditableNode):
        (WebCore::InspectorDOMAgent::setInspectedNode):
        (WebCore::InspectorDOMAgent::setAllowEditingUserAgentShadowTrees): Added.

2019-10-17  Ryosuke Niwa  <rniwa@webkit.org>

        Document::m_closeAfterStyleRecalc is unnecessary
        https://bugs.webkit.org/show_bug.cgi?id=203143

        Reviewed by Antti Koivisto.

        Removed the code to defer implicit close until the style recalc is done
        since we call FrameLoader::checkCompleted asynchronously via a timer these days.

        * dom/Document.cpp:
        (WebCore::Document::resolveStyle):
        (WebCore::Document::implicitClose):
        * dom/Document.h:

2019-10-17  Dean Jackson  <dino@apple.com>

        texImage2D for a half-float texture only accepts null
        https://bugs.webkit.org/show_bug.cgi?id=169999
        <rdar://problem/31713571>

        Reviewed by Simon Fraser.

        After we initially implemented this, the extension was
        modified such that texImage2D could upload to half-float
        from a Uint16 array.

        Test: fast/canvas/webgl/oes-texture-half-float-uint16.html

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::validateArrayBufferType): Accept
        Uint16.

2019-10-18  Daniel Bates  <dabates@apple.com>

        REGRESSION (r241747): [iOS] Adjust default SVG focus ring width to match width for HTML documents
        https://bugs.webkit.org/show_bug.cgi?id=203011

        Reviewed by Wenson Hsieh.

        Update default user agent stylesheet for SVG documents (i.e. .svg resources) to use the same 3px
        outline width for focused elements as we do for HTML documents.

        This makes the test imported/blink/svg/custom/focus-ring-2.svg pass on iOS.

        * css/svg.css:

2019-10-18  Jer Noble  <jer.noble@apple.com>

        Add experimental HDR MediaCapabilities support.
        https://bugs.webkit.org/show_bug.cgi?id=203113

        Reviewed by Eric Carlson.

        Tests: media/mediacapabilities/mock-decodingInfo-hdr.html
               platform/mac/media/mediacapabilities/hevc-decodingInfo-hdr.html

        Add support for MediaCapabilities.decodeInfo() HDR support detection.

        Add new enum IDL types to MediaCapabilities and remove old unused ones. Add
        mock implementation for HDR detection. Add Cocoa platform implementation.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/mediacapabilities/ColorGamut.idl: 
        * Modules/mediacapabilities/HdrMetadataType.idl: 
        * Modules/mediacapabilities/ScreenLuminance.h: 
        * Modules/mediacapabilities/TransferFunction.idl: 
        * Modules/mediacapabilities/VideoConfiguration.idl:
        * Scripts/GenerateSettings.rb:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/scripts/CodeGenerator.pm:
        (WK_ucfirst):
        * bindings/scripts/CodeGeneratorJS.pm:
        (ToMethodName):
        * page/Settings.yaml:
        * platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
        (WebCore::createMediaPlayerDecodingConfigurationCocoa):
        * platform/mediacapabilities/ColorGamut.h: 
        * platform/mediacapabilities/HdrMetadataType.h: 
        * platform/mediacapabilities/TransferFunction.h: 
        * platform/mediacapabilities/VideoConfiguration.h:
        * platform/mock/MediaEngineConfigurationFactoryMock.cpp:
        (WebCore::canDecodeMedia):
        (WebCore::canEncodeMedia):

2019-10-18  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Implement AuthenticatorCancel
        https://bugs.webkit.org/show_bug.cgi?id=191523
        <rdar://problem/55920204>

        Reviewed by Brent Fulgham.

        Covered by new tests in existing test files.

        * Modules/credentialmanagement/CredentialsContainer.cpp:
        (WebCore::CredentialsContainer::get):
        (WebCore::CredentialsContainer::isCreate):
        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinator::create const):
        (WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
        * Modules/webauthn/AuthenticatorCoordinator.h:
        * Modules/webauthn/AuthenticatorCoordinatorClient.cpp: Removed.
        * Modules/webauthn/AuthenticatorCoordinatorClient.h:
        * Modules/webauthn/PublicKeyCredential.cpp:
        (WebCore::PublicKeyCredential::tryCreate):
        * Modules/webauthn/PublicKeyCredential.h:
        * Modules/webauthn/PublicKeyCredentialData.h:
        * Modules/webauthn/fido/DeviceRequestConverter.h:
        * Modules/webauthn/fido/FidoHidMessage.cpp:
        (fido::FidoHidMessage::FidoHidMessage):
        * Modules/webauthn/fido/FidoHidPacket.cpp:
        (fido::FidoHidInitPacket::getSerializedData const):
        (fido::FidoHidContinuationPacket::getSerializedData const):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * testing/MockWebAuthenticationConfiguration.h:
        (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl:
        Adds a new option to test AuthenticatorCancel.

2019-10-18  Simon Fraser  <simon.fraser@apple.com>

        Add TextStream dumping for BasicShape types
        https://bugs.webkit.org/show_bug.cgi?id=203150

        Reviewed by Zalan Bujtas.

        Add dumping for the classes, and make the BasicShape enum an enum class.

        * css/BasicShapeFunctions.cpp:
        (WebCore::valueForBasicShape):
        * rendering/shapes/Shape.cpp:
        (WebCore::Shape::createShape):
        * rendering/style/BasicShapes.cpp:
        (WebCore::BasicShapeCircle::dump const):
        (WebCore::BasicShapeEllipse::dump const):
        (WebCore::BasicShapePolygon::dump const):
        (WebCore::BasicShapePath::dump const):
        (WebCore::BasicShapeInset::dump const):
        (WebCore::operator<<):
        * rendering/style/BasicShapes.h:
        (WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate):

2019-10-18  Antti Koivisto  <antti@apple.com>

        ElementRuleCollector function signature cleanups
        https://bugs.webkit.org/show_bug.cgi?id=203153
        <rdar://problem/56412684>

        Unreviewed followup.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::transferMatchedRules):

        Try to appease MSVC.

2019-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Load event must be fired only for the SVG structurally external elements and the outermost SVG element
        https://bugs.webkit.org/show_bug.cgi?id=203044

        Reviewed by Simon Fraser.

        The SVG1.1 spec for SVGLoad event is:
            https://www.w3.org/TR/SVG11/interact.html

        The SVG2 spec for the load event is:
            https://www.w3.org/TR/SVG/changes.html#interact
            https://www.w3.org/TR/SVG/interact.html

        SVG2 removes the SVGExternalResourcesRequired interface. It also simplifies
        the rules for firing the load event and made them consistent with the HTML
        specs. The plan is to remove SVGExternalResourcesRequired in a following
        patch. This patch makes SVGExternalResourcesRequired have no effect on the
        load event firing rules. It moves all the functionalities to SVGURIReference
        as a step towards removing the SVGExternalResourcesRequired interface.

        Test: svg/custom/image-load-event.html

        * dom/Document.cpp:
        (WebCore::Document::implicitClose):
        Do not use the SVGLoad term. It has been removed from the specs.

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::ScriptElement):
        * dom/ScriptElement.h:
        (WebCore::ScriptElement::errorOccurred const):
        (WebCore::ScriptElement::setErrorOccurred):
        Add a method to track the occurrence  of loading error. errorOccurred()
        || haveFiredLoadEvent() means no pending loading activity.

        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::dispatchLoadEventToOutermostSVGElements):
        (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements): Deleted.
        * svg/SVGDocumentExtensions.h:
        Do not use the SVGLoad term. 

        * svg/SVGElement.cpp:
        (WebCore::SVGElement::sendLoadEventIfPossible):
        (WebCore::SVGElement::loadEventTimerFired):
        (WebCore::SVGElement::loadEventTimer):
        (WebCore::SVGElement::finishParsingChildren):
        (WebCore::SVGElement::sendSVGLoadEventIfPossible): Deleted.
        (WebCore::SVGElement::sendSVGLoadEventIfPossibleAsynchronously): Deleted.
        (WebCore::SVGElement::svgLoadEventTimerFired): Deleted.
        (WebCore::SVGElement::svgLoadEventTimer): Deleted.
        * svg/SVGElement.h:
        finishParsingChildren() won't fire 'load' event anymore. The 'load' event 
        will be fired explicitly for the outermost SVG element from Document::implicitClose().

        * svg/SVGExternalResourcesRequired.cpp:
        (WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
        (WebCore::SVGExternalResourcesRequired::dispatchLoadEvent): Deleted.
        (WebCore::SVGExternalResourcesRequired::insertedIntoDocument): Deleted.
        (WebCore::SVGExternalResourcesRequired::finishParsingChildren): Deleted.
        (WebCore::SVGExternalResourcesRequired::haveLoadedRequiredResources const): Deleted.
        * svg/SVGExternalResourcesRequired.h:
        (WebCore::SVGExternalResourcesRequired::setHaveFiredLoadEvent): Deleted.
        (WebCore::SVGExternalResourcesRequired::isParserInserted const): Deleted.
        (WebCore::SVGExternalResourcesRequired::haveFiredLoadEvent const): Deleted.
        * svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::haveLoadedRequiredResources):
        * svg/SVGImageLoader.cpp:
        (WebCore::SVGImageLoader::dispatchLoadEvent):
        The value of externalResourcesRequired() no longer controls firing the
        'load' event.

        * svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::SVGScriptElement):
        (WebCore::SVGScriptElement::insertedIntoAncestor):
        (WebCore::SVGScriptElement::dispatchErrorEvent):
        (WebCore::SVGScriptElement::finishParsingChildren): Deleted.
        * svg/SVGScriptElement.h:
        dispatchErrorEvent() is now a virtual function. Let SVGScriptElement
        overrides it so it can track when the loader finishes its activity.

        * svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::SVGStyleElement):
        * svg/SVGStyleElement.h:

        * svg/SVGURIReference.cpp:
        (WebCore::SVGURIReference::contextElement const):
        (WebCore::SVGURIReference::parseAttribute):
        (WebCore::SVGURIReference::haveLoadedRequiredResources const):
        (WebCore::SVGURIReference::dispatchLoadEvent):
        * svg/SVGURIReference.h:
        (WebCore::SVGURIReference::haveFiredLoadEvent const):
        (WebCore::SVGURIReference::setHaveFiredLoadEvent):
        (WebCore::SVGURIReference::errorOccurred const):
        (WebCore::SVGURIReference::setErrorOccurred):
        SVGURIReference will decide whether the 'load' event can be fired or not.

        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::SVGUseElement):
        (WebCore::SVGUseElement::insertedIntoAncestor):
        (WebCore::SVGUseElement::notifyFinished):
        (WebCore::SVGUseElement::finishParsingChildren): Deleted.
        (WebCore::SVGUseElement::isValid const): Deleted.
        (WebCore::SVGUseElement::haveLoadedRequiredResources): Deleted.
        (WebCore::SVGUseElement::setHaveFiredLoadEvent): Deleted.
        (WebCore::SVGUseElement::haveFiredLoadEvent const): Deleted.
        (WebCore::SVGUseElement::svgLoadEventTimer): Deleted.
        * svg/SVGUseElement.h:
        SVGUseElement needs to track firing the load event or error occurrence 
        the same way SVGImageElement and SVGScriptElement do.

2019-10-18  Antti Koivisto  <antti@apple.com>

        ElementRuleCollector function signature cleanups
        https://bugs.webkit.org/show_bug.cgi?id=203153

        Reviewed by Zalan Bujtas.

        Many functions in ElementRuleCollector take repetitive arguments that can be removed:

        - Make includeEmptyRules argument a class member
        - Remove RuleRange argument, update the ranges in rule transfer step.

        * css/ElementRuleCollector.cpp:
        (WebCore::MatchRequest::MatchRequest):
        (WebCore::ElementRuleCollector::addMatchedRule):
        (WebCore::ElementRuleCollector::collectMatchingRules):
        (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
        (WebCore::ElementRuleCollector::transferMatchedRules):
        (WebCore::ElementRuleCollector::matchAuthorRules):
        (WebCore::ElementRuleCollector::matchesAnyAuthorRules):
        (WebCore::ElementRuleCollector::collectMatchingAuthorRules):
        (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
        (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
        (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
        (WebCore::ElementRuleCollector::matchPartPseudoElementRules):
        (WebCore::ElementRuleCollector::matchPartPseudoElementRulesForScope):
        (WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules):
        (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
        (WebCore::ElementRuleCollector::matchUserRules):
        (WebCore::ElementRuleCollector::matchUARules):
        (WebCore::ElementRuleCollector::collectMatchingRulesForList):
        (WebCore::ElementRuleCollector::matchAllRules):
        (WebCore::ElementRuleCollector::hasAnyMatchingRules):
        * css/ElementRuleCollector.h:
        (WebCore::ElementRuleCollector::setIncludeEmptyRules):
        (WebCore::ElementRuleCollector::transferMatchedRules):

        Range update happens now here based on the supplied argument.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::pseudoStyleForElement):
        (WebCore::StyleResolver::pseudoStyleRulesForElement):
x
2019-10-18  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] :part rules should be able to override style attribute
        https://bugs.webkit.org/show_bug.cgi?id=202919

        Reviewed by Zalan Bujtas.

        Element inline style was simply appended to the matching declaration list and not sorted with the rest of the author style.
        This used to work because before CSS Shadow Parts feature inline style would always win.

        Fixing this involves refactoring the rule collection code to remove this assumption.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::addMatchedRule):

        Both initialize and update ranges here.

        (WebCore::ElementRuleCollector::clearMatchedRules):
        (WebCore::ElementRuleCollector::addElementStyleProperties):

        Both initialize and update ranges here.

        (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):

        Split out transfering to a separate function.

        (WebCore::ElementRuleCollector::transferMatchedRules):

        Add a parameter to limit transfer to rules from a scope.

        (WebCore::ElementRuleCollector::matchAuthorRules):
        (WebCore::ElementRuleCollector::matchesAnyAuthorRules):

        Replace hasMatchedRules() with a more specific function. This can use collectMatchingAuthorRules and avoids unnecessary sorting step.

        (WebCore::ElementRuleCollector::collectMatchingAuthorRules):

        Split out collecting the rules from matchAuthorRules. Like other collect functions, this doesn't do any sorting.

        (WebCore::ElementRuleCollector::matchAllRules):

        Add element inline style before transfering rules from the containing host scope.

        (WebCore::ElementRuleCollector::addElementInlineStyleProperties):

        Factor adding inline style into a function.

]        * css/ElementRuleCollector.h:
        (WebCore::ElementRuleCollector::hasMatchedRules const): Deleted.
        * css/StyleProperties.h:
        (WebCore::StylePropertiesBase::deref const):
        (WebCore::StylePropertiesBase::deref): Deleted.

        Make const to allow RefPtr<const StyleProperties>

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::CascadedProperties::addImportantMatches):

        Sort !important properties taking into account that the host scope has lower priority.

        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::invalidateIfNeeded):

2019-10-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Include horizontal spacing when checking for the extra horizontal space
        https://bugs.webkit.org/show_bug.cgi?id=203154
        <rdar://problem/56408032>

        Reviewed by Antti Koivisto.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):

2019-10-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Fix table's total horizontal spacing computation
        https://bugs.webkit.org/show_bug.cgi?id=203151
        <rdar://problem/56406930>

        Reviewed by Antti Koivisto.

        The horizontal spacing value sets the gaps between
        1. first column and the left edge of the table's content box
        2. between 2 columns
        3. last column and the right edge of the table's content box
        In case of 'n' columns, the number of gaps is 'n + 1'.

        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::totalHorizontalSpacing const):

2019-10-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Cache table's width constraint values.
        https://bugs.webkit.org/show_bug.cgi?id=203135
        <rdar://problem/56396352>

        Reviewed by Antti Koivisto.

        This patch ensures that when computedIntrinsicWidthConstraints is called from both the preferred width and the actual layout codepaths during a layout frame, we don't
        end up building up the grid twice.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::widthConstraints):
        (WebCore::Layout::TableGrid::widthConstraints const): Deleted.
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::hasComputedWidthConstraints const):

2019-10-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] TableFormattingContext::computedIntrinsicWidthConstraints should not expect a valid containing block's width
        https://bugs.webkit.org/show_bug.cgi?id=203131
        <rdar://problem/56394676>

        Reviewed by Antti Koivisto.

        When TableFormattingContext::computedIntrinsicWidthConstraints is called by the preferred width computation (<div style="float: left"><table>)
        the containing block's width is not yet set (it gets computed based on the preferred width) so computedIntrinsicWidthConstraints should not be relying
        on it. Let's move that logic out to TableFormattingContext::layoutInFlowContent() where it belongs. 

        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::TableFormattingContext::ensureTableGrid):
        (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
        (WebCore::Layout::TableFormattingContext::computedTableWidth): Deleted.
        (WebCore::Layout::TableFormattingContext::distributeExtraHorizontalSpace): Deleted.
        * layout/tableformatting/TableFormattingContext.h:

2019-10-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Fix block level formatting root inflow box height computation
        https://bugs.webkit.org/show_bug.cgi?id=203085
        <rdar://problem/56372306>

        Reviewed by Antti Koivisto.

        Section 10.6.7 (https://www.w3.org/TR/CSS22/visudet.html#root-height) defines the height computation for block level formatting context roots.
        We already use it for floats, out-of-flow and block level boxes when overflow computes to not "visible".
        This patch makes generic in-flow non-replaced BFC roots (e.g. principal block container box for <table>) compute their heights according to 10.6.7.

        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

2019-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Support navigator.clipboard.read()
        https://bugs.webkit.org/show_bug.cgi?id=203021

        Reviewed by Ryosuke Niwa.

        Add support for navigator.clipboard.read(), which returns a promise that resolves to a list of ClipboardItems.
        See below for more details.

        Tests: editing/async-clipboard/clipboard-change-data-while-reading.html
               editing/async-clipboard/clipboard-read-basic.html

        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::read):

        Implement read(). This makes two calls to the platform pasteboard: the first to get the current change count,
        and if the change count is different from the changeCount used for the last read() call (or there are no
        existing clipboard items being tracked), then we request pasteboard item information for all items on the
        pasteboard, and use this information to create new clipboard items. Otherwise, if the changeCount is still valid
        for the current list of clipboard items, simply return these clipboard items.

        If the changeCount ends up being different in between the initial changeCount request and when the pasteboard
        item information is received, we immediately bail with a NotAllowedError. The new layout test
        clipboard-change-data-while-reading.html exercises this scenario.

        (WebCore::Clipboard::getType):
        (WebCore::Clipboard::frame const):
        * Modules/async-clipboard/Clipboard.h:
        * Modules/async-clipboard/ClipboardItem.cpp:
        (WebCore::ClipboardItem::blobFromString):
        (WebCore::ClipboardItem::ClipboardItem):
        (WebCore::ClipboardItem::create):
        (WebCore::ClipboardItem::navigator):

        Refactor this so that each clipboard item itself has a WeakPtr to its Navigator. This avoids having to follow
        the weak pointer to the Clipboard to get to the Clipboard's navigator during garbage collection when computing
        reachability from opaque roots, since this may happen on a background (GC) thread.

        (WebCore::ClipboardItem::clipboard):
        * Modules/async-clipboard/ClipboardItem.h:
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
        (WebCore::ClipboardItemBindingsDataSource::getType):
        (WebCore::blobFromString): Deleted.

        Move this to ClipboardItem, and make it a static method.

        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
        (WebCore::ClipboardItemPasteboardDataSource::ClipboardItemPasteboardDataSource):
        (WebCore::ClipboardItemPasteboardDataSource::getType):
        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:

        Move a couple of member variables (index and changeCount) out of ClipboardItem. Instead of having each
        ClipboardItem keep track of this information, have the Clipboard that owns the ClipboardItem keep this
        information. This means that reading data from ClipboardItem will (in a future patch) work by having the item
        ask its Clipboard object to read data on its behalf.

        * platform/Pasteboard.cpp:
        (WebCore::Pasteboard::allPasteboardItemInfo const):
        (WebCore::Pasteboard::pasteboardItemInfo const):
        (WebCore::Pasteboard::readString):
        (WebCore::Pasteboard::readBuffer):
        (WebCore::Pasteboard::readURL):

        Add some null checks to handle the case where there is no pasteboard strategy.

2019-10-17  Chris Dumez  <cdumez@apple.com>

        Don't put pages that have not reached the non-visually empty layout milestone in the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203108
        <rdar://problem/56375671>

        Reviewed by Geoff Garen.

        We don't want to go back to a visually empty page on back/forward navigation.

        * history/BackForwardCache.cpp:
        (WebCore::canCacheFrame):
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::visuallyEmptyKey):
        * page/DiagnosticLoggingKeys.h:

2019-10-17  Simon Fraser  <simon.fraser@apple.com>

        Only include "deep color" in layer tree dumps if a tests requests it
        https://bugs.webkit.org/show_bug.cgi?id=203125

        Reviewed by Tim Horton.
        
        Layer tree dumping tests can fail when run on different devices because the "deep color"
        property on layers is device-dependent. Stop dumping this by default, and have one test
        that sets the bit. iphone-7 is the only device we test that has deep color support.

        Tests: compositing/contents-format/deep-color-backing-store.html
               compositing/contents-format/ipad/deep-color-backing-store.html
               compositing/contents-format/iphone-7/deep-color-backing-store.html

        * page/Frame.h:
        * platform/graphics/GraphicsLayerClient.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::layerTreeAsText):
        * testing/Internals.cpp:
        (WebCore::toLayerTreeFlags):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-17  Dean Jackson  <dino@apple.com>

        ctx.font = "" asserts in CSS parser
        https://bugs.webkit.org/show_bug.cgi?id=203127
        <rdar://problem/56391016>

        Reviewed by Devin Rousso.

        The HTML specification says:
        "values that cannot be parsed as CSS font values are ignored", so
        return early if we get an empty string, otherwise the CSS parser
        will assert. This was the only case I could find where we sidestepped
        most of the parsing infrastructure and injected a raw string.

        Test: http/wpt/2dcontext/text-styles/2d.text.font.parse.invalid.html

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setFont):

2019-10-17  Ryosuke Niwa  <rniwa@webkit.org>

        Integrate resize event with HTML5 event loop
        https://bugs.webkit.org/show_bug.cgi?id=202964

        Reviewed by Geoffrey Garen.

        Dispatch resize events in "run the resize steps" during the "update the rendering":
        https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering

        Exisitng code in WebCore which was dispatching or scheduling dispatching of resize events now simply sets
        a flag on document and schedules a rendering update. In Page::updateRendering, we fire resize events on
        any documents with this flag set.

        Test: fast/events/resize-subframe-in-rendering-update.html

        * dom/Document.cpp:
        (WebCore::Document::setNeedsDOMWindowResizeEvent): Added.
        (WebCore::Document::setNeedsVisualViewportResize): Added.
        (WebCore::Document::runResizeSteps): Added. https://drafts.csswg.org/cssom-view/#run-the-resize-steps
        * dom/Document.h:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::resizeTo const):
        * page/FrameView.cpp:
        (WebCore::FrameView::sendResizeEventIfNeeded): Now sets m_needsDOMWindowResizeEvent on Document instead of
        enqueuing a resize event.
        * page/Page.cpp:
        (WebCore::Page::updateRendering): Call runResizeSteps on each document.
        (WebCore::Page::collectDocuments): Added.
        * page/Page.h:
        * page/VisualViewport.cpp:
        (WebCore::VisualViewport::enqueueResizeEvent):

2019-10-17  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r251255.

        This is causing the existing back/forward tests to be flaky

        Reverted changeset:

        "Don't put pages that have not reached the non-visually empty
        layout milestone in the back/forward cache"
        https://bugs.webkit.org/show_bug.cgi?id=203108
        https://trac.webkit.org/changeset/251255

2019-10-17  Mark Lam  <mark.lam@apple.com>

        Use constexpr in more places and remove some unnecessary external linkage.
        https://bugs.webkit.org/show_bug.cgi?id=203115

        Reviewed by Yusuke Suzuki.

        No new tests because this patch adds no new functionality.

        * html/track/TextTrackCueGeneric.cpp:
        * html/track/VTTCue.cpp:
        * page/EventHandler.cpp:
        (WebCore::SyntheticTouchPoint::SyntheticTouchPoint):
        * page/FrameTree.h:
        * page/scrolling/ScrollingMomentumCalculator.cpp:
        (WebCore::projectedInertialScrollDistance):
        * platform/graphics/FontTaggedSettings.h:
        * platform/graphics/Region.cpp:
        * platform/graphics/filters/FELighting.cpp:
        * rendering/TableLayout.h:
        * rendering/svg/SVGRenderingContext.h:

2019-10-17  Simon Fraser  <simon.fraser@apple.com>

        [ Mojave+ ] Layout Test compositing/fixed-with-main-thread-scrolling.html is a flaky timeout
        https://bugs.webkit.org/show_bug.cgi?id=198757

        Reviewed by Tim Horton.
        
        WheelEventTestMonitor depends on "deferral reasons" getting added and removed, such that there is always
        at least one reason active until scrolling quiesces.

        WheelEventTestMonitor made the incorrect assumption that every call into ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent()
        would result in a scroll change making it to the main thread, so it would defer "ScrollingThreadSyncNeeded" there,
        and rely on AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll() to remove that deferral reason.
        That assumption is wrong, because wheel events may coalesce, or have no impact on scroll position if already scrolled
        to the max/min extent (e.g. when rubber banding).
        
        Fix by adding a new "HandlingWheelEvent" deferral reason for the duration that the scrolling thread is processing an wheel event,
        and then having ScrollingThreadSyncNeeded just represent the phase where any resulting scroll is being sent to the UI process.
        These phases should always overlap.
        
        This required moving isMonitoringWheelEvents() from the root scrolling node to the ScrollingTree.

        * page/WheelEventTestMonitor.cpp:
        (WebCore::operator<<):
        * page/WheelEventTestMonitor.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitTreeState):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::isMonitoringWheelEvents const):
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):

2019-10-17  Ryosuke Niwa  <rniwa@webkit.org>

        Make requestIdleCallback suspendable
        https://bugs.webkit.org/show_bug.cgi?id=203023

        Reviewed by Chris Dumez.

        Make requestIdleCallback suspendable by making WindowEventLoop itself suspendable.
        Because WindowEventLoop can be shared across documents, we don't want to make it an ActiveDOMObject.

        Instead, we would make CachedFrameBase::restore and CachedFrame manually invoke suspend & resume.

        Test: requestidlecallback/requestidlecallback-in-page-cache.html

        * dom/Document.h:
        (WebCore::Document::eventLoopIfExists): Added. This should probably go away once most of the event loop
        is implemented since we're almost always going to have this object then.
        * dom/WindowEventLoop.cpp:
        (WebCore::WindowEventLoop::queueTask): Because m_tasks may contain tasks of suspended documents,
        we check m_activeTaskCount, which is only positive when there is a task for non-suspended documents,
        to decide whether we schedule a callback or not.
        (WebCore::WindowEventLoop::suspend): Added. No-op for now.
        (WebCore::WindowEventLoop::resume): Added. Schedule a callback if there is a task associated with
        this document.
        (WebCore::WindowEventLoop::run): Skip a task for a suspended document, and add it back to m_tasks along
        with other tasks that got scheduled by running the current working set of tasks.
        * dom/WindowEventLoop.h:
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        (WebCore::CachedFrame::CachedFrame):

2019-10-17  Chris Dumez  <cdumez@apple.com>

        Don't put pages that have not reached the non-visually empty layout milestone in the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=203108

        Reviewed by Geoffrey Garen.

        We don't want to go back to a visually empty page on back/forward navigation.

        * history/BackForwardCache.cpp:
        (WebCore::canCacheFrame):
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::visuallyEmptyKey):
        * page/DiagnosticLoggingKeys.h:

2019-10-17  Dirk Schulze  <krit@webkit.org>

        transform-box: content-box, stroke-box missing
        https://bugs.webkit.org/show_bug.cgi?id=201892

        Reviewed by Simon Fraser.

        Added the keywords content-box and stroke-box to the
        transform-box CSS property.
        Those keywords were added to the spec after the implementation
        in WebKit.

        Test: transforms/transform-box.html

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator TransformBox const):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        * rendering/RenderLayer.cpp:
        (WebCore::computeReferenceBox):
        (WebCore::transformBoxToCSSBoxType):
        (WebCore::RenderLayer::currentTransform const):
        * rendering/style/RenderStyleConstants.h:
        * svg/SVGGraphicsElement.cpp:
        (WebCore::SVGGraphicsElement::animatedLocalTransform const):

2019-10-17  Youenn Fablet  <youenn@apple.com>

        SincResampler does not need to create a new AudioBus for each consumeSource call
        https://bugs.webkit.org/show_bug.cgi?id=202983

        Reviewed by Eric Carlson.

        Allocate an internal AudioBus once and for all.
        No observable change of behavior.

        * platform/audio/SincResampler.cpp:
        (WebCore::SincResampler::consumeSource):
        * platform/audio/SincResampler.h:

2019-10-17  Chris Dumez  <cdumez@apple.com>

        Deprecate ActiveDOMObject::canSuspendForDocumentSuspension()
        https://bugs.webkit.org/show_bug.cgi?id=203086

        Reviewed by Geoffrey Garen.

        Rename ActiveDOMObject::canSuspendForDocumentSuspension() to shouldPreventEnteringBackForwardCache_DEPRECATED()
        to make it clear that no new overrides should be added and that it is no longer OK to prevent the page from
        entering the back/forward cache. Also provide a default implementation that returns false so that well-behaved
        classes no longer need to override this.

        * Modules/applepay/ApplePaySession.cpp:
        (WebCore::ApplePaySession::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::ApplePaySession::canSuspendForDocumentSuspension const): Deleted.
        * Modules/applepay/ApplePaySession.h:
        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::canSuspendForDocumentSuspension const): Deleted.
        * Modules/cache/DOMCache.h:
        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::canSuspendForDocumentSuspension const): Deleted.
        * Modules/cache/DOMCacheStorage.h:
        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::MediaKeySession::canSuspendForDocumentSuspension const): Deleted.
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        (WebCore::WebKitMediaKeySession::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::WebKitMediaKeySession::canSuspendForDocumentSuspension const): Deleted.
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
        * Modules/entriesapi/FileSystemDirectoryReader.cpp:
        (WebCore::FileSystemDirectoryReader::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::FileSystemDirectoryReader::canSuspendForDocumentSuspension const): Deleted.
        * Modules/entriesapi/FileSystemDirectoryReader.h:
        * Modules/entriesapi/FileSystemEntry.cpp:
        (WebCore::FileSystemEntry::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::FileSystemEntry::canSuspendForDocumentSuspension const): Deleted.
        * Modules/entriesapi/FileSystemEntry.h:
        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::FetchRequest::canSuspendForDocumentSuspension const): Deleted.
        * Modules/fetch/FetchRequest.h:
        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::FetchResponse::canSuspendForDocumentSuspension const): Deleted.
        * Modules/fetch/FetchResponse.h:
        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::page const):
        (WebCore::Geolocation::canSuspendForDocumentSuspension const): Deleted.
        * Modules/geolocation/Geolocation.h:
        * Modules/indexeddb/IDBDatabase.cpp:
        (WebCore::IDBDatabase::canSuspendForDocumentSuspension const): Deleted.
        * Modules/indexeddb/IDBDatabase.h:
        * Modules/indexeddb/IDBIndex.cpp:
        (WebCore::IDBIndex::canSuspendForDocumentSuspension const): Deleted.
        * Modules/indexeddb/IDBIndex.h:
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::canSuspendForDocumentSuspension const): Deleted.
        * Modules/indexeddb/IDBObjectStore.h:
        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::canSuspendForDocumentSuspension const): Deleted.
        * Modules/indexeddb/IDBRequest.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::canSuspendForDocumentSuspension const): Deleted.
        * Modules/indexeddb/IDBTransaction.h:
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::MediaRecorder::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediarecorder/MediaRecorder.h:
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediasource/SourceBuffer.h:
        * Modules/mediasource/SourceBufferList.cpp:
        (WebCore::SourceBufferList::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediasource/SourceBufferList.h:
        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::MediaStream::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::MediaStreamTrack::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/mediastream/RTCDTMFSender.cpp:
        (WebCore::RTCDTMFSender::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::RTCDTMFSender::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediastream/RTCDTMFSender.h:
        * Modules/mediastream/RTCDataChannel.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediastream/RTCPeerConnection.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::UserMediaRequest::canSuspendForDocumentSuspension const): Deleted.
        * Modules/mediastream/UserMediaRequest.h:
        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::Notification::canSuspendForDocumentSuspension const): Deleted.
        * Modules/notifications/Notification.h:
        * Modules/paymentrequest/PaymentRequest.cpp:
        (WebCore::PaymentRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::PaymentRequest::canSuspendForDocumentSuspension const): Deleted.
        * Modules/paymentrequest/PaymentRequest.h:
        * Modules/paymentrequest/PaymentResponse.cpp:
        (WebCore::PaymentResponse::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::PaymentResponse::canSuspendForDocumentSuspension const): Deleted.
        * Modules/paymentrequest/PaymentResponse.h:
        * Modules/pictureinpicture/PictureInPictureWindow.cpp:
        (WebCore::PictureInPictureWindow::canSuspendForDocumentSuspension const): Deleted.
        * Modules/pictureinpicture/PictureInPictureWindow.h:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::AudioContext::canSuspendForDocumentSuspension const): Deleted.
        * Modules/webaudio/AudioContext.h:
        * Modules/webdatabase/DatabaseContext.cpp:
        (WebCore::DatabaseContext::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::DatabaseContext::canSuspendForDocumentSuspension const): Deleted.
        * Modules/webdatabase/DatabaseContext.h:
        * Modules/webgpu/GPUCanvasContext.h:
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::canSuspendForDocumentSuspension const): Deleted.
        * Modules/websockets/WebSocket.h:
        * Modules/webvr/VRDisplay.cpp:
        (WebCore::VRDisplay::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::VRDisplay::canSuspendForDocumentSuspension const): Deleted.
        * Modules/webvr/VRDisplay.h:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::WebAnimation::canSuspendForDocumentSuspension const): Deleted.
        * animation/WebAnimation.h:
        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::canSuspendForDocumentSuspension const): Deleted.
        * css/FontFaceSet.h:
        * dom/ActiveDOMObject.h:
        * dom/GenericEventQueue.cpp:
        (WebCore::GenericEventQueueBase<T>::canSuspendForDocumentSuspension const): Deleted.
        * dom/GenericEventQueue.h:
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::canSuspendForDocumentSuspension const): Deleted.
        * dom/MessagePort.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForDocumentSuspension):
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::FileReader::canSuspendForDocumentSuspension const): Deleted.
        * fileapi/FileReader.h:
        * html/HTMLMarqueeElement.cpp:
        (WebCore::HTMLMarqueeElement::canSuspendForDocumentSuspension const): Deleted.
        * html/HTMLMarqueeElement.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::canSuspendForDocumentSuspension const): Deleted.
        * html/HTMLMediaElement.h:
        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::canSuspendForDocumentSuspension const): Deleted.
        * html/HTMLSourceElement.h:
        * html/ImageBitmap.cpp:
        * html/PublicURLManager.cpp:
        (WebCore::PublicURLManager::canSuspendForDocumentSuspension const): Deleted.
        * html/PublicURLManager.h:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension const): Deleted.
        * html/canvas/WebGLRenderingContextBase.h:
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::canSuspendForDocumentSuspension const): Deleted.
        * html/track/TrackListBase.h:
        * page/EventSource.cpp:
        (WebCore::EventSource::canSuspendForDocumentSuspension const): Deleted.
        * page/EventSource.h:
        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::canSuspendForDocumentSuspension const): Deleted.
        * page/IntersectionObserver.h:
        * page/ResizeObserver.cpp:
        (WebCore::ResizeObserver::canSuspendForDocumentSuspension const): Deleted.
        * page/ResizeObserver.h:
        * page/SuspendableTimer.cpp:
        (WebCore::SuspendableTimerBase::canSuspendForDocumentSuspension const): Deleted.
        * page/SuspendableTimer.h:
        * platform/SuspendableTaskQueue.cpp:
        (WebCore::SuspendableTaskQueue::canSuspendForDocumentSuspension const): Deleted.
        * platform/SuspendableTaskQueue.h:
        * testing/Internals.cpp:
        * workers/Worker.cpp:
        (WebCore::Worker::canSuspendForDocumentSuspension const): Deleted.
        * workers/Worker.h:
        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::canSuspendForDocumentSuspension const): Deleted.
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::canSuspendForDocumentSuspension const): Deleted.
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::canSuspendForDocumentSuspension const): Deleted.
        * workers/service/ServiceWorkerRegistration.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const):
        (WebCore::XMLHttpRequest::canSuspendForDocumentSuspension const): Deleted.
        * xml/XMLHttpRequest.h:

2019-10-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Table formatting context accesses geometry information from parent BFC
        https://bugs.webkit.org/show_bug.cgi?id=203082
        <rdar://problem/56370827>

        Reviewed by Antti Koivisto.

        Tables are wrapped in a 2 level formatting context structure. A <table> element initiates a block formatting context for its principal table box
        where the caption and the table content live. It also initiates a table wrapper box which establishes the table formatting context.
        In many cases the TFC needs access to the parent (generated) BFC.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::geometryForBox const):
        * layout/FormattingContext.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computedTableWidth):

2019-10-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][Painting] Add support for image/background image painting
        https://bugs.webkit.org/show_bug.cgi?id=203054
        <rdar://problem/56347733>

        Reviewed by Antti Koivisto.

        In addition to image rendering, this patch also addresses various run/decoration painting issues.

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintBoxDecoration):
        (WebCore::Display::paintInlineContent):
        (WebCore::Display::absoluteDisplayBox):
        (WebCore::Display::paintBoxDecorationAndChildren):
        (WebCore::Display::Painter::paint):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::setImage):
        (WebCore::Display::Run::image const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendReplacedInlineBox):
        * layout/layouttree/LayoutReplaced.h:
        (WebCore::Layout::Replaced::setCachedImage):
        (WebCore::Layout::Replaced::cachedImage const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

2019-10-17  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add Display::Run/LineBox mapping
        https://bugs.webkit.org/show_bug.cgi?id=203051
        <rdar://problem/56342487>

        Reviewed by Antti Koivisto.

        Mapping enables us to paint baseline aligned runs on the current line. This is temporary until after we figure out the final run/line structure.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintInlineContent):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::addLineBox):
        (WebCore::Layout::InlineFormattingState::lineBoxForRun const):
        (WebCore::Layout::InlineFormattingState::addInlineRun):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::Run):
        (WebCore::Layout::Line::alignContentVertically):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::displayRun const):
        (WebCore::Layout::Line::Run::logicalRect const):
        (WebCore::Layout::Line::Run::adjustLogicalTop):
        (WebCore::Layout::Line::Run::moveVertically):
        (WebCore::Layout::Line::Run::moveHorizontally):
        (WebCore::Layout::Line::Run::expand):
        * layout/inlineformatting/InlineLineBox.h:
        * layout/inlineformatting/InlineLineLayout.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):

2019-10-17  Antoine Quint  <graouts@apple.com>

        [Web Animations] Enable the Web Animations JavaScript API by default
        https://bugs.webkit.org/show_bug.cgi?id=203075

        Reviewed by Antti Koivisto.

        * page/RuntimeEnabledFeatures.h:

2019-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, fix watchOS and tvOS builds after r251224

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::shouldTreatAtLeastOneTypeAsFile):

        Move the `shouldTreatAtLeastOneTypeAsFile` helper function out of the `PASTEBOARD_SUPPORTS_ITEM_PROVIDERS`
        section, and into generic iOS-family code so that it can be used in `pasteboardMayContainFilePaths`.

2019-10-17  Youenn Fablet  <youenn@apple.com>

        MultiChannelResampler does not need to recreate a ChannelProvider for every process call
        https://bugs.webkit.org/show_bug.cgi?id=202982

        Reviewed by Eric Carlson.

        We no longer allocate a new ChannelProvider for every process call.
        No observable change of behavior.

        * platform/audio/MultiChannelResampler.cpp:
        (WebCore::MultiChannelResampler::ChannelProvider::ChannelProvider):
        (WebCore::MultiChannelResampler::ChannelProvider::setProvider):
        (WebCore::MultiChannelResampler::MultiChannelResampler):
        (WebCore::MultiChannelResampler::process):
        * platform/audio/MultiChannelResampler.h:

2019-10-17  Devin Rousso  <drousso@apple.com>

        Web Inspector: rework frontend agent construction to allow commands/events to be controlled by the related target's type
        https://bugs.webkit.org/show_bug.cgi?id=200384
        <rdar://problem/53850352>

        Reviewed by Joseph Pecoraro.

        * inspector/InspectorFrontendClient.h:
        (WebCore::InspectorFrontendClient::backendCommandsURL): Deleted.
        (WebCore::InspectorFrontendClient::debuggableType): Deleted.
        * inspector/InspectorFrontendClientLocal.h:
        * page/PageDebuggable.h:
        (WebCore::PageDebuggable::type const):
        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::debuggableType const): Added.
        Split the `Web` debuggable type into `Page` (WebCore::Page) and `WebPage` (WebKit::WebPageProxy).

2019-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] [iOS] Refactor logic for suppressing URL data when the pasteboard may contain files
        https://bugs.webkit.org/show_bug.cgi?id=203065

        Reviewed by Tim Horton.

        Platform-specific pasteboard refactoring before tackling webkit.org/b/203021. See below for details. No new
        tests, as there is no change in behavior.

        * platform/Pasteboard.h:
        (WebCore::Pasteboard::changeCount const):

        Add a stub for Pasteboard::changeCount() on non-Cocoa platforms.

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):

        Move this helper function farther up the file, so it can be used in more places.

        (WebCore::webSafeTypes):

        Add a separate helper to compute the list of web-safe MIME types (for instance, "text/plain") given a list of
        platform types, and a function to determine whether to avoid exposing a given URL to the DOM.

        (WebCore::shouldTreatAtLeastOneTypeAsFile):

        Split this out into a separate helper function, so that it can be invoked when determining whether a given
        NSItemProvider is suspected to contain file paths. In the case where we're getting the full list of types that
        are safe for the DOM to read, we want to pass in the entire pasteboard object and iterate through all of the
        available types in search for something that could feasibly accompany a file URL.

        In the case of computing the web-safe types per item, we only have an item provider, in which case we only
        iterate through the types in that NSItemProvider. See call sites below for examples.

        (WebCore::PlatformPasteboard::informationForItemAtIndex):

        Invoke the new `webSafeTypes` helper method.

        (WebCore::pasteboardMayContainFilePaths):
        (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

        Invoke the new `webSafeTypes` helper method.

2019-10-16  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Correct radial gradient handling of various radius orderings
        https://bugs.webkit.org/show_bug.cgi?id=202815

        Reviewed by Per Arne Vollan.

        Revise the 'generateGradient' implementation to recognize that the
        radius arguments might not be in increasing order. Direct2D's
        implementation does expect this, so we need to swap order and
        revise the gradient range to match.

        Drive-by fix: Stop building unused image decoders if building with
        the Apple stack.

        * PlatformFTW.cmake: Stop building unused image decoders.
        * platform/graphics/win/GradientDirect2D.cpp:
        (WebCore::Gradient::generateGradient):

2019-10-16  Chris Dumez  <cdumez@apple.com>

        Rename PageCache to BackForwardCache
        https://bugs.webkit.org/show_bug.cgi?id=203048

        Reviewed by Alex Christensen.

        Rename PageCache to BackForwardCache for clarity and consistency with the UIProcess's WebBackForwardCache.

        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::suspend):
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::canSuspendForDocumentSuspension const):
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::suspend):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::suspend):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::canSuspendForDocumentSuspension const):
        * bindings/js/WindowProxy.cpp:
        (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
        * bindings/js/WindowProxy.h:
        * dom/ActiveDOMObject.h:
        * dom/Document.cpp:
        (WebCore::Document::~Document):
        (WebCore::Document::scheduleStyleRecalc):
        (WebCore::Document::needsStyleRecalc const):
        (WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
        (WebCore::Document::createRenderTree):
        (WebCore::Document::didBecomeCurrentDocumentInFrame):
        (WebCore::Document::attachToCachedFrame):
        (WebCore::Document::detachFromCachedFrame):
        (WebCore::Document::prepareForDestruction):
        (WebCore::Document::adjustFocusedNodeOnNodeRemoval):
        (WebCore::Document::setFocusedElement):
        (WebCore::Document::takeDOMWindowFrom):
        (WebCore::Document::setBackForwardCacheState):
        (WebCore::Document::suspend):
        (WebCore::Document::resume):
        (WebCore::Document::topDocument const):
        * dom/Document.h:
        (WebCore::Document::backForwardCacheState const):
        * dom/FullscreenManager.cpp:
        (WebCore::FullscreenManager::willEnterFullscreen):
        (WebCore::FullscreenManager::didEnterFullscreen):
        (WebCore::FullscreenManager::willExitFullscreen):
        (WebCore::FullscreenManager::didExitFullscreen):
        * dom/FullscreenManager.h:
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
        (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
        * history/BackForwardCache.cpp: Renamed from Source/WebCore/history/PageCache.cpp.
        (WebCore::logBackForwardCacheFailureDiagnosticMessage):
        (WebCore::canCacheFrame):
        (WebCore::canCachePage):
        (WebCore::BackForwardCache::singleton):
        (WebCore::BackForwardCache::BackForwardCache):
        (WebCore::BackForwardCache::dump const):
        (WebCore::BackForwardCache::canCache const):
        (WebCore::BackForwardCache::pruneToSizeNow):
        (WebCore::BackForwardCache::setMaxSize):
        (WebCore::BackForwardCache::frameCount const):
        (WebCore::BackForwardCache::markPagesForDeviceOrPageScaleChanged):
        (WebCore::BackForwardCache::markPagesForContentsSizeChanged):
        (WebCore::BackForwardCache::markPagesForCaptionPreferencesChanged):
        (WebCore::setBackForwardCacheState):
        (WebCore::BackForwardCache::addIfCacheable):
        (WebCore::BackForwardCache::take):
        (WebCore::BackForwardCache::removeAllItemsForPage):
        (WebCore::BackForwardCache::get):
        (WebCore::BackForwardCache::remove):
        (WebCore::BackForwardCache::prune):
        * history/BackForwardCache.h: Renamed from Source/WebCore/history/PageCache.h.
        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        (WebCore::CachedFrame::CachedFrame):
        (WebCore::CachedFrame::clear):
        (WebCore::CachedFrame::destroy):
        * history/CachedFramePlatformData.h:
        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::setCachedPage):
        (WebCore::HistoryItem::setURL):
        * history/HistoryItem.h:
        (WebCore::HistoryItem::isInBackForwardCache const):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::suspend):
        (WebCore::HTMLMediaElement::resume):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::createElementRenderer):
        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::suspend):
        * html/MediaElementSession.cpp:
        (WebCore::MediaElementSession::autoplayPermitted const):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::addSubresourceLoader):
        * loader/DocumentLoader.h:
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::closeURL):
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::stopAllLoaders):
        (WebCore::FrameLoader::stopForBackForwardCache):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::open):
        (WebCore::FrameLoader::frameDetached):
        (WebCore::FrameLoader::detachFromParent):
        (WebCore::FrameLoader::receivedMainResourceError):
        (WebCore::FrameLoader::shouldPerformFragmentNavigation):
        (WebCore::FrameLoader::dispatchUnloadEvents):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
        * loader/HistoryController.cpp:
        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
        (WebCore::HistoryController::restoreScrollPositionAndViewState):
        (WebCore::HistoryController::invalidateCurrentItemCachedPage):
        (WebCore::HistoryController::updateForReload):
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::canCacheInBackForwardCache):
        * loader/appcache/ApplicationCacheHost.h:
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::load):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::suspendForBackForwardCache):
        (WebCore::DOMWindow::resumeFromBackForwardCache):
        (WebCore::DOMWindow::decrementScrollEventListenersCount):
        * page/DOMWindow.h:
        * page/DOMWindowExtension.cpp:
        (WebCore::DOMWindowExtension::suspendForBackForwardCache):
        (WebCore::DOMWindowExtension::resumeFromBackForwardCache):
        * page/DOMWindowExtension.h:
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::backForwardCacheKey):
        (WebCore::DiagnosticLoggingKeys::backForwardCacheFailureKey):
        * page/DiagnosticLoggingKeys.h:
        * page/EventSource.cpp:
        (WebCore::EventSource::scheduleReconnect):
        (WebCore::EventSource::didReceiveResponse):
        (WebCore::EventSource::didReceiveData):
        (WebCore::EventSource::didFinishLoading):
        (WebCore::EventSource::didFail):
        (WebCore::EventSource::abortConnectionAttempt):
        (WebCore::EventSource::suspend):
        (WebCore::EventSource::resume):
        (WebCore::EventSource::dispatchMessageEvent):
        * page/EventSource.h:
        * page/Frame.cpp:
        (WebCore::Frame::setView):
        (WebCore::Frame::setDocument):
        (WebCore::Frame::willDetachPage):
        * page/FrameView.cpp:
        (WebCore::FrameView::didRestoreFromBackForwardCache):
        (WebCore::FrameView::setContentsSize):
        * page/FrameView.h:
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layout):
        (WebCore::FrameViewLayoutContext::scheduleLayout):
        * page/MemoryRelease.cpp:
        (WebCore::releaseCriticalMemory):
        (WebCore::releaseMemory):
        * page/MemoryRelease.h:
        * page/Page.cpp:
        (WebCore::Page::~Page):
        (WebCore::Page::setViewScaleFactor):
        (WebCore::Page::setDeviceScaleFactor):
        * page/Page.h:
        * page/PageGroup.cpp:
        (WebCore::PageGroup::captionPreferencesChanged):
        * page/PerformanceLogging.cpp:
        (WebCore::PerformanceLogging::memoryUsageStatistics):
        * page/Settings.yaml:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::usesBackForwardCacheChanged):
        * page/SettingsBase.h:
        * page/animation/AnimationBase.cpp:
        (WebCore::AnimationBase::setNeedsStyleRecalc):
        * page/animation/CSSAnimationController.cpp:
        (WebCore::CSSAnimationControllerPrivate::updateAnimations):
        (WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
        (WebCore::CSSAnimationController::cancelAnimations):
        (WebCore::CSSAnimationController::updateAnimations):
        * page/animation/ImplicitAnimation.cpp:
        (WebCore::ImplicitAnimation::sendTransitionEvent):
        * page/animation/KeyframeAnimation.cpp:
        (WebCore::KeyframeAnimation::sendAnimationEvent):
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
        (WebCore::ScrollAnimatorMac::updateScrollerStyle):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintIntoLayer):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
        (WebCore::RenderLayerCompositor::didAddScrollingLayer):
        * rendering/RenderLayerCompositor.h:
        * rendering/RenderObject.h:
        * rendering/SimpleLineLayoutCoverage.cpp:
        (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
        * testing/Internals.cpp:
        (WebCore::Internals::clearBackForwardCache):
        (WebCore::Internals::backForwardCacheSize const):
        (WebCore::Internals::preventDocumentForEnteringBackForwardCache):
        * testing/Internals.h:
        * testing/Internals.idl:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::suspend):

2019-10-16  John Wilander  <wilander@apple.com>

        Resource Load Statistics (experimental): Block all third-party cookies on websites without prior user interaction
        https://bugs.webkit.org/show_bug.cgi?id=203017
        <rdar://problem/56262708>

        Reviewed by Alex Christensen.

        NetworkStorageSession::shouldBlockCookies() now checks if the first-party website has
        received user interaction and if not, blocks all third-party cookies, regardless of the
        status of those third-party domains (prevalent or not).

        Bundled cleanup task: Remove the two month old feature flag for NSURLSession switching.

        Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setIsITPSessionSwitchingEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::isITPSessionSwitchingEnabled const): Deleted.
        * page/Settings.yaml:
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::hasHadUserInteractionAsFirstParty const):
        (WebCore::NetworkStorageSession::shouldBlockCookies const):
        (WebCore::NetworkStorageSession::setDomainsWithUserInteractionAsFirstParty):
        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingOnSitesWithoutUserInteractionEnabled):

2019-10-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add style and text content to Display::Run
        https://bugs.webkit.org/show_bug.cgi?id=203045
        <rdar://problem/56340105>

        Reviewed by Antti Koivisto.

        Painting Display::Runs requires style and text content. Currently there's no mapping structure to connect Display::Runs to Display::Boxes to access style and content.

        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::TextContext::content const):
        (WebCore::Display::Run::style const):
        (WebCore::Display::Run::Run):
        (WebCore::Display::Run::TextContext::TextContext):
        (WebCore::Display::Run::TextContext::expand):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::expand):

2019-10-16  Simon Fraser  <simon.fraser@apple.com>

        Add dumping for BorderData and StyleBackgroundData
        https://bugs.webkit.org/show_bug.cgi?id=203038

        Reviewed by Zalan Bujtas.

        As part of adding dumping for all RenderStyle data, add dumping support for 
        BorderData and StyleBackgroundData.
        
        For large classes it's beneficial to avoid dumping default values; those classes
        get a dump() function that can take an argument to say whether values which are default
        should be printed.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/LengthSize.h:
        (WebCore::LengthSize::isZero const):
        * rendering/style/BorderData.cpp: Added.
        (WebCore::operator<<):
        (WebCore::BorderData::dump const):
        * rendering/style/BorderData.h:
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleBackgroundData.cpp:
        (WebCore::StyleBackgroundData::dump const):
        (WebCore::operator<<):
        * rendering/style/StyleBackgroundData.h:

2019-10-16  Chris Dumez  <cdumez@apple.com>

        [WK2] Handle back/forward cache entry expiration in the UIProcess instead of the WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=203034
        <rdar://problem/56332453>

        Reviewed by Antti Koivisto.

        Use Seconds type for backForwardCacheExpirationInterval setting instead of
        double, for clarity.

        * history/CachedPage.cpp:
        (WebCore::CachedPage::CachedPage):
        (WebCore::CachedPage::hasExpired const):
        * page/Settings.yaml:

2019-10-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Fix various vertical alignment issues.
        https://bugs.webkit.org/show_bug.cgi?id=203041

        Reviewed by Antti Koivisto.

        This patch fixes both regular inline box and inline-block baseline aligment. It also addresses a few related vertical positioning issues. 

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::alignContentVertically):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        * layout/inlineformatting/InlineLine.h:
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::resetDescent):
        (WebCore::Layout::LineBox::setLogicalHeightIfGreater):
        (WebCore::Layout::LineBox::setBaselineOffsetIfGreater):
        (WebCore::Layout::LineBox::setAscentIfGreater):
        (WebCore::Layout::LineBox::setDescentIfGreater):
        (WebCore::Layout::LineBox::resetBaseline):
        (WebCore::
        Layout::LineBox::setBaseline): Deleted.
        (WebCore::Layout::LineBox::baseline): Deleted.
        (WebCore::Layout::LineBox::setBaselineOffset): Deleted.
        (WebCore::Layout::LineBox::Baseline::setAscentIfGreater): Deleted.
        (WebCore::Layout::LineBox::Baseline::setDescentIfGreater): Deleted.

2019-10-16  Chris Dumez  <cdumez@apple.com>

        Drop unused WKPageSetResourceCachingDisabled() SPI
        https://bugs.webkit.org/show_bug.cgi?id=203035

        Reviewed by Alex Christensen.

        * history/PageCache.cpp:
        (WebCore::canCachePage):
        (WebCore::PageCache::take):
        (WebCore::PageCache::get):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache const):
        * inspector/agents/page/PageNetworkAgent.cpp:
        (WebCore::PageNetworkAgent::setResourceCachingDisabled):
        * inspector/agents/worker/WorkerNetworkAgent.cpp:
        (WebCore::WorkerNetworkAgent::setResourceCachingDisabled):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::subresourceCachePolicy const):
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::cachePolicy const):
        * page/Page.h:
        (WebCore::Page::isResourceCachingDisabledByWebInspector const):
        (WebCore::Page::setResourceCachingDisabledByWebInspector):
        (WebCore::Page::isResourceCachingDisabled const): Deleted.
        (WebCore::Page::setResourceCachingDisabled): Deleted.
        (WebCore::Page::setResourceCachingDisabledOverride): Deleted.
        * workers/WorkerDebuggerProxy.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::setResourceCachingDisabledByWebInspector):
        (WebCore::WorkerMessagingProxy::setResourceCachingDisabled): Deleted.
        * workers/WorkerMessagingProxy.h:
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabledByWebInspector):
        (WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabled): Deleted.
        * workers/service/context/ServiceWorkerThreadProxy.h:

2019-10-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        DumpRenderTree should clear WTFLogChannelState::OnWithAccumulation state set by testRunner.accummulateLogsForChannel
        https://bugs.webkit.org/show_bug.cgi?id=203024

        Reviewed by Alex Christensen.

        * platform/LogInitialization.h:
        * platform/Logging.cpp:
        (WebCore::clearAllLogChannelsToAccumulate): Added.
        * platform/Logging.h:
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::clearAllLogChannelsToAccumulate): Added.
        * testing/js/WebCoreTestSupport.h:

2019-10-16  Youenn Fablet  <youenn@apple.com>

        WebAudioSourceProviderAVFObjC::provideInput should set its WebAudioBufferList parameters correctly
        https://bugs.webkit.org/show_bug.cgi?id=202930
        <rdar://problem/56006776>

        Reviewed by Eric Carlson.

        There is a time where the bus channel number and audio source channel numbers may be different.
        In case the bus channel number is less than the audio source channel number, initialization of
        the WebAudioBufferList might not be fully done.
        In that case, output silence and return early.
        Reduce the number of frames to process based on the number of frames the output audio bus plans to process.

        Partially covered by new API test (this a race so we cannot reproduce the crash easily).

        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        (WebCore::MediaStreamAudioSourceNode::process):
        Make sure to process the number of frames the output bus expect.
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
        (WebCore::WebAudioSourceProviderAVFObjC::provideInput):

2019-10-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] TableFormattingContext::distributeExtraHorizontalSpace should not ignore fixed width columns
        https://bugs.webkit.org/show_bug.cgi?id=203010

        Reviewed by Antti Koivisto.

        Fixed width columns (e.g. <col width=100px>) don't participate in the extra horizontal space distribution.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computedTableWidth):
        (WebCore::Layout::TableFormattingContext::distributeExtraHorizontalSpace):
        (WebCore::Layout::TableFormattingContext::distributeAvailableWidth): Deleted.
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::Column::hasFixedWidth const):
        (WebCore::Layout::TableGrid::widthConstraints const):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::totalHorizontalSpacing const):
        (WebCore::Layout::TableGrid::columnsContext const):

2019-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] ASSERTION FAILED: blob in SQLiteStatement.cpp(163) : int WebCore::SQLiteStatement::bindBlob()
        https://bugs.webkit.org/show_bug.cgi?id=202976

        Reviewed by Adrian Perez de Castro.

        This is because IconDatabases passes a nullptr blob to store emtpty icons. sqlite3_bind_blob() allows nullptr as
        blob, so we shouldn't assert.

        * platform/sql/SQLiteStatement.cpp:
        (WebCore::SQLiteStatement::bindBlob): Update the assert to only fail when blob is nullptr and size > 0.

2019-10-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for Windows ports
        https://bugs.webkit.org/show_bug.cgi?id=203016
        <rdar://problem/56317774>

        * page/DOMTimer.h: Added WEBCORE_EXPORT to ~DOMTimer().

2019-10-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        image/apng not recognized in source tag
        https://bugs.webkit.org/show_bug.cgi?id=202785

        Reviewed by Dean Jackson.

        Add image/apng as supported mime type for images on Mac/iOS and
        on all the other platforms that enable apng support.

        This fixes the test imported/w3c/web-platform-tests/apng/supported-in-source-type.html

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::supportedImageMIMETypes):

2019-10-15  Ryosuke Niwa  <rniwa@webkit.org>

        adoptRef DOMTimer in install instead of its constructor
        https://bugs.webkit.org/show_bug.cgi?id=203016

        Reviewed by Simon Fraser.

        Moved the code to add DOMTimer to ScriptExecutionContext's map to DOMTimer::install
        instead of its constructor so that we can adoptRef there instead for clarity & simplicity.

        * dom/ScriptExecutionContext.h:
        (WebCore::ScriptExecutionContext::addTimeout):
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::DOMTimer):
        (WebCore::DOMTimer::install):
        (WebCore::DOMTimer::fired):

2019-10-15  Simon Fraser  <simon.fraser@apple.com>

        ScrollingTreeScrollingNodeDelegateMac::stretchAmount() should not have side effects
        https://bugs.webkit.org/show_bug.cgi?id=203009

        Reviewed by Dean Jackson.

        Calling ScrollingTreeScrollingNodeDelegateMac::stretchAmount() had the side effect of calling
        setMainFrameIsRubberBanding() on the scrolling tree.
        
        Remove this badness and replace it by modifying updateMainFramePinState() (which is called every time
        the scroll position changes) to also compute if we're rubber-banding.
        
        Also make a bunch of methods on ScrollControllerClient const, which makes it clear that
        they don't have side effects.

        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinAndRubberbandState):
        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinState): Deleted.
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::isAlreadyPinnedInDirectionOfGesture const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::pinnedInDirection const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollVertically const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::isAlreadyPinnedInDirectionOfGesture): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::pinnedInDirection): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollVertically): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection): Deleted.
        * platform/cocoa/ScrollController.h:
        * platform/mac/ScrollAnimatorMac.h:
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent const):
        (WebCore::ScrollAnimatorMac::pinnedInDirection const):
        (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture const):
        (WebCore::ScrollAnimatorMac::allowsVerticalStretching const):
        (WebCore::ScrollAnimatorMac::allowsHorizontalStretching const):
        (WebCore::ScrollAnimatorMac::stretchAmount const):
        (WebCore::ScrollAnimatorMac::canScrollHorizontally const):
        (WebCore::ScrollAnimatorMac::canScrollVertically const):
        (WebCore::ScrollAnimatorMac::shouldRubberBandInDirection const):
        (WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): Deleted.
        (WebCore::ScrollAnimatorMac::pinnedInDirection): Deleted.
        (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture): Deleted.
        (WebCore::ScrollAnimatorMac::allowsVerticalStretching): Deleted.
        (WebCore::ScrollAnimatorMac::allowsHorizontalStretching): Deleted.
        (WebCore::ScrollAnimatorMac::stretchAmount): Deleted.
        (WebCore::ScrollAnimatorMac::canScrollHorizontally): Deleted.
        (WebCore::ScrollAnimatorMac::canScrollVertically): Deleted.
        (WebCore::ScrollAnimatorMac::shouldRubberBandInDirection): Deleted.
        * platform/mock/ScrollAnimatorMock.h:

2019-10-15  Simon Fraser  <simon.fraser@apple.com>

        WheelEventTestMonitor doesn't need to be threadsafe
        https://bugs.webkit.org/show_bug.cgi?id=203012

        Reviewed by Dean Jackson.

        WheelEventTestMonitor is only called on the main thread, so doesn't need a lock to protect
        m_deferCompletionReasons, and add main thread assertions.

        * page/WheelEventTestMonitor.cpp:
        (WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
        (WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer):
        (WebCore::WheelEventTestMonitor::deferForReason):
        (WebCore::WheelEventTestMonitor::removeDeferralForReason):
        (WebCore::WheelEventTestMonitor::triggerTestTimerFired):
        * page/WheelEventTestMonitor.h:

2019-10-15  Andres Gonzalez  <andresg_22@apple.com>

        AX: Make AXIsolatedTree compile again
        https://bugs.webkit.org/show_bug.cgi?id=202702
        <rdar://problem/56084968>

        Reviewed by Joanmarie Diggs.

        Re-submitting r251045 with a fix for internal builds.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::remove):
        (WebCore::AXObjectCache::createIsolatedAccessibilityTreeHierarchy):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::treePageCache):
        (WebCore::AXIsolatedTree::nodeForID const):
        (WebCore::AXIsolatedTree::applyPendingChanges):
        (WebCore::AXIsolatedTree::initializePageTreeForID): Deleted.
        (WebCore::AXIsolatedTree::setInitialRequestInProgress): Deleted.
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedTreeNode::setTreeIdentifier):
        (WebCore::AXIsolatedTreeNode::rectAttributeValue const):
        * accessibility/isolatedtree/AXIsolatedTreeNode.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (convertToNSArray):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper childrenVectorArray]):

2019-10-15  Ryosuke Niwa  <rniwa@webkit.org>

        [iOS] Crash in WebCore::DOMWindow::incrementScrollEventListenersCount
        https://bugs.webkit.org/show_bug.cgi?id=202878

        Unreviewed. Addressed Darin's post-commit review comment.

        * dom/Node.cpp:
        (WebCore::tryAddEventListener):

2019-10-15  Chris Dumez  <cdumez@apple.com>

        [macOS] Simplify main thread initialization
        https://bugs.webkit.org/show_bug.cgi?id=203001

        Reviewed by Geoff Garen.

        * bridge/objc/WebScriptObject.mm:
        (+[WebScriptObject initialize]):
        * platform/cocoa/SharedBufferCocoa.mm:
        (+[WebCoreSharedBufferData initialize]):

2019-10-15  Peng Liu  <peng.liu6@apple.com>

        [Picture-in-Picture Web API] Implement HTMLVideoElement.requestPictureInPicture() / Document.exitPictureInPicture()
        https://bugs.webkit.org/show_bug.cgi?id=201024

        Reviewed by Eric Carlson.

        Implement the support to enter and exit PiP mode with the Picture-in-Picture API.
        Majority work of this patch was done by Carlos Eduardo Ramalho <cadubentzen@gmail.com>.

        Also, fix a build error of Modules/webaudio/OfflineAudioContext.cpp because of this patch (due to unified build).

        Tests: imported/w3c/web-platform-tests/picture-in-picture/css-selector.html
               imported/w3c/web-platform-tests/picture-in-picture/disable-picture-in-picture.html
               imported/w3c/web-platform-tests/picture-in-picture/enter-picture-in-picture.html
               imported/w3c/web-platform-tests/picture-in-picture/exit-picture-in-picture.html
               imported/w3c/web-platform-tests/picture-in-picture/idlharness.window.html
               imported/w3c/web-platform-tests/picture-in-picture/leave-picture-in-picture.html
               imported/w3c/web-platform-tests/picture-in-picture/mediastream.html
               imported/w3c/web-platform-tests/picture-in-picture/picture-in-picture-element.html
               imported/w3c/web-platform-tests/picture-in-picture/picture-in-picture-window.html
               imported/w3c/web-platform-tests/picture-in-picture/request-picture-in-picture-twice.html
               imported/w3c/web-platform-tests/picture-in-picture/request-picture-in-picture.html
               imported/w3c/web-platform-tests/picture-in-picture/shadow-dom.html

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/pictureinpicture/DocumentPictureInPicture.cpp: Added.
        (WebCore::DocumentPictureInPicture::exitPictureInPicture):
        (WebCore::DocumentPictureInPicture::from):
        * Modules/pictureinpicture/DocumentPictureInPicture.h: Added.
        (WebCore::DocumentPictureInPicture::pictureInPictureEnabled):
        (WebCore::DocumentPictureInPicture::supplementName):
        * Modules/pictureinpicture/DocumentPictureInPicture.idl: Added.
        * Modules/pictureinpicture/EnterPictureInPictureEvent.cpp: Added.
        (WebCore::EnterPictureInPictureEvent::create):
        (WebCore::EnterPictureInPictureEvent::EnterPictureInPictureEvent):
        * Modules/pictureinpicture/EnterPictureInPictureEvent.h: Added.
        * Modules/pictureinpicture/EnterPictureInPictureEvent.idl: Added.
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp: Added.
        (WebCore::HTMLVideoElementPictureInPicture::HTMLVideoElementPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::~HTMLVideoElementPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::from):
        (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::autoPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::setAutoPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::disablePictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::setDisablePictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::exitPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
        (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h: Added.
        (WebCore::HTMLVideoElementPictureInPicture::supplementName):
        * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.idl: Added.
        * Modules/pictureinpicture/PictureInPictureWindow.cpp: Added.
        (WebCore::PictureInPictureWindow::create):
        (WebCore::PictureInPictureWindow::PictureInPictureWindow):
        (WebCore::PictureInPictureWindow::activeDOMObjectName const):
        (WebCore::PictureInPictureWindow::canSuspendForDocumentSuspension const):
        (WebCore::PictureInPictureWindow::eventTargetInterface const):
        (WebCore::PictureInPictureWindow::scriptExecutionContext const):
        * Modules/pictureinpicture/PictureInPictureWindow.h: Added.
        * Modules/pictureinpicture/PictureInPictureWindow.idl: Added.
        * Modules/webaudio/OfflineAudioContext.cpp:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/Document.cpp:
        (WebCore::Document::pictureInPictureElement const):
        (WebCore::Document::setPictureInPictureElement):
        * dom/Document.h:
        * dom/DocumentOrShadowRoot.idl:
        * dom/EventNames.h:
        * dom/EventNames.in:
        * dom/EventTargetFactory.in:
        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::pictureInPictureElement const):
        * dom/ShadowRoot.h:
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::fullscreenModeChanged):
        (WebCore::HTMLVideoElement::setPictureInPictureObserver):
        * html/HTMLVideoElement.h:
        * page/Settings.yaml:
        * platform/PictureInPictureObserver.h: Added.
        (WebCore::PictureInPictureObserver::~PictureInPictureObserver):
        * testing/InternalSettings.h:

2019-10-15  Simon Fraser  <simon.fraser@apple.com>

        Add TextStream dumping for ThemeTypes enums
        https://bugs.webkit.org/show_bug.cgi?id=202972

        Reviewed by Dean Jackson.

        Make ControlPart, SelectionPart, ThemeFont and ThemeColor dumpable.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/ThemeTypes.cpp: Added.
        (WebCore::operator<<):
        * platform/ThemeTypes.h:

2019-10-15  Simon Fraser  <simon.fraser@apple.com>

        Add dumping for Animation and AnimationList
        https://bugs.webkit.org/show_bug.cgi?id=202973

        Reviewed by Dean Jackson.

        Make Animation, AnimationList and related enums dumpable.

        * platform/animation/Animation.cpp:
        (WebCore::operator<<):
        * platform/animation/Animation.h:
        * platform/animation/AnimationList.cpp:
        (WebCore::operator<<):
        * platform/animation/AnimationList.h:

2019-10-15  Simon Fraser  <simon.fraser@apple.com>

        Don't mutate a NinePieceImage to create a mask default image
        https://bugs.webkit.org/show_bug.cgi?id=202967

        Reviewed by Dean Jackson.

        For every StyleRareNonInheritedData, the maskBoxImage undergoes copy-on-write
        via maskBoxImage.setMaskDefaults(). Fix by giving NinePieceImage a constructor
        argument that cna make the mask flavor of image.

        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertBorderMask):
        (WebCore::StyleBuilderConverter::convertReflection):
        * rendering/style/NinePieceImage.cpp:
        (WebCore::NinePieceImage::defaultMaskData):
        (WebCore::NinePieceImage::NinePieceImage):
        * rendering/style/NinePieceImage.h:
        (WebCore::NinePieceImage::setMaskDefaults): Deleted.
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        * rendering/style/StyleReflection.h:
        (WebCore::StyleReflection::StyleReflection):

2019-10-15  youenn fablet  <youenn@apple.com>

        Move headers to keep from a HTTPHeaderNameSet to an OptionSet
        https://bugs.webkit.org/show_bug.cgi?id=202977

        Reviewed by Anders Carlsson.

        Covered by existing tests.
        New representation is smaller and more efficient to process.

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::httpHeadersToKeepFromCleaning):
        (WebCore::cleanHTTPRequestHeadersForAccessControl):
        * loader/CrossOriginAccessControl.h:
        (WebCore::cleanHTTPRequestHeadersForAccessControl): Deleted.
        * loader/ResourceLoaderOptions.h:

2019-10-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Use <col> to adjust the preferred column width.
        https://bugs.webkit.org/show_bug.cgi?id=202997
        <rdar://problem/56300345>

        Reviewed by Antti Koivisto.

        The <col> elment can set the preferred width on the table column. Let's take these values into account while computing the preferred width for columns.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableFormattingContextGeometry.cpp:
        (WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth const):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::Column::columnBox const):

2019-10-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Add support for colgroup/col
        https://bugs.webkit.org/show_bug.cgi?id=202991
        <rdar://problem/56294715>

        Reviewed by Antti Koivisto.

        This patch sets up the column context when <colgroup> is present. This is in preparation for using <col>'s width to adjust the preferred width on table columns.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::ensureTableGrid):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::Column::Column):
        (WebCore::Layout::TableGrid::ColumnsContext::addColumn):
        * layout/tableformatting/TableGrid.h:

2019-10-15  Alex Christensen  <achristensen@webkit.org>

        Unreviewed, rolling out r251138.

        Broke API tests

        Reverted changeset:

        "Pass CORS-enabled schemes through WebProcess instead of
        having them NetworkProcess-global"
        https://bugs.webkit.org/show_bug.cgi?id=202891
        https://trac.webkit.org/changeset/251138

2019-10-15  Chris Dumez  <cdumez@apple.com>

        Stop using inheritance for WebBackForwardCacheEntry
        https://bugs.webkit.org/show_bug.cgi?id=202989

        Reviewed by Alex Christensen.

        * history/BackForwardItemIdentifier.h:
        (WebCore::BackForwardItemIdentifier::operator bool const):

2019-10-15  Alex Christensen  <achristensen@webkit.org>

        Pass CORS-enabled schemes through WebProcess instead of having them NetworkProcess-global
        https://bugs.webkit.org/show_bug.cgi?id=202891

        Reviewed by Youenn Fablet.

        * platform/LegacySchemeRegistry.cpp:
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
        (WebCore::LegacySchemeRegistry::allURLSchemesRegisteredAsCORSEnabled):
        * platform/LegacySchemeRegistry.h:

2019-10-15  Zalan Bujtas  <zalan@apple.com>

        [LFC] Adjust computed width value when box sizing is border-box
        https://bugs.webkit.org/show_bug.cgi?id=202966
        <rdar://problem/56277954>

        Reviewed by Antti Koivisto.

        box-sizing: border-box; means the width value sets the size of the border box (and not the content box).

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedContentWidth const):
        (WebCore::Layout::FormattingContext::Geometry::computedMinWidth const):
        (WebCore::Layout::FormattingContext::Geometry::computedMaxWidth const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):

2019-10-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Add <col> element's width attribute value to Layout::Box rare data
        https://bugs.webkit.org/show_bug.cgi?id=202988
        <rdar://problem/56291048>

        Reviewed by Antti Koivisto.

        Sadly RenderStyle does not have this value.

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::setColumnWidth):
        (WebCore::Layout::Box::columnWidth const):
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::outputLayoutBox):

2019-10-15  Zalan Bujtas  <zalan@apple.com>

        [LFC] Adjust computed height value when box sizing is border-box
        https://bugs.webkit.org/show_bug.cgi?id=202965
        <rdar://problem/56276771>

        Reviewed by Antti Koivisto.

        box-sizing: border-box; means the height value sets the size of the border box (and not the content box).  

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedContentHeight const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox):
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/displaytree/DisplayBox.cpp:
        (WebCore::Display::Box::Box):
        (WebCore::Display::Box::Style::Style): Deleted.
        * layout/displaytree/DisplayBox.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableFormattingContextGeometry.cpp:
        (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):

2019-10-15  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Implement getType() for ClipboardItems created from bindings
        https://bugs.webkit.org/show_bug.cgi?id=202943

        Reviewed by Tim Horton.

        Adds basic support for ClipboardItem.getType(), in the case where the ClipboardItems are created by the page. To
        achieve this, we introduce ClipboardItemDataSource, which represents the data source backing a given clipboard
        item. This backing may either consist of a list of types and their corresponding DOMPromises (for ClipboardItems
        that come from the page), or may consist of a list of items that will ask the platformr pasteboard for their
        data (to be supported in a future patch).

        See below for more details.

        Test: editing/async-clipboard/clipboard-item-basic.html

        * Modules/async-clipboard/Clipboard.h:
        * Modules/async-clipboard/ClipboardItem.cpp:
        (WebCore::clipboardItemPresentationStyle):
        (WebCore::ClipboardItem::ClipboardItem):

        Pass in the parent Clipboard object for ClipboardItems that are backed by the platform pasteboard (which are
        returned by Clipboard.read()). (Note that this doesn't make any difference until this codepath is actually
        exercised when we add support for Clipboard.read()).

        (WebCore::ClipboardItem::create):
        (WebCore::ClipboardItem::types const):
        (WebCore::ClipboardItem::getType):

        Plumb types() and getType() to the clipboard item's datasource.

        (WebCore::ClipboardItem::navigator):

        Make navigator() return the parent Clipboard object's navigator.

        * Modules/async-clipboard/ClipboardItem.h:
        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: Added.
        (WebCore::blobFromString):
        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemBindingsDataSource):

        Store the given list of types and DOM promises.

        (WebCore::ClipboardItemBindingsDataSource::types const):
        (WebCore::ClipboardItemBindingsDataSource::getType):

        Implement getType() by finding the matching promised type in the item's array of types, and waiting for the
        promise to either resolve or reject. If the promise resolves to either a string or blob, we deliver the result
        back to the page by resolving the promise returned by getType(). Otherwise, we reject it.

        * Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
        * Modules/async-clipboard/ClipboardItemDataSource.h:
        (WebCore::ClipboardItemDataSource::ClipboardItemDataSource):
        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:

        Add a stub implementation of a clipboard item data source that is backed by data in the platform pasteboard. In
        a future patch, this will implement getType() by calling out to the platform pasteboard.

        (WebCore::ClipboardItemPasteboardDataSource::ClipboardItemPasteboardDataSource):
        (WebCore::ClipboardItemPasteboardDataSource::types const):
        (WebCore::ClipboardItemPasteboardDataSource::getType):
        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:
        * Modules/mediastream/RTCRtpReceiver.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:

        Unrelated build fixes, due to changes in unified source groupings.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/network/mac/UTIUtilities.mm:

        More build fixes, due to changes in unified source groupings.

2019-10-15  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for text-transform: uppercase/lowercase
        https://bugs.webkit.org/show_bug.cgi?id=202968
        <rdar://problem/56278141>

        Reviewed by Antti Koivisto.

        The text content on the layout box should be in its final state (This might change if we actually need the original content for some reason though).

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::applyTextTransform):
        (WebCore::Layout::TreeBuilder::createLayoutBox):

2019-10-14  Youenn Fablet  <youenn@apple.com>

        Handle service worker loads through NetworkResourceLoader
        https://bugs.webkit.org/show_bug.cgi?id=202309

        Reviewed by Alex Christensen.

        Allow to serialize HTTP header names as enumeration.
        Updated SWServer ability to handle schemes by adding built-in support for HTTP and HTTPS as done in LegacySchemeRegistry.

        Covered by existing tests.

        * loader/ResourceLoaderOptions.h:
        * platform/network/create-http-header-name-table:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::canHandleScheme const):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::runRegisterJob):

2019-10-14  Tim Horton  <timothy_horton@apple.com>

        Unify sources for bindings more densely
        https://bugs.webkit.org/show_bug.cgi?id=202918

        Reviewed by Simon Fraser.

        No new tests, just a build time speedup.
        For me, this is a reliable 17% boost on the WebCore Build Time Benchmark.

        * Scripts/generate-unified-sources.sh:
        Use dense bundles for JS* and bindings/js/*.
        This seems acceptable for a few reasons:

        - most of the time building these files is spent parsing the exact
        same set of JSC headers, because the generated bindings code ends
        up including the same set of things

        - the incremental build cost of bundling more bindings sources together
        is small, because the JSC headers dominate the time

        - folks will frequently have to rebuild all of the bindings (on every
        pull, for example, because they indirectly include most JSC headers),
        but rarely end up rebuilding only a single one (in my experience)

        * bindings/js/ReadableStreamDefaultController.cpp:
        (WebCore::readableStreamCallFunction):
        (WebCore::ReadableStreamDefaultController::invoke):
        (WebCore::callFunction): Deleted.
        Deduplicate static functions that now get bundled together.

        * platform/graphics/ca/PlatformCALayer.cpp:
        (WebCore::PlatformCALayer::currentTimeToMediaTime):
        * platform/graphics/ca/PlatformCALayer.h:
        In older macOS SDKs, CABase.h included ApplicationServices.h, which
        causes lots of trouble.

2019-10-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] White pages in AC mode: Cannot get default EGL display: EGL_BAD_PARAMETER
        https://bugs.webkit.org/show_bug.cgi?id=202362

        Reviewed by Carlos Alberto Lopez Perez.

        The problem is that PlatformDisplayLibWPE::initialize() is failing to initialize the EGL display for some
        reason. We need to understand why, but we should also handle the case of failing to initialize the EGL display
        and simply disable accelerated compositing mode to avoid white pages and crashes in websites using WebGL. This
        patch doesn't actually fix the bug, it just handles the EGL display initialization failure.

        * platform/graphics/PlatformDisplay.cpp:
        (WebCore::PlatformDisplay::~PlatformDisplay): Set s_sharedDisplayForCompositing to nullptr when the shared
        display for compositing is destroyed.
        * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:
        (WebCore::PlatformDisplayLibWPE::initialize): Return false when EGL display initialization fails.
        * platform/graphics/libwpe/PlatformDisplayLibWPE.h:

2019-10-14  Chris Dumez  <cdumez@apple.com>

        [WK2] Have WebBackForwardCache class coordinate page caching in all WebProcesses
        https://bugs.webkit.org/show_bug.cgi?id=202929
        <rdar://problem/56250421>

        Reviewed by Alex Christensen.

        Drop FrameLoaderClient::didSaveToPageCache() function as it is no longer needed.
        Instead, we now call HistoryItem::notifyChanged() whenever HistoryItem::m_cachedPage
        changes. This communicates to the UIProcess whether or not a HistoryItem has an
        associated CachedPage.

        I also added more release logging to the PageCache and renamed its logging channel
        from PageCache to WebBackForwardCache to match the UIProcess's channel.

        * history/BackForwardItemIdentifier.h:
        (WebCore::BackForwardItemIdentifier::string const):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::CachedFrame):
        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::setCachedPage):
        (WebCore::HistoryItem::takeCachedPage):
        * history/HistoryItem.h:
        * history/PageCache.cpp:
        (WebCore::PageCache::addIfCacheable):
        (WebCore::PageCache::take):
        (WebCore::PageCache::removeAllItemsForPage):
        (WebCore::PageCache::get):
        (WebCore::PageCache::remove):
        (WebCore::PageCache::prune):
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
        * loader/FrameLoaderClient.h:
        * platform/Logging.h:

2019-10-14  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Outsets for referenced SVG filters are always zero
        https://bugs.webkit.org/show_bug.cgi?id=202826

        Reviewed by Simon Fraser.

        Sometimes the filter is applied only to a part of the image, so we need
        to enlarge the source rectangle such that the border of the result image
        looks like as if the filter were applied to the whole image.

        The filter outsets should only be calculated for the blur and the drop
        shadow filters. The problem is FilterOperations::outsets() was returning
        empty outsets always for the referenced filters.

        Since the referenced filters must be software filters, the fix is to rely
        on CSSFilter in calculating the filter outsets for software filters.

        By adding a virtual function called outset() to the FilterEffect class, 
        we can loop through the CSSFilter::m_effects asking every FilterEffect
        to return its outset(). This function is only overridden by FEDropShadow
        and FEGaussianBlur.

        This should work because RenderLayer builds the CSSFilter when the styleChanged()
        happens through its updateFilterPaintingStrategy(). This will guarantee 
        that m_filters->filter()->outsets() will return the correct outsets for
        the referenced and the non-referenced software filters.

        We should keep FilterOperations::outsets() because it has be used for
        the hardware non-referenced filters. In that case, RenderLayer does not
        build the the filter effects. Therefore m_filters can't be used because
        it is null in this case.

        For accuracy, hasOutsets() implementation is deleted. Having a blur or
        drop shadow filter effect is not enough to say hasOutsets() is true. We
        need to calculate the outsets first and then ask if it isZero() or not.

        Test: css3/filters/svg-blur-filter-clipped.html

        * platform/graphics/IntRectExtent.h:
        (WebCore::operator==):
        (WebCore::operator+=):
        (WebCore::IntRectExtent::expandRect const): Deleted.
        IntRectExtent is only used as a filter outsets. So add the definition of
        IntOutsets in IntRectExtent.h.

        * platform/graphics/filters/FEDropShadow.cpp:
        (WebCore::FEDropShadow::outsets const):
        * platform/graphics/filters/FEDropShadow.h:
        * platform/graphics/filters/FEGaussianBlur.cpp:
        (WebCore::FEGaussianBlur::calculateOutsetSize):
        (WebCore::FEGaussianBlur::outsets const):
        * platform/graphics/filters/FEGaussianBlur.h:
        * platform/graphics/filters/FilterEffect.h:
        (WebCore::FilterEffect::outsets const):
        * platform/graphics/filters/FilterOperations.cpp:
        (WebCore::FilterOperations::outsets const):
        (WebCore::outsetSizeForBlur): Deleted.
        (WebCore::FilterOperations::hasOutsets const): Deleted.
        * platform/graphics/filters/FilterOperations.h:
        (WebCore::FilterOperations::hasOutsets const):
        * platform/graphics/texmap/TextureMapperLayer.cpp:
        (WebCore::TextureMapperLayer::computeOverlapRegions):

        * rendering/CSSFilter.cpp:
        (WebCore::CSSFilter::build):
        (WebCore::CSSFilter::computeSourceImageRectForDirtyRect):
        (WebCore::CSSFilter::outsets const):
        Calculate m_outsets once and cache its value for later uses.

        * rendering/CSSFilter.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
        (WebCore::RenderLayer::hasAncestorWithFilterOutsets const):
        (WebCore::transparencyClipBox):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::filterOutsets const):
        (WebCore::RenderStyle::hasFilterOutsets const): Deleted.

2019-10-14  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Refactor custom pasteboard writing codepaths to handle multiple items
        https://bugs.webkit.org/show_bug.cgi?id=202916

        Reviewed by Tim Horton.

        Adjusts the `Pasteboard::write` codepath for writing PasteboardCustomData to the platform pasteboard, such that
        it accepts multiple PasteboardCustomDatas. No new tests, since there is no behavior change.

        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::commitToPasteboard):

        Pass in the PasteboardCustomData as a single-item vector.

        * platform/Pasteboard.h:
        * platform/PasteboardStrategy.h:
        * platform/PlatformPasteboard.h:
        * platform/StaticPasteboard.h:
        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::Pasteboard::writeCustomData):
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::Pasteboard::writeCustomData):
        * platform/gtk/PlatformPasteboardGtk.cpp:
        (WebCore::PlatformPasteboard::write):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::write):

        Adjust this method to return the updated change count.

        * platform/libwpe/PasteboardLibWPE.cpp:
        (WebCore::Pasteboard::writeCustomData):
        * platform/libwpe/PlatformPasteboardLibWPE.cpp:
        (WebCore::PlatformPasteboard::write):
        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::write):

        Add logic to fall back to writing legacy pasteboard types in the case where there is only one item.

        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::writeCustomData):

2019-10-14  Ryosuke Niwa  <rniwa@webkit.org>

        Deploy smart pointers in RadioButtonGroups and RadioButtonGroup
        https://bugs.webkit.org/show_bug.cgi?id=202942

        Reviewed by Zalan Bujtas.

        Use Ref & WeakPtr instead of raw pointers in RadioButtonGroups and RadioButtonGroup.

        Also made RadioButtonGroups::m_nameToGroupMap a HashMap instead of a unique_ptr of HashMap
        since RadioButtonGroups is lazily created in TreeScope as of r250708.

        No new tests since there should be no observable behavioral change.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers const):
        * dom/RadioButtonGroups.cpp:
        (WebCore::RadioButtonGroup): Use WeakHashSet and WeakPtr instead of raw pointers.
        (WebCore::RadioButtonGroup::isEmpty const):
        (WebCore::RadioButtonGroup::checkedButton const):
        (WebCore::RadioButtonGroup::members const):
        (WebCore::RadioButtonGroup::setCheckedButton):
        (WebCore::RadioButtonGroup::updateCheckedState):
        (WebCore::RadioButtonGroup::requiredStateChanged):
        (WebCore::RadioButtonGroup::remove):
        (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
        (WebCore::RadioButtonGroup::updateValidityForAllButtons):
        (WebCore::RadioButtonGroup::contains const):
        (WebCore::RadioButtonGroups::addButton):
        (WebCore::RadioButtonGroups::groupMembers const):
        (WebCore::RadioButtonGroups::updateCheckedState):
        (WebCore::RadioButtonGroups::requiredStateChanged):
        (WebCore::RadioButtonGroups::checkedButtonForGroup const):
        (WebCore::RadioButtonGroups::hasCheckedButton const):
        (WebCore::RadioButtonGroups::isInRequiredGroup const):
        (WebCore::RadioButtonGroups::removeButton):
        * dom/RadioButtonGroups.h:
        (WebCore::RadioButtonGroups):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::radioButtonGroup const):
        (WebCore::HTMLInputElement::checkedRadioButtonForGroup const):
        * html/HTMLInputElement.h:

2019-10-14  David Quesada  <david_quesada@apple.com>

        Remove WebCore::IOSApplication::isWebApp()
        https://bugs.webkit.org/show_bug.cgi?id=181259

        Reviewed by Alex Christensen.

        As of iOS 11, the Web.app process no longer uses WebKit directly, so IOSApplication::isWebApp()
        is never true. Since it's no longer needed, remove it.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isWebApp): Deleted.

2019-10-14  Andy Estes  <aestes@apple.com>

        REGRESSION (r243682): Quick Look previews loaded from the memory cache render with the wrong content type
        https://bugs.webkit.org/show_bug.cgi?id=202935
        <rdar://problem/54318133>

        Reviewed by Tim Horton.

        When loading a Quick Look preview after deciding content policy, PreviewLoader would update
        DocumentLoader with the preview response (the response that contains the preview's
        Content-Type). It would not update the CachedResource representing the preview main
        resource, however, which caches the underlying ResourceResponse in m_response.

        When loading from the memory cache, it's the CachedResource's response that's used to
        synthesize DocumentLoader::responseReceived. When loading Quick Look previews *before*
        deciding content policy, this response would be the preview response, but as described
        above, when loading after deciding content policy it's the underlying response.

        This patch updates a Quick Look preview's CachedResource with the preview response along
        with updating DocumentLoader so that there is not a mismatch between the resource's content
        type and its underlying data.

        Added a new API test.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::previewResponseReceived):
        * loader/DocumentLoader.h:
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::didReceivePreviewResponse):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceivePreviewResponse):
        * loader/SubresourceLoader.h:
        * loader/cache/CachedRawResource.cpp:
        (WebCore::CachedRawResource::previewResponseReceived):
        * loader/cache/CachedRawResource.h:
        * loader/cache/CachedRawResourceClient.h:
        (WebCore::CachedRawResourceClient::previewResponseReceived):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::previewResponseReceived):
        * loader/cache/CachedResource.h:
        * loader/ios/PreviewLoader.mm:
        (-[WebPreviewLoader _loadPreviewIfNeeded]):

2019-10-14  Youenn Fablet  <youenn@apple.com>

        A response body promise should be rejected in case of a failure happening after the HTTP response
        https://bugs.webkit.org/show_bug.cgi?id=202792

        Reviewed by Chris Dumez.

        Test: imported/w3c/web-platform-tests/service-workers/service-worker/fetch-error.https.html

        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::BodyLoader::didFail):
        Propagate error to fetch body consumer if any.

2019-10-14  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Support writing multiple PasteboardCustomData with SharedBuffers to the pasteboard
        https://bugs.webkit.org/show_bug.cgi?id=202851

        Reviewed by Darin Adler.

        This patch refactors some logic around WebCore::PasteboardCustomData, in preparation for implementing the async
        clipboard API. There are two main goals of this refactoring:

        1. Enable writing multiple items (each backed by PasteboardCustomData) to the platform pasteboard.
        2. Enable writing platform data in the form of SharedBuffers to the platform pasteboard.

        See below for more details; no tests, as there is no change in behavior yet.

        * Headers.cmake:
        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:

        Move PasteboardCustomData out of Pasteboard.h and into its own file.

        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::commitToPasteboard):
        * editing/cocoa/EditorCocoa.mm:
        (WebCore::Editor::getPasteboardTypesAndDataForAttachment):
        * platform/Pasteboard.cpp:
        (WebCore::PasteboardCustomData::createSharedBuffer const): Deleted.
        (WebCore::PasteboardCustomData::fromSharedBuffer): Deleted.

        Moved these method implementations to PasteboardCustomData.cpp.

        * platform/Pasteboard.h:

        Refactor PasteboardCustomData so that its member variables are now private, and encapsulated behind methods
        Additionally, make it so that the only way to set data on PasteboardCustomData is to use the writeString,
        writeData, and writeStringInCustomData methods, which ensure that the PasteboardCustomData is always in a
        consistent state.

        * platform/PasteboardCustomData.cpp: Added.
        (WebCore::copyPlatformData):
        (WebCore::PasteboardCustomData::Entry::Entry):
        (WebCore::PasteboardCustomData::Entry::operator=):

        Refactor the implementation of PasteboardCustomData, so that it contains a list of PasteboardCustomData entries
        instead of individual Vectors and HashMaps.

        (WebCore::PasteboardCustomData::PasteboardCustomData):
        (WebCore::PasteboardCustomData::createSharedBuffer const):
        (WebCore::PasteboardCustomData::fromSharedBuffer):
        (WebCore::PasteboardCustomData::writeString):
        (WebCore::PasteboardCustomData::writeData):
        (WebCore::PasteboardCustomData::writeStringInCustomData):
        (WebCore::PasteboardCustomData::addOrMoveEntryToEnd):

        Move logic from StaticPasteboard into PasteboardCustomData, and refactor these methods to handle
        Vector<PasteboardCustomData::Entry>.

        (WebCore::PasteboardCustomData::clear):
        (WebCore::PasteboardCustomData::operator=):
        (WebCore::PasteboardCustomData::orderedTypes const):
        (WebCore::PasteboardCustomData::hasData const):
        (WebCore::PasteboardCustomData::hasSameOriginCustomData const):
        (WebCore::PasteboardCustomData::sameOriginCustomStringData const):
        (WebCore::PasteboardCustomData::readBuffer const):
        (WebCore::PasteboardCustomData::readString const):
        (WebCore::PasteboardCustomData::readStringInCustomData const):
        (WebCore::PasteboardCustomData::forEachType const):
        (WebCore::PasteboardCustomData::forEachPlatformString const):
        (WebCore::PasteboardCustomData::forEachCustomString const):
        (WebCore::PasteboardCustomData::forEachPlatformStringOrBuffer const):

        Moved these method implementations from StaticPasteboard to PasteboardCustomData, and also introduced some new
        methods to help iterate through types and data.

        * platform/PasteboardCustomData.h: Added.
        (WebCore::PasteboardCustomData::origin const):
        (WebCore::PasteboardCustomData::setOrigin):
        (WebCore::PasteboardCustomData::data const):
        * platform/PasteboardStrategy.h:
        * platform/PlatformPasteboard.h:
        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::decoder const):
        * platform/SharedBuffer.h:
        * platform/StaticPasteboard.cpp:
        (WebCore::StaticPasteboard::hasData):
        (WebCore::StaticPasteboard::typesSafeForBindings):
        (WebCore::StaticPasteboard::typesForLegacyUnsafeBindings):
        (WebCore::StaticPasteboard::readString):
        (WebCore::StaticPasteboard::readStringInCustomData):
        (WebCore::StaticPasteboard::writeString):
        (WebCore::StaticPasteboard::writeData):
        (WebCore::StaticPasteboard::writeStringInCustomData):
        (WebCore::StaticPasteboard::clear):
        (WebCore::StaticPasteboard::takeCustomData):
        (WebCore::StaticPasteboard::StaticPasteboard): Deleted.

        Refactor StaticPasteboard to now contain a PasteboardCustomData; additionally, adjust several methods in
        StaticPasteboard to simply call into PasteboardCustomData to write, read, or clear data.

        (WebCore::updateTypes): Deleted.
        * platform/StaticPasteboard.h:
        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::Pasteboard::readStringInCustomData):
        (WebCore::Pasteboard::readOrigin):
        (WebCore::PasteboardCustomData::cocoaType): Deleted.

        Moved the implementation of PasteboardCustomData::cocoaType from PasteboardCocoa.mm to
        PasteboardCustomDataCocoa.mm.

        * platform/cocoa/PasteboardCustomDataCocoa.mm: Added.
        (WebCore::PasteboardCustomData::cocoaType):
        * platform/ios/AbstractPasteboard.h:
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::changeCount const):
        (WebCore::registerItemsToPasteboard):
        (WebCore::registerItemToPasteboard):
        (WebCore::PlatformPasteboard::write):

        Support writing multiple PasteboardCustomData objects to the platform pasteboard on iOS, by generating
        NSItemProviders for each one. This refactors the existing `registerItemToPasteboard` helper to handle multiple
        registration lists, renames it to `registerItemsToPasteboard` (plural), and then reimplements
        `registerItemToPasteboard` in terms of `registerItemsToPasteboard`.

        (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
        (WebCore::createItemProviderRegistrationList):

        Adjust these to use getters on PasteboardCustomData instead of accessing the member variables directly.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard init]):
        (-[WebItemProviderPasteboard stageRegistrationLists:]):
        (-[WebItemProviderPasteboard clearRegistrationLists]):
        (-[WebItemProviderPasteboard takeRegistrationLists]):

        Refactor registration list staging on WebItemProviderPasteboard to support multiple registration lists, each
        representing a single item provider.

        (-[WebItemProviderPasteboard stageRegistrationList:]): Deleted.
        (-[WebItemProviderPasteboard takeRegistrationList]): Deleted.
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::write):
        * platform/mac/PasteboardWriter.mm:
        (WebCore::createPasteboardWriter):
        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
        (WebCore::PlatformPasteboard::write):

        Support writing multiple PasteboardCustomData objects to the platform pasteboard on macOS, by creating and
        setting NSPasteboardItems for each custom data. This means that instead of using legacy macOS pasteboard types,
        we need to use the "modern" NSPasteboardTypes when writing each item. This is because NSPasteboardItem quietly
        fails when attempting to set data for a legacy pasteboard type.

        (WebCore::createPasteboardItem):

2019-10-14  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r251081.

        Broke macOS and iOS builds

        Reverted changeset:

        "transform-box: content-box, stroke-box missing"
        https://bugs.webkit.org/show_bug.cgi?id=201892
        https://trac.webkit.org/changeset/251081

2019-10-14  Dean Jackson  <dino@apple.com>

        Reset maxCanvasPixelMemory between tests
        https://bugs.webkit.org/show_bug.cgi?id=202941
        <rdar://problem/56260865>

        Reviewed by Wenson Hsieh.

        Reset the maximum canvas memory between tests.

        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):

2019-10-14  Myles C. Maxfield  <mmaxfield@apple.com>

        [Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
        https://bugs.webkit.org/show_bug.cgi?id=202778

        Unreviewed.

        Addressing post-review comment.

        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::createSystemUIFont):

2019-10-14  Alex Christensen  <achristensen@webkit.org>

        REGRESSION: [iOS 13?] TestWebKitAPI.SharedBufferTest.tryCreateArrayBufferLargeSegments is failing
        https://bugs.webkit.org/show_bug.cgi?id=201902

        Reviewed by Ryosuke Niwa.

        * Modules/webauthn/fido/U2fResponseConverter.cpp:
        (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):

2019-10-14  Russell Epstein  <russell_e@apple.com>

        Unreviewed, rolling out r251081.

        Broke macOS and iOS builds.

        Reverted changeset:

        "transform-box: content-box, stroke-box missing"
        https://bugs.webkit.org/show_bug.cgi?id=201892
        https://trac.webkit.org/changeset/251081

2019-10-14  Dirk Schulze  <krit@webkit.org>

        transform-box: content-box, stroke-box missing
        https://bugs.webkit.org/show_bug.cgi?id=201892

        Reviewed by Simon Fraser.

        Added the keywords content-box and stroke-box to the
        transform-box CSS property.
        Those keywords were added to the spec after the implementation
        in WebKit.

        Test: transforms/transform-box.html

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator TransformBox const):
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        * rendering/RenderLayer.cpp:
        (WebCore::computeReferenceBox):
        (WebCore::transformBoxToCSSBoxType):
        (WebCore::RenderLayer::currentTransform const):
        * rendering/style/RenderStyleConstants.h:
        * svg/SVGGraphicsElement.cpp:
        (WebCore::SVGGraphicsElement::animatedLocalTransform const):

2019-10-14  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r251045.

        Broke internal builds

        Reverted changeset:

        "AX: Make AXIsolatedTree compile again"
        https://bugs.webkit.org/show_bug.cgi?id=202702
        https://trac.webkit.org/changeset/251045

2019-10-14  youenn fablet  <youenn@apple.com>

        Reuse existing web processes for running service workers
        https://bugs.webkit.org/show_bug.cgi?id=202195

        Reviewed by Chris Dumez.

        Update implementation to be able to run service workers jointly with page.
        Add internals API to get the process ID.
        This allows writing tests to check whether a service worker is in the same process as its client or not.

        Test: http/wpt/service-workers/service-worker-different-process.https.html

        * testing/Internals.cpp:
        (WebCore::Internals::processIdentifier const):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/ServiceWorkerInternals.cpp:
        (WebCore::ServiceWorkerInternals::processIdentifier const):
        * testing/ServiceWorkerInternals.h:
        * testing/ServiceWorkerInternals.idl:
        * workers/service/ServiceWorkerProvider.cpp:
        (WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
        Do not register dummy documents whose sole purpose is to do loading for service workers.
        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::setConnection):
        Now that connections might be created more than once on a given process,
        Make sure that the replaced connection is stopped or there is no replaced connection.
        (WebCore::SWContextManager::stopAllServiceWorkers):
        Add routine to stop all service workers running in a given web process.
        * workers/service/context/SWContextManager.h:
        (WebCore::SWContextManager::Connection::isClosed const):
        (WebCore::SWContextManager::Connection::setAsClosed):

2019-10-13  Tim Horton  <timothy_horton@apple.com>

        Stop 'using namespace *Names' in files generated by make_names.pl
        https://bugs.webkit.org/show_bug.cgi?id=202907

        Reviewed by Geoffrey Garen.

        * dom/make_names.pl:
        (printFunctionTable):
        (printFactoryCppFile):
        (printWrapperFactoryCppFile):
        Stop 'using namespace SVGNames' and 'using namepace HTMLNames' in
        files generated by make_names.pl. Just use fully-qualified names.

        There is some overlap between the two namespaces, so this is a
        prerequsite for doing more aggressive unified source bundling in bindings.

2019-10-13  Tim Horton  <timothy_horton@apple.com>

        Don't include ApplicationServices in npapi.h
        https://bugs.webkit.org/show_bug.cgi?id=202911

        Reviewed by Sam Weinig.

        * plugins/npapi.h:
        Just include CoreGraphics.h, not ApplicationServices.h.
        ApplicationServices.h pulls in all sorts of crazy things like
        QuickDraw headers that have symbol conflicts with JSC (like Handle).

2019-10-13  Stephan Szabo  <stephan.szabo@sony.com>

        Wincairo build broken: EventLoop.h: No such file or directory
        https://bugs.webkit.org/show_bug.cgi?id=202893

        Reviewed by Fujii Hironori.

        Remove include of EventLoop.h.

        * platform/network/curl/SynchronousLoaderClientCurl.cpp:

2019-10-13  Konstantin Tokarev  <annulen@yandex.ru>

        Fix compilation of Crypto.cpp on macOS with !WEB_CRYPTO
        https://bugs.webkit.org/show_bug.cgi?id=202895

        Reviewed by Alexey Proskuryakov.

        Crypto.cpp does not use getCommonCryptoDigestAlgorithm(), defined in
        CommonCryptoUtilities.h, but requires CommonCrypto includes which are
        coming with it. However, when WEB_CRYPTO is disabled necessary
        transitive includes are missing.

        * page/Crypto.cpp:

2019-10-13  Simon Fraser  <simon.fraser@apple.com>

        Convert ENinePieceImageRule into an enum class and rename
        https://bugs.webkit.org/show_bug.cgi?id=202889

        Reviewed by Alex Christensen.

        Enum classify ENinePieceImageRule.
        
        The bitfield in NinePieceImage isn't saving anything so don't use one there.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForRepeatRule):
        * css/CSSToStyleMap.cpp:
        (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
        * css/StyleBuilderCustom.h:
        (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
        * rendering/style/NinePieceImage.cpp:
        (WebCore::NinePieceImage::NinePieceImage):
        (WebCore::NinePieceImage::computeMiddleTileScale):
        (WebCore::NinePieceImage::computeTileScales):
        (WebCore::NinePieceImage::Data::Data):
        (WebCore::NinePieceImage::Data::create):
        * rendering/style/NinePieceImage.h:
        (WebCore::NinePieceImage::horizontalRule const):
        (WebCore::NinePieceImage::setHorizontalRule):
        (WebCore::NinePieceImage::verticalRule const):
        (WebCore::NinePieceImage::setVerticalRule):

2019-10-13  Simon Fraser  <simon.fraser@apple.com>

        Clarify the naming of the radius-related functions on BorderData
        https://bugs.webkit.org/show_bug.cgi?id=202888

        Reviewed by Alex Christensen.

        BorderData had some confusingly named data members and functions ("topLeft"'"). Renamed
        to include the term "radius".

        * platform/graphics/PathUtilities.cpp:
        (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
        * rendering/style/BorderData.h:
        (WebCore::BorderData::BorderData):
        (WebCore::BorderData::hasBorderRadius const):
        (WebCore::BorderData::operator== const):
        (WebCore::BorderData::topLeftRadius const):
        (WebCore::BorderData::topRightRadius const):
        (WebCore::BorderData::bottomLeftRadius const):
        (WebCore::BorderData::bottomRightRadius const):
        (WebCore::BorderData::topLeft const): Deleted.
        (WebCore::BorderData::topRight const): Deleted.
        (WebCore::BorderData::bottomLeft const): Deleted.
        (WebCore::BorderData::bottomRight const): Deleted.
        * rendering/style/RenderStyle.cpp:
        (WebCore::calcRadiiFor):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::borderTopLeftRadius const):
        (WebCore::RenderStyle::borderTopRightRadius const):
        (WebCore::RenderStyle::borderBottomLeftRadius const):
        (WebCore::RenderStyle::borderBottomRightRadius const):
        (WebCore::RenderStyle::resetBorderTopLeftRadius):
        (WebCore::RenderStyle::resetBorderTopRightRadius):
        (WebCore::RenderStyle::resetBorderBottomLeftRadius):
        (WebCore::RenderStyle::resetBorderBottomRightRadius):
        (WebCore::RenderStyle::setBorderTopLeftRadius):
        (WebCore::RenderStyle::setBorderTopRightRadius):
        (WebCore::RenderStyle::setBorderBottomLeftRadius):
        (WebCore::RenderStyle::setBorderBottomRightRadius):

2019-10-13  Simon Fraser  <simon.fraser@apple.com>

        Convert LineBoxContain to use an OptionSet<>
        https://bugs.webkit.org/show_bug.cgi?id=202890

        Reviewed by Alex Christensen.

        Use OptionSet<LineBoxContain>.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::createLineBoxContainValue):
        * css/CSSLineBoxContainValue.cpp:
        (WebCore::CSSLineBoxContainValue::CSSLineBoxContainValue):
        (WebCore::CSSLineBoxContainValue::customCSSText const):
        * css/CSSLineBoxContainValue.h:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertLineBoxContain):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeLineBoxContain):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::minLineHeightForReplacedRenderer const):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::ascentAndDescentForBox const):
        (WebCore::RootInlineBox::includeLeadingForBox const):
        (WebCore::RootInlineBox::includeFontForBox const):
        (WebCore::RootInlineBox::includeGlyphsForBox const):
        (WebCore::RootInlineBox::includeInitialLetterForBox const):
        (WebCore::RootInlineBox::includeMarginForBox const):
        (WebCore::RootInlineBox::fitsToGlyphs const):
        (WebCore::RootInlineBox::includesRootLineBoxFontOrLeading const):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::canUseForFontAndText):
        (WebCore::SimpleLineLayout::canUseForStyle):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::lineBoxContain const):
        (WebCore::RenderStyle::setLineBoxContain):
        (WebCore::RenderStyle::initialLineBoxContain):
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        * rendering/style/StyleRareInheritedData.h:
        * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
        (WebCore::styleForFirstLetter):

2019-10-12  Ryosuke Niwa  <rniwa@webkit.org>

        [iOS] Crash in WebCore::DOMWindow::incrementScrollEventListenersCount
        https://bugs.webkit.org/show_bug.cgi?id=202878

        Reviewed by Alex Christensen.

        Added the missing null check in tryAddEventListener and tryRemoveEventListener for scroll event.

        Test: fast/events/scroll-event-on-document-without-window.html

        * dom/Node.cpp:
        (WebCore::tryAddEventListener):
        (WebCore::tryRemoveEventListener):

2019-10-12  Simon Fraser  <simon.fraser@apple.com>

        Move CSSReflectionDirection into RenderStyleConstants as ReflectionDirection
        https://bugs.webkit.org/show_bug.cgi?id=202886

        Reviewed by Sam Weinig.

        Make CSSReflectionDirection an enum class ReflectionDirection, and fix the usage sites.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForReflection):
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator ReflectionDirection const):
        (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection const): Deleted.
        * css/CSSReflectionDirection.h: Removed.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::reflectionOffset const):
        (WebCore::RenderBox::reflectedRect const):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/style/RenderStyleConstants.cpp:
        (WebCore::operator<<):
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/StyleReflection.h:
        (WebCore::StyleReflection::direction const):
        (WebCore::StyleReflection::setDirection):
        (WebCore::StyleReflection::StyleReflection):

2019-10-12  Simon Fraser  <simon.fraser@apple.com>

        Fix the spelling of ThreeDDarkDhasowColor and unwrap the ThemeType enums
        https://bugs.webkit.org/show_bug.cgi?id=202887

        Reviewed by Wenson Hsieh.

        ThreeDDarkDhasowColor was misspelled, and one enum value per line please.

        * platform/ThemeTypes.h:

2019-10-12  Chris Dumez  <cdumez@apple.com>

        Add [ActiveDOMObject] to IDLs of ActiveDOMObjects
        https://bugs.webkit.org/show_bug.cgi?id=202869

        Reviewed by Ryosuke Niwa.

        Add [ActiveDOMObject] to IDLs of ActiveDOMObjects, this is necessary so that the wrapper
        stays alive as long as ActiveDOMObject::hasPendingActivity() returns true. We may have
        subtle lifetime bugs otherwise.

        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeySession.idl:
        * Modules/entriesapi/FileSystemDirectoryReader.idl:
        * Modules/entriesapi/FileSystemEntry.idl:
        * Modules/geolocation/Geolocation.idl:
        * Modules/indexeddb/IDBObjectStore.h:
        * Modules/indexeddb/IDBObjectStore.idl:
        * Modules/paymentrequest/PaymentResponse.idl:
        * Modules/webvr/VRDisplay.h:
        * Modules/webvr/VRDisplay.idl:
        * workers/service/ServiceWorkerContainer.idl:

2019-10-12  Simon Fraser  <simon.fraser@apple.com>

        Implement TextStream-based dumping for all the RenderStyle and SVGRenderStyle enum classes
        https://bugs.webkit.org/show_bug.cgi?id=202877

        Reviewed by Dean Jackson.

        Make style-related enum classes dumpable with TextStream,  and make some SVG style-related
        classes dumpable.

        * rendering/style/RenderStyleConstants.cpp:
        (WebCore::operator<<):
        * rendering/style/RenderStyleConstants.h:
        * rendering/style/SVGRenderStyleDefs.cpp:
        (WebCore::operator<<):
        * rendering/style/SVGRenderStyleDefs.h:
        * rendering/style/ShadowData.cpp:
        (WebCore::operator<<):
        * rendering/style/ShadowData.h:

2019-10-12  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r251040.

        Broke IDB tests in Debug

        Reverted changeset:

        "Add [ActiveDOMObject] to IDLs of ActiveDOMObjects"
        https://bugs.webkit.org/show_bug.cgi?id=202869
        https://trac.webkit.org/changeset/251040

2019-10-12  Ryosuke Niwa  <rniwa@webkit.org>

        Invoke callbacks registered by requestIdleCallback
        https://bugs.webkit.org/show_bug.cgi?id=202824

        Reviewed by Antti Koivisto.

        Invoke callbacks registered by requestIdleCallback unless it's canceled.

        To do this, this patch introduces WindowEventLoop class, which represents the HTML5 event loop:
        https://html.spec.whatwg.org/multipage/webappapis.html#window-event-loop

        Because each and only each agent cluster is meant to have its own window event loop, this class will be shared
        across multiple documents of the same registrable domain:
        https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-agent-cluster-formalism

        Tests: requestidlecallback/requestidlecallback-is-called.html
               requestidlecallback/requestidlecallback-is-not-called-when-canceled.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::eventLoop): Added.
        (WebCore::Document::requestIdleCallback): Associate IdleCallbackController with this document.
        * dom/Document.h:
        (WebCore::Document::idleCallbackController): Added. Used for release assertions.
        * dom/IdleCallbackController.cpp:
        (WebCore::IdleCallbackController::IdleCallbackController): Keeps a weak pointer to Document.
        (WebCore::IdleCallbackController::queueIdleCallback):
        (WebCore::IdleCallbackController::removeIdleCallback):
        (WebCore::IdleCallbackController::queueTaskToStartIdlePeriod): Added.
        (WebCore::IdleCallbackController::startIdlePeriod): Added. Implements the start an idle period algorithm:
        https://w3c.github.io/requestidlecallback/#start-an-idle-period-algorithm
        (WebCore::IdleCallbackController::queueTaskToInvokeIdleCallbacks): Added.
        (WebCore::IdleCallbackController::invokeIdleCallbacks): Added. The invoke idle callback timeout algorithm:
        https://w3c.github.io/requestidlecallback/#invoke-idle-callback-timeout-algorithm
        * dom/IdleCallbackController.h:
        * dom/IdleDeadline.h:
        * dom/WindowEventLoop.cpp: Added.
        (WebCore::WindowEventLoop::create): Added.
        (WebCore::WindowEventLoop::WindowEventLoop): Added.
        (WebCore::WindowEventLoop::queueTask): Added.
        (WebCore::WindowEventLoop::run): Added.
        * dom/WindowEventLoop.h: Added.
        * page/Page.cpp:
        (WebCore::Page::updateRendering): Added comments for the missing pieces.

2019-10-12  Chris Dumez  <cdumez@apple.com>

        Back/Forward cache does not work after doing a favorite navigation
        https://bugs.webkit.org/show_bug.cgi?id=202762
        <rdar://problem/56126911>

        Reviewed by Antti Koivisto.

        When a subframe goes into the page cache, make sure we null out the opener
        link of any windows that were opened by this frame. This matches what would
        happened if this frame were closed.

        Covered by the following API tests:
        ProcessSwap.PageCacheAfterProcessSwapByClient
        ProcessSwap.OpenerLinkAfterAPIControlledProcessSwappingOfOpener

        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::CachedFrame):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::~FrameLoader):
        (WebCore::FrameLoader::detachFromAllOpenedFrames):
        * loader/FrameLoader.h:

2019-10-12  Chris Fleizach  <cfleizach@apple.com>

        AX: Make AXIsolatedTree compile again
        https://bugs.webkit.org/show_bug.cgi?id=202702
        <rdar://problem/56084968>

        Reviewed by Joanmarie Diggs.

        Fix compilation and runtime issues when building with ACCESSIBILITY_ISOLATED_TREE.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
        * accessibility/isolatedtree/AXIsolatedTree.cpp:
        (WebCore::AXIsolatedTree::treePageCache):
        (WebCore::AXIsolatedTree::nodeForID const):
            - Remove release assert here because the initial request that comes through happens on the main thread.
              We need to handle that case specific case.
        (WebCore::AXIsolatedTree::applyPendingChanges):
        (WebCore::AXIsolatedTree::initializePageTreeForID): Deleted.
        (WebCore::AXIsolatedTree::setInitialRequestInProgress): Deleted.
        * accessibility/isolatedtree/AXIsolatedTree.h:
        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
        (WebCore::AXIsolatedTreeNode::rectAttributeValue const):
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (convertToNSArray):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper childrenVectorArray]):

2019-10-11  Ryosuke Niwa  <rniwa@webkit.org>

        Windows build fix attempt after r251043.

        * dom/ShadowRoot.cpp:

2019-10-11  Ryosuke Niwa  <rniwa@webkit.org>

        Add the support for ShadowRoot.delegateFocus
        https://bugs.webkit.org/show_bug.cgi?id=166484
        <rdar://problem/29816058>

        Reviewed by Antti Koivisto.

        Implement delegatesFocus as specified in https://github.com/whatwg/html/pull/4796

        When the shadow root of an element has delegates focus flag set, focusing on the shadow host would automatically
        "delegates" focus to the first focusable element in the shadow tree instead.

        The first focusable element is determined as the first element that is programatically focusable or mouse focusable
        in the flat tree (composed tree in WebKit's terminology) in the case of the element getting focused via DOM API,
        Element.prototype.focus, by via mouse down. In the case of sequential focus navigation (via tab key), it's the
        first keyboard focusable element in the tabIndex order.

        Tests: imported/w3c/web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-click-method.html
               imported/w3c/web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-varies.html
               imported/w3c/web-platform-tests/shadow-dom/focus/click-focus-delegatesFocus-tabindex-zero.html
               imported/w3c/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html
               imported/w3c/web-platform-tests/shadow-dom/focus/focus-tabindex-order-shadow-negative-delegatesFocus.html
               imported/w3c/web-platform-tests/shadow-dom/focus/focus-tabindex-order-shadow-varying-delegatesFocus.html
               imported/w3c/web-platform-tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-delegatesFocus.html

        * dom/Element.cpp:
        (WebCore::Element::isKeyboardFocusable const): A shadow host with the delegates focus flag is not considered as
        keyboard focusable. The rest is taken care of by the existing logic in FocusController.
        (WebCore::isProgramaticallyFocusable): Extracted from Element::focus.
        (WebCore::findFirstProgramaticallyFocusableElementInComposedTree): Added.
        (WebCore::Element::focus): Added the support for delegatesFocus.
        * dom/Element.h:
        (WebCore::ShadowRootInit::delegatesFocus): Added.
        * dom/Element.idl: Ditto.
        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::ShadowRoot): Added delegatesFocus to the constructor.
        * dom/ShadowRoot.h:
        * page/EventHandler.cpp:
        (WebCore::findFirstMouseFocusableElementInComposedTree): Added.
        (WebCore::EventHandler::dispatchMouseEvent): Added the support for delegatesFocus. Uses the first mouse focusable
        element in the flat tree (composed tree) order.
        * page/FocusController.cpp:
        (WebCore::FocusController::findFirstFocusableElementInShadowRoot):
        * page/FocusController.h:

2019-10-11  Rob Buis  <rbuis@igalia.com>

        Cleanup RuntimeEnabledFeatures includes
        https://bugs.webkit.org/show_bug.cgi?id=202857

        Reviewed by Eric Carlson.

        These classes must have had made use of runtime flags before
        but are not using them anymore.

        * Modules/mediastream/MediaDevices.cpp:
        * Modules/mediastream/RTCRtpSender.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        * accessibility/AccessibilityObject.cpp:
        * css/CSSComputedStyleDeclaration.cpp:
        * css/MediaQueryEvaluator.cpp:
        * css/MediaQueryExpression.cpp:
        * css/parser/CSSParser.cpp:
        * dom/ContainerNode.cpp:
        * dom/EventTarget.cpp:
        * dom/Position.cpp:
        * dom/PseudoElement.cpp:
        * dom/TreeScope.cpp:
        * dom/ViewportArguments.cpp:
        * history/CachedFrame.cpp:
        * html/HTMLPlugInElement.cpp:
        * html/HTMLStyleElement.cpp:
        * html/HTMLTrackElement.cpp:
        * inspector/agents/InspectorNetworkAgent.cpp:
        * loader/ResourceLoadNotifier.cpp:
        * page/DOMWindow.cpp:
        * page/EventHandler.cpp:
        * page/PointerLockController.cpp:
        * page/csp/ContentSecurityPolicy.cpp:
        * page/scrolling/ScrollingCoordinator.cpp:
        * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
        * rendering/RenderFlexibleBox.cpp:
        * rendering/style/RenderStyle.cpp:
        * rendering/updating/RenderTreeUpdater.cpp:

2019-10-11  Chris Dumez  <cdumez@apple.com>

        Add [ActiveDOMObject] to IDLs of ActiveDOMObjects
        https://bugs.webkit.org/show_bug.cgi?id=202869

        Reviewed by Ryosuke Niwa.

        Add [ActiveDOMObject] to IDLs of ActiveDOMObjects, this is necessary so that the wrapper
        stays alive as long as ActiveDOMObject::hasPendingActivity() returns true. We may have
        subtle lifetime bugs otherwise.

        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeySession.idl:
        * Modules/entriesapi/FileSystemDirectoryReader.idl:
        * Modules/entriesapi/FileSystemEntry.idl:
        * Modules/geolocation/Geolocation.idl:
        * Modules/indexeddb/IDBObjectStore.h:
        * Modules/indexeddb/IDBObjectStore.idl:
        * Modules/paymentrequest/PaymentResponse.idl:
        * Modules/webvr/VRDisplay.h:
        * Modules/webvr/VRDisplay.idl:
        * workers/service/ServiceWorkerContainer.idl:

2019-10-11  Devin Rousso  <drousso@apple.com>

        Web Inspector: Elements: Computed: show shorthand properties in addition to longhand ones
        https://bugs.webkit.org/show_bug.cgi?id=200554

        Reviewed by Matt Baker.

        Test: inspector/css/getComputedStyleForNode.html

        Include additional `CSS.CSSComputedStyleProperty` items for shorthand CSS properties when
        calling `CSS.getComputedStyleForNode`.

        * inspector/InspectorStyleSheet.h:
        * inspector/InspectorStyleSheet.cpp:
        (WebCore::InspectorStyle::buildArrayForComputedStyle const):
        (WebCore::InspectorStyle::collectProperties const): Added.
        (WebCore::InspectorStyle::styleWithProperties const):
        (WebCore::InspectorStyle::populateAllProperties const): Deleted.

2019-10-08  Ryosuke Niwa  <rniwa@webkit.org>

        Make WebInspector's remote debug EventLoop code into RunLoop
        https://bugs.webkit.org/show_bug.cgi?id=202716

        Reviewed by Joseph Pecoraro.

        Use RunLoop::cycle.

        * PlatformFTW.cmake:
        * PlatformPlayStation.cmake:
        * PlatformWin.cmake:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * inspector/PageScriptDebugServer.cpp:
        (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
        * platform/SourcesGLib.txt:
        * platform/glib/EventLoopGlib.cpp: Removed.
        * platform/playstation/EventLoopPlayStation.cpp: Removed.
        * platform/win/EventLoopWin.cpp: Removed.

2019-10-11  Dean Jackson  <dino@apple.com>

        REGRESSION (r244239) Layout Test fast/canvas/canvas-too-large-to-draw.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=202870

        Reviewed by Simon Fraser.

        Add an internal method to specify a fake limit of canvas pixel memory
        so our tests produce reproducible results.

        * html/HTMLCanvasElement.cpp:
        (WebCore::maxActivePixelMemory):
        (WebCore::HTMLCanvasElement::setMaxPixelMemoryForTesting):
        * html/HTMLCanvasElement.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setMaxCanvasPixelMemory):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-11  Chris Dumez  <cdumez@apple.com>

        API Test TestWebKitAPI.WebKit.DefaultQuota is very flaky on High Sierra
        https://bugs.webkit.org/show_bug.cgi?id=202850

        Reviewed by Alex Christensen.

        Make sure the DOMCache / DOMCacheStorage objects stay alive while they have pending
        promises to be resolved.

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::hasPendingActivity const):
        * Modules/cache/DOMCache.h:
        * Modules/cache/DOMCache.idl:
        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::hasPendingActivity const):
        * Modules/cache/DOMCacheStorage.h:
        * Modules/cache/DOMCacheStorage.idl:

2019-10-11  Chris Dumez  <cdumez@apple.com>

        Unreviewed, address post-landing feedback from Darin for r251019.

        Added a new comment for clarity.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopForPageCache):

2019-10-11  Alex Christensen  <achristensen@webkit.org>

        Only use CFNetwork SPI for metrics where needed
        https://bugs.webkit.org/show_bug.cgi?id=202825

        Reviewed by Joseph Pecoraro.

        * platform/network/NetworkLoadMetrics.h:

2019-10-11  Chris Dumez  <cdumez@apple.com>

        Pages frequently fail to enter the back/forward cache due to frames with a quick redirect coming
        https://bugs.webkit.org/show_bug.cgi?id=202768
        <rdar://problem/56132022>

        Reviewed by Alex Christensen.

        When a quick redirect is scheduled with the navigation scheduler, we set the m_quickRedirectComing flag.
        This flag is supposed to get unset if the navigation gets cancelled and when the navigation actually
        happens. However, for a navigation to a javascript: URL, we would return early after executing the JS
        and fail to reset the m_quickRedirectComing flag. Later on, we would fail to enter the page cache because
        we would think that the iframe still has a quick redirect scheduled.

        Test: fast/history/page-cache-iframe-js-url.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected):
        Reset the m_quickRedirectComing flag if we return early after executing
        the javascript URL.

        (WebCore::FrameLoader::stopForPageCache):
        Stop policy checks & cancel scheduled navigations after stopping loads. Stopping loads may
        run script which may in theory schedule new navigations. This is hardening.

2019-10-11  Antti Koivisto  <antti@apple.com>

        Position::upstream/downstream should not need to call ensureLineBoxes
        https://bugs.webkit.org/show_bug.cgi?id=202203

        Reviewed by Zalan Bujtas.

        This avoids forced switch to complex text layout path by Position constructor and will allow future cleanups.

        Currently simple line path strips end of line whitespace when white-space:pre-wrap is set.
        These are don't affect rendering but they are needed for editing positions.
        This patch makes simple line path match the complex path by generating runs for these whitespaces.

        * dom/Position.cpp:
        (WebCore::Position::upstream const):
        (WebCore::Position::downstream const):
        (WebCore::ensureLineBoxesIfNeeded): Deleted.
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):

        Create a new run if isLineBreak bit is set.

        (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
        (WebCore::SimpleLineLayout::LineState::trailingWhitespaceWidth const):
        (WebCore::SimpleLineLayout::computeLineLeft):

        Also compute width of the hanging whitespace when aligning the line. This matches the code
        in updateLogicalWidthForLeft/Right/CenterAlignedBlock in the complex path.

        (WebCore::SimpleLineLayout::preWrap):

        breakSpaces implies preWrap is off.

        (WebCore::SimpleLineLayout::firstFragment):
        (WebCore::SimpleLineLayout::createLineRuns):

        Crete runs also for soft linebreaks in pre-wrap.
        Add whitespace runs to the end of the line in pre-wrap.

        (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):

        Hang the whitespace run when wrapping.

        (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.

        Remainging logic moved to the callsite.

2019-10-11  Jonathan Bedard  <jbedard@apple.com>

        Unreviewed, rolling out r250945.

        Broke 18 Debug API tests

        Reverted changeset:

        "Add support for CompactPointerTuple<..., OptionSet<...>>"
        https://bugs.webkit.org/show_bug.cgi?id=201316
        https://trac.webkit.org/changeset/250945

2019-10-11  Bjorn Melinder  <bjornm@spotify.com>

        OfflineAudioContext does not validate allocation of destination buffer
        https://bugs.webkit.org/show_bug.cgi?id=177259

        Reviewed by Eric Carlson.

        Moved the allocation of the destination buffer to the static
        OfflineAudioContext::create method where we are able to handle a failed
        allocation properly and return an Exception. This change handles both
        negative lengths as well as too large lengths where the memory cannot
        be allocated.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/OfflineAudioContext.cpp:
        (WebCore::OfflineAudioContext::OfflineAudioContext):
        (WebCore::OfflineAudioContext::create):
        * Modules/webaudio/OfflineAudioContext.h:

2019-10-10  Konstantin Tokarev  <annulen@yandex.ru>

        Guard GCrypt-specific code with USE(GCRYPT) instead of PLATFORM macros
        https://bugs.webkit.org/show_bug.cgi?id=202829

        Reviewed by Jiewen Tan.

        * crypto/keys/CryptoKeyEC.h:
        * crypto/keys/CryptoKeyRSA.h:

2019-10-10  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: use more C++ keywords for defining agents
        https://bugs.webkit.org/show_bug.cgi?id=200959
        <rdar://problem/54735374>

        Reviewed by Joseph Pecoraro.

        Add override annotation to overrided virtual methods in inspector code. This
        change is automatically generated by the following command:
        clang-tidy -checks='-*,modernize-use-override' -header-filter='.*inspector.*' -fix -p WebKitBuild/Release/
            WebKitBuild/Release/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-84c9f43f-*.cpp
            WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource-84c9f43f-*.cpp

        No new tests. No behavior changes.

        * inspector/InspectorController.h:
        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendHost.cpp:
        * inspector/PageScriptDebugServer.h:
        * inspector/WebInjectedScriptManager.h:
        * inspector/WorkerInspectorController.h:
        * inspector/WorkerScriptDebugServer.h:
        * inspector/WorkerToPageFrontendChannel.h:
        * inspector/agents/InspectorApplicationCacheAgent.h:
        * inspector/agents/InspectorCPUProfilerAgent.h:
        * inspector/agents/InspectorCSSAgent.h:
        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMDebuggerAgent.h:
        * inspector/agents/InspectorDOMStorageAgent.h:
        * inspector/agents/InspectorDatabaseAgent.h:
        * inspector/agents/InspectorIndexedDBAgent.cpp:
        * inspector/agents/InspectorIndexedDBAgent.h:
        * inspector/agents/InspectorLayerTreeAgent.h:
        * inspector/agents/InspectorMemoryAgent.h:
        * inspector/agents/InspectorNetworkAgent.cpp:
        * inspector/agents/InspectorNetworkAgent.h:
        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/InspectorWorkerAgent.h:
        * inspector/agents/WebConsoleAgent.h:
        * inspector/agents/WebDebuggerAgent.h:
        * inspector/agents/WebHeapAgent.h:
        * inspector/agents/page/PageAuditAgent.h:
        * inspector/agents/page/PageConsoleAgent.h:
        * inspector/agents/page/PageDOMDebuggerAgent.h:
        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageHeapAgent.h:
        * inspector/agents/page/PageNetworkAgent.h:
        * inspector/agents/page/PageRuntimeAgent.h:
        * inspector/agents/worker/ServiceWorkerAgent.h:
        * inspector/agents/worker/WorkerAuditAgent.h:
        * inspector/agents/worker/WorkerConsoleAgent.h:
        * inspector/agents/worker/WorkerDOMDebuggerAgent.h:
        * inspector/agents/worker/WorkerDebuggerAgent.h:
        * inspector/agents/worker/WorkerNetworkAgent.h:
        * inspector/agents/worker/WorkerRuntimeAgent.h:

2019-10-10  Tim Horton  <timothy_horton@apple.com>

        Use HAVE(IOSURFACE_RGB10) instead of PLATFORM(IOS_FAMILY) where appropriate
        https://bugs.webkit.org/show_bug.cgi?id=202823

        Reviewed by Wenson Hsieh.

        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::layerContentsFormat):
        * platform/ios/LegacyTileGridTile.mm:
        (WebCore::LegacyTileGridTile::LegacyTileGridTile):

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

        [Catalina] LayoutTest fast/canvas/webgl/texImage2D-mse-flip-{true,false}.html failing
        https://bugs.webkit.org/show_bug.cgi?id=202771
        <rdar://problem/49441298>

        Reviewed by Eric Carlson.

        Catalina no longer creates IOSurface-backed CVPixelBuffers by default for certain
        codecs; make the CVPixelBuffers generated by WebCoreDecompressionSession IOSurface-backed
        explicitly by passing in the correct attributes when creating the VTDecompressionSession.

        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
        (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):

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

        [Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
        https://bugs.webkit.org/show_bug.cgi?id=202778
        <rdar://problem/52594556>

        Reviewed by Simon Fraser.

        This was caught by fast/text/international/system-language/han-quotes.html,
        but we didn't have time to fix it until now.

        Test: fast/text/international/system-language/han-quotes.html

        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::createSystemUIFont):

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

        FontFaceSet's ready promise is not always resolved
        https://bugs.webkit.org/show_bug.cgi?id=202548

        Reviewed by Youenn Fablet.

        When we do layout on an element, FontRanges::glyphDataForCharacter() will cause the first
        available font to start loading, but will continue looking at subsequent fonts to see if
        there's a good one we can render while the load is happening. When looking for a fallback
        font, it calls FontRanges::Range::font() with a ExternalResourceDownloadPolicy set to
        Forbid. This is fine, except that a side effect of calling this function is that the
        CSSFontFace marks itself as Loading, which means document.fonts.ready is deferred. Then,
        the load finishes, and the subsequent CSSFontFace is never actually used, meaning it never
        exits the Loading state, which means document.fonts.ready never fires.

        The solution to this is to just only allow the font to enter the Loading state if it's not
        one of these "subsequent" fonts.

        Test: fast/text/fontfaceset-ready-not-fired.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::pump):

2019-10-10  youenn fablet  <youenn@apple.com>

        MockRealtimeVideoSource::setFrameRateWithPreset should not use preset after moving it
        https://bugs.webkit.org/show_bug.cgi?id=202800

        Reviewed by Alexey Proskuryakov.

        This does not affect behavior right now since clients typically get the intrinsic size through media samples.
        But this could create some inconsistencies.

        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):

2019-10-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: don't call willDispatchEvent/didDispatchEvent unless there is a listener for the event
        https://bugs.webkit.org/show_bug.cgi?id=202713

        Reviewed by Joseph Pecoraro.

        Fixes failing inspector/timeline/timeline-recording.html after r250672. This was because the
        `InspectorTimelineAgent` expected a corresponding `willDispatchEvent` before it was told
        about the `didDispatchEvent`, which wasn't happening since only `willDispatchEvent` would
        early-return if the `DOMWindow` didn't have any event listeners for the dispatched event. By
        making the `DOMWindow::dispatchEvent` itself early-return in that case, it now handles both
        `willDispatchEvent` and `didDispatchEvent`, ensuring that they are always called in pairs.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::dispatchEvent):

        * dom/EventTarget.cpp:
        (WebCore::EventTarget::innerInvokeEventListeners):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willDispatchEvent):
        (WebCore::InspectorInstrumentation::didDispatchEvent):
        (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
        (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willDispatchEventImpl):
        (WebCore::InspectorInstrumentation::didDispatchEventImpl):
        (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
        (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
        `InspectorInstrumentation::willDispatchEventImpl` was always called with `hasEventListeners`
        as `true`, so there's no reason to keep that parameter around. Similarly, the change inside
        `DOMWindow::dispatchEvent` will make it so that the same is true for
        `InspectorInstrumentation::willDispatchEventOnWindowImpl` as well.

2019-10-10  Chris Dumez  <cdumez@apple.com>

        Flaky Test: media/media-source/media-source-page-cache.html
        https://bugs.webkit.org/show_bug.cgi?id=202775

        Reviewed by Eric Carlson.

        SourceBufferList should never prevent entering the page cache, even if it has
        pending events in its queue. Its queue is a MainThreadGenericEventQueue, which
        is Page Cache-aware and will properly suspend the firing of events when needed.

        No new tests, covered by flaky test which should no longer be.

        * Modules/mediasource/SourceBufferList.cpp:
        (WebCore::SourceBufferList::canSuspendForDocumentSuspension const):

2019-10-10  Sihui Liu  <sihui_liu@apple.com>

        Add a unit test for StorageQuotaManager
        https://bugs.webkit.org/show_bug.cgi?id=202755

        Reviewed by Youenn Fablet.

        Expose state of StorageQuotaManager for newly added unit test.

        * storage/StorageQuotaManager.h:
        (WebCore::StorageQuotaManager::state const):

2019-10-10  Wenson Hsieh  <wenson_hsieh@apple.com>

        Support programmatic paste requests on macOS
        https://bugs.webkit.org/show_bug.cgi?id=202773
        <rdar://problem/48957166>

        Reviewed by Tim Horton.

        Adds support for programmatic paste requests on macOS. See below for more details.

        Tests: editing/pasteboard/dom-paste/dom-paste-confirmation.html
               editing/pasteboard/dom-paste/dom-paste-consecutive-confirmations.html
               editing/pasteboard/dom-paste/dom-paste-rejection.html
               editing/pasteboard/dom-paste/dom-paste-requires-user-gesture.html
               editing/pasteboard/dom-paste/dom-paste-same-origin.html

        * editing/EditorCommand.cpp:
        (WebCore::defaultValueForSupportedPaste):
        (WebCore::supportedPaste):
        (WebCore::allowPasteFromDOM):
        (WebCore::enabledPaste):

        Fixes an existing bug uncovered by the layout test editing/execCommand/clipboard-access.html, which tests the
        results of `document.queryCommandEnabled("copy")` and `document.queryCommandEnabled("paste")`. The problem here
        is that document.queryCommandEnabled("paste") returns true if DOM paste access requests are enabled, regardless
        of whether or not there is an active user gesture. This is inconsistent with the behavior of "copy" and "cut",
        which return false in the case where there is no user gesture (and the clipboard access policy is also equal to
        ClipboardAccessPolicy::RequiresUserGesture -- refer to `allowCopyCutFromDOM`).

        When pasting, we only DOM paste access requests to be triggered only in the case where there is a user gesture.
        This means that enabledPaste should additionally be gated on a user gesture check. For consistency with the
        implementation of `enabledCopy`, we introduce a `allowPasteFromDOM` helper that is similar to
        `allowCopyCutFromDOM`, and additionally check this constraint when the paste command's source is the DOM (as
        opposed to a menu or key binding).

        This adjustment also adds a missing canDHTMLPaste() check prior to consulting canPaste(). This ensures that when
        evaluating document.queryCommandEnabled("Paste"), we'll dispatch a "beforepaste" event, similar to how
        evaluating document.queryCommandEnabled("Copy") dispatches a "beforecopy" event.

        * platform/LocalizedStrings.h:

        Mark a function as WEBCORE_EXPORT.

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

        [GTK][WPE] Lots of media related tests crashing or flaky after r250918 - [ Mac WK2 ] Layout Test fast/mediastream/MediaStreamTrack-getSettings.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=202784

        Unreviewed, fix GTK and WPE test crashes.

        * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeAudioSource::render): Reconfigure if necessary.
        (WebCore::WrappedMockRealtimeAudioSource::reconfigure): New, setup for rendering.
        (WebCore::WrappedMockRealtimeAudioSource::settingsDidChange): Call reconfigure.

2019-10-10  youenn fablet  <youenn@apple.com>

        Remove unified plan runtime flag
        https://bugs.webkit.org/show_bug.cgi?id=202721

        Reviewed by Geoffrey Garen.

        Covered by existing tests.

        * Modules/mediastream/RTCRtpSender.cpp:
        (WebCore::RTCRtpSender::RTCRtpSender):
        * Modules/mediastream/RTCRtpTransceiver.idl:
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
        (WebCore::LibWebRTCMediaEndpoint::addTrack):
        (WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
        (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
        (WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
        (WebCore::LibWebRTCMediaEndpoint::OnTrack):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
        (WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):
        (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        (WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setWebRTCVP8CodecEnabled):
        * testing/Internals.cpp:
        (WebCore::Internals::useMockRTCPeerConnectionFactory):

2019-10-10  Chris Dumez  <cdumez@apple.com>

        DOMCacheStorage should not prevent pages from entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202608

        Reviewed by Youenn Fablet.

        Make DOMCacheStorage fully suspendable by queueing all its asynchronous promise resolutions
        to a SuspendableTaskQueue. This makes sure that no promises are resolved while suspended
        in the page cache.

        Test: http/tests/navigation/page-cache-domcachestorage-pending-promise.html

        * Modules/cache/DOMCacheStorage.cpp:
        (WebCore::DOMCacheStorage::DOMCacheStorage):
        (WebCore::DOMCacheStorage::doSequentialMatch):
        (WebCore::DOMCacheStorage::match):
        (WebCore::DOMCacheStorage::has):
        (WebCore::DOMCacheStorage::open):
        (WebCore::DOMCacheStorage::doOpen):
        (WebCore::DOMCacheStorage::remove):
        (WebCore::DOMCacheStorage::doRemove):
        (WebCore::DOMCacheStorage::keys):
        (WebCore::DOMCacheStorage::canSuspendForDocumentSuspension const):
        * Modules/cache/DOMCacheStorage.h:

2019-10-10  youenn fablet  <youenn@apple.com>

        Add asserts to MediaStreamPrivate observer routines
        https://bugs.webkit.org/show_bug.cgi?id=202724

        Reviewed by Alex Christensen.

        These methods are only to be called in main thread.
        Add asserts to validate this.
        No change of behavior.

        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::addObserver):
        (WebCore::MediaStreamPrivate::removeObserver):
        (WebCore::MediaStreamPrivate::forEachObserver const):

2019-10-09  youenn fablet  <youenn@apple.com>

        A service worker process should not be created when enqueuing a service worker job
        https://bugs.webkit.org/show_bug.cgi?id=202578
        <rdar://problem/55979690>

        Reviewed by Chris Dumez.

        Ask for a service worker context connection when planning to install or run a service worker.
        This allows to not spin unnecessarily service worker processes for jobs that do not end up installing a service worker.

        Covered by existing tests.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::tryInstallContextData):
        (WebCore::SWServer::runServiceWorkerIfNecessary):

2019-10-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, fix the internal iOS build

        * page/PointerCaptureController.h: Add some missing forward declarations.

2019-10-09  Sihui Liu  <sihui_liu@apple.com>

        Unreviewed, fix an asserition after r250937.

        Space increase tasks will be finished once it's started.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask):
        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):

2019-10-09  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Refactor Pasteboard item reading functions to work on both iOS and macOS
        https://bugs.webkit.org/show_bug.cgi?id=202647

        Reviewed by Tim Horton.

        Moves some pasteboard helper functions out of iOS-specific code, and into platform-agnostic code. See below for
        more details. There is no change in behavior, as nothing exercises these new pasteboard functions on macOS yet.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/Pasteboard.cpp:
        (WebCore::Pasteboard::allPasteboardItemInfo const):
        (WebCore::Pasteboard::pasteboardItemInfo const):
        (WebCore::Pasteboard::readString):
        (WebCore::Pasteboard::readBuffer):
        (WebCore::Pasteboard::readURL):

        Add some new helpers on Pasteboard to read Strings, data, and URLs from the platform pasteboard. These forward
        to the platform strategy which, in WebKit2, are currently implemented using sync IPC, but could be changed in
        the future to be fully asynchronous.

        * platform/Pasteboard.h:
        (WebCore::Pasteboard::name const):

        Expose a cross-platform name() getter on Pasteboard. On non-Cocoa platforms, this simply returns the empty
        string, but on macOS and iOS, this returns the platform pasteboard name, which is stored in m_pasteboardName.

        * platform/PasteboardItemInfo.h:
        (WebCore::PasteboardItemInfo::pathForContentType const):
        (WebCore::PasteboardItemInfo::contentTypeForHighestFidelityItem const):
        (WebCore::PasteboardItemInfo::encode const):
        (WebCore::PasteboardItemInfo::decode):

        Adds a couple of new members to PasteboardItemInfo (which represents metadata about a given item in the platform
        pasteboard). These are changeCount (which is self explanatory), and webSafeTypesByFidelity, which is a list of
        types in fidelity order which contains the list of pasteboard types that are safe to expose to bindings. These
        may include types such as "text/plain", "text/html", "text/uri-list", and "image/png".

        To distinguish this list from the existing contentTypesByFidelity list, I've also renamed contentTypesByFidelity
        to platformTypesByFidelity, to make it more obvious that this other list of types are platform-specific, and not
        generally safe to expose to the web.

        * platform/PasteboardStrategy.h:
        * platform/PlatformPasteboard.h:

        Move several helpers out into platform-agnostic code.

        * platform/cocoa/PasteboardCocoa.mm:
        (WebCore::Pasteboard::fileContentState):
        * platform/cocoa/PlatformPasteboardCocoa.mm: Added.

        Add a new file to contain the implementation of PlatformPasteboard::allPasteboardItemInfo, which is the same
        across Cocoa platforms.

        (WebCore::PlatformPasteboard::allPasteboardItemInfo):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::readRespectingUTIFidelities):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::informationForItemAtIndex):
        (WebCore::PlatformPasteboard::readBuffer const):
        (WebCore::PlatformPasteboard::readString const):
        (WebCore::PlatformPasteboard::readURL const):

        Additionally refactor all methods on PlatformPasteboard that take pasteboard item indices as signed integers
        (`int`) to receive `size_t` values instead.

        (WebCore::PlatformPasteboard::allPasteboardItemInfo): Deleted.
        * platform/libwpe/PasteboardLibWPE.cpp:
        (WebCore::Pasteboard::readString):
        (WebCore::Pasteboard::read):
        * platform/libwpe/PlatformPasteboardLibWPE.cpp:
        (WebCore::PlatformPasteboard::readString const):

        Add an implementation stub for WPE.

        * platform/mac/PlatformPasteboardMac.mm:
        (WebCore::modernPasteboardTypeForWebSafeMIMEType):
        (WebCore::webSafeMIMETypeForModernPasteboardType):

        Add helpers to convert between modern NSPasteboardTypes and web-safe types. While some logic exists today on
        macOS to convert between legacy pasteboard types and web-safe types, conversion between the modern pasteboard
        types and web-safe types are needed since NSPasteboardItem's types only support NSPasteboardTypes and
        dynamically declared types that match the format of a universal type identfier (for instance, "com.foo.bar").

        (WebCore::PlatformPasteboard::readBuffer const):
        (WebCore::PlatformPasteboard::readString const):
        (WebCore::PlatformPasteboard::readURL const):
        (WebCore::PlatformPasteboard::count const):
        (WebCore::PlatformPasteboard::informationForItemAtIndex):

        Implement all of these helpers by looking up the NSPasteboardItem at the given item index and querying it for
        data for non-legacy pasteboard types.

        (WebCore::PlatformPasteboard::itemAtIndex const):

2019-10-09  Daniel Bates  <dabates@apple.com>

        Add support for CompactPointerTuple<..., OptionSet<...>>
        https://bugs.webkit.org/show_bug.cgi?id=201316

        Reviewed by Yusuke Suzuki.

        Use the new CompactPointerTuple capability to replace CompactPointerTuple<RenderObject*, uint8_t>
        with CompactPointerTuple<RenderObject*, OptionSet<ElementStyleFlag>> in Node.h.

        * dom/Node.h:
        (WebCore::Node::hasStyleFlag const):
        (WebCore::Node::setStyleFlag):
        (WebCore::Node::clearStyleFlags):
        Update code now that we support CompactPointerTuple<..., OptionSet<...>>.

2019-10-09  John Wilander  <wilander@apple.com>

        IsLoggedIn: Add as experimental feature
        https://bugs.webkit.org/show_bug.cgi?id=202707
        <rdar://problem/56095064>

        Reviewed by Brent Fulgham and Chris Dumez.

        IsLoggedIn was proposed to the WebAppSec WG at TPAC 2019.
        So far there is only an explainer posted to the mailing list:
        https://lists.w3.org/Archives/Public/public-webappsec/2019Sep/0004.html

        This patch adds the three experimental web APIs:
        - Promise<void> setLoggedIn()
        - Promise<void> setLoggedOut()
        - Promise<bool> isLoggedIn()

        It also tests that those APIs are only exposed in secure contexts.

        The functionality is implemented as a supplement to Navigator.

        Tests: http/tests/is-logged-in/available-in-secure-contexts.https.html
               http/tests/is-logged-in/unavailable-in-insecure-contexts.html

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/NavigatorIsLoggedIn.cpp: Added.
        (WebCore::NavigatorIsLoggedIn::from):
        (WebCore::NavigatorIsLoggedIn::supplementName):
        (WebCore::NavigatorIsLoggedIn::setLoggedIn):
        (WebCore::NavigatorIsLoggedIn::setLoggedOut):
        (WebCore::NavigatorIsLoggedIn::isLoggedIn):
        * page/NavigatorIsLoggedIn.h: Added.
        * page/NavigatorIsLoggedIn.idl: Added.
        * page/PointerCaptureController.cpp:
        * page/PointerCaptureController.h:
        * page/Settings.yaml:

2019-10-09  Russell Epstein  <repstein@apple.com>

        Unreviewed, rolling out r250930.

        Broke watchOS Builds

        Reverted changeset:

        "Add support for CompactPointerTuple<..., OptionSet<...>>"
        https://bugs.webkit.org/show_bug.cgi?id=201316
        https://trac.webkit.org/changeset/250930

2019-10-09  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Move the mock testing entrance to Internals
        https://bugs.webkit.org/show_bug.cgi?id=202560
        <rdar://problem/55973793>

        Reviewed by Chris Dumez.

        This patch moves TestRunner.setWebAuthenticationMockConfiguration to
        Internals.setMockWebAuthenticationConfiguration and removes the old
        entrance. The purpose of this patch is to allow API tests to use
        the same mock infrastructure that is used by layout tests.

        No new tests, covered by updates on existing tests.

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
        * WebCore.xcodeproj/project.pbxproj:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::setMockWebAuthenticationConfiguration):
        * testing/Internals.cpp:
        (WebCore::Internals::setMockWebAuthenticationConfiguration):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/MockWebAuthenticationConfiguration.h: Added.
        (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::LocalConfiguration::decode):
        (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
        (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
        (WebCore::MockWebAuthenticationConfiguration::encode const):
        (WebCore::MockWebAuthenticationConfiguration::decode):
        * testing/MockWebAuthenticationConfiguration.idl: Added.

2019-10-09  Simon Fraser  <simon.fraser@apple.com>

        Rename WheelEventTestTrigger and improve naming in related code
        https://bugs.webkit.org/show_bug.cgi?id=202772

        Reviewed by Tim Horton.

        Change the "test trigger" terminology to "monitor wheel events"; after all, tests
        call monitorWheelEvents() and callAfterScrollingCompletes(), and this is not triggering
        a test.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/FrameView.cpp:
        (WebCore::FrameView::adjustScrollbarsForLayout):
        (WebCore::FrameView::setScrollPosition):
        (WebCore::FrameView::didAddScrollbar):
        * page/Page.cpp:
        (WebCore::Page::ensureWheelEventTestMonitor):
        (WebCore::Page::ensureTestTrigger): Deleted.
        * page/Page.h:
        (WebCore::Page::wheelEventTestMonitor const):
        (WebCore::Page::clearWheelEventTestMonitor):
        (WebCore::Page::isMonitoringWheelEvents const):
        (WebCore::Page::testTrigger const): Deleted.
        (WebCore::Page::clearTrigger): Deleted.
        (WebCore::Page::expectsWheelEventTriggers const): Deleted.
        * page/WheelEventTestMonitor.cpp: Added.
        (WebCore::WheelEventTestMonitor::WheelEventTestMonitor):
        (WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
        (WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer):
        (WebCore::WheelEventTestMonitor::deferForReason):
        (WebCore::WheelEventTestMonitor::removeDeferralForReason):
        (WebCore::WheelEventTestMonitor::triggerTestTimerFired):
        (WebCore::operator<<):
        * page/WheelEventTestMonitor.h: Renamed from Source/WebCore/page/WheelEventTestTrigger.h.
        * page/WheelEventTestTrigger.cpp: Removed.
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::platformPrepareForWheelEvents):
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
        (WebCore::AsyncScrollingCoordinator::updateIsMonitoringWheelEventsForFrameView):
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
        (WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const):
        (WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const):
        (WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView): Deleted.
        (WebCore::AsyncScrollingCoordinator::deferTestsForReason const): Deleted.
        (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason const): Deleted.
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::updateIsMonitoringWheelEventsForFrameView):
        (WebCore::ScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView): Deleted.
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
        (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateScrollingNode::setIsMonitoringWheelEvents):
        (WebCore::ScrollingStateScrollingNode::dumpProperties const):
        (WebCore::ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger): Deleted.
        * page/scrolling/ScrollingStateScrollingNode.h:
        (WebCore::ScrollingStateScrollingNode::isMonitoringWheelEvents const):
        (WebCore::ScrollingStateScrollingNode::expectsWheelEventTestTrigger const): Deleted.
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::deferWheelEventTestCompletionForReason):
        (WebCore::ScrollingTree::removeWheelEventTestCompletionDeferralForReason):
        (WebCore::ScrollingTree::deferTestsForReason): Deleted.
        (WebCore::ScrollingTree::removeTestDeferralForReason): Deleted.
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/ThreadedScrollingTree.cpp:
        (WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason):
        (WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason):
        (WebCore::ThreadedScrollingTree::deferTestsForReason): Deleted.
        (WebCore::ThreadedScrollingTree::removeTestDeferralForReason): Deleted.
        * page/scrolling/ThreadedScrollingTree.h:
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const): Deleted.
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const): Deleted.
        * platform/Logging.h:
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::deferWheelEventTestCompletionForReason const):
        (WebCore::ScrollAnimator::removeWheelEventTestCompletionDeferralForReason const):
        (WebCore::ScrollAnimator::deferTestsForReason const): Deleted.
        (WebCore::ScrollAnimator::removeTestDeferralForReason const): Deleted.
        * platform/ScrollAnimator.h:
        (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestMonitor):
        (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger): Deleted.
        * platform/cocoa/ScrollController.h:
        (WebCore::ScrollControllerClient::deferWheelEventTestCompletionForReason const):
        (WebCore::ScrollControllerClient::removeWheelEventTestCompletionDeferralForReason const):
        (WebCore::ScrollControllerClient::deferTestsForReason const): Deleted.
        (WebCore::ScrollControllerClient::removeTestDeferralForReason const): Deleted.
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::startSnapRubberbandTimer):
        (WebCore::ScrollController::stopSnapRubberbandTimer):
        (WebCore::ScrollController::scheduleStatelessScrollSnap):
        (WebCore::ScrollController::startDeferringWheelEventTestCompletionDueToScrollSnapping):
        (WebCore::ScrollController::stopDeferringWheelEventTestCompletionDueToScrollSnapping):
        (WebCore::ScrollController::startScrollSnapTimer):
        (WebCore::ScrollController::stopScrollSnapTimer):
        (WebCore::ScrollController::startDeferringTestsDueToScrollSnapping): Deleted.
        (WebCore::ScrollController::stopDeferringTestsDueToScrollSnapping): Deleted.
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimatorMac::didBeginScrollGesture const):
        (WebCore::ScrollAnimatorMac::didEndScrollGesture const):
        (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon):
        (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
        * rendering/RenderBox.cpp:
        (WebCore::setupWheelEventMonitor):
        (WebCore::RenderBox::setScrollLeft):
        (WebCore::RenderBox::setScrollTop):
        (WebCore::setupWheelEventTestTrigger): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::createScrollbar):
        * rendering/RenderListBox.cpp:
        (WebCore::setupWheelEventTestMonitor):
        (WebCore::RenderListBox::setScrollTop):
        (WebCore::RenderListBox::createScrollbar):
        (WebCore::setupWheelEventTestTrigger): Deleted.
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::monitorWheelEvents):
        (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer):
        (WebCoreTestSupport::clearWheelEventTestMonitor):
        (WebCoreTestSupport::clearWheelEventTestTrigger): Deleted.
        * testing/js/WebCoreTestSupport.h:

2019-10-09  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: update size to actual disk usage only when estimated increase is bigger than space available
        https://bugs.webkit.org/show_bug.cgi?id=201957

        Reviewed by Youenn Fablet.

        For better performance.

        Covered by existing tests.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::QuotaUser::resetSpaceUsed): m_estimatedSpaceIncrease will be updated when task
        is finished, so no need to clear it when doing reset.
        (WebCore::IDBServer::IDBServer::QuotaUser::computeSpaceUsed):
        * Modules/indexeddb/server/IDBServer.h:

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp: instead of reading file size after each task, just add the 
        task size to known usage and get an estimated usage.
        (WebCore::IDBServer::UniqueIDBDatabase::startSpaceIncreaseTask):
        (WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask):
        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::generateUniqueCallbackIdentifier):
        (WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
        (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
        (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
        (WebCore::IDBServer::UniqueIDBDatabase::forgetErrorCallback):
        (WebCore::IDBServer::generateUniqueCallbackIdentifier): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

        * storage/StorageQuotaManager.cpp: use m_state to decide what action to take on next request. Previously when a 
        request asked for size bigger than space available, we would go to ask for more space directly. Now because IDB
        can be reporting estimated usage, we first ask IDB to compute its actual disk usage and ask for more space if 
        actual space available is smaller than requested size.
        (WebCore::StorageQuotaManager::askUserToInitialize):
        (WebCore::StorageQuotaManager::removeUser):
        (WebCore::StorageQuotaManager::requestSpace):
        (WebCore::StorageQuotaManager::askForMoreSpace):
        (WebCore::StorageQuotaManager::processPendingRequests):
        * storage/StorageQuotaManager.h:
        * storage/StorageQuotaUser.h:
        (WebCore::StorageQuotaUser::computeSpaceUsed):

2019-10-09  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: include size of index records in size estimate of put/add task
        https://bugs.webkit.org/show_bug.cgi?id=202483

        Reviewed by Geoffrey Garen.

        SQLiteIDBBackingStore has two tables IndexRecords and Records. For add operation add(VALUE, KEY), we add a new 
        record to Records table. If we can extract index value from VALUE for some index, we would add a new record to
        IndexRecords table.

        We estimated the task szie of add task with (KEY_SIZE + VALUE_SIZE), but we didn't count the size that could be
        added to the IndexRecords table. This could lead to storage abuse.

        Test: storage/indexeddb/request-size-estimate.html

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):

2019-10-09  Chris Dumez  <cdumez@apple.com>

        Youtube.com is unable to enter the back/forward cache on macOS
        https://bugs.webkit.org/show_bug.cgi?id=202754
        <rdar://problem/56117666>

        Reviewed by Eric Carlson.

        As of r250542, the MainThreadGenericEventQueue used by both MediaSource and
        SourceBuffer to fire event is PageCache-aware. As a result, both these
        ActiveDOMObjects can now safety suspend without risking running script while
        in the page cache. I did have to update some logic in MediaSource::removeSourceBuffer()
        to make sure we do not unnecessarily construct new ActiveDOMObjects while
        suspending, as this is not allowed.

        Test: media/media-source/media-source-page-cache.html

        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::removeSourceBuffer):
        (WebCore::MediaSource::canSuspendForDocumentSuspension const):
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::canSuspendForDocumentSuspension const):
        * Modules/mediasource/SourceBuffer.h:

2019-10-09  Daniel Bates  <dabates@apple.com>

        Add support for CompactPointerTuple<..., OptionSet<...>>
        https://bugs.webkit.org/show_bug.cgi?id=201316

        Reviewed by Yusuke Suzuki.

        Use the new CompactPointerTuple capability to replace CompactPointerTuple<RenderObject*, uint8_t>
        with CompactPointerTuple<RenderObject*, OptionSet<ElementStyleFlag>> in Node.h.

        * dom/Node.h:
        (WebCore::Node::hasStyleFlag const):
        (WebCore::Node::setStyleFlag):
        (WebCore::Node::clearStyleFlags):
        Update code now that we support CompactPointerTuple<..., OptionSet<...>>.

2019-10-09  Zalan Bujtas  <zalan@apple.com>

        RunResolver::rangeForRendererWithOffsets should check for range end
        https://bugs.webkit.org/show_bug.cgi?id=202761
        <rdar://problem/55917924>

        Reviewed by Antti Koivisto.

        This patch ensures that when rangeForRenderer comes back with a collapsed run (empty range), rangeForRendererWithOffsets returns an empty range as well.

        Test: fast/text/simple-line-layout-range-check-end.html

        * rendering/SimpleLineLayoutResolver.cpp:
        (WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets const):

2019-10-09  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Fix video sometimes not appearing
        https://bugs.webkit.org/show_bug.cgi?id=201401

        Reviewed by Xabier Rodriguez-Calvar.

        The code in MediaPlayerPrivateGStreamer::changePipelineState() was
        supposed to call `ensureGLVideoSinkContext()` on upwards transitions
        to PAUSED but the code did not take into account non-step-by-step
        state transitions, which happens frequently with playbin3 in the MSE
        case.

        Before the patch, when playbin3 transitioned from READY to PLAYING
        without stopping for preroll this call would not be made and the
        texture IDs received at the sink would not correspond to the
        compositor GL context, leading to artifacts (often the player controls
        or a blank screen).

        Test: imported/w3c/web-platform-tests/media-source/mediasource-video-is-visible.html

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):

2019-10-09  Eric Carlson  <eric.carlson@apple.com>

        [ Mac WK2 ] Layout Test fast/mediastream/MediaStreamTrack-getSettings.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=196400
        <rdar://problem/49567579>

        Reviewed by Youenn Fablet.

        No new tests, this fixes a broken test.

        * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
        * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
        (WebCore::MockRealtimeAudioSourceMac::reconfigure): Reconfigure buffers as well.
        (WebCore::MockRealtimeAudioSourceMac::render): Call reconfigure if the buffer isn't
        configured correctly.
        (WebCore::MockRealtimeAudioSourceMac::settingsDidChange): Call reconfigure.

        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource): Set sample rate to default.

2019-10-09  Chris Dumez  <cdumez@apple.com>

        Unreviewed, address Darin's post-landing comments for r250912.

        The array should be const.

        * css/CSSDefaultStyleSheets.cpp:

2019-10-09  Daniel Bates  <dabates@apple.com>

        Clean up: Remove pre-macOS Sierra workaround for missing kVK_RightCommand
        https://bugs.webkit.org/show_bug.cgi?id=202597

        Reviewed by Anders Carlsson.

        kVK_RightCommand has been defined in HIToolbox/Events.h since macOS Sierra. We no longer
        need to maintain code to manually define it.

        * platform/mac/PlatformEventFactoryMac.mm:
        (WebCore::keyForKeyEvent):

2019-10-09  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Minor exportparts attribute parsing cleanups
        https://bugs.webkit.org/show_bug.cgi?id=202740

        Reviewed by Zalan Bujtas.

        * dom/ShadowRoot.cpp:
        (WebCore::parsePartMapping):
        (WebCore::parsePartMappingsList):

        Return the map as the return value.

        (WebCore::ShadowRoot::partMappings const):

2019-10-09  Andy Estes  <aestes@apple.com>

        [iOS] Remove redundant uses of USE(UIKIT_EDITING)
        https://bugs.webkit.org/show_bug.cgi?id=202717

        Reviewed by Anders Carlsson.

        * page/ios/FrameIOS.mm:
        (WebCore::Frame::qualifyingNodeAtViewportLocation):
        (WebCore::Frame::approximateNodeAtViewportLocationLegacy):

2019-10-09  Chris Dumez  <cdumez@apple.com>

        [iOS] REGRESSION (r250398) Layout Test fast/history/page-cache-element-state-focused.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=202712
        <rdar://problem/56082428>

        Reviewed by Antti Koivisto.

        The test was failing depending on the order in which the tests were executed. The reason is that
        elements would either use the full UA stylesheet (html.css) or the simple one in CSSDefaultStyleSheets.cpp.
        Unfortunately, the outline-width was different on iOS between the simple stylesheet and the full one, causing
        the test output to look different depending on which stylesheet was used.

        Address the issue by making sure that the outline-width is 3px on IOS_FAMILY in the simple stylesheet, to
        be consistent with the value in the full stylesheet (html.css).

        * css/CSSDefaultStyleSheets.cpp:

2019-10-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][Painting] Decouple content and decoration painting
        https://bugs.webkit.org/show_bug.cgi?id=202718
        <rdar://problem/56104661>

        Reviewed by Antti Koivisto.

        This patch adds support for individual run painting <div><span style="background-color: red">red</span>black</div>.
        This is pretty much all we can do with the current data structures (lack of context).

        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintBoxDecoration):
        (WebCore::Display::paintInlineContent):
        (WebCore::Display::Painter::paint):
        (WebCore::Display::paintBlockLevelBoxDecoration): Deleted.
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):

2019-10-09  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed build fix for Windows ports
        https://bugs.webkit.org/show_bug.cgi?id=202630
        <rdar://problem/56107907>

        dom/Document.cpp(3990): error C2653: 'MediaStreamTrack': is not a class or namespace name
        dom/Document.cpp(3990): error C3861: 'captureState': identifier not found

        * dom/Document.cpp:
        (WebCore::Document::updateIsPlayingMedia): Restored #if ENABLE(MEDIA_STREAM).

2019-10-09  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Mark as supported in features.json
        https://bugs.webkit.org/show_bug.cgi?id=202730

        Reviewed Ryosuke Niwa.

        * features.json:

2019-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Wayland: do not use EGL_PLATFORM_WAYLAND_KHR with eglGetPlatformDisplayEXT
        https://bugs.webkit.org/show_bug.cgi?id=202689

        Reviewed by Žan Doberšek.

        Use EGL_PLATFORM_WAYLAND_EXT instead. It shouldn't really matter because both are the same value.

        * platform/graphics/wayland/PlatformDisplayWayland.cpp:
        (WebCore::PlatformDisplayWayland::initialize):

2019-10-09  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Allow exporting single part with multiple names using exportparts attribute
        https://bugs.webkit.org/show_bug.cgi?id=202719

        Reviewed by Ryosuke Niwa.

        Cases like exportparts="part:export1, part:export2" should work.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):

        Allow one part name to expand into multiple names for matching.

        * dom/ShadowRoot.cpp:
        (WebCore::parsePartMappingsList):

        Allow multiple names per mapping.

        (WebCore::ShadowRoot::partMappings const):
        * dom/ShadowRoot.h:

2019-10-09  Philippe Normand  <pnormand@igalia.com>

        REGRESSION(r246399): [GStreamer] Problems playing AAC streams
        https://bugs.webkit.org/show_bug.cgi?id=202204

        Reviewed by Xabier Rodriguez-Calvar.

        Push the EOS event in the WebKitWebSrc element when the internal
        queue is empty only for non-live resources. In the live case the
        queue might drain temporarily but that's OK because data would
        still be queued in downstream elements.

        No new tests, the EOS event was pushed too early because of this
        regression but there's no way to differentiate it from an expected
        event in a layout test.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcCreate):

2019-10-09  youenn fablet  <youenn@apple.com>

        MediaStreamTrack does not need to be a Document audio producer
        https://bugs.webkit.org/show_bug.cgi?id=202630

        Reviewed by Eric Carlson.

        Instead of having all tracks being MediaProducer, we can use the new methods introduced for iOS
        to mute/unmute capture tracks and get capture media state.
        This allows to not register tracks that are not capture tracks.
        Covered by existing tests.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::~MediaStreamTrack):
        (WebCore::MediaStreamTrack::setMuted):
        (WebCore::MediaStreamTrack::applyConstraints):
        (WebCore::MediaStreamTrack::mediaState const):
        (WebCore::MediaStreamTrack::updateCaptureAccordingToMutedState):
        (WebCore::MediaStreamTrack::pageMutedStateDidChange): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * dom/Document.cpp:
        (WebCore::Document::updateIsPlayingMedia):
        (WebCore::Document::pageMutedStateDidChange):

2019-10-08  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Enable by default
        https://bugs.webkit.org/show_bug.cgi?id=202644

        Reviewed by Ryosuke Niwa.

        Flip the switch.

        * page/RuntimeEnabledFeatures.h:

2019-10-08  Jiewen Tan  <jiewen_tan@apple.com>

        Partially undo r250811
        https://bugs.webkit.org/show_bug.cgi?id=202715
        <rdar://problem/56084287>

        Reviewed by Chris Dumez.

        This patch changes the SerializedScriptValue to always wrap CryptoKey objects again.
        CryptoKey objects could belong to an array or another object. In those cases, IDBObjectStore
        cannot set the flag for the embedded Cryptokey objects. Neither can postMessage to unset
        the flag. Therefore, there is no way to separate the serialization process into two and
        this patch restores the old behaviour. However, the hardening part of r250811 is kept
        and therefore the crash should still be prevented.

        No new test, updated existing test

        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::putOrAdd):
        (WebCore::JSC::setIsWrappingRequiredForCryptoKey): Deleted.
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::dumpIfTerminal):
        (WebCore::CloneDeserializer::readTerminal):
        * crypto/CryptoKey.h:
        (WebCore::CryptoKey::allows const):
        (WebCore::CryptoKey::isWrappingRequired const): Deleted.
        (WebCore::CryptoKey::setIsWrappingRequired): Deleted.
        (): Deleted.
        * dom/ScriptExecutionContext.h:

2019-10-08  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: modifications to shader modules can be shared between vertex/fragment shaders
        https://bugs.webkit.org/show_bug.cgi?id=202031

        Reviewed by Dean Jackson.

        Test: inspector/canvas/updateShader-webgpu-sharedVertexFragment.html

        * Modules/webgpu/WebGPUPipeline.h:
        * Modules/webgpu/WebGPUComputePipeline.cpp:
        (WebCore::WebGPUComputePipeline::cloneShaderModules): Added.
        (WebCore::WebGPUComputePipeline::recompile):
        * Modules/webgpu/WebGPURenderPipeline.cpp:
        (WebCore::WebGPURenderPipeline::cloneShaderModules): Added.
        (WebCore::WebGPURenderPipeline::recompile):
        Recreate the vertex/fragment/compute shader module(s) when recompiling so that modifications
        to it via this pipeline don't affect other pipelines that also use the same shader module.

        * inspector/InspectorShaderProgram.h:
        * inspector/InspectorShaderProgram.cpp:
        (WebCore::InspectorShaderProgram::updateShader):
        (WebCore::InspectorShaderProgram::buildObjectForShaderProgram): Added.
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::didCreateWebGLProgram):
        (WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline):
        Include as part of the `Canvas.event.programCreated` payload a flag indicating whether the
        vertex shader module and fragment shader module are the same for `WebGPURenderPipeline`s.

2019-10-08  Timothy Hatcher  <timothy@apple.com>

        Copying white text from dark mode WebKit apps and pasting in a light mode app results in white (invisible) text.
        https://bugs.webkit.org/show_bug.cgi?id=202662
        rdar://problem/48677354

        Reviewed by Megan Gardner.

        Covered by new API tests.

        HTMLConverter needs to strip white text colors when the document is in dark mode, like it does for black in light mode.

        * editing/cocoa/HTMLConverter.mm:
        (normalizedColor): Handle dark mode and ignore white.
        (HTMLConverterCaches::colorPropertyValueForNode): Pass element to normalizedColor.

2019-10-08  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Fix style invalidation with class selector and ::before and ::after
        https://bugs.webkit.org/show_bug.cgi?id=202694

        Reviewed by Ryosuke Niwa.

        Test: fast/css/shadow-parts/invalidation-class-before-after.html

        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::invalidateIfNeeded):
        (WebCore::Style::Invalidator::invalidateStyleWithMatchElement):

        Invalidate in the shadow tree if the computed match element is host.

        (WebCore::Style::Invalidator::invalidateInShadowTreeIfNeeded):

        Factor into a function.

        * style/StyleInvalidator.h:

2019-10-08  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fix non-unified builds after r250486
        https://bugs.webkit.org/show_bug.cgi?id=202636

        Reviewed by Youenn Fablet.

        No new tests needed.

        * Modules/fetch/FetchLoader.h: Add missing forward declaration of WebCore::SharedBuffer.
        * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp: Add missing inclusion of header
        wtf/text/StringConcatenateNumbers.h
        * Modules/indexeddb/shared/IDBIterateCursorData.cpp: Ditto.
        * animation/DocumentTimeline.cpp: Add missing inclusion of the EventNames.h and
        JavaScriptCore/VM.h headers.
        * bindings/js/JSDOMWindowCustom.cpp: Add missing inclusion of the JSDOMConvertCallbacks.h
        header.
        * bindings/js/JSIDBRequestCustom.cpp: Add missing inclusion of the JSDOMConvertIndexedDB.h
        and JSDOMConvertSequences.h headers.
        * bindings/js/JSRemoteDOMWindowCustom.cpp: Add missing inclusion of the
        JSDOMExceptionHandling.h header.
        * bindings/js/ScriptController.cpp: Add missing inclusion of the
        JavaScriptCore/WeakGCMapInlines.h header to avoid missing symbols during linking.
        * bindings/js/ScriptModuleLoader.h: Add missing inclusion of the wtf/HashSet.h header
        and add a forward declaration for the JSC::JSModuleRecord type.
        * bindings/js/WindowProxy.cpp: Add missing inclusion of the JavaScriptCore/StrongInlines.h
        header to avoid missing symbols during linking.
        * css/FontFaceSet.cpp: Add missing inclusion of the DOMPromiseProxy.h header.
        * css/FontFaceSet.h: Add missing inclusion of the IDLTypes.h header.
        * dom/IdleDeadline.h: Add missing inclusion of the wtf/Ref.h header.
        * history/CachedPage.h: Add missing inclusion of the wtf/MonotonicTime.h header.
        * html/canvas/WebGLBuffer.h: Add missing inclusion of the wtf/RefPtr.h header.
        * html/canvas/WebGLFramebuffer.h: Add missing inclusion of the wtf/HashMap.h and
        wtf/Vector.h headers.
        * html/canvas/WebGLProgram.h: Add missing inclusion of the wtf/HashFunctions.h, wtf/Lock.h,
        and wtf/Vector.h headers; add the missing namespace to an usage of WTF::LockHolder.
        * html/canvas/WebGLShader.h: Add missing inclusion of the wtf/text/WTFString.h header.
        * inspector/InspectorController.cpp: Add missing inclusion of the SharedBuffer.h header.
        * inspector/agents/InspectorCanvasAgent.cpp: Add missing inclusion of the ImageBitmap.h
        header.
        * page/DOMWindowExtension.cpp: Add missing inclusion of the Document.h header.
        * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp: Add missing inclusion of the
        ScrollingTreeFrameScrollingNode.h header.
        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: Add missing inclusion
        of the Logging.h header.
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: Add missing
        inclusion of the ScrollingTree.h header.
        * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp: Add missing inclusion of the
        ScrollingTreeOverflowScrollProxyNode.h header.
        * platform/SuspendableTaskQueue.cpp: Add missing inclusion of the ScriptExecutionContext.h
        header.
        * workers/Worker.cpp: Add missing inclusion of the JavaScriptCore/ScriptCallStack.h header.

2019-10-08  youenn fablet  <youenn@apple.com>

        MediaStreamTrack should be a PlatformMediaSessionClient instead of MediaStream
        https://bugs.webkit.org/show_bug.cgi?id=202631

        Reviewed by Eric Carlson.

        Make MediaStreamTrack a PlatformMediaSessionClient, which allows tracking tracks that are not owned by a stream.
        MediaStream is no longer a PlatformMediaSessionClient so we move some of MediaStream API implementation to MediaStreamTrack.

        Covered by updated test.

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::MediaStream):
        (WebCore::MediaStream::startProducingData):
        (WebCore::MediaStream::stopProducingData):
        (WebCore::MediaStream::statusDidChange):
        (WebCore::MediaStream::mediaType const): Deleted.
        (WebCore::MediaStream::presentationType const): Deleted.
        (WebCore::MediaStream::characteristics const): Deleted.
        (WebCore::MediaStream::mayResumePlayback): Deleted.
        (WebCore::MediaStream::suspendPlayback): Deleted.
        (WebCore::MediaStream::sourceApplicationIdentifier const): Deleted.
        (WebCore::MediaStream::canProduceAudio const): Deleted.
        (WebCore::MediaStream::processingUserGestureForMedia const): Deleted.
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::configureTrackRendering):
        (WebCore::MediaStreamTrack::mediaType const):
        (WebCore::MediaStreamTrack::presentationType const):
        (WebCore::MediaStreamTrack::characteristics const):
        (WebCore::MediaStreamTrack::mayResumePlayback):
        (WebCore::MediaStreamTrack::suspendPlayback):
        (WebCore::MediaStreamTrack::sourceApplicationIdentifier const):
        (WebCore::MediaStreamTrack::canProduceAudio const):
        (WebCore::MediaStreamTrack::processingUserGestureForMedia const):
        * Modules/mediastream/MediaStreamTrack.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::load):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::hasVideo const):
        (WebCore::MediaStreamPrivate::hasAudio const):
        (WebCore::MediaStreamPrivate::hasCaptureVideoSource const): Deleted.
        (WebCore::MediaStreamPrivate::hasCaptureAudioSource const): Deleted.
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/MediaStreamTrackPrivate.h:

2019-10-08  Brady Eidson  <beidson@apple.com>

        Service Worker Fetch events should time out.
        https://bugs.webkit.org/show_bug.cgi?id=202188

        Reviewed by Alex Christensen.

        Test: http/tests/workers/service/basic-timeout.https.html

        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerWorker.h:
        (WebCore::SWServerWorker::setHasTimedOutAnyFetchTasks):
        (WebCore::SWServerWorker::hasTimedOutAnyFetchTasks const):

2019-10-08  Alexey Shvayka  <shvaikalesh@gmail.com>

        Accept two values in the overflow shorthand
        https://bugs.webkit.org/show_bug.cgi?id=184691

        Reviewed by Simon Fraser.

        In https://github.com/w3c/csswg-drafts/issues/2484 it was resolved to accept one or two values in
        the overflow shorthand, instead of only one. If two values are specified, the first would be used
        for overflow-x and the second for overflow-y. This change was shipped in Firefox 61 and Chrome 68.
        This patch implements new syntax while preserving handling of -webkit-paged-x and -webkit-paged-y.

        Tests: fast/css/cssText-shorthand.html
               fast/css/getComputedStyle/getComputedStyle-overflow.html
               imported/w3c/web-platform-tests/css/css-overflow/overflow-shorthand-001.html
               imported/w3c/web-platform-tests/css/css-overflow/parsing/overflow-computed.html
               imported/w3c/web-platform-tests/css/css-overflow/parsing/overflow-valid.html
               imported/w3c/web-platform-tests/css/cssom/shorthand-values.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSProperties.json:
        * css/StyleProperties.cpp:
        (WebCore::StyleProperties::getPropertyValue const):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::consumeOverflowShorthand):
        (WebCore::CSSPropertyParser::parseShorthand):
        * css/parser/CSSPropertyParser.h:

2019-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, fix WebCore's features.json after r250824

        * features.json: Remove an erroneous "specification" key.

2019-10-08  Chris Dumez  <cdumez@apple.com>

        Make sure ActiveDOMObject properly deals with detached documents
        https://bugs.webkit.org/show_bug.cgi?id=202596

        Reviewed by Geoffrey Garen.

        For detached document, the script execution context is their context document.
        The ActiveDOMObject constructor taking a Document& would make sure to get the
        document's contextDocument. However, if the ActiveDOMObject constructor taking
        a ScriptExecutionContext* is called, it would assume this is the right script
        execution context, which is unsafe. In this patch, all ActiveDOMObject
        constructors now check for detached documents and make sure to use their
        context document when necessary.

        * dom/ActiveDOMObject.cpp:
        (WebCore::suitableScriptExecutionContext):
        (WebCore::ActiveDOMObject::ActiveDOMObject):
        * dom/ActiveDOMObject.h:
        * dom/Document.h:

2019-10-09  Simon Fraser  <simon.fraser@apple.com>

        Clean up WheelEventTestTriggers logging
        https://bugs.webkit.org/show_bug.cgi?id=202764

        Reviewed by Tim Horton.

        Make DeferTestTriggerReason a bit set, and use OptionSet<> rather than StdSet. Make
        DeferTestTriggerReason and ScrollableAreaReasonMap loggable, and simplify the logging.

        * page/WheelEventTestTrigger.cpp:
        (WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
        (WebCore::WheelEventTestTrigger::deferTestsForReason):
        (WebCore::WheelEventTestTrigger::removeTestDeferralForReason):
        (WebCore::WheelEventTestTrigger::triggerTestTimerFired):
        (WebCore::operator<<):
        (WebCore::dumpState): Deleted.
        * page/WheelEventTestTrigger.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
        (WebCore::AsyncScrollingCoordinator::deferTestsForReason const):
        (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason const):
        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const):
        (WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const):

2019-10-08  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed. Restabilize non-unified build.

        * Modules/fetch/FetchLoader.h:
        * animation/DocumentTimeline.cpp:
        * bindings/js/JSDOMWindowCustom.cpp:
        * bindings/js/JSIDBRequestCustom.cpp:
        * bindings/js/JSRemoteDOMWindowCustom.cpp:
        * bindings/js/ScriptModuleLoader.h:
        * bindings/js/WindowProxy.cpp:
        * css/FontFaceSet.cpp:
        * css/FontFaceSet.h:
        * css/typedom/StylePropertyMapReadOnly.cpp:
        * history/CachedPage.h:
        * html/canvas/WebGLBuffer.cpp:
        * html/canvas/WebGLBuffer.h:
        * html/canvas/WebGLFramebuffer.h:
        * html/canvas/WebGLProgram.cpp:
        * html/canvas/WebGLProgram.h:
        * html/canvas/WebGLShader.h:
        * inspector/InspectorController.cpp:
        * inspector/agents/InspectorCanvasAgent.cpp:
        * workers/Worker.cpp:
        * workers/service/ServiceWorkerContainer.cpp:
        * workers/service/ServiceWorkerGlobalScope.cpp:

2019-10-08  Zalan Bujtas  <zalan@apple.com>

        [LFC][Painting] Add very basic block and inline painting
        https://bugs.webkit.org/show_bug.cgi?id=202697
        <rdar://problem/56076562>

        Reviewed by Antti Koivisto.

        This is a very basic border/background painting with simple text. No phases/z-index/layers of any kind.

        * layout/displaytree/DisplayBox.h: This seems to be getting out of hand.
        (WebCore::Display::Box::moveBy):
        * layout/displaytree/DisplayPainter.cpp:
        (WebCore::Display::paintBlockLevelBoxDecoration):
        (WebCore::Display::paintInlineContent):
        (WebCore::Display::Painter::paint):
        * layout/floats/FloatingContext.h:
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::inlineRuns const):
        (WebCore::Layout::InlineFormattingState::lineBoxes const):

2019-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, try to fix the WinCairo build after r250824

        * dom/IdleDeadline.h:

        Add a missing include for <wtf/Ref.h>, such that the adoptRef function is defined.

2019-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, try to fix the open source macOS build after r250824

        * bindings/js/JSDOMConvertRecord.h:

        Add a missing #include for JSDOMGlobalObject. This file utilizes methods on JSDOMGlobalObject, but only ensures
        that it has a forward declaration of JSDOMGlobalObject (by way of including JSDOMExceptionHandling.h through
        JSDOMConvertBase.h).

2019-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unreviewed, update DerivedSources xcfilelists after r250816

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:

2019-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Clipboard API] Introduce bindings for the async Clipboard API
        https://bugs.webkit.org/show_bug.cgi?id=202622
        <rdar://problem/56038126>

        Reviewed by Ryosuke Niwa.

        Adds IDL for the async clipboard API (with the exception of delayed item generation interfaces, which
        I'll iterate on and introduce separately). See: https://w3c.github.io/clipboard-apis/#async-clipboard-api for
        more information.

        Tests: editing/async-clipboard/clipboard-interfaces.html
               editing/async-clipboard/clipboard-wrapper-stays-alive.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/async-clipboard/Clipboard.cpp:
        (WebCore::Clipboard::create):
        (WebCore::Clipboard::Clipboard):
        (WebCore::Clipboard::navigator):
        (WebCore::Clipboard::eventTargetInterface const):
        (WebCore::Clipboard::scriptExecutionContext const):
        (WebCore::Clipboard::readText):
        (WebCore::Clipboard::writeText):
        (WebCore::Clipboard::read):
        (WebCore::Clipboard::write):

        Stub out these API calls for now by immediately rejecting the given promise.

        * Modules/async-clipboard/Clipboard.h:
        * Modules/async-clipboard/Clipboard.idl:
        * Modules/async-clipboard/ClipboardItem.cpp:
        (WebCore::ClipboardItem::ClipboardItem):
        (WebCore::ClipboardItem::create):
        (WebCore::ClipboardItem::types const):
        (WebCore::ClipboardItem::getType):

        Stub out these API calls for now by immediately rejecting the given promise.

        (WebCore::navigator):
        * Modules/async-clipboard/ClipboardItem.h:
        (WebCore::ClipboardItem::presentationStyle const):
        * Modules/async-clipboard/ClipboardItem.idl:
        * Modules/async-clipboard/NavigatorClipboard.cpp:
        (WebCore::NavigatorClipboard::NavigatorClipboard):
        (WebCore::NavigatorClipboard::clipboard):
        (WebCore::NavigatorClipboard::from):
        (WebCore::NavigatorClipboard::supplementName):
        * Modules/async-clipboard/NavigatorClipboard.h:
        * Modules/async-clipboard/NavigatorClipboard.idl:
        * Modules/mediastream/MediaStreamTrack.cpp:
        * Modules/mediastream/RTCDTMFSender.cpp:
        * Modules/mediastream/RTCRtpSender.cpp:
        * Modules/webgpu/WebGPUPipeline.h:

        More unified sources-related build fixes.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/DeviceOrientationOrMotionEvent.cpp:

        Unified sources-related build fix.

        * dom/EventTargetFactory.in:
        * features.json:

        Add Async Clipboard API as a feature in development on webkit.org.

        * page/Settings.yaml:

2019-10-08  Rob Buis  <rbuis@igalia.com>

        Fetch: data: URL HEAD request should result in empty response body
        https://bugs.webkit.org/show_bug.cgi?id=175764

        Reviewed by Youenn Fablet.

        Do not build the response body for HEAD requests for data urls:
        https://fetch.spec.whatwg.org/#concept-main-fetch (Step 13)

        Tests: imported/web-platform-tests/fetch/api/basic/scheme-data.any.js
               imported/web-platform-tests/xhr/data-uri.html

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::loadDataURL):

2019-10-08  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Implement style invalidation
        https://bugs.webkit.org/show_bug.cgi?id=202632

        Reviewed by Ryosuke Niwa.

        Tests: fast/css/shadow-parts/invalidation-class-descendant-combinator-export.html
               fast/css/shadow-parts/invalidation-class-descendant-combinator.html
               fast/css/shadow-parts/invalidation-class-sibling-combinator-export.html
               fast/css/shadow-parts/invalidation-class-sibling-combinator.html

        * css/RuleFeature.cpp:
        (WebCore::isSiblingOrSubject):

        Don't treat crossing to host as moving to ancestor when computing elements impacted by a selector.
        StyleInvalidator expects these relations to be about the host element, shadow tree invalidation in handled separately.

        * dom/Element.cpp:
        (WebCore::Element::attributeChanged):

        Invalidate parts in shadow tree on 'exportparts' attribute mutation.

        (WebCore::Element::partAttributeChanged):

        Invalidate element on 'part' attribute mutation.

        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::Invalidator):
        (WebCore::Style::Invalidator::invalidateIfNeeded):

        Invalidate parts in shadow tree during class and attribute mutation invalidation.

        (WebCore::Style::Invalidator::invalidateShadowParts):
        * style/StyleInvalidator.h:
        (WebCore::Style::Invalidator::dirtiesAllStyle const):
        (WebCore::Style::Invalidator::hasShadowPseudoElementRulesInAuthorSheet const): Deleted.

        Remove an unncessary bool.

2019-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Remove unused WebKitSoupRequestGeneric after r250597

        * platform/Soup.cmake:
        * platform/SourcesSoup.txt:
        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::updateSoupRequest const):
        * platform/network/soup/WebKitSoupRequestGeneric.cpp: Removed.
        * platform/network/soup/WebKitSoupRequestGeneric.h: Removed.
        * platform/network/soup/WebKitSoupRequestGenericClient.h: Removed.

2019-10-08  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Internal shadow pseudo elements should work with ::part
        https://bugs.webkit.org/show_bug.cgi?id=202620

        Reviewed by Ryosuke Niwa.

        Selectors like ::part(foo)::placeholder should work.

        This involves hop out of a UA shadow tree and then from an author shadow tree.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchAuthorRules):
        (WebCore::ElementRuleCollector::matchPartPseudoElementRules):

        If we are matching a pseudo element in a UA shadow tree, see if part rules can match is the surrounding scope.

        (WebCore::ElementRuleCollector::matchPartPseudoElementRulesForScope):
        * css/ElementRuleCollector.h:
        * css/RuleSet.cpp:
        (WebCore::RuleSet::addRule):

        Sort rules with both internal pseudo element and ::part to the part bucket.

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively const):
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::splitCompoundAtImplicitShadowCrossingCombinator):

        Allow multiple ShadowDescendant relations for ::part.

2019-10-07  Ryosuke Niwa  <rniwa@webkit.org>

        Add IDL for requestIdleCallback
        https://bugs.webkit.org/show_bug.cgi?id=202653

        Reviewed by Geoffrey Garen.

        Added the basic scaffolding for implementing requestIdleCallback disabled by default:
        https://w3c.github.io/requestidlecallback/

        This patch just adds the support for calling requestIdleCallback which generates a monotonically increasing number.
        The callback is never called for now.

        Tests: requestidlecallback/requestidlecallback-enabled.html
               requestidlecallback/requestidlecallback-id.html
               requestidlecallback/requestidlecallback-not-enabled.html

        * CMakeLists.txt:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/Document.cpp:
        (WebCore::Document::requestIdleCallback):
        (WebCore::Document::cancelIdleCallback):
        * dom/Document.h:
        * dom/IdleCallbackController.cpp: Added.
        (WebCore::IdleCallbackController::queueIdleCallback):
        (WebCore::IdleCallbackController::removeIdleCallback):
        * dom/IdleCallbackController.h: Added.
        * dom/IdleDeadline.cpp: Added.
        (WebCore::IdleDeadline::timeRemaining const):
        (WebCore::IdleDeadline::didTimeout const):
        * dom/IdleDeadline.h: Added.
        * dom/IdleDeadline.idl: Added.
        * dom/IdleRequestCallback.h: Added.
        * dom/IdleRequestCallback.idl: Added.
        * dom/IdleRequestOptions.h: Added.
        * dom/IdleRequestOptions.idl: Added.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::requestIdleCallback):
        (WebCore::DOMWindow::cancelIdleCallback):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
        * page/Settings.yaml:

2019-10-07  Jiewen Tan  <jiewen_tan@apple.com>

        Only wrapping CryptoKeys for IDB during serialization
        https://bugs.webkit.org/show_bug.cgi?id=202500
        <rdar://problem/52445927>

        Reviewed by Chris Dumez.

        Wrapping CryptoKeys during IDB serialization is a legacy request from Netflix when WebKit was an
        early adopter. It is not necessary for other kinds of serialization. However, given existing keys
        stored in users' idb are wrapped, the wrapping/unwrapping mechanism cannot be easily discarded.
        Therefore, this patch restricts the wrapping/unwrapping mechanism to idb only.

        To do so, a isWrappingRequired flag is added to CryptoKey such that whenever idb sees a CryptoKey,
        it can set it. SerializedScriptValue will then only wrap a CryptoKey when this flag is set. Otherwise,
        a new tag UnwrappedCryptoKeyTag is used to store unwrapped CryptoKeys in order to keep the old CryptoKeyTag
        binaries intact. For deserialization, each type will be deserialized differently.

        Besides the above, this patch also hardens WorkerGlobalScope::wrapCryptoKey/unwrapCryptoKey for
        any potential racy issues. CryptoBooleanContainer is introduced to capture boolean in the lambda.
        workerGlobalScope is replaced with workerMessagingProxy. Now, every variables captured in the lambdas
        should be either a copy or a thread safe ref of the original object.

        Test: crypto/workers/subtle/aes-indexeddb.html

        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::JSC::setIsWrappingRequiredForCryptoKey):
        (WebCore::IDBObjectStore::putOrAdd):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::dumpIfTerminal):
        (WebCore::CloneDeserializer::readTerminal):
        * crypto/CryptoKey.h:
        (WebCore::CryptoKey::isWrappingRequired const):
        (WebCore::CryptoKey::setIsWrappingRequired):
        * dom/ScriptExecutionContext.h:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::CryptoBooleanContainer::create):
        (WebCore::CryptoBooleanContainer::boolean const):
        (WebCore::CryptoBooleanContainer::setBoolean):
        (WebCore::WorkerGlobalScope::wrapCryptoKey):
        (WebCore::WorkerGlobalScope::unwrapCryptoKey):
        * workers/WorkerGlobalScope.h:
        * workers/WorkerLoaderProxy.h:
        (WebCore::WorkerLoaderProxy::isWorkerMessagingProxy const):
        * workers/WorkerMessagingProxy.h:
        (isType):

2019-10-07  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, build fix for Windows
        https://bugs.webkit.org/show_bug.cgi?id=202569

        * bindings/js/JSHTMLElementCustom.cpp:
        (WebCore::constructJSHTMLElement):
        * bindings/js/JSWebAnimationCustom.cpp:
        (WebCore::constructJSWebAnimation):

2019-10-07  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Change signature of HostFunction to (JSGlobalObject*, CallFrame*)
        https://bugs.webkit.org/show_bug.cgi?id=202569

        Reviewed by Saam Barati.

        No behavior change.

        While signature is changed, we still use `state` name for CallFrame* variable since changing this involves massive channge in
        CodeGeneratorJS.pm. When replacing `ExecState*` to `JSGlobalObject*`, we just remove these `state` variable and use `globalObject`
        instead.

        * Modules/applepay/ApplePaySession.h:
        * Modules/applepay/PaymentMerchantSession.h:
        * Modules/fetch/FetchResponse.h:
        * Modules/indexeddb/IDBFactory.h:
        * Modules/indexeddb/IDBIndex.h:
        * Modules/indexeddb/IDBKeyRange.h:
        * Modules/indexeddb/IDBObjectStore.h:
        * Modules/indexeddb/server/IDBSerializationContext.h:
        * bindings/js/IDBBindingUtilities.h:
        * bindings/js/JSDOMBindingSecurity.h:
        * bindings/js/JSDOMBuiltinConstructor.h:
        (WebCore::JSDOMBuiltinConstructor<JSClass>::construct):
        * bindings/js/JSDOMConstructor.h:
        * bindings/js/JSDOMConstructorBase.cpp:
        (WebCore::callThrowTypeError):
        * bindings/js/JSDOMConstructorNotConstructable.h:
        (WebCore::JSDOMConstructorNotConstructable::callThrowTypeError):
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::makeThisTypeErrorForBuiltins):
        (WebCore::makeGetterTypeErrorForBuiltins):
        (WebCore::isReadableByteStreamAPIEnabled):
        * bindings/js/JSDOMIterator.h:
        (WebCore::IteratorTraits>::next):
        * bindings/js/JSDOMNamedConstructor.h:
        * bindings/js/JSDOMPromise.cpp:
        (WebCore::DOMPromise::whenPromiseIsSettled):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
        * bindings/js/JSExtendableMessageEventCustom.cpp:
        (WebCore::constructJSExtendableMessageEvent):
        * bindings/js/JSHTMLElementCustom.cpp:
        (WebCore::constructJSHTMLElement):
        * bindings/js/JSPluginElementFunctions.cpp:
        (WebCore::callPlugin):
        * bindings/js/JSWebAnimationCustom.cpp:
        (WebCore::constructJSWebAnimation):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::setupModuleScriptHandlers):
        * bindings/js/ScriptController.h:
        * bindings/js/ScriptModuleLoader.h:
        * bindings/js/ScriptState.h:
        * bindings/js/StructuredClone.cpp:
        (WebCore::cloneArrayBufferImpl):
        (WebCore::cloneArrayBuffer):
        (WebCore::structuredCloneArrayBuffer):
        (WebCore::structuredCloneArrayBufferView):
        * bindings/js/StructuredClone.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        (GenerateOperationTrampolineDefinition):
        (GenerateSerializerDefinition):
        (GenerateLegacyCallerDefinitions):
        (GenerateLegacyCallerDefinition):
        (GenerateIterableDefinition):
        (GenerateConstructorDefinitions):
        (GenerateConstructorDefinition):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::jsMapLikePrototypeFunctionGet):
        (WebCore::jsMapLikePrototypeFunctionHas):
        (WebCore::jsMapLikePrototypeFunctionEntries):
        (WebCore::jsMapLikePrototypeFunctionKeys):
        (WebCore::jsMapLikePrototypeFunctionValues):
        (WebCore::jsMapLikePrototypeFunctionForEach):
        (WebCore::jsMapLikePrototypeFunctionAdd):
        (WebCore::jsMapLikePrototypeFunctionClear):
        (WebCore::jsMapLikePrototypeFunctionDelete):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::jsReadOnlyMapLikePrototypeFunctionGet):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionHas):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionEntries):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionKeys):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionValues):
        (WebCore::jsReadOnlyMapLikePrototypeFunctionForEach):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
        (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactions):
        (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsNotNeeded):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::jsTestCEReactionsStringifierPrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterface):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecified):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArguments):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableVariantArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithOptionalVariantArgument):
        (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithDefaultVariantArgument):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttribute):
        (WebCore::jsTestDOMJITPrototypeFunctionItem):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttribute):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementById):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByName):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::jsTestEnabledBySettingPrototypeFunctionEnabledBySettingOperation):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::JSTestEventConstructorConstructor::construct):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::jsTestEventTargetPrototypeFunctionItem):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
        (WebCore::jsTestGlobalObjectConstructorFunctionEnabledAtRuntimeOperationStatic):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorld):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabled):
        (WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldWhenRuntimeFeaturesEnabled):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
        (WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
        (WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBoolean):
        (WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBoolean):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::jsTestIndexedSetterWithIdentifierPrototypeFunctionIndexedSetter):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::construct):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
        (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
        (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
        (WebCore::jsTestInterfacePrototypeFunctionTakeNodes):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
        (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
        (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::jsTestIterablePrototypeFunctionEntries):
        (WebCore::jsTestIterablePrototypeFunctionKeys):
        (WebCore::jsTestIterablePrototypeFunctionValues):
        (WebCore::jsTestIterablePrototypeFunctionForEach):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionNamedSetter):
        (WebCore::jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunctionIndexedSetter):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorNamedConstructor::construct):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::jsTestNamedDeleterWithIdentifierPrototypeFunctionNamedDeleter):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::jsTestNamedGetterWithIdentifierPrototypeFunctionGetterName):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::jsTestNamedSetterWithIdentifierPrototypeFunctionNamedSetter):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionNamedSetter):
        (WebCore::jsTestNamedSetterWithIndexedGetterPrototypeFunctionIndexedSetter):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionNamedSetter):
        (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunctionIndexedSetter):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesInstanceFunctionUnforgeableOperation):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsInstanceFunctionUnforgeableOperation):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNodeConstructor::construct):
        (WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
        (WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
        (WebCore::jsTestNodePrototypeFunctionGetSecretBoolean):
        (WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBoolean):
        (WebCore::jsTestNodePrototypeFunctionEntries):
        (WebCore::jsTestNodePrototypeFunctionKeys):
        (WebCore::jsTestNodePrototypeFunctionValues):
        (WebCore::jsTestNodePrototypeFunctionForEach):
        (WebCore::jsTestNodePrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::JSTestObjConstructor::construct):
        (WebCore::callJSTestObj1):
        (WebCore::callJSTestObj2):
        (WebCore::callJSTestObj3):
        (WebCore::callJSTestObj):
        (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation):
        (WebCore::jsTestObjConstructorFunctionEnabledAtRuntimeOperationStatic):
        (WebCore::jsTestObjPrototypeFunctionEnabledInSpecificWorldWhenRuntimeFeatureEnabled):
        (WebCore::jsTestObjPrototypeFunctionWorldSpecificMethod):
        (WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
        (WebCore::jsTestObjPrototypeFunctionGetSecretBoolean):
        (WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBoolean):
        (WebCore::jsTestObjPrototypeFunctionVoidMethod):
        (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionByteMethod):
        (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionOctetMethod):
        (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionLongMethod):
        (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionObjMethod):
        (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
        (WebCore::jsTestObjInstanceFunctionUnforgeableMethod):
        (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
        (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
        (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
        (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNullableByteStringArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithByteStringArgTreatingNullAsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionSerializedValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithRecord):
        (WebCore::jsTestObjPrototypeFunctionMethodWithException):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningLong):
        (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionReturningObject):
        (WebCore::jsTestObjPrototypeFunctionCustomMethod):
        (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
        (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
        (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod):
        (WebCore::jsTestObjPrototypeFunctionAddEventListener):
        (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateVoid):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObj):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidException):
        (WebCore::jsTestObjPrototypeFunctionWithExecStateObjException):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecState):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjException):
        (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpaces):
        (WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
        (WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgument):
        (WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgument):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValue):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNull):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyString):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLong):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequence):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBoolean):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAny):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalObject):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecord):
        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromise):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
        (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions):
        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion):
        (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter):
        (WebCore::jsTestObjConstructorFunctionClassMethod):
        (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
        (WebCore::jsTestObjConstructorFunctionClassMethod2):
        (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptional):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange):
        (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional):
        (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
        (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
        (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
        (WebCore::jsTestObjPrototypeFunctionOperationWithOptionalUnionParameter):
        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
        (WebCore::jsTestObjPrototypeFunctionGetElementById):
        (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
        (WebCore::jsTestObjPrototypeFunctionConvert1):
        (WebCore::jsTestObjPrototypeFunctionConvert2):
        (WebCore::jsTestObjPrototypeFunctionConvert3):
        (WebCore::jsTestObjPrototypeFunctionConvert4):
        (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
        (WebCore::jsTestObjPrototypeFunctionOrange):
        (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
        (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
        (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
        (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethod):
        (WebCore::jsTestObjPrototypeFunctionAny):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
        (WebCore::jsTestObjPrototypeFunctionTestCustomPromiseFunction):
        (WebCore::jsTestObjConstructorFunctionTestStaticCustomPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestCustomReturnsOwnPromiseFunction):
        (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunction):
        (WebCore::jsTestObjPrototypeFunctionConditionalOverload):
        (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload):
        (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot):
        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter):
        (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
        (WebCore::jsTestObjPrototypeFunctionLegacyCallerNamed):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimization):
        (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithException):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowFunction):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWorkerFunction):
        (WebCore::jsTestObjPrototypeFunctionConditionallyExposedToWindowAndWorkerFunction):
        (WebCore::jsTestObjPrototypeFunctionToString):
        (WebCore::jsTestObjPrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::constructJSTestOverloadedConstructors1):
        (WebCore::constructJSTestOverloadedConstructors2):
        (WebCore::constructJSTestOverloadedConstructors3):
        (WebCore::constructJSTestOverloadedConstructors4):
        (WebCore::constructJSTestOverloadedConstructors5):
        (WebCore::JSTestOverloadedConstructorsConstructor::construct):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
        (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
        (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::construct):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::JSTestPromiseRejectionEventConstructor::construct):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::jsTestSerializationPrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::jsTestSerializationInheritPrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::jsTestSerializationInheritFinalPrototypeFunctionToJSON):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunction):
        (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionFunctionReturning):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::jsTestStringifierPrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::jsTestStringifierAnonymousOperationPrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionIdentifier):
        (WebCore::jsTestStringifierNamedOperationPrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionIdentifier):
        (WebCore::jsTestStringifierOperationImplementedAsPrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::jsTestStringifierOperationNamedToStringPrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::jsTestStringifierReadOnlyAttributePrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::jsTestStringifierReadWriteAttributePrototypeFunctionToString):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::construct):
        (WebCore::jsTestTypedefsPrototypeFunctionFunc):
        (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg):
        (WebCore::jsTestTypedefsPrototypeFunctionSequenceOfNullablesArg):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfNullablesArg):
        (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg):
        (WebCore::jsTestTypedefsPrototypeFunctionUnionArg):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
        (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef):
        (WebCore::jsTestTypedefsPrototypeFunctionPointFunction):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction):
        (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2):
        (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
        (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
        * bridge/c/c_utility.h:
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::callObjCFallbackObject):
        * bridge/runtime_method.cpp:
        (JSC::callRuntimeMethod):
        * bridge/runtime_object.cpp:
        (JSC::Bindings::callRuntimeObject):
        (JSC::Bindings::callRuntimeConstructor):
        * crypto/SubtleCrypto.h:
        * css/CSSFontFace.h:
        * dom/CustomElementReactionQueue.h:
        * dom/Document.h:
        * dom/MessagePort.h:
        * dom/MouseEvent.h:
        * dom/ScriptExecutionContext.h:
        * html/HTMLFrameElementBase.h:
        * html/canvas/WebGLAny.h:
        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/page/PageRuntimeAgent.h:
        * page/DOMWindow.h:
        * page/PageConsoleClient.h:
        * page/RemoteDOMWindow.h:
        * page/csp/ContentSecurityPolicy.h:
        * platform/ThreadGlobalData.h:
        * plugins/PluginViewBase.h:
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/Worker.h:
        * workers/WorkerConsoleClient.h:
        * workers/service/ExtendableMessageEvent.h:
        * worklets/WorkletConsoleClient.h:

2019-10-07  Sihui Liu  <sihui_liu@apple.com>

        ASSERTION FAILED: m_transactionOperationsInProgressQueue.first() == &operation in IDBTransaction::operationCompletedOnClient
        https://bugs.webkit.org/show_bug.cgi?id=202552

        Reviewed by Alex Christensen.

        Dispatch task to database thread even if there is QuotaExceededError, to make sure request results are sent in 
        order.

        Modified existing test to cover this: storage/indexeddb/storage-limit.html. Test would hit this assertion 
        without fix.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::requestSpace):
        (WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck):
        (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::getCount):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-10-07  Keith Rollin  <krollin@apple.com>

        Unreviewed, build fix after r250666. Fix 32- vs. 64-bit mismatch on
        32-bit builds.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::estimateSize):

2019-10-07  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed WinCairo build fix for r250786.

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::addAll):

2019-10-07  Tim Horton  <timothy_horton@apple.com>

        Fix the Windows build

        * html/ImageBitmap.h:

2019-10-07  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed WinCairo build fix for r250758.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

2019-10-07  Ryosuke Niwa  <rniwa@webkit.org>

        focus pseudo class should match a shadow host whose shadow tree contains the focused element
        https://bugs.webkit.org/show_bug.cgi?id=202432

        Reviewed by Antti Koivisto.

        Note that focus pseudo class does not match a shadow host when its shadow tree contains a slot element
        with a focused element or its ancestor assigned since such a shadow host has the actual focused element
        in the same tree as the shadow host. (e.g. the focused element can be a direct child of the host).

        In order to preserve the behavior of focus ring, which should be only drawn on the currently focused
        element and not any shadow host which contains such an element, this patch introduces a new pseudo class,
        -webkit-direct-focus, which is only available in the user agent stylesheet. Putting :host(:focus) rule
        isn't sufficient because style rules inside shadow trees always has a lower precendence than rules
        outside the shadow tree (the tree of its shadow host).

        [1] Also see https://github.com/whatwg/html/pull/4731

        Tests: fast/shadow-dom/direct-focus-pseudo-does-not-match-in-author-stylesheet.html
               fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html
               fast/shadow-dom/focus-pseudo-on-shadow-host-1.html
               fast/shadow-dom/focus-pseudo-on-shadow-host-2.html
               fast/shadow-dom/focus-pseudo-on-shadow-host-3.html

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const): Added the support for -webkit-direct-focus.
        * css/CSSSelector.h:
        * css/RuleSet.cpp:
        (WebCore::RuleSet::addRule): Ditto.
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):: Ditto.
        (WebCore::doesShadowTreeContainFocusedElement):: Ditto.
        (WebCore::SelectorChecker::matchesFocusPseudoClass): Implemented the new behavior.
        (WebCore::SelectorChecker::matchesDirectFocusPseudoClass): Added. Implements the old behavior for
        the focus ring via -webkit-direct-focus pseudo class.
        * css/SelectorChecker.h:
        * css/SelectorPseudoClassAndCompatibilityElementMap.in: Added -webkit-direct-focus.
        * css/html.css: Use -webkit-direct-focus pseudo class to preserve the existing behavior of focus ring.
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumePseudo): Ignore -webkit-direct-focus in author and user stylesheets.
        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType): Added the support for -webkit-direct-focus.
        * dom/Element.cpp:
        (WebCore::Element::setFocus): Invoke setContainsFocusedElement on each shadow ancestor root of
        the newly focused element. Note that we can't use :focus-within pseudo class since that would also match
        the host of a shadow root which contains a slotted focused element, causing both the shadow host and
        the slotted element to match :focus pseudo class in the host's tree.
        * dom/ShadowRoot.h:

2019-10-07  Rob Buis  <rbuis@igalia.com>

        Change Response's statusText's default
        https://bugs.webkit.org/show_bug.cgi?id=191879

        Reviewed by Youenn Fablet.

        Change Response's statusText's default to "".

        Tests: web-platform-tests/fetch/api/response/response-clone.html
               web-platform-tests/fetch/api/response/response-init-001.html

        * Modules/fetch/FetchResponse.h:
        * Modules/fetch/FetchResponse.idl:

2019-10-07  Chris Dumez  <cdumez@apple.com>

        DOMCache should not prevent pages from entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202590

        Reviewed by Youenn Fablet.

        Allow DOMCache to suspend in the back/forward cache unconditionally, by
        appending all promise resolutions to a SuspendableTaskQueue. This guarantees
        that any asynchronous promise resolution is delayed while in the page cache,
        until the page gets resumed.

        Test: http/tests/navigation/page-cache-domcache-pending-promise.html

        * Modules/cache/DOMCache.cpp:
        (WebCore::DOMCache::DOMCache):
        (WebCore::DOMCache::match):
        (WebCore::DOMCache::matchAll):
        (WebCore::DOMCache::addAll):
        (WebCore::DOMCache::putWithResponseData):
        (WebCore::DOMCache::put):
        (WebCore::DOMCache::remove):
        (WebCore::DOMCache::keys):
        (WebCore::DOMCache::canSuspendForDocumentSuspension const):
        * Modules/cache/DOMCache.h:

2019-10-07  Chris Dumez  <cdumez@apple.com>

        PendingImageBitmap should not prevent entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202585

        Reviewed by Tim Horton.

        Add PageCache support to PendingImageBitmap by doing the promise resolution on a
        SuspendableTimer (which properly gets paused while in PageCache).

        Test: fast/history/page-cache-createImageBitmap.html

        * html/ImageBitmap.cpp:

2019-10-07  Dirk Schulze  <krit@webkit.org>

        clip-path: <geometry-box> mapping incorrect
        https://bugs.webkit.org/show_bug.cgi?id=202075

        Reviewed by Simon Fraser.

        For HTML elements:
        - stroke-box, view-box consistently compute to border-box
        - fill-box computes to content-box

        Tests: css3/masking/clip-path-border-radius-fill-box-001.html
               css3/masking/clip-path-border-radius-stroke-box-000.html
               css3/masking/clip-path-border-radius-view-box-000.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::nodeAtPoint):
        * rendering/shapes/BoxShape.cpp:
        (WebCore::computeRoundedRectForBoxShape):

2019-10-07  Tim Horton  <timothy_horton@apple.com>

        Fix the Windows build

        * html/ImageBitmap.h:

2019-10-07  Zalan Bujtas  <zalan@apple.com>

        [LFC] Add const version of LayoutState::displayBoxForLayoutBox
        https://bugs.webkit.org/show_bug.cgi?id=202623
        <rdar://problem/56025259>

        Reviewed by Antti Koivisto.

        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox):
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox const):
        * layout/LayoutState.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputLayoutTree):

2019-10-07  youenn fablet  <youenn@apple.com>

        [iOS] Unmuting capture of a page is not working
        https://bugs.webkit.org/show_bug.cgi?id=202627

        Reviewed by Eric Carlson.

        Before the patch, we were muting the capture tracks but never unmuting them.
        The patch updates the code to make sure we unmute capture tracks based on the document state.
        In addition, the iOS code wass process-wide while capture might happen between two documents in the same process.
        The patch updates the capturestate computation and muting logic to be Document based.
        A follow-up refactoring will merge back iOS and MacOS code paths.
        Covered by API test.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::captureState):
        (WebCore::MediaStreamTrack::updateCaptureAccordingMutedState):
        (WebCore::MediaStreamTrack::muteCapture): Deleted.
        * Modules/mediastream/MediaStreamTrack.h:
        * dom/Document.cpp:
        (WebCore::Document::updateIsPlayingMedia):
        (WebCore::Document::pageMutedStateDidChange):

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

        attachShadow should support attaching a shadow root to a main element
        https://bugs.webkit.org/show_bug.cgi?id=197726

        Reviewed by Antti Koivisto.

        Added main element to the list of elements that support an author shadow root.

        Test: fast/shadow-dom/attach-shadow-to-elements.html

        * dom/Element.cpp:
        (WebCore::canAttachAuthorShadowRoot):

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

        [LFC][Painting] Introduce Display::Painter
        https://bugs.webkit.org/show_bug.cgi?id=202614
        <rdar://problem/56010347>

        Reviewed by Antti Koivisto.

        Display::Painter is responsible for rendering the nodes in the display tree. Testing purposes/WK1 only at this point.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/LayoutContext.cpp:
        (WebCore::Layout::initializeLayoutState):
        (WebCore::Layout::LayoutContext::runLayout):
        (WebCore::Layout::LayoutContext::runLayoutAndVerify):
        (WebCore::Layout::LayoutContext::runLayoutAndPaint):
        (WebCore::Layout::LayoutContext::run): Deleted.
        * layout/LayoutContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::LayoutState):
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::root const):
        * layout/Verification.cpp:
        (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
        * layout/displaytree/DisplayPainter.cpp: Added.
        (WebCore::Display::Painter::paint):
        * layout/displaytree/DisplayPainter.h: Added.
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        Node::ref/deref should be const
        https://bugs.webkit.org/show_bug.cgi?id=202562

        Reviewed by Ryosuke Niwa.

        This enables RefPtr<const Element> and matches RefCounted.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::collectMatchingRules):
        (WebCore::ElementRuleCollector::matchAuthorRules):
        (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
        (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
        (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
        (WebCore::ElementRuleCollector::matchPartPseudoElementRules):
        (WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules):
        (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
        (WebCore::ElementRuleCollector::matchUARules):
        (WebCore::ElementRuleCollector::ruleMatches):
        (WebCore::ElementRuleCollector::matchAllRules):

        Use it to ref elements in ElementRuleCollector.

        * css/ElementRuleCollector.h:
        (WebCore::ElementRuleCollector::element const):
        * dom/Node.h:
        (WebCore::Node::ref const):
        (WebCore::Node::deref const):
        (WebCore::Node::ref): Deleted.
        (WebCore::Node::deref): Deleted.

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

        [LFC] LayoutChildtIteratorAdapter -> LayoutChildIteratorAdapter
        https://bugs.webkit.org/show_bug.cgi?id=202612
        <rdar://problem/56007611>

        Reviewed by Anders Carlsson.

        * layout/layouttree/LayoutChildIterator.h:
        (WebCore::Layout::LayoutChildIterator<T>::LayoutChildIterator):
        (WebCore::Layout::LayoutChildIterator<T>::operator):
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::LayoutChildIteratorAdapter):
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::begin const):
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::end const):
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::first const):
        (WebCore::Layout::LayoutChildIteratorAdapter<T>::last const):
        (WebCore::Layout::childrenOfType):
        (WebCore::Layout::LayoutChildtIterator<T>::LayoutChildtIterator): Deleted.
        (WebCore::Layout::LayoutChildtIterator<T>::operator): Deleted.
        (WebCore::Layout::LayoutChildtIteratorAdapter<T>::LayoutChildtIteratorAdapter): Deleted.
        (WebCore::Layout::LayoutChildtIteratorAdapter<T>::begin const): Deleted.
        (WebCore::Layout::LayoutChildtIteratorAdapter<T>::end const): Deleted.
        (WebCore::Layout::LayoutChildtIteratorAdapter<T>::first const): Deleted.
        (WebCore::Layout::LayoutChildtIteratorAdapter<T>::last const): Deleted.

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

        [LFC] Remove redundant includes.
        https://bugs.webkit.org/show_bug.cgi?id=202610
        <rdar://problem/56003250>

        Reviewed by Tim Horton.

        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        * layout/FormattingContextQuirks.cpp:
        * layout/FormattingState.h:
        * layout/LayoutContext.h:
        * layout/LayoutState.h:
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingState.cpp:
        * layout/blockformatting/BlockFormattingState.h:
        * layout/blockformatting/BlockInvalidation.h:
        * layout/displaytree/DisplayRect.h:
        * layout/displaytree/DisplayRun.h:
        * layout/floats/FloatAvoider.cpp:
        * layout/floats/FloatAvoider.h:
        * layout/floats/FloatBox.h:
        * layout/floats/FloatingContext.cpp:
        * layout/floats/FloatingContext.h:
        * layout/floats/FloatingState.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        * layout/inlineformatting/InlineInvalidation.h:
        * layout/inlineformatting/InlineLine.h:
        * layout/inlineformatting/InlineLineBreaker.cpp:
        * layout/inlineformatting/InlineLineLayout.cpp:
        * layout/layouttree/LayoutBox.h:
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableFormattingContextGeometry.cpp:
        * layout/tableformatting/TableGrid.h:
        * layout/tableformatting/TableInvalidation.h:

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

        Change "InvalidStateError" to "NotSupportedError" for attachShadow()
        https://bugs.webkit.org/show_bug.cgi?id=197948

        Reviewed by Wenson Hsieh.

        Match the latest spec. See https://github.com/whatwg/dom/pull/761

        * dom/Element.cpp:
        (WebCore::Element::attachShadow): Throw NotSupportedError when there is already a shadow tree.

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

        Allow pages using EventSource to enter the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202370
        <rdar://problem/55853142>

        Reviewed by Geoffrey Garen.

        Allow pages using EventSource to enter the back/forward cache. If the EventSource is
        connecting at the time it enters PageCache, it will resume connecting after restoring
        from PageCache (by making m_connectTimer a SuspendableTimer, which is PageCache-aware).
        If the EventSource is was open upon navigating, it gets closed upon navigating (since
        all pending loads get cancelled on navigation). To help the page recover, we fire an
        error event and attempt to reconnect automatically when restoring the page from page
        cache. It is allowed by the specification to attempt reconnection in case of non-fatal
        network errors.

        Tests: http/tests/eventsource/eventsource-page-cache-connected.html
               http/tests/eventsource/eventsource-page-cache-connecting.html

        * page/EventSource.cpp:
        (WebCore::EventSource::EventSource):
        (WebCore::EventSource::scheduleReconnect):
        (WebCore::EventSource::close):
        (WebCore::EventSource::didReceiveResponse):
        (WebCore::EventSource::dispatchErrorEvent):
        (WebCore::EventSource::didReceiveData):
        (WebCore::EventSource::didFinishLoading):
        (WebCore::EventSource::didFail):
        (WebCore::EventSource::abortConnectionAttempt):
        (WebCore::EventSource::doExplicitLoadCancellation):
        (WebCore::EventSource::canSuspendForDocumentSuspension const):
        (WebCore::EventSource::suspend):
        (WebCore::EventSource::resume):
        (WebCore::EventSource::dispatchMessageEvent):
        * page/EventSource.h:

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

        ServiceWorkerContainer should never prevent a page from entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202603

        Reviewed by Geoff Garen.

        Make it so that ServiceWorkerContainer can suspend, even if they have pending promises.
        We now queue all promise resolutions to a SuspendableTaskQueue to make sure that those
        promises do not get resolved while in the page cache.

        Test: http/tests/workers/service/page-cache-service-worker-pending-promise.https.html

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        (WebCore::ServiceWorkerContainer::ready):
        (WebCore::ServiceWorkerContainer::getRegistration):
        (WebCore::ServiceWorkerContainer::getRegistrations):
        (WebCore::ServiceWorkerContainer::jobFailedWithException):
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
        (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
        (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
        (WebCore::ServiceWorkerContainer::canSuspendForDocumentSuspension const):
        * workers/service/ServiceWorkerContainer.h:

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

        Allow pages using IDBIndex to enter the PageCache
        https://bugs.webkit.org/show_bug.cgi?id=202430
        <rdar://problem/55887918>

        Reviewed by Geoffrey Garen.

        There is no reason to prevent PageCaching when an IDBIndex object is alive.
        No events are fired by IDBIndex and its API returns IDBRequest objects, which
        are already PageCache-aware.

        I have seen Yahoo.com failing to enter the back/forward cache because of this.

        No new tests, updated existing test.

        * Modules/indexeddb/IDBIndex.cpp:
        (WebCore::IDBIndex::canSuspendForDocumentSuspension const):

2019-10-04  Heiko Becker  <heirecka@exherbo.org>

        Fix build with icu 65.1
        https://bugs.webkit.org/show_bug.cgi?id=202600

        Reviewed by Konstantin Tokarev.

        * dom/Document.cpp:
        (WebCore::isValidNameNonASCII):
        (WebCore::Document::parseQualifiedName):

2019-10-04  James Darpinian  <jdarpinian@chromium.org>

        Allow using WebGL 2 when USE_ANGLE=1
        https://bugs.webkit.org/show_bug.cgi?id=202593

        Reviewed by Alex Christensen.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::create):
            Disable irrelevant extension check.
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
            Use ES3 ANGLE context when WebGL 2 is requested.

2019-10-04  Alex Christensen  <achristensen@webkit.org>

        Stop sending list of display-isolated schemes to NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=202557

        Reviewed by Youenn Fablet.

        They are only ever used in the WebProcess in SecurityOrigin::canDisplay.
        If someone adds code that uses them in the NetworkProcess, they will hit my new assertion.

        No change in behavior.

        * page/SecurityOrigin.cpp:
        (WebCore::SecurityOrigin::canDisplay const):
        * platform/RuntimeApplicationChecks.h:
        (WebCore::isInNetworkProcess):
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::isInNetworkProcess):

2019-10-04  Alex Christensen  <achristensen@webkit.org>

        Rename SchemeRegistry to LegacySchemeRegistry
        https://bugs.webkit.org/show_bug.cgi?id=202586

        Reviewed by Tim Horton.

        SchemeRegistry is process-global.  We need to replace it with a non-process-global registry, but Rome wasn't built in a day.
        This rename allows me to call the replacement object that will have ownership and configuration "SchemeRegistry"
        and it also indicates that new development should use the owned object instead of the global object.

        * Headers.cmake:
        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::isSecure):
        * Modules/mediastream/UserMediaRequest.cpp:
        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinatorInternal::processAppIdExtension):
        * Modules/webdatabase/DatabaseContext.cpp:
        (WebCore::DatabaseContext::allowDatabaseAccess const):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::setDomain):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::hasServiceWorkerScheme const):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
        (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
        * loader/CrossOriginAccessControl.cpp:
        (WebCore::isValidCrossOriginRedirectionURL):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::matchRegistration):
        (WebCore::DocumentLoader::disallowWebArchive const):
        (WebCore::DocumentLoader::commitData):
        (WebCore::DocumentLoader::maybeLoadEmpty):
        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
        (WebCore::DocumentThreadableLoader::checkURLSchemeAsCORSEnabled):
        * loader/archive/mhtml/MHTMLArchive.cpp:
        (WebCore::MHTMLArchive::create):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::freshnessLifetime const):
        * page/Page.cpp:
        (WebCore::Page::userStyleSheetLocationChanged):
        * page/SecurityOrigin.cpp:
        (WebCore::shouldTreatAsUniqueOrigin):
        (WebCore::shouldTreatAsPotentiallyTrustworthy):
        (WebCore::SecurityOrigin::SecurityOrigin):
        (WebCore::SecurityOrigin::isSecure):
        (WebCore::SecurityOrigin::canDisplay const):
        (WebCore::SecurityOrigin::domainForCachePartition const):
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::allowObjectFromSource const):
        (WebCore::ContentSecurityPolicy::allowChildFrameFromSource const):
        (WebCore::ContentSecurityPolicy::allowResourceFromSource const):
        (WebCore::ContentSecurityPolicy::allowConnectToSource const):
        (WebCore::ContentSecurityPolicy::allowBaseURI const):
        * platform/LegacySchemeRegistry.cpp: Copied from Source/WebCore/platform/SchemeRegistry.cpp.
        (WebCore::allBuiltinSchemes):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsLocal):
        (WebCore::LegacySchemeRegistry::removeURLSchemeRegisteredAsLocal):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsLocal):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsNoAccess):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsNoAccess):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsDisplayIsolated):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsSecure):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsSecure):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsEmptyDocument):
        (WebCore::LegacySchemeRegistry::shouldLoadURLSchemeAsEmptyDocument):
        (WebCore::LegacySchemeRegistry::setDomainRelaxationForbiddenForURLScheme):
        (WebCore::LegacySchemeRegistry::isDomainRelaxationForbiddenForURLScheme):
        (WebCore::LegacySchemeRegistry::canDisplayOnlyIfCanRequest):
        (WebCore::LegacySchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing):
        (WebCore::LegacySchemeRegistry::allowsDatabaseAccessInPrivateBrowsing):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled):
        (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy):
        (WebCore::LegacySchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy):
        (WebCore::LegacySchemeRegistry::schemeShouldBypassContentSecurityPolicy):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
        (WebCore::LegacySchemeRegistry::shouldAlwaysRevalidateURLScheme):
        (WebCore::LegacySchemeRegistry::registerURLSchemeAsCachePartitioned):
        (WebCore::LegacySchemeRegistry::shouldPartitionCacheForURLScheme):
        (WebCore::LegacySchemeRegistry::registerURLSchemeServiceWorkersCanHandle):
        (WebCore::LegacySchemeRegistry::canServiceWorkersHandleURLScheme):
        (WebCore::LegacySchemeRegistry::isServiceWorkerContainerCustomScheme):
        (WebCore::LegacySchemeRegistry::isUserExtensionScheme):
        (WebCore::LegacySchemeRegistry::isBuiltinScheme):
        (WebCore::SchemeRegistry::registerURLSchemeAsLocal): Deleted.
        (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal): Deleted.
        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsNoAccess): Deleted.
        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNoAccess): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsDisplayIsolated): Deleted.
        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsSecure): Deleted.
        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsEmptyDocument): Deleted.
        (WebCore::SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument): Deleted.
        (WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme): Deleted.
        (WebCore::SchemeRegistry::isDomainRelaxationForbiddenForURLScheme): Deleted.
        (WebCore::SchemeRegistry::canDisplayOnlyIfCanRequest): Deleted.
        (WebCore::SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): Deleted.
        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing): Deleted.
        (WebCore::SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsCORSEnabled): Deleted.
        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy): Deleted.
        (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy): Deleted.
        (WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated): Deleted.
        (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned): Deleted.
        (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle): Deleted.
        (WebCore::SchemeRegistry::canServiceWorkersHandleURLScheme): Deleted.
        (WebCore::SchemeRegistry::isServiceWorkerContainerCustomScheme): Deleted.
        (WebCore::SchemeRegistry::isUserExtensionScheme): Deleted.
        (WebCore::SchemeRegistry::isBuiltinScheme): Deleted.
        * platform/LegacySchemeRegistry.h: Copied from Source/WebCore/platform/SchemeRegistry.h.
        * platform/SchemeRegistry.cpp: Removed.
        * platform/SchemeRegistry.h: Removed.
        * platform/ios/QuickLook.mm:
        * storage/Storage.cpp:
        * testing/Internals.cpp:
        (WebCore::Internals::registerURLSchemeAsBypassingContentSecurityPolicy):
        (WebCore::Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy):
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::addRegistration):
        * workers/service/ServiceWorkerProvider.cpp:
        (WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::runRegisterJob):

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

        Crash in debug build with imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html
        https://bugs.webkit.org/show_bug.cgi?id=202583

        Reviewed by Dean Jackson.

        Ensure we remove the animation from the timeline it's currently associated with since it may have changed since its creation. This caused
        a crash because we have an assertion in AnimationTimeline::removeAnimation() to check that the animation belonged to the timeline it's called on.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::removeReplacedAnimations):

2019-10-04  Tim Horton  <timothy_horton@apple.com>

        Clean up some includes to make the build a bit faster: DOMPromise
        https://bugs.webkit.org/show_bug.cgi?id=202570

        Reviewed by Chris Dumez.

        No new tests, just reorganizing.

        Apply some profile-guided optimizations to our headers.

        Get JSDOMPromiseDeferred.h and DOMPromiseProxy.h out of WebCore headers.
        One remains (FetchBodyConsumer.h); I leave it as an exercise to the reader.
        In my testing, this is worth a reliable 5-6% on the WebCore Build Benchmark.

        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
        * Modules/encryptedmedia/MediaKeySession.cpp:
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
        * Modules/encryptedmedia/MediaKeySystemAccess.h:
        * Modules/encryptedmedia/MediaKeys.cpp:
        * Modules/encryptedmedia/MediaKeys.h:
        * Modules/encryptedmedia/NavigatorEME.cpp:
        * Modules/encryptedmedia/NavigatorEME.h:
        * Modules/fetch/DOMWindowFetch.cpp:
        * Modules/fetch/DOMWindowFetch.h:
        * Modules/fetch/FetchBody.cpp:
        * Modules/fetch/FetchBody.h:
        * Modules/fetch/FetchLoader.cpp:
        * Modules/fetch/FetchLoader.h:
        * Modules/fetch/WorkerGlobalScopeFetch.cpp:
        * Modules/fetch/WorkerGlobalScopeFetch.h:
        * Modules/mediacapabilities/MediaCapabilities.cpp:
        * Modules/mediacapabilities/MediaCapabilities.h:
        * Modules/mediastream/MediaDevices.cpp:
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/mediastream/PeerConnectionBackend.cpp:
        * Modules/mediastream/PeerConnectionBackend.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        * Modules/mediastream/RTCRtpReceiver.h:
        * Modules/mediastream/RTCRtpSenderBackend.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        * Modules/mediastream/UserMediaRequest.h:
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp:
        * Modules/paymentrequest/PaymentRequest.cpp:
        * Modules/paymentrequest/PaymentRequest.h:
        * Modules/paymentrequest/PaymentResponse.cpp:
        * Modules/paymentrequest/PaymentResponse.h:
        * Modules/streams/ReadableStreamSource.h:
        * Modules/webaudio/AudioContext.h:
        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        * Modules/webauthn/AuthenticatorCoordinator.h:
        * Modules/webauthn/PublicKeyCredential.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        * Modules/webgpu/WebGPU.cpp:
        * Modules/webgpu/WebGPU.h:
        * Modules/webgpu/WebGPUAdapter.cpp:
        * Modules/webgpu/WebGPUAdapter.h:
        * Modules/webgpu/WebGPUBuffer.cpp:
        * Modules/webgpu/WebGPUBuffer.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webvr/NavigatorWebVR.cpp:
        * Modules/webvr/NavigatorWebVR.h:
        * Modules/webvr/VRDisplay.cpp:
        * Modules/webvr/VRDisplay.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * animation/KeyframeEffect.cpp:
        * animation/WebAnimation.cpp:
        * animation/WebAnimation.h:
        * bindings/js/CachedModuleScriptLoader.cpp:
        * bindings/js/CachedModuleScriptLoaderClient.h:
        * bindings/js/JSDOMPromiseDeferred.h:
        * bindings/js/JSHTMLTemplateElementCustom.cpp:
        * bindings/js/JSImageDataCustom.cpp:
        * bindings/js/JSReadableStreamSourceCustom.cpp:
        * bindings/js/JSWebAnimationCustom.cpp:
        * bindings/js/JSWorkerGlobalScopeBase.cpp:
        * bindings/js/JSWorkerGlobalScopeCustom.cpp:
        * bindings/js/JSWorkletGlobalScopeBase.cpp:
        * bindings/js/ScriptModuleLoader.cpp:
        * css/FontFace.cpp:
        * css/FontFace.h:
        * css/FontFaceSet.cpp:
        * css/FontFaceSet.h:
        * dom/CustomElementRegistry.cpp:
        * dom/DeviceOrientationOrMotionEvent.cpp:
        * dom/DeviceOrientationOrMotionEvent.h:
        * dom/MouseEvent.cpp:
        * dom/MouseEvent.h:
        * html/CustomPaintCanvas.h:
        * html/ImageBitmap.cpp:
        * html/ImageBitmap.h:
        * html/OffscreenCanvas.cpp:
        * html/OffscreenCanvas.h:
        * loader/ImageLoader.cpp:
        * loader/ImageLoader.h:
        * page/DOMWindow.cpp:
        * page/Navigator.h:
        * platform/graphics/CustomPaintImage.cpp:
        * testing/Internals.cpp:
        * testing/Internals.h:
        * testing/ServiceWorkerInternals.h:
        * testing/ServiceWorkerInternals.mm:
        * workers/service/ServiceWorkerContainer.cpp:
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerJob.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        * workers/service/ServiceWorkerRegistration.h:
        * worklets/PaintWorkletGlobalScope.cpp:

2019-10-04  Sihui Liu  <sihui_liu@apple.com>

        Layout Test imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a Flaky Failure
        https://bugs.webkit.org/show_bug.cgi?id=201481
        <rdar://problem/55046055>

        Reviewed by Alex Christensen.

        We should not schedule timer if we know the timer function will be no-op.

        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::removeRequest):
        (WebCore::IDBTransaction::scheduleOperation):
        (WebCore::IDBTransaction::trySchedulePendingOperationTimer):
        (WebCore::IDBTransaction::pendingOperationTimerFired):
        (WebCore::IDBTransaction::didStart):
        (WebCore::IDBTransaction::operationCompletedOnClient):
        (WebCore::IDBTransaction::deactivate):
        (WebCore::IDBTransaction::schedulePendingOperationTimer): Deleted.
        * Modules/indexeddb/IDBTransaction.h:

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

        Unreviewed follow-up fix for r250693 to address assertion hits in debug.

        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::didFirstLayout):
        (WebCore::FontFaceSet::completedLoading):
        Make sure the ready promise is not already resolved before resolving it.

        * platform/SuspendableTaskQueue.cpp:
        (WebCore::SuspendableTaskQueue::SuspendableTaskQueue):
        * platform/SuspendableTaskQueue.h:
        (WebCore::SuspendableTaskQueue::create):
        Add a new constructor that takes in a Document since the ActiveDOMObject's
        constructor taking a Document has some useful logic.

2019-10-04  Joonghun Park  <jh718.park@samsung.com>

        Negative radii in radial gradients should be rejected.
        https://bugs.webkit.org/show_bug.cgi?id=202412

        Per the spec, https://drafts.csswg.org/css-images-3/#radial-gradients
        "Negative values are invalid.",
        we reject negative radii values in radial-gradient.

        This patch rejects negative radii during radial-gradient parsing
        for both webkit prefixed and non-prefixed ones.

        Reviewed by Antti Koivisto.

        Tests: imported/blink/css-parser/webkit-gradient.html
               imported/w3c/web-platform-tests/compat/webkit-radial-gradient-radii.html
               imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-invalid.html

        * css/parser/CSSPropertyParserHelpers.cpp:
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
        (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
        (WebCore::CSSPropertyParserHelpers::consumeRadialGradient):

2019-10-04  Alex Christensen  <achristensen@webkit.org>

        Move WKProcessPool._registerURLSchemeServiceWorkersCanHandle to _WKWebsiteDataStoreConfiguration
        https://bugs.webkit.org/show_bug.cgi?id=202553

        Reviewed by Youenn Fablet.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::SWServer):
        * workers/service/server/SWServer.h:
        (WebCore::SWServer::registeredSchemes const):
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::runRegisterJob):

2019-10-04  youenn fablet  <youenn@apple.com>

        AbortSignal does not always emit the abort signal
        https://bugs.webkit.org/show_bug.cgi?id=201871
        <rdar://problem/55451712>

        Reviewed by Chris Dumez.

        Make sure a JSAbortSignal is not GCed until objects that can abort it are gone.
        This includes a followed signal and an AbortController.
        Current WebKit implementation only uses following of one signal at a time.

        Test: http/tests/fetch/abort-signal-gc.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSAbortControllerCustom.cpp: Added.
        (WebCore::JSAbortController::visitAdditionalChildren):
        * bindings/js/JSAbortSignalCustom.cpp: Added.
        (WebCore::JSAbortSignalOwner::isReachableFromOpaqueRoots):
        * bindings/js/JSTypedOMCSSStyleValueCustom.cpp:
        * dom/AbortController.idl:
        * dom/AbortSignal.cpp:
        (WebCore::AbortSignal::follow):
        * dom/AbortSignal.h:
        * dom/AbortSignal.idl:

2019-10-04  youenn fablet  <youenn@apple.com>

        Allow to suspend RTCPeerConnection when not connected
        https://bugs.webkit.org/show_bug.cgi?id=202403

        Reviewed by Chris Dumez.

        Implement suspend/resume in RTCPeerConnection by sending suspend/resume to the libwebrtc media endpoint,
        which suspends/resumes its socket factory.

        We allow suspension when the connection is not connected.
        Pages with connected connections will not go in page cache yet.

        Tests: webrtc/datachannel/datachannel-page-cache-send.html
               webrtc/datachannel/datachannel-page-cache.html

        * Modules/mediastream/PeerConnectionBackend.h:
        (WebCore::PeerConnectionBackend::suspend):
        (WebCore::PeerConnectionBackend::resume):
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const):
        (WebCore::RTCPeerConnection::suspend):
        (WebCore::RTCPeerConnection::resume):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::suspend):
        (WebCore::LibWebRTCMediaEndpoint::resume):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::suspend):
        (WebCore::LibWebRTCPeerConnectionBackend::resume):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:

2019-10-04  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r250583.

        Broke multiple internal API tests

        Reverted changeset:

        "[JSC] Place VM* in TLS"
        https://bugs.webkit.org/show_bug.cgi?id=202391
        https://trac.webkit.org/changeset/250583

2019-10-04  Alex Christensen  <achristensen@webkit.org>

        Simplify sandbox enabling macros
        https://bugs.webkit.org/show_bug.cgi?id=202536

        Reviewed by Brent Fulgham.

        * Configurations/FeatureDefines.xcconfig:

2019-10-04  Chris Lord  <clord@igalia.com>

        ImageBitmap should be serializable
        https://bugs.webkit.org/show_bug.cgi?id=202394

        Reviewed by Žan Doberšek.

        Test: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable.html

        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::dumpImageBitmap):
        (WebCore::CloneDeserializer::readTransferredImageBitmap):
        (WebCore::CloneDeserializer::readImageBitmap):
        (WebCore::CloneDeserializer::readTerminal):

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

        AppleTV named as XSS-payloads trigger when AirPlay is used
        https://bugs.webkit.org/show_bug.cgi?id=202534
        <rdar://55931262>

        Reviewed by Eric Carlson.

        Ensure we escape an AirPlay's device name before inserting its name into the DOM.

        * Modules/modern-media-controls/media/placard-support.js:
        (PlacardSupport.prototype._updateAirPlayPlacard):
        (PlacardSupport):
        (escapeHTML):

2019-10-04  Oriol Brufau  <obrufau@igalia.com>

        [css-grid] Preserve auto repeat() in getComputedStyle() for non-grids
        https://bugs.webkit.org/show_bug.cgi?id=202258

        Reviewed by Javier Fernandez.

        Tests: imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-nogrid.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-nogrid.html
               imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed.html

        Usually, the resolved value of grid-template-rows/columns is the used
        value, expanding the repeat() notation. But for elements with a non-grid
        display, the resolved value is just the computed value, with repeat(),
        since the used value doesn't exist.
        Before this patch, the repeat() was dropped, and line names after it
        appeared at the wrong position or were also dropped. There was also an
        assert failure in debug. This patch fixes the serialization for auto
        repeat(). Integer repeat() is still expanded at computed-value time, so
        it's not preserved in getComputedStyle().

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::OrderedNamedLinesCollector::OrderedNamedLinesCollector):
        (WebCore::OrderedNamedLinesCollectorInsideRepeat::OrderedNamedLinesCollectorInsideRepeat):
        (WebCore::OrderedNamedLinesCollectorInGridLayout::OrderedNamedLinesCollectorInGridLayout):
        (WebCore::OrderedNamedLinesCollector::collectLineNamesForIndex const):
        (WebCore::OrderedNamedLinesCollectorInsideRepeat::collectLineNamesForIndex const):
        (WebCore::OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex const):
        (WebCore::populateGridTrackList):
        (WebCore::valueForGridTrackList):

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

        [CSS Shadow Parts] Support 'exportparts' attribute
        https://bugs.webkit.org/show_bug.cgi?id=202520

        Reviewed by Ryosuke Niwa.

        Support 'exportparts' attribute for exporting part mappings from subcomponents.

        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchAuthorRules):
        (WebCore::ElementRuleCollector::matchPartPseudoElementRules):

        Recurse to containing scopes to collect part rules if there are exported mappings.

        (WebCore::ElementRuleCollector::ruleMatches):
        * css/ElementRuleCollector.h:
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::matchRecursively const):

        Make ShadowDescendant fake combinator skip directly to the scope where the part rules are coming from.

        (WebCore::SelectorChecker::checkOne const):

        Resolve names via mappings if needed.

        * css/SelectorChecker.h:
        * dom/Element.cpp:
        (WebCore::Element::attributeChanged):

        Invalidate mappings as needed.

        * dom/ShadowRoot.cpp:
        (WebCore::parsePartMappings):

        Parse the mappings microsyntax.

        (WebCore::ShadowRoot::partMappings const):
        (WebCore::ShadowRoot::invalidatePartMappings):
        * dom/ShadowRoot.h:
        * html/HTMLAttributeNames.in:

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

        A newly inserted element doesn't get assigned to a named slot if slot assignments had already happened
        https://bugs.webkit.org/show_bug.cgi?id=199733

        Reviewed by Antti Koivisto.

        The bug was caused by addSlotElementByName not invalidating slot assignments when a new slot element
        is inserted after corresponding elements with the slot content attribute had already been inserted.

        Fixed the bug by always invalidating the slot assignment when a new slot element is inserted.

        Tests: fast/shadow-dom/add-slotted-element-after-assignment-1.html
               fast/shadow-dom/add-slotted-element-after-assignment-2.html
               fast/shadow-dom/add-slotted-element-after-assignment-3.html

        * dom/SlotAssignment.cpp:
        (WebCore::SlotAssignment::addSlotElementByName):

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

        Radio button groups are not scoped by shadow boundaries
        https://bugs.webkit.org/show_bug.cgi?id=199568

        Reviewed by Antti Koivisto.

        Fixed the bug that radio button groups are not scoped to each shadow tree by moving
        RadioButtonGroups from FormController, which is a per-document object, to TreeScope.

        Test: imported/w3c/web-platform-tests/shadow-dom/input-type-radio.html

        * dom/RadioButtonGroups.h:
        (WebCore::RadioButtonGroups): Made this bmalloc'ed now that it's allocated standalone.
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::radioButtonGroups): Added.
        * dom/TreeScope.h:
        * html/FormController.h:
        (WebCore::FormController::radioButtonGroups): Deleted.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::~HTMLInputElement):
        (WebCore::HTMLInputElement::removedFromAncestor): Update the radio button group here.
        (WebCore::HTMLInputElement::didMoveToNewDocument): Removed the code to update radio
        button group here since it's done in removedFromAncestor now. Note that insertion case
        is alrady taken care of by HTMLInputElement::didFinishInsertingNode.
        (WebCore::HTMLInputElement::radioButtonGroups const): Ditto.

2019-10-03  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Correct interaction with other pseudo elements
        https://bugs.webkit.org/show_bug.cgi?id=202526

        Reviewed by Ryosuke Niwa.

        Cases like foo::part(bar)::before should work.

        This patch doesn't cover ::placeholder which is implemented as PseudoElementWebKitCustom (like internal -webkit-* properties).

        * css/CSSSelector.h:
        (WebCore::isTreeStructuralPseudoClass):

        Add a helper.

        * css/parser/CSSSelectorParser.cpp:

        Allow non-structural pseudo classes after ::part().
        Allow other pseudo elements after ::part().

        (WebCore::CSSSelectorParser::consumePseudo):

        No need for DisallowPseudoElementsScope, we are just parsing identifiers.

2019-10-03  James Darpinian  <jdarpinian@chromium.org>

        Fix WebGL 1 conformance regressions when USE_ANGLE=1
        https://bugs.webkit.org/show_bug.cgi?id=202545

        Prevent ANGLE from automatically using ES3 when ES2 is requested.

        WEBGL_debug_shaders extension should not accept or return null.

        Enable ANGLE's new support for emulating RGB on RGBA IOSurfaces.

        Reviewed by Alex Christensen.

        * html/canvas/WebGLDebugShaders.cpp:
        (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
        * html/canvas/WebGLDebugShaders.h:
        * html/canvas/WebGLDebugShaders.idl:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
        * platform/graphics/angle/Extensions3DANGLE.cpp:
        (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):

2019-10-03  Jer Noble  <jer.noble@apple.com>

    [iOS] WebContent process can be interrupted during suspension; loses "Now Playing" status
    https://bugs.webkit.org/show_bug.cgi?id=202537
    <rdar://problem/55952707>

    Reviewed by Eric Carlson.

    Always deactivate the AVAudioSession when the last playing PlatformAudioSession ends playback and the application is in the background.

    * platform/audio/PlatformMediaSessionManager.cpp:
    (WebCore::PlatformMediaSessionManager::removeSession):
    (WebCore::PlatformMediaSessionManager::processWillSuspend):
    (WebCore::PlatformMediaSessionManager::maybeDeactivateAudioSession):
    * platform/audio/PlatformMediaSessionManager.h:
    (WebCore::PlatformMediaSessionManager::isApplicationInBackground const):
    * platform/audio/ios/MediaSessionManagerIOS.h:
    * platform/audio/ios/MediaSessionManagerIOS.mm:
    (WebCore::MediaSessionManageriOS::sessionWillEndPlayback):

2019-10-03  Chris Dumez  <cdumez@apple.com>

        Allow pages using FontFaceSet to enter the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202476

        Reviewed by Myles C. Maxfield.

        Allow pages using FontFaceSet to enter the back/forward cache by updating its
        implementation to queue all its tasks that run script to a SuspendableTaskQueue.
        The SuspendableTaskQueue makes sure to properly suspend while in PageCache and
        run the tasks when resuming from PageCache.

        Test: http/tests/navigation/page-cache-fontfaceset.html

        * PlatformWin.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::fontLoadEventOccurred):
        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::FontFaceSet):
        (WebCore::FontFaceSet::canSuspendForDocumentSuspension const):
        (WebCore::FontFaceSet::didFirstLayout):
        (WebCore::FontFaceSet::completedLoading):
        (WebCore::FontFaceSet::faceFinished):
        * css/FontFaceSet.h:

        * platform/SuspendableTaskQueue.cpp: Added.
        (WebCore::SuspendableTaskQueue::SuspendableTaskQueue):
        (WebCore::SuspendableTaskQueue::close):
        (WebCore::SuspendableTaskQueue::cancelAllTasks):
        (WebCore::SuspendableTaskQueue::enqueueTask):
        (WebCore::SuspendableTaskQueue::runOneTask):
        (WebCore::SuspendableTaskQueue::activeDOMObjectName const):
        (WebCore::SuspendableTaskQueue::canSuspendForDocumentSuspension const):
        (WebCore::SuspendableTaskQueue::stop):
        (WebCore::SuspendableTaskQueue::suspend):
        (WebCore::SuspendableTaskQueue::resume):
        * platform/SuspendableTaskQueue.h: Added.
        (WebCore::SuspendableTaskQueue::create):
        (WebCore::SuspendableTaskQueue::isClosed const):
        (WebCore::SuspendableTaskQueue::hasPendingTasks const):
        Add a SuspendableTaskQueue class which is Page-Cache aware and can be used to queue
        generic tasks as WTF::Function<void<>> lambdas.

2019-10-03  Chris Dumez  <cdumez@apple.com>

        Provisional / scheduled loads in subframes should not prevent a page from entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202474

        Reviewed by Alex Christensen.

        Provisional / scheduled loads in subframes should not prevent a page from entering the back/forward cache.
        To address the issue, we now make sure to stop all loads before checking for PageCache eligibility.

        Test: fast/history/page-cache-quick-redirect-iframe.html

        * history/PageCache.cpp:
        (WebCore::PageCache::addIfCacheable):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopForPageCache):
        * loader/FrameLoader.h:

2019-10-03  Chris Dumez  <cdumez@apple.com>

        XMLHttpRequest sometimes prevents pages from entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202434
        <rdar://problem/55890340>

        Reviewed by Geoffrey Garen.

        XMLHttpRequest::canSuspendForDocumentSuspension() was returning false if the document has not fired
        the window's load event, with a comment explaining that cancelling the XHR in the upon suspension
        may cause the load event to get fired and thus run script when forbidden. However, we should only
        return false if the XMLHttpRequest is actually loading (m_loader is not null). XHRs that are not
        loading should never prevent page caching.

        I saw failures to enter the back/forward cache on yandex.ru and taobao.com because of this.

        Test: http/tests/navigation/page-cache-failed-xhr.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::canSuspendForDocumentSuspension const):

2019-10-03  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Downgrade document.referrer for all third-party iframes
        https://bugs.webkit.org/show_bug.cgi?id=202506
        <rdar://problem/55786397>

        Reviewed by Brent Fulgham.

        This change downgrades document.referrer for all third-party iframes if ITP/Resource Load Statistics
        is enabled. The behavior matches the downgrade of all HTTP referrers for third-party resources
        which landed in https://trac.webkit.org/changeset/250413/webkit.

        Tests: http/tests/resourceLoadStatistics/downgrade-document-referrer-nested-third-party-iframe.html
               http/tests/resourceLoadStatistics/downgrade-document-referrer-third-party-iframe.html
               http/tests/resourceLoadStatistics/leave-empty-document-referrer-alone-third-party-iframe.html

        * dom/Document.cpp:
        (WebCore::Document::referrer):
        (WebCore::Document::referrer const): Deleted.
            Can no longer be const since it lazily downgrades and saves the referrer on read.
        * dom/Document.h:

2019-10-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: remove `InspectorInstrumentationCookie`
        https://bugs.webkit.org/show_bug.cgi?id=202487

        Reviewed by Matt Baker.

        All it does is create a shallow-copy of the `InstrumentingAgents` (it copies a pointer to
        the `InstrumentingAgents` object, so any of the pointers to the `InspectorAgent` that are
        contained therein are shared between each instance) and save the tracking
        `InspectorTimelineAgent`'s id (monotonically increasing integer).

        All uses of `InspectorInstrumentationCookie` are local values, so there's no way that the
        `InspectorTimelineAgent` (or the id) could change in between an
        `InspectorInstrumentation::will*` and an `InspectorInstrumentation::did*`, as both the
        tracking state and id are controlled by the frontend and cannot "interrupt".

        Removing `InspectorInstrumentationCookie` _can_ cause issues is in situations where the
        `ScriptExecutionContext` (or `Page`) changes between the `InspectorInstrumentation::will*`
        and the `InspectorInstrumentation::did*`, but this can be avoided so long as a pointer to
        the "context" used for `InspectorInstrumentation::will*` is saved.

        Covered by existing tests: inspector/timeline/*

        * inspector/InspectorInstrumentationCookie.h: Removed.
        * inspector/InspectorInstrumentationCookie.cpp: Removed.

        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::internalStop):
        (WebCore::InspectorTimelineAgent::didDispatchEvent):
        (WebCore::InspectorTimelineAgent::didPaint):
        (WebCore::InspectorTimelineAgent::clearRecordStack): Deleted.

        * bindings/js/JSCallbackData.cpp:
        (WebCore::JSCallbackData::invokeCallback):
        * bindings/js/JSCustomElementInterface.cpp:
        (WebCore::constructCustomElementSynchronously):
        (WebCore::JSCustomElementInterface::upgradeElement):
        (WebCore::JSCustomElementInterface::invokeCallback):
        * bindings/js/JSErrorHandler.cpp:
        (WebCore::JSErrorHandler::handleEvent):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/JSExecState.h:
        * bindings/js/JSExecStateInstrumentation.h:
        (WebCore::JSExecState::instrumentFunctionInternal):
        (WebCore::JSExecState::instrumentFunctionCall):
        (WebCore::JSExecState::instrumentFunctionConstruct):
        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::executeFunctionInContext):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluateInWorld):
        (WebCore::ScriptController::evaluateModule):
        * dom/Document.cpp:
        (WebCore::Document::resolveStyle):
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::innerInvokeEventListeners):
        * dom/MutationObserver.cpp:
        (WebCore::MutationObserver::deliver):
        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::fired):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::dispatchEvent):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layout):
        * page/IntersectionObserver.cpp:
        (WebCore::IntersectionObserver::notify):
        * page/PerformanceObserver.cpp:
        (WebCore::PerformanceObserver::deliver):

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willCallFunction):
        (WebCore::InspectorInstrumentation::didCallFunction):
        (WebCore::InspectorInstrumentation::willDispatchEvent):
        (WebCore::InspectorInstrumentation::didDispatchEvent):
        (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
        (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
        (WebCore::InspectorInstrumentation::willEvaluateScript):
        (WebCore::InspectorInstrumentation::didEvaluateScript):
        (WebCore::InspectorInstrumentation::willFireTimer):
        (WebCore::InspectorInstrumentation::didFireTimer):
        (WebCore::InspectorInstrumentation::willLayout):
        (WebCore::InspectorInstrumentation::didLayout):
        (WebCore::InspectorInstrumentation::willRecalculateStyle):
        (WebCore::InspectorInstrumentation::didRecalculateStyle):
        (WebCore::InspectorInstrumentation::willFireAnimationFrame):
        (WebCore::InspectorInstrumentation::didFireAnimationFrame):
        (WebCore::InspectorInstrumentation::willFireObserverCallback):
        (WebCore::InspectorInstrumentation::didFireObserverCallback):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willCallFunctionImpl):
        (WebCore::InspectorInstrumentation::didCallFunctionImpl):
        (WebCore::InspectorInstrumentation::willDispatchEventImpl):
        (WebCore::InspectorInstrumentation::didDispatchEventImpl):
        (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
        (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
        (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
        (WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
        (WebCore::InspectorInstrumentation::willFireTimerImpl):
        (WebCore::InspectorInstrumentation::didFireTimerImpl):
        (WebCore::InspectorInstrumentation::willLayoutImpl):
        (WebCore::InspectorInstrumentation::didLayoutImpl):
        (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
        (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
        (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
        (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
        (WebCore::InspectorInstrumentation::retrieveTimelineAgent): Deleted.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-10-03  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: add size estimate for key path when estimate task size
        https://bugs.webkit.org/show_bug.cgi?id=202480

        Reviewed by Geoffrey Garen.

        No observable behavior change.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::estimateSize):

2019-10-03  youenn fablet  <youenn@apple.com>

        Regression: iOS 13.1 MediaStreamTrack.enabled = false kills audio track
        https://bugs.webkit.org/show_bug.cgi?id=202405
        <rdar://problem/55922616>

        Reviewed by Eric Carlson.

        When the web page is setting enabled to false, media session might change from PlayRecord to None.
        This might trigger CoreAudio to no longer output audio samples, thus triggering our audio capture failure timer.
        This would end the track after 2 seconds.
        Given audio tracks can be reenabled by a web page, we should not change the Media Session setup based on that.
        This patch updates MediaStream::mediaType to return independently of the enabled state.

        Add internals API to write a cross platform test.

        Test: fast/mediastream/audio-track-enabled.html
        Manually tested as well.

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::mediaType const):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::hasCaptureAudioSource const):
        * testing/Internals.cpp:
        (WebCore::Internals::supportsAudioSession const):
        (WebCore::Internals::audioSessionCategory const):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-03  youenn fablet  <youenn@apple.com>

        http/tests/security/navigate-when-restoring-cached-page.html should not use RTCPeerConnection to not enter in page cache
        https://bugs.webkit.org/show_bug.cgi?id=202521

        Reviewed by Chris Dumez.

        Introduce a dummy ActiveDOMObject which can never be suspended for document suspension.
        Allow a page to create this dummy ActiveDOMObject through internals.
        Covered by updated test.

        * dom/ActiveDOMObject.h:
        * testing/Internals.cpp:
        (WebCore::Internals::preventDocumentForEnteringPageCache):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-10-03  Tim Horton  <timothy_horton@apple.com>

        WebKit doesn't build with trunk clang
        https://bugs.webkit.org/show_bug.cgi?id=202511

        Reviewed by Anders Carlsson.

        * Modules/fetch/FetchLoader.h:
        * Modules/geolocation/Geolocation.h:
        * Modules/indexeddb/IDBTransaction.h:
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        * Modules/indexeddb/shared/InProcessIDBServer.h:
        * Modules/notifications/Notification.cpp:
        * Modules/notifications/Notification.h:
        * platform/graphics/ca/TileController.h:
        * workers/service/context/ServiceWorkerThreadProxy.h:
        Fix the build by exporting destructors and custom delete operators.
        I don't know why this changed, but trunk clang insists.
        There are also some new warnings; this only fixes the hard errors.

2019-10-03  Tim Horton  <timothy_horton@apple.com>

        Yet another build fix

        * css/typedom/TypedOMCSSImageValue.h:
        Forward declare Document.

2019-10-03  Jiewen Tan  <jiewen_tan@apple.com>

        Support googleLegacyAppidSupport extension
        https://bugs.webkit.org/show_bug.cgi?id=202427
        <rdar://problem/55887473>

        Reviewed by Brent Fulgham.

        This patch adds support for googleLegacyAppidSupport extension, when set:
        1) user agent should only use the U2F transport protocol,
        2) should only communicate with roaming authenticators, and
        3) should use a hard-coded appID of https://www.gstatic.com/securitykey/origins.json.
        To be noticed as the name implies, this extension is exclusively for RP ID = google.com.

        Implementation wise, all operations are captured in methods with name processGoogleLegacyAppIdSupportExtension.
        1) AuthenticatorCoordinator takes care of setting the value.
        2) U2fCommandConstructor takes care of hard coding the AppID.
        3) AuthenticatorManager takes care of removing AuthenticatorTransport::Internal from TransportSet, so startDiscovery
        will not poke platform authenticators.
        4) CtapAuthenticator takes care of downgrading to U2fAuthenticator.
        5) U2fAuthenticator takes care of setting the AppID in the response.

        Partially covered by new test cases in existing tests, and remaining will be covered by manual tests.

        * Modules/webauthn/AuthenticationExtensionsClientInputs.h:
        (WebCore::AuthenticationExtensionsClientInputs::encode const):
        (WebCore::AuthenticationExtensionsClientInputs::decode):
        * Modules/webauthn/AuthenticationExtensionsClientInputs.idl:
        * Modules/webauthn/AuthenticatorCoordinator.cpp:
        (WebCore::AuthenticatorCoordinatorInternal::processGoogleLegacyAppIdSupportExtension):
        (WebCore::AuthenticatorCoordinator::create const):
        * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
        (WebCore::PublicKeyCredentialCreationOptions::encode const):
        (WebCore::PublicKeyCredentialCreationOptions::decode):
        * Modules/webauthn/fido/U2fCommandConstructor.cpp:
        (fido::convertToU2fRegisterCommand):
        (fido::processGoogleLegacyAppIdSupportExtension):
        * Modules/webauthn/fido/U2fCommandConstructor.h:

2019-10-03  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: tests under LayoutTests/inspector/debugger are flaky
        https://bugs.webkit.org/show_bug.cgi?id=137131
        <rdar://problem/18461335>

        Reviewed by Devin Rousso.

        Fix debugger tests on GTK. All tests that pause on breakpoint didn't work because
        in layout tests InspectorFrontendClientLocal was using Timer to dispatch commands
        sent from the local front-end page to the inspected one. When paused inside a script
        triggered by the front-end nested timer event would be scheduled but never fired
        because in glib implementation of RunLoop::TimerBase uses event source which doesn't
        allow recursion (g_source_set_can_recurse is not called on the source), so dispatching
        Debugger.resume command didn't work when paused inside another inspector command (e.g.
        eval). RunLoop itself uses event source which does allow recursion. So instead of using
        a timer for asynchronous command dispatching with delay=0 we now schedule a task in
        RunLoop's queue.

        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorBackendDispatchTask::dispatch):
        (WebCore::InspectorBackendDispatchTask::reset):
        (WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
        (WebCore::InspectorBackendDispatchTask::scheduleOneShot): ensures that there is one inspector
        dispatch task in the queue.
        (WebCore::InspectorBackendDispatchTask::dispatchOneMessage): this is mostly the same behavior
        as was with timerFired, we should be able to dispatch all accumulated messages from the queue
        in one batch but for now I'd like to keep it one per iteration.

2019-10-03  Joonghun Park  <pjh0718@gmail.com>

        CSS ellipse() doesn't accept single <shape-radius>
        https://bugs.webkit.org/show_bug.cgi?id=181745

        CSS ellipse() should only accept 0 or 2 radii.
        The corresponding csswg discussion is
        https://github.com/w3c/csswg-drafts/issues/2175.

        Reviewed by Antti Koivisto.

        Tests: imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed.html
               imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html
               imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid.html
               imported/w3c/web-platform-tests/css/css-masking/parsing/shape-outside-computed.html
               imported/w3c/web-platform-tests/css/css-masking/parsing/shape-outside-invalid.html
               imported/w3c/web-platform-tests/css/css-masking/parsing/shape-outside-valid.html

        * css/CSSBasicShapes.cpp:
        (WebCore::CSSBasicShapeEllipse::cssText const):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeBasicShapeEllipse):

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

        [Nicosia] Enable runtime checks and triggers for async non-main-frame scrolling
        https://bugs.webkit.org/show_bug.cgi?id=202509

        Reviewed by Carlos Garcia Campos.

        Add build guards that would enable runtime checks of the asynchronous
        frame scrolling setting in the ScrollingCoordinator and
        RenderLayerCompositor classes for the Nicosia-using ports.

        The check in ScrollingCoordinator avoids bailing on coordinating
        scrolling for non-main frames when the setting is enabled. The check in
        RenderLayerCompositor avoids imposing a requirement for a composition
        layer for any non-main frame when the setting is disabled.

        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView const):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):

2019-10-02  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Support multiple arguments for ::part()
        https://bugs.webkit.org/show_bug.cgi?id=202482

        Reviewed by Ryosuke Niwa.

        Support ::part(foo bar).

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const):
        (WebCore::CSSSelector::setArgumentList):
        (WebCore::CSSSelector::setLangArgumentList): Deleted.

        Give this a more generic name and use it for ::part() too.

        * css/CSSSelector.h:
        (WebCore::CSSSelector::argumentList const):
        (WebCore::CSSSelector::langArgumentList const): Deleted.
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):

        Match only if all parts are found from the element 'part' attribute.

        * css/parser/CSSParserSelector.cpp:
        (WebCore::CSSParserSelector::setArgumentList):
        (WebCore::CSSParserSelector::setLangArgumentList): Deleted.
        * css/parser/CSSParserSelector.h:
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumePseudo):

        Parse the list.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):

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

        [iOS] When hit testing for a context menu interaction, do not consider whether the element is contenteditable
        https://bugs.webkit.org/show_bug.cgi?id=202498
        <rdar://problem/54723131>

        Reviewed by Tim Horton.

        When the user selects a context menu action, WebKit performs a hit test in order to find the
        acted-on element on the page. This is separate from the hit test performed to generate the
        context menu's targeted preview. Since an arbitrary amount of time can elapse between
        preview generation and action selection, this second hit-tests might return a different
        element.

        One case where we know a different element can be returned is in apps that dynamically
        enable and disable editing. If editing is disabled when the first hit test occurs but is
        enabled when the second one occurs, different elements will be returned due to
        Frame::qualifyingNodeAtViewportLocation preferring to return the root editable element when
        the approximate node is contenteditable.

        While the appropriate long-term fix is to only hit-test once and use that element for both
        preview generation and action selection, this patch implements a short-term fix to address
        the specific problem in rdar://problem/54723131 by disabling the contenteditable behavior
        described above for context menu interaction hit testing.

        The long-term fix is tracked by <https://webkit.org/b/202499>.

        * page/Frame.h:
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::qualifyingNodeAtViewportLocation):
        (WebCore::Frame::approximateNodeAtViewportLocationLegacy):
        (WebCore::ancestorRespondingToClickEventsNodeQualifier):
        (WebCore::Frame::nodeRespondingToClickEvents):
        (WebCore::Frame::nodeRespondingToDoubleClickEvent):
        (WebCore::Frame::nodeRespondingToInteraction):
        (WebCore::Frame::nodeRespondingToScrollWheelEvents):

2019-10-02  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Basic ::part() pseudo element support
        https://bugs.webkit.org/show_bug.cgi?id=202456

        Reviewed by Ryosuke Niwa.

        Implement basic parsing and selector matching for ::part() pseudo element.

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::pseudoId):
        (WebCore::CSSSelector::parsePseudoElementType):
        (WebCore::CSSSelector::selectorText const):
        * css/CSSSelector.h:
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::matchAuthorRules):
        (WebCore::ElementRuleCollector::matchPartPseudoElementRules):
        * css/ElementRuleCollector.h:
        * css/RuleSet.cpp:
        (WebCore::RuleSet::addRule):
        * css/RuleSet.h:
        (WebCore::RuleSet::partPseudoElementRules const):
        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const):
        * css/SelectorPseudoElementTypeMap.in:
        * css/parser/CSSParserSelector.cpp:
        (WebCore::CSSParserSelector::parsePseudoElementSelector):

        Also added ::slotted to SelectorPseudoElementTypeMap.in to resolve a FIXME here.

        * css/parser/CSSParserSelector.h:
        (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching const):
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::isOnlyPseudoElementFunction):
        (WebCore::CSSSelectorParser::consumePseudo):

        Parse single values only, multipart ::part(foo bar) case is not yet handled.

        * dom/Element.cpp:
        (WebCore::Element::partNames const):

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

        Adopt copyToVector() in AnimationTimeline::animationsForElement()
        https://bugs.webkit.org/show_bug.cgi?id=202488

        Reviewed by Wenson Hsieh.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationsForElement const):

2019-10-02  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer] Let playbin handle redirects for us when appropriate
        https://bugs.webkit.org/show_bug.cgi?id=195326

        A simplified mechanism has been added in GStreamer to handle corner cases.

        Reviewed by Xabier Rodriguez-Calvar.

        Not easily testable at our level

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):

2019-10-02  Tim Horton  <timothy_horton@apple.com>

        Another build fix

        * css/typedom/TypedOMCSSImageValue.cpp:
        (WebCore::TypedOMCSSImageValue::TypedOMCSSImageValue):
        * css/typedom/TypedOMCSSImageValue.h:
        I feel like I am actively being thwarted.

2019-10-02  Tim Horton  <timothy_horton@apple.com>

        Another build fix

        * css/typedom/TypedOMCSSImageValue.h:

2019-10-02  Tim Horton  <timothy_horton@apple.com>

        Try to fix the Windows build

        * css/typedom/TypedOMCSSImageValue.cpp:
        (WebCore::TypedOMCSSImageValue::document const):
        * css/typedom/TypedOMCSSImageValue.h:
        Out-of-line this instead of including Document.h in TypedOMCSSImageValue,
        which was an earlier build fix from r250610.

        * platform/graphics/cg/GradientCG.cpp:
        * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
        * platform/graphics/win/GraphicsContextCGWin.cpp:
        Try to fix the build.

2019-10-02  Keith Rollin  <krollin@apple.com>

        Unreviewed build fix after r250595.

        macCatalyst appears to have triggered the the problem where the build
        can sometimes fail if the unified sources mechanism doesn't group
        together the right set of files.

        * css/typedom/TypedOMCSSImageValue.h:

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

        [Web Animations] Implement replaced animations
        https://bugs.webkit.org/show_bug.cgi?id=202190
        <rdar://55697719>

        Reviewed by Dean Jackson.

        Implementing section "5.5 Replacing Animations" (https://drafts.csswg.org/web-animations/#replacing-animations) of the Web Animations
        specification which allows for Web Animations to be destroyed when they are superseded by another animation and the developer doesn't
        explicitly opt into persisting them using the persist() method.

        An animation is marked as replaceable (to sum up) when it's finished and another animation for the same property takes precedence.
        As part of DocumentTimeline::internalUpdateAnimationsAndSendEvents(), we'll go through all replaceable animations, dispatch a "remove"
        DOM event, and remove them from our list of animations.

        We also make a couple of fixes in this patch that were uncovered while working on the WPT tests for replaced animations:
        
        - we would incorrectly parse single values for a property that allows lists (change in KeyframeEffect's processKeyframeLikeObject())
        - we didn't account for the position in the global animation list when sorted animations by composite order (AnimationTimeline::animationsForElement())

        Finally, to get more readable results, we implement a stub of commitStyles(). Its full implementation is tracked by http://wkb.ug/202193.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::animationTimingDidChange): Mark the position of the animation in the global animation list, to which it may only be added once.
        (WebCore::AnimationTimeline::animationsForElement const): Account for the animation's position in the global animation when sorting.
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::bindingsReplaceState const): Flush pending styles when querying the ready state for a declarative animation.
        * animation/DeclarativeAnimation.h:
        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents): Run the "remove replaced animations" procedure as the second step in the "update animations
        and send events" procedure.
        (WebCore::DocumentTimeline::animationCanBeRemoved): Determine whether a given animation may be removed based on its finished state, replace state and whether
        it is fully superseded by another animation targeting the same property on the same target element.
        (WebCore::DocumentTimeline::removeReplacedAnimations): Remove any removable animation and dispatch a "remove" DOM event for each removed animation. 
        * animation/DocumentTimeline.h:
        * animation/KeyframeEffect.cpp:
        (WebCore::processKeyframeLikeObject): Fix an issue found in a replaced animations WPT test that showed that we didn't record the value of an animation that allows lists.
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::isReplaceable const):
        (WebCore::WebAnimation::persist): Mark the replace state as "persisted" and ensure the animation is set on the animation list for its target element in case it had already
        been removed based on its persisted state.
        (WebCore::WebAnimation::commitStyles): Stub for a new function.
        * animation/WebAnimation.h:
        (WebCore::WebAnimation::replaceState const):
        (WebCore::WebAnimation::setReplaceState):
        (WebCore::WebAnimation::bindingsReplaceState const):
        (WebCore::WebAnimation::globalPosition const):
        (WebCore::WebAnimation::setGlobalPosition):
        * animation/WebAnimation.idl:
        * dom/EventNames.h: Add the new "remove" event so that the "onremove" DOM property is available on Animation objects. 

2019-10-02  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed build fix in Nicosia's ScrollingTreePositionedNode class.

        * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
        (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
        Fix the name of the variable included in the log call.

2019-10-02  youenn fablet  <youenn@apple.com>

        Use strongly typed identifiers for webrtc sockets
        https://bugs.webkit.org/show_bug.cgi?id=202400

        Reviewed by Chris Dumez.

        No observable change of behavior.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/libwebrtc/LibWebRTCSocketIdentifier.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocket.h.

2019-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK][WPE] Stop using legacy custom protocol implementation
        https://bugs.webkit.org/show_bug.cgi?id=202407

        Reviewed by Žan Doberšek.

        Remove the code to setup custom protocols in soup session.

        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::SoupNetworkSession):
        * platform/network/soup/SoupNetworkSession.h:

2019-10-02  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Enable async scrolling at build-time for Nicosia-using ports
        https://bugs.webkit.org/show_bug.cgi?id=202397

        Reviewed by Carlos Garcia Campos.

        * PlatformPlayStation.cmake: Add missing build targets.
        * SourcesGTK.txt: Ditto.

2019-10-01  Tim Horton  <timothy_horton@apple.com>

        Clean up some includes to make the build a bit faster
        https://bugs.webkit.org/show_bug.cgi?id=202444

        Reviewed by Geoff Garen.

        No new tests, just reorganizing.

        Apply some profile-guided optimizations to our headers.

        * bindings/js/CallTracerTypes.h:
        * css/typedom/TypedOMCSSImageValue.h:
        * html/canvas/WebGLObject.h:
        * html/canvas/WebGLVertexArrayObjectBase.h:
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::instrumentingAgentsForWebGPUDevice):
        (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
        (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
        (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didCreateWebGPUDevice):
        (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice):
        (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline):
        * platform/graphics/BitmapImage.cpp:
        * platform/graphics/Font.h:
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::getUserToBaseCTM):
        * platform/graphics/cg/GraphicsContextCG.h:
        (WebCore::getUserToBaseCTM): Deleted.
        * platform/graphics/cg/ImageBufferCG.cpp:
        * platform/graphics/cocoa/IOSurface.h:
        * platform/graphics/mac/PDFDocumentImageMac.mm:
        InspectorInstrumentation.h is one of the most expensive headers in the entire project.
        While not included in many places (70), it is fairly straightforward to reduce
        its per-inclusion cost by rougly 80%.

2019-10-01  Alex Christensen  <achristensen@webkit.org>

        Progress towards a functioning CMake build on Mac
        https://bugs.webkit.org/show_bug.cgi?id=202443

        Rubber-stamped by Tim Horton.

        * testing/Internals.mm:

2019-10-01  John Wilander  <wilander@apple.com>

        Storage Access API: document.hasStorageAccess() should return true when the cookie policy allows access
        https://bugs.webkit.org/show_bug.cgi?id=202435
        <rdar://problem/55718526>

        Reviewed by Brent Fulgham.

        WebKit's Storage Access API implementation has so far only looked at whether ITP is
        blocking cookie access or not. However, the default cookie policy is still in
        effect underneath ITP. document.hasStorageAccess() should return true if the
        third-party:
        a) is not classified by ITP, and
        b) has cookies which implies it can use cookies as third-party according to the
        default cookie policy.

        Tests: http/tests/storageAccess/has-storage-access-false-by-default-ephemeral.html
               http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral.html
               http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies.html

        * platform/network/NetworkStorageSession.h:
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::hasCookies const):
        * platform/network/curl/NetworkStorageSessionCurl.cpp:
        (WebCore::NetworkStorageSession::hasCookies const):
            Not yet implemented. Always says false.
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::hasCookies const):
            Not yet implemented. Always says false.

2019-10-01  Tim Horton  <timothy_horton@apple.com>

        Clean up some includes to make the build a bit faster
        https://bugs.webkit.org/show_bug.cgi?id=202437

        Reviewed by Jer Noble.

        * Modules/webaudio/PannerNode.h:
        * Modules/webaudio/RealtimeAnalyser.h:
        * platform/audio/HRTFPanner.h:
        FFTFrame includes Accelerate.h, which is quite expensive.

2019-10-01  Antti Koivisto  <antti@apple.com>

        [CSS Shadow Parts] Parse 'part' attribute
        https://bugs.webkit.org/show_bug.cgi?id=202409

        Reviewed by Ryosuke Niwa.

        Add parsing for Element 'part' attribute and the IDL interface.
        Also add a feature flag for CSS Shadow Parts.

        * dom/Element.cpp:
        (WebCore::Element::attributeChanged):
        (WebCore::isNonEmptyTokenList):
        (WebCore::Element::classAttributeChanged):
        (WebCore::Element::partAttributeChanged):
        (WebCore::Element::partNames const):
        (WebCore::Element::part):
        (WebCore::classStringHasClassName): Deleted.
        * dom/Element.h:
        * dom/Element.idl:
        * dom/ElementRareData.cpp:
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::partList const):
        (WebCore::ElementRareData::setPartList):
        (WebCore::ElementRareData::partNames const):
        (WebCore::ElementRareData::setPartNames):
        * html/HTMLAttributeNames.in:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled):
        (WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const):

2019-10-01  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Place VM* in TLS
        https://bugs.webkit.org/show_bug.cgi?id=202391

        Reviewed by Mark Lam.

        Use JSLockHolder instead. It automatically puts VM* in TLS.

        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::toJS):
        (WebCore::deserializeIDBValueToJSValue):

2019-10-01  youenn fablet  <youenn@apple.com>

        Queue events and promise resolution in RTCPeerConnection when suspended for page cache
        https://bugs.webkit.org/show_bug.cgi?id=202396

        Reviewed by Chris Dumez.

        This patch prepares RTCPeerConnection to be suspendable to enter page cache.
        For that purpose, we queue events and promise resolution/rejection tasks if the RTCPeerConnection m_shouldDelayTasks is set to true.
        This queueing is enabled when RTCPeerConnection is asked to suspend itself.
        The queued tasks are then executed at resume time.
        Renamed fireEvent to dispatchEventWhenFeasible.
        No change of behavior for now.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::createOfferSucceeded):
        (WebCore::PeerConnectionBackend::createOfferFailed):
        (WebCore::PeerConnectionBackend::createAnswerSucceeded):
        (WebCore::PeerConnectionBackend::createAnswerFailed):
        (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
        (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
        (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
        (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
        (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
        (WebCore::PeerConnectionBackend::addIceCandidateFailed):
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::doClose):
        (WebCore::RTCPeerConnection::suspend):
        (WebCore::RTCPeerConnection::resume):
        (WebCore::RTCPeerConnection::updateIceGatheringState):
        (WebCore::RTCPeerConnection::updateIceConnectionState):
        (WebCore::RTCPeerConnection::updateConnectionState):
        (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
        (WebCore::RTCPeerConnection::doTask):
        (WebCore::RTCPeerConnection::fireEvent):
        * Modules/mediastream/RTCPeerConnection.h:

2019-10-01  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Correct additional canvas test failures
        https://bugs.webkit.org/show_bug.cgi?id=202388

        Reviewed by Fujii Hironori.

        This patch corrects a handful of errors in Direct2D's drawing code.

        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::clearRect): Use the transformed dimensions of
        rects to determine whether they intersect with the render target.
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::copyRectFromData const):
        (WebCore::ImageBufferData::loadDataToBitmapIfNeeded): It is not
        necessary (or correct) to 'endDraw' when loading image data to the
        Bitmap target.
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::strokeBoundingRect const): Provide an implementation.

2019-10-01  Alex Christensen  <achristensen@webkit.org>

        Progress towards successful CMake build on Mac
        https://bugs.webkit.org/show_bug.cgi?id=202426

        Rubber-stamped by Tim Horton.

        * PlatformMac.cmake:

2019-10-01  Tim Horton  <timothy_horton@apple.com>

        Clean up some includes to make the build a bit faster
        https://bugs.webkit.org/show_bug.cgi?id=202417

        Reviewed by Jer Noble.

        No new tests, just reorganizing.

        Apply some profile-guided optimizations to our headers.

        * Modules/mediasource/SourceBuffer.cpp:
        * WebCorePrefix.h:
        Add HashMap, which ends up included in all source files.

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::selectImageSource):
        (WebCore::HTMLImageElement::didAttachRenderers):
        (WebCore::HTMLImageElement::insertedIntoAncestor):
        (WebCore::HTMLImageElement::width):
        (WebCore::HTMLImageElement::height):
        (WebCore::HTMLImageElement::naturalWidth const):
        (WebCore::HTMLImageElement::naturalHeight const):
        (WebCore::HTMLImageElement::complete const):
        (WebCore::HTMLImageElement::decode):
        (WebCore::HTMLImageElement::didMoveToNewDocument):
        (WebCore::HTMLImageElement::cachedImage const):
        (WebCore::HTMLImageElement::setLoadManually):
        (WebCore::HTMLImageElement::hasPendingActivity const):
        (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const):
        * html/HTMLImageElement.h:
        (WebCore::HTMLImageElement::cachedImage const): Deleted.
        (WebCore::HTMLImageElement::setLoadManually): Deleted.
        (WebCore::HTMLImageElement::hasPendingActivity const): Deleted.
        (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const): Deleted.
        HTMLImageLoader brings in JSDOMPromiseDeferred, which is known to be horribly expensive.
        Out-of-line m_imageLoader.

        * platform/graphics/GraphicsLayer.h:
        Swap Animation for TimingFunction, which is much smaller.

        * platform/graphics/MediaPlayer.h:
        InbandTextTrackPrivate brings in SerializedPlatformRepresentation.h,
        which is very expensive. MediaPlayer.h is included in many places.
        Break the link.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:

2019-10-01  youenn fablet  <youenn@apple.com>

        RTCDataChannel should not prevent entering page cache except if in open state
        https://bugs.webkit.org/show_bug.cgi?id=202395

        Reviewed by Chris Dumez.

        Only prevent entering page cache in open state.
        Enqueue message through the document event queue to handle suspension properly.

        We cannot yet write page cache tests as a data channel requires a peer connection which
        currently forbids entering page cache.

        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::RTCDataChannel):
        (WebCore::RTCDataChannel::didReceiveStringData):
        (WebCore::RTCDataChannel::didReceiveRawData):
        (WebCore::RTCDataChannel::didDetectError):
        (WebCore::RTCDataChannel::bufferedAmountIsDecreasing):
        (WebCore::RTCDataChannel::scheduleDispatchEvent):
        (WebCore::RTCDataChannel::scheduledEventTimerFired): Deleted.
        * Modules/mediastream/RTCDataChannel.h:

2019-10-01  Rob Buis  <rbuis@igalia.com>

        [Mac] Layout Test imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html fails
        https://bugs.webkit.org/show_bug.cgi?id=202350

        Reviewed by Alex Christensen.

        In some cases didReceiveResponse will deliver redirects (normally willSendRequestInternal will be used for redirects).
        When this is done in manual redirect mode make sure the response type is opaque redirect.

        Test: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::didReceiveResponse):

2019-10-01  Keith Rollin  <krollin@apple.com>

        Remove some support for < iOS 13
        https://bugs.webkit.org/show_bug.cgi?id=202386
        <rdar://problem/55863017>

        Reviewed by Eric Carlson.

        Remove some support for iOS versions less than 13.0.

        Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
        and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
        values >= 130000. This means that expressions like
        "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
        "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

        This removal is part of a series of patches effecting the removal of
        dead code for old versions of iOS. This particular pass involves
        changes in which Jer Noble was involved. These changes are isolated
        from other similar changes in order to facilitate the reviewing
        process.

        No new tests -- no new or changed functionality.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):

2019-10-01  Chris Dumez  <cdumez@apple.com>

        Unreviewed attempt to fix Windows build after r250527.

        * dom/GenericEventQueue.cpp:
        (WebCore::TaskQueueConstructor::construct):
        (WebCore::TaskQueueConstructor<Timer>::construct):
        (WebCore::GenericEventQueueBase<T>::enqueueEvent):
        (WebCore::GenericEventQueueBase<T>::close):
        (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
        (WebCore::GenericEventQueueBase<T>::setPaused):
        (WebCore::GenericEventQueueBase<T>::suspend):
        (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
        * dom/GenericEventQueue.h:
        * platform/GenericTaskQueue.h:

2019-10-01  Alex Christensen  <achristensen@webkit.org>

        Fix internal build after r250549
        https://bugs.webkit.org/show_bug.cgi?id=202390

        There is an internal #define confirm on some systems, so rename DOMWindow::confirm to DOMWindow::confirmForBindings.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::confirmForBindings):
        (WebCore::DOMWindow::confirm): Deleted.
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2019-10-01  Chris Dumez  <cdumez@apple.com>

        Unreviewed attempt to fix Windows build after r250527.

        * platform/GenericTaskQueue.h:

2019-10-01  Zan Dobersek  <zdobersek@igalia.com>

        [CoordGraphics] Implement sync methods for position, bounds origin
        https://bugs.webkit.org/show_bug.cgi?id=202398

        Reviewed by Carlos Garcia Campos.

        Add the CoordinatedGraphicsLayer::syncPosition() and
        CoordinatedGraphicsLayer::syncBoundsOrigin() method overrides, both
        performing a synchronization of the given GraphicsLayer attribute.

        These methods are used by the scrolling code to reflect changes in these
        attributes without causing a layer flush (which is not necessary since
        the changes have already been applied in an equivalent way).

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::didChangeGeometry):
        (WebCore::CoordinatedGraphicsLayer::syncPosition):
        (WebCore::CoordinatedGraphicsLayer::syncBoundsOrigin):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

2019-10-01  Joonghun Park  <jh718.park@samsung.com>

        Make table's clientWidth/Height include its border sizes.
        https://bugs.webkit.org/show_bug.cgi?id=200974

        WebKit doesn't have table wrapper box currently
        while Gecko has it,
        so this CL tries to mimic the behavior that
        clientWidth/Height refers to table wrapper box
        which doesn't have borders applied to itself
        and table grid box has the borders.

        This CL adds table's border sizes
        to clientWidth/Height
        at |LayoutBox::PixelSnappedClientWidth/Height|.

        As a result of this CL, table's clientWidth/Height
        and offsetWidth/Height are equal now, respectively.

        The corresponding csswg discussion is
        https://github.com/w3c/csswg-drafts/issues/4245.

        Reviewed by Antti Koivisto.

        Tests: fast/table/border-collapsing/bug236727.html
               imported/w3c/web-platform-tests/css/cssom-view/table-border-collapse-client-width-height.html
               imported/w3c/web-platform-tests/css/cssom-view/table-border-separate-client-width-height.html
               imported/w3c/web-platform-tests/css/cssom-view/table-with-border-client-width-height.html

        * dom/Element.cpp:
        (WebCore::Element::clientWidth):
        (WebCore::Element::clientHeight):

2019-10-01  youenn fablet  <youenn@apple.com>

        Remove races condition when validating capture sandbox extension revocation
        https://bugs.webkit.org/show_bug.cgi?id=202133
        <rdar://problem/55660905>

        Reviewed by Eric Carlson.

        Covered by existing tests.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::endCapture):
        Synchronously update document media state when capture is ended.
        This allows to validate the fact that no document is capturing while we revoke sandbox extensions.

2019-10-01  youenn fablet  <youenn@apple.com>

        MediaDevices should be SecureContext
        https://bugs.webkit.org/show_bug.cgi?id=202267

        Reviewed by Eric Carlson.

        Manually tested since 127.0.0.1/localhost are secure contexts.

        * Modules/mediastream/MediaDevices.idl:
        * bindings/js/WebCoreBuiltinNames.h:

2019-09-30  Alex Christensen  <achristensen@webkit.org>

        Resurrect Mac CMake build
        https://bugs.webkit.org/show_bug.cgi?id=202384

        Rubber-stamped by Tim Horton.

        * PlatformMac.cmake:

2019-09-30  Chris Dumez  <cdumez@apple.com>

        Make GenericEventQueue an ActiveDOMObject
        https://bugs.webkit.org/show_bug.cgi?id=202373

        Reviewed by Eric Carlson.

        Make GenericEventQueue an ActiveDOMObject so that it is guaranteed to never fire any events while
        suspended without requiring the client to explicitly suspend/resume the event queue.

        * Modules/encryptedmedia/MediaKeySession.cpp:
        (WebCore::MediaKeySession::MediaKeySession):
        (WebCore::MediaKeySession::enqueueMessage):
        (WebCore::MediaKeySession::updateKeyStatuses):
        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
        (WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
        (WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
        (WebCore::WebKitMediaKeySession::addKeyTimerFired):
        (WebCore::WebKitMediaKeySession::sendMessage):
        (WebCore::WebKitMediaKeySession::sendError):
        (WebCore::WebKitMediaKeySession::hasPendingActivity const):
        (WebCore::WebKitMediaKeySession::stop):
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::MediaSource):
        (WebCore::MediaSource::hasPendingActivity const):
        (WebCore::MediaSource::stop):
        (WebCore::MediaSource::canSuspendForDocumentSuspension const):
        (WebCore::MediaSource::scheduleEvent):
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::SourceBuffer):
        (WebCore::SourceBuffer::hasPendingActivity const):
        (WebCore::SourceBuffer::stop):
        (WebCore::SourceBuffer::scheduleEvent):
        * Modules/mediasource/SourceBuffer.h:
        * Modules/mediasource/SourceBufferList.cpp:
        (WebCore::SourceBufferList::SourceBufferList):
        (WebCore::SourceBufferList::scheduleEvent):
        (WebCore::SourceBufferList::canSuspendForDocumentSuspension const):
        * Modules/mediasource/SourceBufferList.h:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        (WebCore::AudioContext::stop):
        * Modules/webaudio/AudioContext.h:
        * animation/DeclarativeAnimation.cpp:
        (WebCore::DeclarativeAnimation::DeclarativeAnimation):
        (WebCore::DeclarativeAnimation::tick):
        (WebCore::DeclarativeAnimation::needsTick const):
        (WebCore::DeclarativeAnimation::remove):
        (WebCore::DeclarativeAnimation::enqueueDOMEvent):
        (WebCore::DeclarativeAnimation::stop):
        (WebCore::DeclarativeAnimation::suspend):
        (WebCore::DeclarativeAnimation::resume):
        * animation/DeclarativeAnimation.h:
        * dom/GenericEventQueue.cpp:
        (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
        (WebCore::GenericEventQueueBase<T>::setPaused):
        (WebCore::GenericEventQueueBase<T>::canSuspendForDocumentSuspension const):
        (WebCore::GenericEventQueueBase<T>::suspend):
        (WebCore::GenericEventQueueBase<T>::resume):
        (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
        (WebCore::GenericEventQueueBase<T>::stop):
        (WebCore::GenericEventQueueBase<T>::activeDOMObjectName const):
        (WebCore::GenericEventQueue::create):
        (WebCore::MainThreadGenericEventQueue::create):
        * dom/GenericEventQueue.h:
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::MessagePort):
        (WebCore::MessagePort::close):
        (WebCore::MessagePort::dispatchMessages):
        * dom/MessagePort.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::scheduleEvent):
        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
        (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
        (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
        (WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
        (WebCore::HTMLMediaElement::closeTaskQueues):
        (WebCore::HTMLMediaElement::suspend):
        (WebCore::HTMLMediaElement::resume):
        (WebCore::HTMLMediaElement::hasPendingActivity const):
        (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
        * html/HTMLMediaElement.h:
        * html/track/TrackListBase.cpp:
        (WebCore::TrackListBase::TrackListBase):
        (WebCore::TrackListBase::scheduleTrackEvent):
        (WebCore::TrackListBase::scheduleChangeEvent):
        (WebCore::TrackListBase::isChangeEventScheduled const):
        (WebCore::TrackListBase::canSuspendForDocumentSuspension const):
        * html/track/TrackListBase.h:
        * workers/Worker.cpp:
        (WebCore::Worker::Worker):
        (WebCore::Worker::terminate):
        (WebCore::Worker::stop):
        (WebCore::Worker::hasPendingActivity const):
        (WebCore::Worker::enqueueEvent):
        (WebCore::Worker::dispatchEvent):
        * workers/Worker.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        (WebCore::ServiceWorkerContainer::startMessages):
        (WebCore::ServiceWorkerContainer::postMessage):
        (WebCore::ServiceWorkerContainer::stop):
        * workers/service/ServiceWorkerContainer.h:

2019-09-30  Chris Dumez  <cdumez@apple.com>

        IDBTransaction / IDBObjectStore should not prevent a page from entering the back / forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202291
        <rdar://problem/55760106>

        Reviewed by Geoffrey Garen.

        IDBObjectStore does not fire any events and should therefore not cause any problem while in PageCache.
        IDBTransaction can only fire abort/complete/error events, all of which are being enqueued to the
        DocumentEventQueue. The DocumentEventQueue subclasses SuspendableTimer which will correctly suspend
        while the document is in page cache. IDBTransaction will therefore not cause events to fire (and JS
        to run) while in page cache.

        Test: storage/indexeddb/IDBTransaction-page-cache.html

        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::canSuspendForDocumentSuspension const):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::canSuspendForDocumentSuspension const):

2019-09-30  Chris Dumez  <cdumez@apple.com>

        Refine restrictions for X-Temp-Tablet HTTP header experiment
        https://bugs.webkit.org/show_bug.cgi?id=202367
        <rdar://problem/55849139>

        Reviewed by Geoffrey Garen.

        Refine restrictions for X-Temp-Tablet HTTP header experiment:
        1. Only send the header if the embedding application is MobileSafari.
        2. Only send the header if the first party is google.com
        3. Only send the header if the current date is before 2/1/2020
        4. Send the header even if using an ephemeral session

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::isXTempTabletHeaderExperimentOver):
        (WebCore::CachedResourceLoader::CachedResourceLoader):
        (WebCore::isGoogleSearch):
        (WebCore::CachedResourceLoader::shouldSendXTempTabletHeader const):
        (WebCore::CachedResourceLoader::requestResource):
        * loader/cache/CachedResourceLoader.h:

2019-09-30  Chris Dumez  <cdumez@apple.com>

        Pages with Web Workers cannot enter the back / forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202296
        <rdar://problem/55764073>

        Reviewed by Jer Noble.

        Allow pages that use Web Workers to enter the back / forward cache.
        This involves adding an EventQueue for all event firing on Woker
        objects and suspending this EventQueue while in the page cache.

        This was preventing some of the pages on weather.com to enter the
        back / forward cache.

        Test: fast/workers/worker-page-cache.html

        * Modules/encryptedmedia/MediaKeySession.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
        * Modules/mediasource/MediaSource.h:
        * Modules/mediasource/SourceBuffer.h:
        * Modules/mediasource/SourceBufferList.h:
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        * Modules/webaudio/AudioContext.h:
        * animation/DeclarativeAnimation.h:

        * dom/GenericEventQueue.cpp:
        (WebCore::TaskQueueConstructor::construct):
        (WebCore::TaskQueueConstructor<Timer>::construct):
        (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
        (WebCore::GenericEventQueueBase<T>::enqueueEvent):
        (WebCore::GenericEventQueueBase<T>::dispatchOneEvent):
        (WebCore::GenericEventQueueBase<T>::close):
        (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
        (WebCore::GenericEventQueueBase<T>::hasPendingEvents const):
        (WebCore::GenericEventQueueBase<T>::hasPendingEventsOfType const):
        (WebCore::GenericEventQueueBase<T>::suspend):
        (WebCore::GenericEventQueueBase<T>::resume):
        * dom/GenericEventQueue.h:
        (WebCore::GenericEventQueueBase::isSuspended const):
        (WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue):
        (WebCore::GenericEventQueue::GenericEventQueue):
        Rename GenericEventQueue to MainThreadGenericEventQueue since its implementation relies
        on a global shared Timer to fire events. Introduce a new GenericEventQueue which can
        actually be used from any thread. This is useful for MessagePort, which is used both
        on the main thread and on worker threads.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::MessagePort):
        (WebCore::MessagePort::close):
        (WebCore::MessagePort::suspend):
        (WebCore::MessagePort::resume):
        (WebCore::MessagePort::dispatchMessages):
        * dom/MessagePort.h:
        Use an GenericEventQueue in MessagePort for consistency with Worker.
        MessagePort is an ActiveDOMobject which returns true in canSuspend(),
        we therefore need to make sure it suspends event firing while
        suspended.

        * html/HTMLMediaElement.h:
        * html/track/TrackListBase.h:
        * workers/Worker.cpp:
        (WebCore::Worker::Worker):
        (WebCore::Worker::terminate):
        (WebCore::Worker::canSuspendForDocumentSuspension const):
        (WebCore::Worker::suspend):
        (WebCore::Worker::resume):
        (WebCore::Worker::stop):
        (WebCore::Worker::hasPendingActivity const):
        (WebCore::Worker::notifyFinished):
        (WebCore::Worker::enqueueEvent):
        (WebCore::Worker::dispatchEvent):
        * workers/Worker.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
        (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):

2019-09-27  Keith Rollin  <krollin@apple.com>

        Coalesce or remove PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
        https://bugs.webkit.org/show_bug.cgi?id=202119
        <rdar://problem/55638792>

        Unreviewed, address post landing review comments for r248533 from
        Darin Adler.

        No new tests -- no new or changed functionality.

        * Modules/applepay/cocoa/PaymentContactCocoa.mm:
        (WebCore::convert):
        (WebCore::subLocality): Deleted.
        (WebCore::setSubLocality): Deleted.
        (WebCore::subAdministrativeArea): Deleted.
        (WebCore::setSubAdministrativeArea): Deleted.

2019-09-30  Antti Koivisto  <antti@apple.com>

        RenderLineBreak should use LineLayoutTraversal
        https://bugs.webkit.org/show_bug.cgi?id=202316

        Reviewed by Zalan Bujtas.

        Replace more path specific code with LineLayoutTraversal.

        * Headers.cmake:
        * rendering/RenderLineBreak.cpp:
        (WebCore::RenderLineBreak::linesBoundingBox const):
        (WebCore::RenderLineBreak::absoluteRects const):
        (WebCore::RenderLineBreak::absoluteQuads const):
        (WebCore::simpleLineLayout): Deleted.
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::writeTextBox):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::computeBoundingBox): Deleted.
        (WebCore::SimpleLineLayout::collectAbsoluteRects): Deleted.
        (WebCore::SimpleLineLayout::rendererForPosition): Deleted.
        * rendering/SimpleLineLayoutFunctions.h:
        * rendering/line/LineLayoutTraversal.cpp:
        (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::atEnd const):
        (WebCore::LineLayoutTraversal::elementBoxFor):
        (WebCore::LineLayoutTraversal::TextBox::rect const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::logicalRect const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::hasHyphen const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::dirOverride const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::text const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::isLineBreak const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::localStartOffset const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::localEndOffset const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::length const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::isLast const): Deleted.
        (WebCore::LineLayoutTraversal::TextBox::iterator const): Deleted.

        Move to header as templates.

        * rendering/line/LineLayoutTraversal.h:
        (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::operator bool const):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::operator* const):
        (WebCore::LineLayoutTraversal::ElementBoxIterator::operator-> const):

        Add a new iterator type for element boxes.
        It doesn't currently really iterate, is just allows testing for end.

        (WebCore::LineLayoutTraversal::Box<Iterator>::rect const):
        (WebCore::LineLayoutTraversal::Box<Iterator>::logicalRect const):
        (WebCore::LineLayoutTraversal::Box<Iterator>::isLeftToRightDirection const):
        (WebCore::LineLayoutTraversal::Box<Iterator>::dirOverride const):
        (WebCore::LineLayoutTraversal::Box<Iterator>::isLineBreak const):
        (WebCore::LineLayoutTraversal::Box<Iterator>::iterator const):

        Split properties that all inline boxes have out from TextBox.
        Make it a template class.

        (WebCore::LineLayoutTraversal::TextBox<Iterator>::hasHyphen const):
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::text const):
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::localStartOffset const):
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::localEndOffset const):
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::length const):
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLastOnLine const):
        (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLast const):

        Make a template class.

        (WebCore::LineLayoutTraversal::hasTextBoxes): Deleted.

2019-09-30  Rob Buis  <rbuis@igalia.com>

        No-Cors check should take into account same-origin
        https://bugs.webkit.org/show_bug.cgi?id=202353

        Reviewed by Youenn Fablet.

        No-Cors check should take into account same-origin, in that case the
        check should bail out, since same-origin is already handled in
        the first step of [1].

        Test: imported/web-platform-tests/fetch/api/redirect/redirect-mode.any.html

        [1] https://fetch.spec.whatwg.org/#main-fetch Step 5

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::canRequest):

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

        [Nicosia] Complete ScrollingTreeNicosia::createScrollingTreeNode()
        https://bugs.webkit.org/show_bug.cgi?id=202358

        Reviewed by Carlos Garcia Campos.

        * page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
        (WebCore::ScrollingTreeNicosia::createScrollingTreeNode):
        Return appropriate objects for the remaining node types.

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

        [Nicosia] Add missing conversion casts for LayerRepresentation objects
        https://bugs.webkit.org/show_bug.cgi?id=202357

        Reviewed by Carlos Garcia Campos.

        After r250491, we have to request explicit conversion of
        LayerRepresentation objects to Nicosia::PlatformLayer pointers.

        * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
        (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp:
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
        * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
        (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
        * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
        (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):

2019-09-29  Zan Dobersek  <zdobersek@igalia.com>

        ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
        https://bugs.webkit.org/show_bug.cgi?id=202256
        <rdar://problem/55772092>

        Reviewed by Simon Fraser.

        Make the scroll container and scrolled contents layer holders
        platform-independent by using the LayerRepresentation as the underlying
        type for the two member variables in ScrollingTreeScrollingNode.

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

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

        [FTW] Correct compositing, shadow, and radial gradient implementations
        https://bugs.webkit.org/show_bug.cgi?id=202177

        Reviewed by Fujii Hironori.

        This patch corrects a number of implementation errors in basic Canvas
        drawing operations.

        Tested by canvas/philip/tests 

        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::State::setCompositeOperation): Initialize blend and
        composite modes to correct defaults.
        (WebCore::Direct2D::drawWithShadowHelper): Correct value used for blur
        standard deviation to more closely match other browser output.
        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::createBitmapCopyFromContext): Added helper function.
        * platform/graphics/win/Direct2DUtilities.h:
        * platform/graphics/win/GradientDirect2D.cpp:
        (WebCore::Gradient::generateGradient): Properly handle the case of a non-zero
        initial gradient radius. Properly compute the final radius.
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::readDataFromBitmapIfNeeded const): Update to use ID2D1DeviceContext
        from platformContext, rather than searching for it each time.
        (WebCore::ImageBufferData::compatibleBitmap): Ditto.
        * platform/graphics/win/PlatformContextDirect2D.cpp:
        (WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Grab the ID2D1DeviceContext for
        the RenderTarget at construction time.
        (WebCore::PlatformContextDirect2D::setRenderTarget): Ditto.
        (WebCore::PlatformContextDirect2D::endDraw): Perform compositing operations when needed.
        (WebCore::PlatformContextDirect2D::compositeIfNeeded): Added.
        (WebCore::PlatformContextDirect2D::setBlendAndCompositeMode): Update to properly set the
        blend and compositing mode (depending on global value set for the canvas.)
        * platform/graphics/win/PlatformContextDirect2D.h:
        (WebCore::PlatformContextDirect2D::deviceContext):
        (WebCore::PlatformContextDirect2D::setRenderTarget): Deleted.
        (WebCore::PlatformContextDirect2D::setBlendMode): Deleted.
        (WebCore::PlatformContextDirect2D::setCompositeMode): Deleted.

2019-09-29  Zan Dobersek  <zdobersek@igalia.com>

        Tighten up LayerRepresentation operators
        https://bugs.webkit.org/show_bug.cgi?id=202344

        Reviewed by Simon Fraser.

        Make the operators on the LayerRepresentation class explicit.
        Additionally, the bool operator is added to the class, allowing objects
        of this class to be safely used in boolean contexts like null checks.
        Before, use in such contexts fell back to using the
        GraphicsLayer::PlatformLayerID operator which caused asserts when the
        internal representation was of different type.

        While the explicit operators prevent misuse, they do require additional
        conversion casts to retrieve the internal LayerRepresentation value.

        * page/scrolling/ScrollingStateNode.h:
        (WebCore::LayerRepresentation::operator GraphicsLayer* const):
        (WebCore::LayerRepresentation::operator PlatformLayer* const):
        (WebCore::LayerRepresentation::operator GraphicsLayer::PlatformLayerID const):
        (WebCore::LayerRepresentation::operator bool const):
        (WebCore::LayerRepresentation::toRepresentation const):
        Add a missing ASSERT_NOT_REACHED() invocation.
        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):

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

        [LFC][IFC] Remove InlineLayout abstraction layer
        https://bugs.webkit.org/show_bug.cgi?id=202352
        <rdar://problem/55811532>

        Reviewed by Antti Koivisto.

        Move InlineLayout functions to InlineFormattingContext. Now inline layout has
        1. InlineFormattingContext -high level layout and preferred width computation, collecting inline content, constructing display boxes
        2. LineLayout -responsible for placing inline content on the current line (partial inline content handling, line breaking etc)
        3. Line -represents an actual line, turns inline content into runs.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::lineLayout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
        (WebCore::Layout::InlineFormattingContext::initialConstraintsForLine):
        (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const): Deleted.
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const): Deleted.
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const): Deleted.
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState): Deleted.
        (WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const): Deleted.
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: Removed.
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::inlineItems const):
        * layout/inlineformatting/InlineLineLayout.cpp: Added.
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::LineInput::LineInput):
        (WebCore::Layout::LineLayout::UncommittedContent::add):
        (WebCore::Layout::LineLayout::UncommittedContent::reset):
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::LineLayout::commitPendingContent):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::layout):
        * layout/inlineformatting/InlineLineLayout.h: Added.
        (WebCore::Layout::LineLayout::formattingContext const):
        (WebCore::Layout::LineLayout::UncommittedContent::runs):
        (WebCore::Layout::LineLayout::UncommittedContent::isEmpty const):
        (WebCore::Layout::LineLayout::UncommittedContent::size const):
        (WebCore::Layout::LineLayout::UncommittedContent::width const):

2019-09-29  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Add overflow, overflow proxy node implementations
        https://bugs.webkit.org/show_bug.cgi?id=202306

        Reviewed by Carlos Garcia Campos.

        Add the ScrollingTreeOverflowScrollProxyNode and
        ScrollingTreeOverflowScrollingNodeNicosia classes, implementing the
        missing overlfow node types. Both implementations are based on the
        corresponsing classes for Cocoa/Mac platforms and should ideally
        share most of the platform-agnostic logic.

        * SourcesWPE.txt:
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
        (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h: Added.
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: Added.
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::create):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::ScrollingTreeOverflowScrollingNodeNicosia):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::adjustedScrollPosition const):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h: Added.

2019-09-28  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Crash when removing the target element while animating its attributes
        https://bugs.webkit.org/show_bug.cgi?id=202247

        Reviewed by Darin Adler.

        If SMIL is animating a CSS attribute, there is a chance the animation is
        ended while it is being started or progressed. For that reason, the member
        SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be
        be protected in resetAnimatedType() and calculateAnimatedValue().

        While SMILTimeContainer::updateAnimations() is calling progress() for the
        scheduled animation elements, SMILTimeContainer::unschedule() might get
        called if processing an animation causes events to be dispatched. For that
        reason we need to copy the scheduled animations Vector before processing
        them so we avoid changing the Vector while looping through its items.

        Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges
        which was added in r129670 for debugging purposes. In some situations, 
        the scheduled animations map could be modified out from under some of the
        functions of SMILTimeContainer.

        Test: svg/animations/animate-and-remove-target-element.html

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::SVGAnimateElementBase::resetAnimatedType):
        (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
        * svg/SVGAnimateElementBase.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::createAnimator):
        * svg/SVGElement.h:
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::schedule):
        (WebCore::SMILTimeContainer::unschedule):
        (WebCore::SMILTimeContainer::setElapsed):
        (WebCore::SMILTimeContainer::sortByPriority):
        (WebCore::SMILTimeContainer::processAnimations):
        (WebCore::SMILTimeContainer::processScheduledAnimations):
        (WebCore::SMILTimeContainer::updateAnimations):
        (WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted.
        * svg/animation/SMILTimeContainer.h:
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::calculateNextProgressTime const):
        * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
        * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
        * svg/properties/SVGAnimatedPropertyPairAnimator.h:
        * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
        * svg/properties/SVGAttributeAnimator.h:
        * svg/properties/SVGMemberAccessor.h:
        (WebCore::SVGMemberAccessor::createAnimator const):
        * svg/properties/SVGPrimitivePropertyAnimator.h:
        (WebCore::SVGPrimitivePropertyAnimator::create):
        * svg/properties/SVGPropertyAnimatorFactory.h:
        (WebCore::SVGPropertyAnimatorFactory::createAnimator):
        * svg/properties/SVGPropertyOwnerRegistry.h:
        * svg/properties/SVGPropertyRegistry.h:
        * svg/properties/SVGValuePropertyAnimatorImpl.h:
        * svg/properties/SVGValuePropertyListAnimatorImpl.h:

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

        [LFC][IFC] Move horizontal alignment to Line
        https://bugs.webkit.org/show_bug.cgi?id=202351
        <rdar://problem/55810139>

        Reviewed by Antti Koivisto.

        Line should be able to finalize the run placement including horizontal alignment.

        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineInput::LineInput):
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::verticalAlignContent):
        (WebCore::Layout::Line::horizontalAlignContent):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        * layout/inlineformatting/InlineLine.h:

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

        [IDL] Support record<DOMString, *Callback> in bindings
        https://bugs.webkit.org/show_bug.cgi?id=202326

        Reviewed by Sam Weinig.

        Currently, IDLRecord's converter assumes that the value type (template argument V) can be converted by passing
        in only an ExecState and the JSValue, since it calls `auto typedValue = Converter<V>::convert(state, subValue)`.
        However, IDLCallbackFunctions additionally require the JSDOMGlobalObject (see JSDOMConverterCallbacks.h). This
        results in a compilation error in generated code, when attempting to convert the record.

        To fix this, teach Converter<IDLRecord<K, V>> to accept three arguments (the ExecState, value, and global
        object) in the case where V requires the global object. Additionally, let the bindings generator know that
        JSValue to native object conversion requires the global object, by returning whether or not the value type of
        the IDL record requires the global object, in the case where the given type is a record.

        * bindings/js/JSDOMConvertRecord.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (JSValueToNativeDOMConvertNeedsGlobalObject):
        * bindings/scripts/test/JS/JSTestObj.cpp:

        Test this scenario by augmenting TestObj.idl with record<DOMString, VoidCallback>.

        (WebCore::jsTestObjStringVoidCallbackRecordAttrGetter):
        (WebCore::jsTestObjStringVoidCallbackRecordAttr):
        (WebCore::setJSTestObjStringVoidCallbackRecordAttrSetter):
        (WebCore::setJSTestObjStringVoidCallbackRecordAttr):
        * bindings/scripts/test/TestObj.idl:

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

        [LFC][IFC] Line::InitialConstraints's heightAndBaseline should be optional
        https://bugs.webkit.org/show_bug.cgi?id=202348

        Reviewed by Antti Koivisto.

        Vertical properties are undefined while computing the preferred width.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineInput::LineInput):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        * layout/inlineformatting/InlineLine.h:

2019-09-28  Chris Dumez  <cdumez@apple.com>

        [Experiment][iOS] Add temporary HTTP header to distinguish iPads for requests to Google
        https://bugs.webkit.org/show_bug.cgi?id=202335
        <rdar://problem/55790994>

        Reviewed by Maciej Stachowiak.

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        * platform/network/HTTPHeaderNames.in:

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

        [LFC][IFC] Line::Box should have a const public interface
        https://bugs.webkit.org/show_bug.cgi?id=202336
        <rdar://problem/55798628>

        Reviewed by Antti Koivisto.

        Clean up Line::Box interface.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::displayRun const):
        (WebCore::Layout::Line::Run::isVisuallyEmpty const):
        (WebCore::Layout::Line::Run::expand):
        (WebCore::Layout::Line::Run::displayRun): Deleted.

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

        Pages using WebGLRenderingContext fail to enter the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202318
        <rdar://problem/55783612>

        Reviewed by Tim Horton.

        Allow pages with a WebGLRenderingContext to enter the back/forward cache by updating the
        implementation to use SuspendableTimers to fire JS events. This guarantees that no events
        will be fired (and thus no JS will run) while in the page cache.

        This was preventing some of the pages on weather.com and facebook.com from entering the
        back/forward cache.

        Test: fast/canvas/webgl/canvas-webgl-page-cache.html

        * dom/DocumentEventQueue.cpp:
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
        (WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension const):
        (WebCore::WebGLRenderingContextBase::suspend):
        (WebCore::WebGLRenderingContextBase::resume):
        (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
        (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
        (WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification):
        (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent):
        * html/canvas/WebGLRenderingContextBase.h:
        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::DOMTimer):
        * page/DOMTimer.h:
        * page/SuspendableTimer.cpp:
        (WebCore::SuspendableTimerBase::SuspendableTimerBase):
        (WebCore::SuspendableTimerBase::hasPendingActivity const):
        (WebCore::SuspendableTimerBase::stop):
        (WebCore::SuspendableTimerBase::suspend):
        (WebCore::SuspendableTimerBase::resume):
        (WebCore::SuspendableTimerBase::canSuspendForDocumentSuspension const):
        (WebCore::SuspendableTimerBase::didStop):
        (WebCore::SuspendableTimerBase::cancel):
        (WebCore::SuspendableTimerBase::startRepeating):
        (WebCore::SuspendableTimerBase::startOneShot):
        (WebCore::SuspendableTimerBase::repeatInterval const):
        (WebCore::SuspendableTimerBase::augmentFireInterval):
        (WebCore::SuspendableTimerBase::augmentRepeatInterval):
        (WebCore::SuspendableTimer::activeDOMObjectName const):
        * page/SuspendableTimer.h:

2019-09-27  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fixes for non-unified builds after r249714
        https://bugs.webkit.org/show_bug.cgi?id=202304

        Reviewed by Youenn Fablet.

        No new tests needed.

        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: Add missing inclusion of Frame.h
        to make the compiler stop complaining about Frame being used without being defined.
        * inspector/InspectorShaderProgram.h: Add missing inclusion of wtf/Variant.h, where
        WTF::Monostate is defined; and prefixed the usage with its namespace.

2019-09-27  Andres Gonzalez  <andresg_22@apple.com>

        Support accessibility for <figure> element on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=202272
        <rdar://problem/54789907>

        Reviewed by Chris Fleizach.

        Test: accessibility/ios-simulator/figure-element.html

        Added a role description for the <figure> element.
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::roleDescription const):

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

        [iPadOS] Can’t use RalphLauren.com on iPad because hover menus don’t stay up
        https://bugs.webkit.org/show_bug.cgi?id=202331
        <rdar://problem/55629493>

        Reviewed by Tim Horton.

        Unfortunately the top level menu items now are ARIA labelled as 'buttons' and that triggers the fast path on content observation.
        This patch introduces a quirk on ralphLauren.com to ignore the ARIA labels when checking whether the target node should always click through.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldIgnoreAriaForFastPathContentObservationCheck const):
        * page/Quirks.h:

2019-09-27  Per Arne Vollan  <pvollan@apple.com>

        [Win] Crash under FontCache::lastResortFallbackFont
        https://bugs.webkit.org/show_bug.cgi?id=202325
        <rdar://problem/47856730>

        Reviewed by Brent Fulgham.

        As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font  
        on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.
 
        No new tests. I have not been able to reproduce this issue. 

        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::FontCache::lastResortFallbackFont):

2019-09-27  Jiewen Tan  <jiewen_tan@apple.com>

        Unreviewed, rolling out r250397.

        caused failure on iOS 13

        Reverted changeset:

        "REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-
        credential-create-success-u2f.https.html is failing"
        https://bugs.webkit.org/show_bug.cgi?id=201620
        https://trac.webkit.org/changeset/250397

2019-09-27  Jer Noble  <jer.noble@apple.com>

        [iOS] Vimeo fails to AirPlay in desktop mode
        https://bugs.webkit.org/show_bug.cgi?id=202322

        Reviewed by Eric Carlson.

        Add a Quirk which opts Vimeo out of the preload=auto restriction, and allows their
        second video element containing a HLS stream to correctly start AirPlaying when the
        system route changes.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::finishInitialization):
        * page/Quirks.cpp:
        (WebCore::Quirks::needsPreloadAutoQuirk const):
        * page/Quirks.h:

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

        [LFC][IFC] Line::close should merge the text runs.
        https://bugs.webkit.org/show_bug.cgi?id=202319
        <rdar://problem/55785949>

        Reviewed by Antti Koivisto.

        Now Line::close returns the final Display::Run list.

        * layout/displaytree/DisplayRect.h:
        (WebCore::Display::Rect::expandHorizontally):
        (WebCore::Display::Rect::expandVertically):
        (WebCore::Display::Rect::expand):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::expandVertically):
        (WebCore::Display::Run::expandHorizontally):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::displayRun):

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

        Allow pages served over HTTPS with `Cache-Control: no-store` header to enter the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202314
        <rdar://problem/55783482>

        Reviewed by Alex Christensen.

        Allow pages served over HTTPS with `Cache-Control: no-store` header to enter the back/forward cache.
        This was preventing all pages on Facebook.com to enter the back/forward cache.

        No new tests, updated existing test.

        * history/PageCache.cpp:
        (WebCore::canCacheFrame):

2019-09-27  Devin Rousso  <drousso@apple.com>

        Flaky Test: inspector/canvas/updateShader.html
        https://bugs.webkit.org/show_bug.cgi?id=202186
        <rdar://problem/55716053>

        Reviewed by Joseph Pecoraro.

        If the `WebGLProgram` outlives it's `WebGLRenderingContext`, the `ScriptExecutionContext*`
        that was provided in the constructor won't be invalidated leading to the bad access crash.

        Rather than pass the `ScriptExecutionContext*` directly, have `WebGLProgram` inherit from
        `ContextDestructionObserver` so that it can propertly invalidate (and notify Web Inspector)
        when the related context is about to be destroyed.

        Test: inspector/canvas/updateShader.html

        * html/canvas/WebGLProgram.h:
        (WebCore::WebGLProgram::scriptExecutionContext const): Deleted.
        * html/canvas/WebGLProgram.cpp:
        (WebCore::WebGLProgram::WebGLProgram):
        (WebCore::WebGLProgram::contextDestroyed): Added.

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

        [LFC][IFC] Replace Line::Run's logicalRect/textContext with Display::Run
        https://bugs.webkit.org/show_bug.cgi?id=202313
        <rdar://problem/55782430>

        Reviewed by Antti Koivisto.

        Display::Run is a container for logical rect and text context. Let's replace Line::Run's logical rect/text context with Display::Run.

        * layout/Verification.cpp:
        (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * layout/displaytree/DisplayRun.h:
        (WebCore::Display::Run::logicalRect const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::alignRuns const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::addInlineRun):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::Run):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::displayRun const):
        (WebCore::Layout::Line::Run::logicalRect const):
        (WebCore::Layout::Line::Run::adjustLogicalTop):
        (WebCore::Layout::Line::Run::moveVertically):
        (WebCore::Layout::Line::Run::moveHorizontally):
        (WebCore::Layout::Line::Run::textContext const): Deleted.
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):

2019-09-27  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r250415.

        Broke iOS debug testing with 50 crashes and 850 API failure

        Reverted changeset:

        "ScrollingTreeScrollingNode: use LayerRepresentation for
        scroll container, scrolled contents layers"
        https://bugs.webkit.org/show_bug.cgi?id=202256
        https://trac.webkit.org/changeset/250415

2019-09-27  Alex Christensen  <achristensen@webkit.org>

        Move service worker process termination delay disabling from process pool to website data store
        https://bugs.webkit.org/show_bug.cgi?id=202308

        Reviewed by Chris Dumez.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::SWServer):
        (WebCore::SWServer::unregisterServiceWorkerClient):
        * workers/service/server/SWServer.h:
        (WebCore::SWServer::disableServiceWorkerProcessTerminationDelay): Deleted.

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

        IDBRequest should not prevent a page from entering the back/forward cache
        https://bugs.webkit.org/show_bug.cgi?id=202270
        <rdar://problem/55744717>

        Reviewed by Youenn Fablet.

        Update IDBRequest::canSuspendForDocumentSuspension() to return true instead of
        false. IDBRequest can only fire 2 events (error / success) and for both its
        merely enqueues the Event to the DocumentEventQueue. The DocumentEventQueue
        uses a SuspendableTimer (which will be suspended while the document is in the
        page cache) so there is no risk of firing the events (and thus running script)
        while in the page cache.

        Test: storage/indexeddb/IDBRequest-page-cache.html

        * Modules/indexeddb/IDBRequest.cpp:
        (WebCore::IDBRequest::canSuspendForDocumentSuspension const):

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

        [LFC][IFC] Remove redundant Line::TextContext member variables
        https://bugs.webkit.org/show_bug.cgi?id=202300
        <rdar://problem/55769916>

        Reviewed by Antti Koivisto.

        This is in preparation for using Display::Run in Line::Run instead of Display::Rect + TextContext.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::isWhitespace const):
        (WebCore::Layout::Line::Run::canBeExtended const):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::isVisuallyEmpty const):
        (WebCore::Layout::Line::Run::setVisuallyIsEmpty):
        (WebCore::Layout::Line::Run::setTextIsCollapsed): Deleted.

2019-09-27  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Implement frame scrolling functionality
        https://bugs.webkit.org/show_bug.cgi?id=202201

        Reviewed by Carlos Garcia Campos.

        Implement logic in the ScrollingTreeFrameScrollingNodeNicosia class,
        largely following the Mac port's implementation but skipping areas we
        don't support or can keep simple, like CSS scroll snap, frame pinning
        and more complex wheel event handling through the platform-specific
        delegate behavior.

        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::adjustedScrollPosition const):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):
        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:

2019-09-27  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] ScrollingCoordinatorNicosia should handle wheel events coming from the main thread
        https://bugs.webkit.org/show_bug.cgi?id=202275

        Reviewed by Carlos Garcia Campos.

        * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
        (WebCore::ScrollingCoordinatorNicosia::handleWheelEvent):
        Handle wheel events that get rerouted through the main thread,
        dispatching them back to the scrolling thread so that they end up
        performing the desired scroll if possible.

2019-09-27  Zan Dobersek  <zdobersek@igalia.com>

        [CoordinatedGraphics] support bounds origin
        https://bugs.webkit.org/show_bug.cgi?id=198998

        Reviewed by Carlos Garcia Campos.

        Add bounds-origin support to the CoordinatedGraphics stack. Currently we
        take the short-cut implementation of just combining the bounds origin
        and the position value and incorporating them into the layer transform
        we calculate in TextureMapperLayer.

        Additional boilerplate code is added, as required, to relay the
        WebCore::GraphicsLayer change of bounds origin to the rendering system.

        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
        (Nicosia::CompositionLayer::flushState):
        * platform/graphics/texmap/TextureMapperLayer.cpp:
        (WebCore::TextureMapperLayer::computeTransformsRecursive):
        (WebCore::TextureMapperLayer::setBoundsOrigin):
        * platform/graphics/texmap/TextureMapperLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::setBoundsOrigin):
        (WebCore::CoordinatedGraphicsLayer::computePositionRelativeToBase):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

2019-09-26  Zan Dobersek  <zdobersek@igalia.com>

        ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
        https://bugs.webkit.org/show_bug.cgi?id=202256

        Reviewed by Simon Fraser.

        Make the scroll container and scrolled contents layer holders
        platform-independent by using the LayerRepresentation as the underlying
        type for the two member variables in ScrollingTreeScrollingNode.

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):

2019-09-26  Chris Dumez  <cdumez@apple.com>

        Pages frequently fails to enter the back/forward cache due to pending loads
        https://bugs.webkit.org/show_bug.cgi?id=202289
        <rdar://problem/55758506>

        Reviewed by Geoffrey Garen.

        Allow pages to enter the back / forward cache, even if they have pending loads.
        Note that these pending loads get cancelled. Also note that we won't enter page
        cache unless the 'load' event has been fired in the main frame, since a
        HistoryItem would not get created otherwise. This was causing frequent transient
        failures to enter the back / forward cache while browsing (e.g. on weather.com).

        Test: http/tests/navigation/page-cache-pending-load.html

        * history/PageCache.cpp:
        (WebCore::canCacheFrame):
        * loader/CrossOriginPreflightChecker.cpp:
        * loader/CrossOriginPreflightChecker.h:
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::setMainDocumentError):
        (WebCore::DocumentLoader::stopLoading):
        * loader/DocumentLoader.h:
        * loader/DocumentThreadableLoader.cpp:
        * loader/DocumentThreadableLoader.h:
        * loader/cache/CachedResource.cpp:
        * loader/cache/CachedResource.h:
        * loader/cache/CachedResourceClient.h:
        (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):
        * page/DiagnosticLoggingKeys.cpp:
        (WebCore::DiagnosticLoggingKeys::mainFrameHasNotFinishedLoadingKey):
        * page/DiagnosticLoggingKeys.h:

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

        [LFC][IFC] Line::Run should have a reference to the associated InlineItem
        https://bugs.webkit.org/show_bug.cgi?id=202288
        <rdar://problem/55758112>

        Reviewed by Antti Koivisto.

        It makes it clearer where the type and the layout box come from.

        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::Run):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::layoutBox const):
        (WebCore::Layout::Line::Run::textContext const):
        (WebCore::Layout::Line::Run::isText const):
        (WebCore::Layout::Line::Run::isBox const):
        (WebCore::Layout::Line::Run::isLineBreak const):
        (WebCore::Layout::Line::Run::isContainerStart const):
        (WebCore::Layout::Line::Run::isContainerEnd const):
        (WebCore::Layout::Line::Run::type const): Deleted.

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

        [LFC][IFC] Remove redundant Line::Content
        https://bugs.webkit.org/show_bug.cgi?id=202284
        <rdar://problem/55757187>

        Reviewed by Antti Koivisto.

        Line::Content is really just a list or runs at this point.

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Run::Run):
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::Content::Run::Run): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Run::layoutBox const):
        (WebCore::Layout::Line::Run::logicalRect const):
        (WebCore::Layout::Line::Run::textContext const):
        (WebCore::Layout::Line::Run::type const):
        (WebCore::Layout::Line::Run::isText const):
        (WebCore::Layout::Line::Run::isBox const):
        (WebCore::Layout::Line::Run::isLineBreak const):
        (WebCore::Layout::Line::Run::isContainerStart const):
        (WebCore::Layout::Line::Run::isContainerEnd const):
        (WebCore::Layout::Line::Run::adjustLogicalTop):
        (WebCore::Layout::Line::Run::moveVertically):
        (WebCore::Layout::Line::Run::moveHorizontally):
        (WebCore::Layout::Line::Run::setTextIsCollapsed):
        (WebCore::Layout::Line::Content::Run::layoutBox const): Deleted.
        (WebCore::Layout::Line::Content::Run::logicalRect const): Deleted.
        (WebCore::Layout::Line::Content::Run::textContext const): Deleted.
        (WebCore::Layout::Line::Content::Run::type const): Deleted.
        (WebCore::Layout::Line::Content::Run::isText const): Deleted.
        (WebCore::Layout::Line::Content::Run::isBox const): Deleted.
        (WebCore::Layout::Line::Content::Run::isLineBreak const): Deleted.
        (WebCore::Layout::Line::Content::Run::isContainerStart const): Deleted.
        (WebCore::Layout::Line::Content::Run::isContainerEnd const): Deleted.
        (WebCore::Layout::Line::Content::Run::adjustLogicalTop): Deleted.
        (WebCore::Layout::Line::Content::Run::moveVertically): Deleted.
        (WebCore::Layout::Line::Content::Run::moveHorizontally): Deleted.
        (WebCore::Layout::Line::Content::Run::setTextIsCollapsed): Deleted.
        (WebCore::Layout::Line::Content::runs const): Deleted.
        (WebCore::Layout::Line::Content::runs): Deleted.

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

        [LFC][IFC] Move Line::Content::m_lineBox to Line.
        https://bugs.webkit.org/show_bug.cgi?id=202280
        <rdar://problem/55755798>

        Reviewed by Antti Koivisto.

        This is in preparation for Line producing Display::Runs instead of Line::Runs.

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::runs const):
        (WebCore::Layout::Line::availableWidth const):
        (WebCore::Layout::Line::lineBox const):
        (WebCore::Layout::Line::logicalTop const):
        (WebCore::Layout::Line::logicalBottom const):
        (WebCore::Layout::Line::logicalLeft const):
        (WebCore::Layout::Line::logicalHeight const):
        (WebCore::Layout::Line::contentLogicalWidth const):
        (WebCore::Layout::Line::contentLogicalRight const):
        (WebCore::Layout::Line::baselineOffset const):
        (WebCore::Layout::Line::Content::lineBox const): Deleted.
        (WebCore::Layout::Line::Content::lineBox): Deleted.
        (WebCore::Layout::Line::Content::setLineBox): Deleted.

2019-09-26  Jiewen Tan  <jiewen_tan@apple.com>

        REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-credential-create-success-u2f.https.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=201620

        Unreviewed, roll back part of r249737 to confirm the cause.

        * Modules/webauthn/fido/U2fResponseConverter.cpp:
        (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):

2019-09-26  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r250385.

        Broke imported/w3c/web-platform-tests/svg/animations/syncbase-
        remove-add-while-running.html on all platforms. Which was
        caught by EWS

        Reverted changeset:

        "Non-callable "handleEvent" property is silently ignored"
        https://bugs.webkit.org/show_bug.cgi?id=200066
        https://trac.webkit.org/changeset/250385

2019-09-26  Kate Cheney  <katherine_cheney@apple.com>

        Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
        https://bugs.webkit.org/show_bug.cgi?id=195420
        <rdar://problem/54213551> 

        Reviewed by Brent Fulgham.

        Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html
               http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
               http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
               http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
               http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
               http/tests/resourceLoadStatistics/cookie-deletion-database.html
               http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
               http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
               http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
               http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
               http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
               http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/enable-debug-mode-database.html
               http/tests/resourceLoadStatistics/grandfathering-database.html
               http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
               http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/prune-statistics-database.html
               http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
               http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
               http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
               http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
               http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
               http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
               http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html

        * platform/sql/SQLiteDatabase.h:
        Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database 
        to clear out the database.

2019-09-26  Antti Koivisto  <antti@apple.com>

        Use LineLayoutTraversal for RenderText functions
        https://bugs.webkit.org/show_bug.cgi?id=202266

        Reviewed by Zalan Bujtas.

        Replace a bunch of functions that have separate simple and complex line layout versions with
        shared functions that use LineLayoutTraversal.

        * rendering/RenderText.cpp:
        (WebCore::RenderText::absoluteRects const):
        (WebCore::RenderText::firstRunLocation const):
        (WebCore::RenderText::linesBoundingBox const):

        This is substantially simpler than RenderTextLineBoxes::boundingBox because it uses physical rects for all computations
        instead of using logical rects and flipping to physical at the end.

        (WebCore::RenderText::caretMinOffset const):
        (WebCore::RenderText::caretMaxOffset const):
        (WebCore::RenderText::countRenderedCharacterOffsetsUntil const):
        (WebCore::containsOffset):
        (WebCore::RenderText::containsRenderedCharacterOffset const):
        (WebCore::RenderText::containsCaretOffset const):
        (WebCore::RenderText::hasRenderedText const):
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::RenderTextLineBoxes::boundingBox const): Deleted.
        (WebCore::RenderTextLineBoxes::firstRunLocation const): Deleted.
        (WebCore::RenderTextLineBoxes::hasRenderedText const): Deleted.
        (WebCore::RenderTextLineBoxes::caretMinOffset const): Deleted.
        (WebCore::RenderTextLineBoxes::caretMaxOffset const): Deleted.
        (WebCore::RenderTextLineBoxes::containsOffset const): Deleted.
        (WebCore::RenderTextLineBoxes::countCharacterOffsetsUntil const): Deleted.
        (WebCore::RenderTextLineBoxes::absoluteRects const): Deleted.
        * rendering/RenderTreeAsText.cpp:
        (WebCore::write):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):
        * rendering/SimpleLineLayout.h:
        (WebCore::SimpleLineLayout::Run::Run):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::computeFirstRunLocation): Deleted.
        * rendering/SimpleLineLayoutFunctions.h:
        (WebCore::SimpleLineLayout::findCaretMinimumOffset): Deleted.
        (WebCore::SimpleLineLayout::findCaretMaximumOffset): Deleted.
        (WebCore::SimpleLineLayout::containsOffset): Deleted.
        (WebCore::SimpleLineLayout::isTextRendered): Deleted.
        * rendering/SimpleLineLayoutResolver.h:
        (WebCore::SimpleLineLayout::RunResolver::Run::isLineBreak const):
        * rendering/line/LineLayoutTraversal.cpp:
        (WebCore::LineLayoutTraversal::TextBox::isLineBreak const):
        (WebCore::LineLayoutTraversal::firstTextBoxFor):
        (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
        (WebCore::LineLayoutTraversal::textBoxesFor):
        (WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor): Deleted.
        (WebCore::LineLayoutTraversal::textBoxRangeFor): Deleted.
        * rendering/line/LineLayoutTraversal.h:
        (WebCore::LineLayoutTraversal::hasTextBoxes):

2019-09-26  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r250381.

        broke multiple webgpu/ tests on Mojave WK2

        Reverted changeset:

        "Flaky Test: inspector/canvas/updateShader.html"
        https://bugs.webkit.org/show_bug.cgi?id=202186
        https://trac.webkit.org/changeset/250381

2019-09-26  Alexey Shvayka  <shvaikalesh@gmail.com>

        Non-callable "handleEvent" property is silently ignored
        https://bugs.webkit.org/show_bug.cgi?id=200066

        Reviewed by Darin Adler.

        Tests: imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html
               imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
               imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
               imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html

        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent): Report TypeError if "handleEvent" is not callable.

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

        [LFC][IFC] Decouple Display::Run and Display::Box initializations.
        https://bugs.webkit.org/show_bug.cgi?id=202255
        <rdar://problem/55731445>

        Reviewed by Antti Koivisto.

        This is in preparation for moving Display::Run initialization to Line class.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

2019-09-26  Devin Rousso  <drousso@apple.com>

        Flaky Test: inspector/canvas/updateShader.html
        https://bugs.webkit.org/show_bug.cgi?id=202186
        <rdar://problem/55716053>

        Reviewed by Joseph Pecoraro.

        If the `WebGPUPipeline`/`WebGLProgram` outlives it's `WebGPUDevice`/`WebGLRenderingContext`,
        the `ScriptExecutionContext*` that was provided in the constructor won't be invalidated
        leading to the bad access crash.

        Rather than pass the `ScriptExecutionContext*` directly, have `WebGPUPipeline`/`WebGLProgram`
        extend from `ContextDestructionObserver` so that it can propertly invalidate (and notify Web
        Inspector) when the related context is about to be destroyed.

        Test: inspector/canvas/updateShader.html

        * Modules/webgpu/WebGPUPipeline.h:
        (WebCore::WebGPUPipeline::scriptExecutionContext const): Deleted.
        * Modules/webgpu/WebGPUPipeline.cpp:
        (WebCore::WebGPUPipeline::WebGPUPipeline):
        (WebCore::WebGPUPipeline::contextDestroyed): Added.

        * html/canvas/WebGLProgram.h:
        (WebCore::WebGLProgram::scriptExecutionContext const): Deleted.
        * html/canvas/WebGLProgram.cpp:
        (WebCore::WebGLProgram::WebGLProgram):
        (WebCore::WebGLProgram::contextDestroyed): Added.

2019-09-25  Chris Dumez  <cdumez@apple.com>

        Add very basic PageCache support for RTCPeerConnection
        https://bugs.webkit.org/show_bug.cgi?id=202244

        Reviewed by Geoffrey Garen.

        RTCPeerConnection::canSuspendForDocumentSuspension() returns true if
        RTCPeerConnection::hasPendingActivity() return false. Previously, hasPendingActivity()
        would return true unless the JS has called close() on the RTCPeerConnection
        object.

        On weather.com, an ad would construct an RTCPeerConnection just to do some feature
        checking and then let the variable go out of scope (without calling close()). Because
        of the previous implementation of RTCPeerConnection::hasPendingActivity(), this wrapper
        and its implementation object would stay alive forever AND prevent the page from
        entering PageCache on navigation.

        To improve this, the implementation of hadPendingActivity() has been updated so that
        it keeps returning false if close() has been called, but will also return false if
        there are no pending Promises to be resolved and no event listeners.

        Test: fast/mediastream/RTCPeerConnection-page-cache.html

        * Modules/mediastream/RTCPeerConnection.cpp:
        WebCore::RTCPeerConnection::RTCPeerConnection:
        Stop taking a pending activity in the constructor, this would be NOT keep the wrapper
        alive since RTCPeerConnection::hasPendingActivity() was not checking
        ActiveDOMObject::hasPendingActivity().

        (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const):
        (WebCore::RTCPeerConnection::hasPendingActivity const):
        
        * Modules/mediastream/RTCPeerConnection.h:

        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DOMPromiseDeferredBase::whenSettled):

2019-09-25  Chris Dumez  <cdumez@apple.com>

        Improve Service worker support for Page Caching
        https://bugs.webkit.org/show_bug.cgi?id=202221

        Reviewed by Geoffrey Garen.

        Allow pages using service workers to enter the back / forward cache.
        Update ServiceWorkerRegistration / ServiceWorker ActiveDOMObjects
        to properly suspend while in PageCache. Also, let documents controlled
        by a service worker to enter PageCache (we already unregistered it as
        a client of the service worker while suspended).

        Test: http/tests/workers/service/page-caching.html

        * dom/Document.cpp:
        (WebCore::Document::suspend):
        (WebCore::Document::resume):
        * history/PageCache.cpp:
        (WebCore::canCacheFrame):
        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::updateState):
        (WebCore::ServiceWorker::canSuspendForDocumentSuspension const):
        (WebCore::ServiceWorker::suspend):
        (WebCore::ServiceWorker::resume):
        * workers/service/ServiceWorker.h:
        * workers/service/ServiceWorkerRegistration.cpp:
        (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
        (WebCore::ServiceWorkerRegistration::canSuspendForDocumentSuspension const):
        (WebCore::ServiceWorkerRegistration::suspend):
        (WebCore::ServiceWorkerRegistration::resume):
        * workers/service/ServiceWorkerRegistration.h:

2019-09-25  Chris Dumez  <cdumez@apple.com>

        [Cocoa] Regression(r212041) Safari adds a .dms extension automatically when downloading binaries with no extension
        https://bugs.webkit.org/show_bug.cgi?id=202147
        <rdar://problem/54886021>

        Reviewed by Alexey Proskuryakov.

        When getting a suggested filename without extension (either from Content-Disposition header or from the download
        attribute), we determine a suitable file extension based on the Content-Type header and append it. This is useful
        since a lot of operating systems (such as macOS) rely on the file extension to determine file type.

        The issue is that if the Content-Type is not provided or when it is provided but is "application/octet-stream",
        we would append a .dms extension, which was unexpected. This patch makes it so that we no longer try to append
        an extension when the resolved content type is "application/octet-stream".

        Tests: http/tests/download/anchor-download-attribute-content-disposition-no-extension-octet-stream.html
               http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html
               http/tests/security/anchor-download-octet-stream-no-extension.html

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):

2019-09-25  Megan Gardner  <megan_gardner@apple.com>

        Update selections after scrolling for iframes and hide selections while iframes and overflow scrolls are scrolling.
        https://bugs.webkit.org/show_bug.cgi?id=202125

        Reviewed by Tim Horton.

        Test: editing/selection/ios/update-selection-after-iframe-scroll.html

        When we end scrolling, make sure that iframes get a final update to ensure that the 
        selection is in the correct position. Pipe that to WebKit/UIProcess via
        frame specific plath.

        * loader/EmptyClients.cpp:
        * page/EditorClient.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

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

        Page temporarily jumps to an excessively small viewport scale while loading usatoday.com
        https://bugs.webkit.org/show_bug.cgi?id=202224
        <rdar://problem/52906640>

        Reviewed by Tim Horton.

        On some pages (e.g. usatoday.com), the content width of the page temporarily becomes very large during page
        load. This causes a couple of viewport scaling behaviors (notably, the existing shrink-to-fit heuristic in
        ViewportConfiguration::initialScaleFromSize, as well as the new iPad-specific content-aware shrink-to-fit
        heuristic in WebPage::immediatelyShrinkToFitContent) to cause the page to shrink down excessively in an attempt
        to fit all the content to the viewport. This causes a very ugly flash as the page appears zoomed out initially
        during page load, before zooming back in.

        To fix this, we add some sanity checks to these viewport scaling heuristics. In ViewportConfiguration's
        initialScaleFromSize method, in the codepath where an initial scale is not specified, we always scale to fit the
        contents of the page; instead, detect the case where the content width is enormous (with a threshold arbitrarily
        chosen to be 1920) and fall back to the scaling to fit the viewport's width, if such a width has been explicitly
        set. This ensures that we avoid excessive shrinking in the case where content is extremely wide, but also that
        we do scale the viewport down to fit all the content in the case where the content isn't extremely wide (e.g. on
        daringfireball.com).

        See WebKit ChangeLog for more detail.

        Test: fast/viewport/ios/shrink-to-fit-large-content-width.html

        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::initialScaleFromSize const):

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

        [iPadOS] [DataActivation] Focus moves away after focusing input fields on www.att.com
        https://bugs.webkit.org/show_bug.cgi?id=202167
        <rdar://problem/55185021>

        Reviewed by Tim Horton.

        Adds a new site-specific quirk. See WebKit ChangeLog for more details.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation const):
        * page/Quirks.h:
        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isDataActivation):

2019-09-25  Jonathan Bedard  <jbedard@apple.com>

        Unreviewed, rolling out r250324.

        Broke many mac wk2 layout tests

        Reverted changeset:

        "Enable LayoutTests using ResourceLoadStatistics SQLite
        backend (195420)"
        https://bugs.webkit.org/show_bug.cgi?id=195420
        https://trac.webkit.org/changeset/250324

2019-09-25  Antti Koivisto  <antti@apple.com>

        Rename LineLayoutInterface to LineLayoutTraversal
        https://bugs.webkit.org/show_bug.cgi?id=202202

        Reviewed by Zalan Bujtas.

        Use a bit more informative namespace name.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Position.cpp:
        (WebCore::Position::upstream const):
        (WebCore::Position::downstream const):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):
        (WebCore::TextIterator::handleTextNodeFirstLetter):
        * editing/TextIterator.h:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::writeTextBox):
        (WebCore::write):
        * rendering/line/LineLayoutTraversal.cpp: Renamed from Source/WebCore/rendering/line/LineLayoutInterfaceTextBoxes.cpp.
        (WebCore::LineLayoutTraversal::TextBox::rect const):
        (WebCore::LineLayoutTraversal::TextBox::logicalRect const):
        (WebCore::LineLayoutTraversal::TextBox::hasHyphen const):
        (WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const):
        (WebCore::LineLayoutTraversal::TextBox::dirOverride const):
        (WebCore::LineLayoutTraversal::TextBox::text const):
        (WebCore::LineLayoutTraversal::TextBox::localStartOffset const):
        (WebCore::LineLayoutTraversal::TextBox::localEndOffset const):
        (WebCore::LineLayoutTraversal::TextBox::length const):
        (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const):
        (WebCore::LineLayoutTraversal::TextBox::isLast const):
        (WebCore::LineLayoutTraversal::TextBox::iterator const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInVisualOrder):
        (WebCore::LineLayoutTraversal::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInTextOrder):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::atEnd const):
        (WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor):
        (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
        (WebCore::LineLayoutTraversal::textBoxRangeFor):
        * rendering/line/LineLayoutTraversal.h: Renamed from Source/WebCore/rendering/line/LineLayoutInterfaceTextBoxes.h.
        (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator++):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator bool const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator!= const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator* const):
        (WebCore::LineLayoutTraversal::TextBoxIterator::operator-> const):
        (WebCore::LineLayoutTraversal::TextBoxRange::TextBoxRange):
        (WebCore::LineLayoutTraversal::TextBoxRange::begin const):
        (WebCore::LineLayoutTraversal::TextBoxRange::end const):
        (WebCore::LineLayoutTraversal::hasTextBoxes):

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

        [LFC][IFC] Use existing Line::Content::LineBox to track the current line geometry
        https://bugs.webkit.org/show_bug.cgi?id=202182

        Reviewed by Antti Koivisto.

        This patch removes the redundant Line::m_logicalTopLeft, m_contentLogicalWidth, m_lineLogicalHeight, m_baseline, m_baselineTop members
        and switches over to Line::m_content's LineBox. 

        * layout/displaytree/DisplayRect.h:
        (WebCore::Display::Rect::Rect):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::m_skipVerticalAligment): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::lineBox):
        (WebCore::Layout::Line::contentLogicalRight const):
        (WebCore::Layout::Line::logicalTop const):
        (WebCore::Layout::Line::logicalBottom const):
        (WebCore::Layout::Line::logicalLeft const):
        (WebCore::Layout::Line::logicalHeight const):
        (WebCore::Layout::Line::contentLogicalWidth const):
        (WebCore::Layout::Line::baselineOffset const):
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::setLogicalTopLeft):
        (WebCore::Layout::LineBox::setLogicalHeight):
        (WebCore::Layout::LineBox::setLogicalWidth):
        (WebCore::Layout::LineBox::moveHorizontally):
        (WebCore::Layout::LineBox::expandHorizontally):
        (WebCore::Layout::LineBox::shrinkHorizontally):
        (WebCore::Layout::LineBox::expandVertically):
        (WebCore::Layout::LineBox::shrinkVertically):
        (WebCore::Layout::LineBox::LineBox):
        (WebCore::Layout::LineBox::setLogicalHeightIfGreater):
        (WebCore::Layout::LineBox::setBaseline):
        (WebCore::Layout::LineBox::baseline const):
        (WebCore::Layout::LineBox::baseline):
        (WebCore::Layout::LineBox::setBaselineOffset):
        (WebCore::Layout::LineBox::Baseline::setAscentIfGreater):
        (WebCore::Layout::LineBox::Baseline::setDescentIfGreater):

2019-09-25  Antti Koivisto  <antti@apple.com>

        Rename InlineBox::nextLeafChild to nextLeafOnLine
        https://bugs.webkit.org/show_bug.cgi?id=202197

        Reviewed by Zalan Bujtas.

        The name is confusing as it never returns a child of the inline box it is called on.
        Rename it and other similar functions that traverse within a line.

        * dom/Position.cpp:
        (WebCore::Position::getInlineBoxAndOffset const):
        * editing/RenderedPosition.cpp:
        (WebCore::RenderedPosition::RenderedPosition):
        (WebCore::RenderedPosition::previousLeafOnLine const):
        (WebCore::RenderedPosition::nextLeafOnLine const):
        (WebCore::RenderedPosition::isEquivalent const):
        (WebCore::RenderedPosition::bidiLevelOnLeft const):
        (WebCore::RenderedPosition::bidiLevelOnRight const):
        (WebCore::RenderedPosition::leftBoundaryOfBidiRun):
        (WebCore::RenderedPosition::rightBoundaryOfBidiRun):
        (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun const):
        (WebCore::RenderedPosition::atRightBoundaryOfBidiRun const):
        (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun const):
        (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun const):
        (WebCore::RenderedPosition::prevLeafChild const): Deleted.
        (WebCore::RenderedPosition::nextLeafChild const): Deleted.
        * editing/RenderedPosition.h:
        (WebCore::RenderedPosition::RenderedPosition):
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
        (WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
        * editing/VisibleUnits.cpp:
        (WebCore::startPositionForLine):
        (WebCore::endPositionForLine):
        (WebCore::previousLinePosition):
        (WebCore::nextLinePosition):
        * layout/Verification.cpp:
        (WebCore::Layout::collectFlowBoxSubtree):
        * rendering/ComplexLineLayout.cpp:
        (WebCore::ComplexLineLayout::updateRubyForJustifiedText):
        (WebCore::expansionBehaviorForInlineTextBox):
        (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
        (WebCore::ComplexLineLayout::layoutRunsAndFloats):
        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::previousOnLineExists const):
        (WebCore::InlineBox::nextLeafOnLine const):
        (WebCore::InlineBox::previousLeafOnLine const):
        (WebCore::InlineBox::nextLeafOnLineIgnoringLineBreak const):
        (WebCore::InlineBox::previousLeafOnLineIgnoringLineBreak const):
        (WebCore::InlineBox::nextLeafChild const): Deleted.
        (WebCore::InlineBox::prevLeafChild const): Deleted.
        (WebCore::InlineBox::nextLeafChildIgnoringLineBreak const): Deleted.
        (WebCore::InlineBox::prevLeafChildIgnoringLineBreak const): Deleted.
        * rendering/InlineBox.h:
        (WebCore::InlineBox::nextOnLine const):
        (WebCore::InlineBox::previousOnLine const):
        (WebCore::InlineBox::setNextOnLine):
        (WebCore::InlineBox::setPreviousOnLine):
        (WebCore::InlineBox::InlineBox):
        (WebCore::InlineBox::prevOnLine const): Deleted.
        (WebCore::InlineBox::setPrevOnLine): Deleted.
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::addToLine):
        (WebCore::InlineFlowBox::removeChild):
        (WebCore::InlineFlowBox::nodeAtPoint):
        (WebCore::InlineFlowBox::firstLeafDescendant const):
        (WebCore::InlineFlowBox::lastLeafDescendant const):
        (WebCore::InlineFlowBox::placeEllipsisBox):
        (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
        (WebCore::InlineFlowBox::checkConsistency const):
        (WebCore::InlineFlowBox::firstLeafChild const): Deleted.
        (WebCore::InlineFlowBox::lastLeafChild const): Deleted.
        * rendering/InlineFlowBox.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::expansionBehavior const):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
        (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
        * rendering/RenderCounter.cpp:
        (WebCore::RenderCounter::rendererRemovedFromTree):
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::lineDirectionPointFitsInBox):
        (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi):
        (WebCore::RenderTextLineBoxes::positionForPoint const):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::isHyphenated const):
        (WebCore::RootInlineBox::lineSelectionGap):
        (WebCore::RootInlineBox::selectionState):
        (WebCore::RootInlineBox::firstSelectedBox):
        (WebCore::RootInlineBox::lastSelectedBox):
        (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
        * rendering/svg/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
        (WebCore::SVGRootInlineBox::nodeAtPoint):

2019-09-25  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Add implementations for fixed, positioned, sticky ScrollingTreeNodes
        https://bugs.webkit.org/show_bug.cgi?id=202100

        Reviewed by Carlos Garcia Campos.

        Fill in the Nicosia implementations for the ScrollingTreeFixedNode,
        ScrollingTreePositionedNode and ScrollingTreeStickyNode classes.

        The implementations in majority repeat what the Cocoa implementations
        do, with the main difference being the Nicosia-specific layer state
        application. Sharing more of this logic should be investigated in the
        future.

        * PlatformPlayStation.cmake: Add ScrollingTreePositionedNode to build.
        * SourcesGTK.txt: Ditto.
        * SourcesWPE.txt: Ditto.
        * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
        (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
        (WebCore::ScrollingTreeFixedNode::dumpProperties const):
        * page/scrolling/nicosia/ScrollingTreeFixedNode.h:
        * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp: Added.
        (WebCore::ScrollingTreePositionedNode::create):
        (WebCore::ScrollingTreePositionedNode::ScrollingTreePositionedNode):
        (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
        (WebCore::ScrollingTreePositionedNode::dumpProperties const):
        * page/scrolling/nicosia/ScrollingTreePositionedNode.h: Added.
        (WebCore::ScrollingTreePositionedNode::relatedOverflowScrollingNodes const):
        * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
        (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
        (WebCore::ScrollingTreeStickyNode::dumpProperties const):
        (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
        * page/scrolling/nicosia/ScrollingTreeStickyNode.h:

2019-09-24  Antoine Quint  <graouts@apple.com>

        [Web Animations] Removing an element should only cancel its declarative animations
        https://bugs.webkit.org/show_bug.cgi?id=202165

        Reviewed by Dean Jackson.

        When an element is removed, an Animation created using the JS API should not be canceled.
        Only declarative animations should be.

        * animation/AnimationTimeline.cpp:
        (WebCore::AnimationTimeline::elementWasRemoved):

2019-09-24  Alex Christensen  <achristensen@webkit.org>

        Remove SchemeRegistry's list of URL schemes allowing local storage in private browsing, which is unused
        https://bugs.webkit.org/show_bug.cgi?id=202181

        Reviewed by Geoffrey Garen.

        The last use of the WebView SPI to set it is being removed in rdar://problem/55685383
        but it already does not do anything.  Let's remove it.

        * platform/SchemeRegistry.cpp:
        (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing): Deleted.
        (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing): Deleted.
        (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing): Deleted.
        * platform/SchemeRegistry.h:

2019-09-24  Wenson Hsieh  <wenson_hsieh@apple.com>

        Remove a content change observation quirk on united.com
        https://bugs.webkit.org/show_bug.cgi?id=202175

        Reviewed by Tim Horton.

        Remove a site-specific quirk that is no longer necessary.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldIgnoreContentChange const): Deleted.
        * page/Quirks.h:
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):

2019-09-24  Kate Cheney  <katherine_cheney@apple.com>

        Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
        https://bugs.webkit.org/show_bug.cgi?id=195420
        <rdar://problem/54213551> 

        Reviewed by Brent Fulgham.

        Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html
               http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
               http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
               http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
               http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
               http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
               http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
               http/tests/resourceLoadStatistics/cookie-deletion-database.html
               http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
               http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
               http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
               http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
               http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
               http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/enable-debug-mode-database.html
               http/tests/resourceLoadStatistics/grandfathering-database.html
               http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
               http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
               http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
               http/tests/resourceLoadStatistics/prune-statistics-database.html
               http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
               http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
               http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
               http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
               http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
               http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
               http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
               http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
               http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html

        * platform/sql/SQLiteDatabase.h:
        Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database 
        to clear out the database.

2019-09-24  Chris Dumez  <cdumez@apple.com>

        Stop sampling PageCache-related AggD data
        https://bugs.webkit.org/show_bug.cgi?id=202161

        Reviewed by Geoffrey Garen.

        Stop sampling PageCache-related AggD data to make it more actionable.

        * history/PageCache.cpp:
        (WebCore::logPageCacheFailureDiagnosticMessage):
        (WebCore::canCacheFrame):
        (WebCore::canCachePage):

2019-09-24  Sihui Liu  <sihui_liu@apple.com>

        Stop refing UniqueIDBDatabaseTransaction in callbacks
        https://bugs.webkit.org/show_bug.cgi?id=202074

        Reviewed by Youenn Fablet.

        After quota check is introduced to IDB, callbacks that take the ref of UniqueIDBDatabaseTransaction will be 
        passed to StorageQuotaManager. This can make UniqueIDBDatabaseTransaction live longer than UniqueIDBDatabase.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::requestSpace):
        (WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion):
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabase::getCount):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):

2019-09-24  Keith Rollin  <krollin@apple.com>

        Coalesce or remove PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
        https://bugs.webkit.org/show_bug.cgi?id=202119
        <rdar://problem/55638792>

        Reviewed by Alex Christensen.

        After refactoring and other code evolution, some platform checks have
        ended up looking like PLATFORM(MAC) || PLATFORM(IOS_FAMILY) (or
        vice-versa). These can be converted into the equivalent
        PLATFORM(COCOA). Where the instance occurs in a Cocoa-only file, the
        check can be removed altogether (along with any "#else" branches).

        No new tests -- no new or changed functionality.

        * Modules/applepay/cocoa/PaymentContactCocoa.mm:
        (WebCore::subLocality):
        (WebCore::setSubLocality):
        (WebCore::subAdministrativeArea):
        (WebCore::setSubAdministrativeArea):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::isAppleLegacyCssValueKeyword):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaSessionTitle const):
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::platform):
        * page/FrameView.cpp:
        (WebCore::FrameView::updateBackgroundRecursively):
        * platform/Timer.cpp:
        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::initialize):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::displayP3ColorSpaceRef):
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):

2019-09-24  Antoine Quint  <graouts@apple.com>

        [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
        https://bugs.webkit.org/show_bug.cgi?id=181121

        Reviewed by Dean Jackson.

        When running the "update animations and send events" steps (https://drafts.csswg.org/web-animations/#update-animations-and-send-events)
        we assemble a list of animations to remove after updating their relevance based on the new timeline current time. However, we wouldn't
        account for the fact that we would *then* dispatch events which could update the timing properties of animations that had been marked
        for removal at this point.

        In this specific WPT test, there were two individual tests that would rewind animations within a "finish" event handler and we would
        not consider the fact that they had been rewound. We now check a second time before removing an animation that it should indeed be
        removed.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):

2019-09-24  Kate Cheney  <katherine_cheney@apple.com>

        Mixed content blocking is bypassed for WebSockets in Workers (159726)
        https://bugs.webkit.org/show_bug.cgi?id=159726
        <rdar://problem/27326438>

        Reviewed by Brady Eidson.

        Tests: http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-with-embedded-http.html
               http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https.html
               http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https.html
               http/tests/websocket/tests/hybi/non-document-mixed-content-blocked.https.html
        
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
        * loader/MixedContentChecker.cpp:
        (WebCore::MixedContentChecker::checkForMixedContentInFrameTree):
        * loader/MixedContentChecker.h:
        Patch to block insecure WebSocket URL connection attempts by Workers
        on secure pages. If the URL is ws, and any embedding iframe has protocol
        https, and the context is a Worker, the connection should be blocked.

        I was unable to write a test case to hit the case where a document
        does not have a frame and tries to communicate via a worker to
        connect to a WebSocket because after removing the subframe from its
        parent, the subframe is unable to perform a postMessage to a worker
        even in the same script execution to tell the worker to connect
        to a WebSocket.

2019-09-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Line::Content should use LineBox
        https://bugs.webkit.org/show_bug.cgi?id=202128
        <rdar://problem/55649079>

        Reviewed by Antti Koivisto.

        Replace Line::Content's m_logicalRect, m_baseline and m_baselineOffset with LineBox.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::lineBox const):
        (WebCore::Layout::Line::Content::setLineBox):
        (WebCore::Layout::Line::baselineOffset const):
        (WebCore::Layout::Line::Content::isEmpty const): Deleted.
        (WebCore::Layout::Line::Content::logicalTop const): Deleted.
        (WebCore::Layout::Line::Content::logicalLeft const): Deleted.
        (WebCore::Layout::Line::Content::logicalRight const): Deleted.
        (WebCore::Layout::Line::Content::logicalBottom const): Deleted.
        (WebCore::Layout::Line::Content::logicalWidth const): Deleted.
        (WebCore::Layout::Line::Content::logicalHeight const): Deleted.
        (WebCore::Layout::Line::Content::baseline const): Deleted.
        (WebCore::Layout::Line::Content::baselineOffset const): Deleted.
        (WebCore::Layout::Line::Content::setLogicalRect): Deleted.
        (WebCore::Layout::Line::Content::setBaseline): Deleted.
        (WebCore::Layout::Line::Content::setBaselineOffset): Deleted.
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::Baseline::height const):
        (WebCore::Layout::LineBox::LineBox):
        (WebCore::Layout::LineBox::baselineOffset const):
        (WebCore::Layout::LineBox::Baseline::Baseline):
        (WebCore::Layout::LineBox::Baseline::setAscent):
        (WebCore::Layout::LineBox::Baseline::setDescent):
        (WebCore::Layout::LineBox::Baseline::reset):
        (WebCore::Layout::LineBox::Baseline::ascent const):
        (WebCore::Layout::LineBox::Baseline::descent const):

2019-09-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Move line constraints computation to a dedicated function
        https://bugs.webkit.org/show_bug.cgi?id=202121
        <rdar://problem/55640742>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::initialConstraintsForLine):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        * layout/inlineformatting/InlineLine.h:

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

        AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit in play/pause methods
        https://bugs.webkit.org/show_bug.cgi?id=202097
        <rdar://problem/51548144>

        Reviewed by Eric Carlson.

        Instead of manipulating the audio unit in play/pause methods, it is more convenient to do so in audioSamplesAvailable.
        play/pause methods only update boolean values that audioSamplesAvailable will read.
        In particular, m_autoPlay and m_isPlaying are no longer modified in the audio thread.

        Behavior was racy so difficult to reproduce.

        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
        (WebCore::AudioTrackPrivateMediaStreamCocoa::playInternal):
        (WebCore::AudioTrackPrivateMediaStreamCocoa::pause):
        (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:

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

        Support sync-xhr feature policy
        https://bugs.webkit.org/show_bug.cgi?id=202098

        Reviewed by Alex Christensen.

        Add support for sync-xhr feature policy parsing.
        Use this feature policy to control use of sync XHR in documents
        as per https://xhr.spec.whatwg.org/#the-send()-method step 12.

        Covered by updated test.

        * html/FeaturePolicy.cpp:
        (WebCore::FeaturePolicy::parse):
        (WebCore::FeaturePolicy::allows const):
        * html/FeaturePolicy.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::isSyncXHRAllowedByFeaturePolicy):
        (WebCore::XMLHttpRequest::createRequest):

2019-09-23  Chris Dumez  <cdumez@apple.com>

        Drop unnecessary SessionID.h header includes
        https://bugs.webkit.org/show_bug.cgi?id=202129

        Reviewed by Alex Christensen.

        * Modules/fetch/FetchBodyConsumer.h:
        * Modules/indexeddb/IDBDatabaseIdentifier.h:
        * bindings/js/SerializedScriptValue.h:
        * dom/DataTransfer.h:
        * editing/WebCorePasteboardFileReader.h:
        * fileapi/FileReaderLoader.h:
        * fileapi/ThreadableBlobRegistry.h:
        * html/FileListCreator.h:
        * loader/CookieJar.h:
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoaderClient.h:
        * loader/LoaderStrategy.h:
        * page/CacheStorageProvider.h:
        * page/Frame.h:
        * page/PageGroup.h:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * platform/network/CacheValidation.h:
        * platform/network/FormData.h:
        * platform/network/NetworkStorageSession.cpp:
        * platform/network/StorageSessionProvider.h:
        * workers/WorkerGlobalScopeProxy.h:
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerProvider.h:
        * workers/service/server/RegistrationDatabase.h:
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerToContextConnection.h:
        * worklets/WorkletGlobalScope.h:

2019-09-23  Alex Christensen  <achristensen@webkit.org>

        Fix WPT test html/browsers/offline/application-cache-api/api_swapcache_error.https.html
        https://bugs.webkit.org/show_bug.cgi?id=202056
        <rdar://problem/55523986>

        Reviewed by Youenn Fablet.

        The test makes sure we throw an exception when we are in an invalid state, which we should definitely do.

        * loader/appcache/ApplicationCache.cpp:
        (WebCore::ApplicationCache::setGroup):
        (WebCore::ApplicationCache::setManifestResource):
        * loader/appcache/ApplicationCache.h:
        (WebCore::ApplicationCache::manifestResource const):
        (WebCore::ApplicationCache::group const):
        * loader/appcache/ApplicationCacheGroup.h:
        * loader/appcache/ApplicationCacheHost.cpp:
        (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup const):
        (WebCore::ApplicationCacheHost::failedLoadingMainResource):
        (WebCore::ApplicationCacheHost::setCandidateApplicationCacheGroup):
        (WebCore::ApplicationCacheHost::swapCache):
        * loader/appcache/ApplicationCacheHost.h:
        (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup const): Deleted.
        * loader/appcache/ApplicationCacheResource.h:

2019-09-23  Chris Dumez  <cdumez@apple.com>

        PlugInClient::didStartFromOrigin() does not need a sessionID
        https://bugs.webkit.org/show_bug.cgi?id=202127

        Reviewed by Geoffrey Garen.

        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
        * page/PlugInClient.h:

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

        Web Inspector: Canvas: show WebGPU shader pipelines
        https://bugs.webkit.org/show_bug.cgi?id=201675
        <rdar://problem/55543450>

        Reviewed by Joseph Pecoraro.

        Tests: inspector/canvas/requestShaderSource-webgpu.html
               inspector/canvas/shaderProgram-add-remove-webgpu.html
               inspector/canvas/updateShader-webgpu.html

        Create common base classes for `WebGPUPipeline` and `GPUPipeline` so that Web Inspector can
        instrument both render and compute shader pipelines.

        Refactor `InspectorShaderProgram` to support both `WebGLProgram` and `WebGPUPipeline` so
        that the same object can be used for all types of shader "program"s.

        Keep a copy of each shader module's source, and allow the shader module to be updated.

        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::WebGPUDevice):
        (WebCore::WebGPUDevice::~WebGPUDevice):
        (WebCore::WebGPUDevice::createShaderModule const):
        (WebCore::WebGPUDevice::createRenderPipeline): Added.
        (WebCore::WebGPUDevice::createComputePipeline): Added.
        (WebCore::WebGPUDevice::createRenderPipeline const): Deleted.
        (WebCore::WebGPUDevice::createComputePipeline const): Deleted.

        * Modules/webgpu/WebGPUPipeline.h: Added.
        (WebCore::WebGPUPipeline::isRenderPipeline const):
        (WebCore::WebGPUPipeline::isComputePipeline const):
        (WebCore::WebGPUPipeline::scriptExecutionContext const):
        * Modules/webgpu/WebGPUPipeline.cpp: Added.
        (WebCore::WebGPUPipeline::instancesMutex):
        (WebCore::WebGPUPipeline::WebGPUPipeline):
        (WebCore::WebGPUPipeline::~WebGPUPipeline):
        * platform/graphics/gpu/GPUPipeline.cpp: Added.
        * platform/graphics/gpu/GPUPipeline.h: Added.
        (WebCore::GPUPipeline::isRenderPipeline const):
        (WebCore::GPUPipeline::isComputePipeline const):

        * Modules/webgpu/WebGPUComputePipeline.idl:
        * Modules/webgpu/WebGPUComputePipeline.h:
        (WebCore::WebGPUComputePipeline::computePipeline const): Deleted.
        * Modules/webgpu/WebGPUComputePipeline.cpp:
        (WebCore::WebGPUComputePipeline::create):
        (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
        (WebCore::WebGPUComputePipeline::recompile): Added.
        * platform/graphics/gpu/GPUComputePipeline.h:
        (WebCore::GPUComputePipeline::isComputePipeline): Added.
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):
        (WebCore::GPUComputePipeline::recompile): Added.

        * Modules/webgpu/WebGPURenderPipeline.idl:
        * Modules/webgpu/WebGPURenderPipeline.h:
        (WebCore::WebGPURenderPipeline::renderPipeline const): Deleted.
        * Modules/webgpu/WebGPURenderPipeline.cpp:
        (WebCore::WebGPURenderPipeline::create):
        (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
        (WebCore::WebGPURenderPipeline::recompile): Added.
        * platform/graphics/gpu/GPURenderPipeline.h:
        (WebCore::GPURenderPipeline::isRenderPipeline): Added.
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::GPURenderPipeline::GPURenderPipeline):
        (WebCore::GPURenderPipeline::recompile): Added.

        * Modules/webgpu/WebGPUShaderModule.h:
        (WebCore::WebGPUShaderModule::source const): Added.
        * Modules/webgpu/WebGPUShaderModule.cpp:
        (WebCore::WebGPUShaderModule::update): Added.
        * Modules/webgpu/WebGPUProgrammableStageDescriptor.h:
        * platform/graphics/gpu/GPUProgrammableStageDescriptor.h:
        (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):

        * inspector/InspectorShaderProgram.h:
        * inspector/InspectorShaderProgram.cpp:
        (WebCore::InspectorShaderProgram::create):
        (WebCore::InspectorShaderProgram::InspectorShaderProgram):
        (WebCore::InspectorShaderProgram::program const): Added.
        (WebCore::InspectorShaderProgram::pipeline const): Added.
        (WebCore::shaderForType): Added.
        (WebCore::InspectorShaderProgram::requestShaderSource): Added.
        (WebCore::InspectorShaderProgram::updateShader): Added.
        (WebCore::InspectorShaderProgram::context const): Deleted.
        (WebCore::InspectorShaderProgram::shaderForType): Deleted.

        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
        (WebCore::InspectorCanvasAgent::discardAgent):
        (WebCore::InspectorCanvasAgent::enable):
        (WebCore::InspectorCanvasAgent::disable):
        (WebCore::InspectorCanvasAgent::requestShaderSource):
        (WebCore::InspectorCanvasAgent::updateShader):
        (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
        (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
        (WebCore::InspectorCanvasAgent::frameNavigated):
        (WebCore::InspectorCanvasAgent::didCreateWebGLProgram): Added.
        (WebCore::InspectorCanvasAgent::willDestroyWebGLProgram): Added.
        (WebCore::InspectorCanvasAgent::isWebGLProgramDisabled): Added.
        (WebCore::InspectorCanvasAgent::isWebGLProgramHighlighted): Added.
        (WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Added.
        (WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Added.
        (WebCore::InspectorCanvasAgent::programDestroyedTimerFired): Added.
        (WebCore::InspectorCanvasAgent::reset): Added.
        (WebCore::InspectorCanvasAgent::unbindProgram):
        (WebCore::InspectorCanvasAgent::findInspectorProgram):
        (WebCore::InspectorCanvasAgent::didCreateProgram): Deleted.
        (WebCore::InspectorCanvasAgent::willDeleteProgram): Deleted.
        (WebCore::InspectorCanvasAgent::isShaderProgramDisabled): Deleted.
        (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted): Deleted.
        (WebCore::InspectorCanvasAgent::clearCanvasData): Deleted.
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didCreateWebGLProgram): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGLProgram): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramDisabled): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramHighlighted): Added.
        (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Added.
        (WebCore::InspectorInstrumentation::didCreateProgram): Deleted.
        (WebCore::InspectorInstrumentation::willDeleteProgram): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramDisabled): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramHighlighted): Deleted.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCreateWebGLProgramImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGLProgramImpl): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramDisabledImpl): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramHighlightedImpl): Added.
        (WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Added.
        (WebCore::InspectorInstrumentation::didCreateProgramImpl): Deleted.
        (WebCore::InspectorInstrumentation::willDeleteProgramImpl): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramDisabledImpl): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramHighlightedImpl): Deleted.

        * html/canvas/WebGLProgram.h:
        * html/canvas/WebGLProgram.cpp:
        (WebCore::WebGLProgram::WebGLProgram):
        (WebCore::WebGLProgram::~WebGLProgram):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::InspectorScopedShaderProgramHighlight::showHightlight):
        (WebCore::WebGLRenderingContextBase::createProgram):
        (WebCore::WebGLRenderingContextBase::deleteProgram):
        (WebCore::WebGLRenderingContextBase::drawArrays):
        (WebCore::WebGLRenderingContextBase::drawElements):
        Rename WebGL program instrumentation points to be less ambiguous.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-09-23  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] Drop animation when dragging images from Photos to WebKit2 Mail compose is incorrect
        https://bugs.webkit.org/show_bug.cgi?id=201674
        <rdar://problem/51250952>

        Reviewed by Tim Horton.

        Adds new helper methods on DragController to support the new image placeholder drop codepath. See WebKit
        ChangeLog for more details.

        Tests:  WKAttachmentTestsIOS.TargetedPreviewsWhenDroppingImages
                WKAttachmentTestsIOS.TargetedPreviewIsClippedWhenDroppingTallImage

        * editing/WebContentReader.h:

        Fix the Windows build after including WebContentReader.h in DragController.cpp.

        * html/HTMLImageElement.h:
        (WebCore::HTMLImageElement::isDroppedImagePlaceholder const):
        (WebCore::HTMLImageElement::setIsDroppedImagePlaceholder):

        Add a flag to HTMLImageElement, indicating whether it is a dropped image placeholder. If so, we have special
        logic to remove some temporary inline style properties from the image after it has finished loading (see
        finalizeDroppedImagePlaceholder).

        Note that this doesn't increase the size of HTMLImageElement.

        * page/DragController.cpp:
        (WebCore::DragController::dragEnded):

        Clean up any stale placeholders after the drag ends.

        (WebCore::DragController::performDragOperation):
        (WebCore::DragController::removeAllDroppedImagePlaceholders):

        Add a private helper to clean up any dropped image placeholders after failing to update dropped image
        placeholders for any reason.

        (WebCore::DragController::tryToUpdateDroppedImagePlaceholders):

        Invoked when performing the drag operation, after image data has been loaded; this function attempts to update
        the list of image placeholder elements tracked by DragController that were previously inserted using
        insertDroppedImagePlaceholdersAtCaret, and updates the source attribute of each element (as well as any backed
        attachment element, if attachment elements are enabled). It achieves this by reading the dropped data as web
        content, and matching up the images in the resulting fragment against the placeholder images. If each image in
        the fragment can correspond to exactly one placeholder, we update the source of each placeholder image,
        migrate attachment elements over to the placeholder images if needed, and finally discard the fragment.

        A return value of false indicates that this process failed, in which case we clean up the placeholders and fall
        back to handling the drop normally.

        (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret):

        Invoked when handling the drop, before any image data has been loaded; this function takes a list of sizes
        representing the preferred presentation sizes of each item provider that will be loaded as an image, and uses
        ReplaceSelectionCommand to insert a list of (initially blank) placeholder images at the drop caret, sized
        accordingly to each item provider's preferredPresentationSize.

        To make this compatible with Mail compose (and all other known internal clients that use the _editable SPI), we
        additionally enforce a max-width of 100% on each image and preserve the aspect ratio of the image by adjusting
        the height if needed.

        (WebCore::DragController::finalizeDroppedImagePlaceholder):
        * page/DragController.h:

        Have DragController keep track of the list of dropped image placeholders (in DOM order), as well as the dropped
        image placeholder range. This information is used once item provider data arrives and the drag operation is
        being performed, to update the source of each dropped image placeholder.

        (WebCore::DragController::droppedImagePlaceholders const):
        (WebCore::DragController::droppedImagePlaceholderRange const):
        * platform/network/mac/UTIUtilities.h:

        Mark an existing helper function as WEBCORE_EXPORT.

2019-09-23  Daniel Bates  <dabates@apple.com>

        Improve CSP inheritance semantics
        https://bugs.webkit.org/show_bug.cgi?id=201884
        <rdar://problem/50172407>

        Reviewed by Brent Fulgham.

        Update the CSP inheritance semantics to more closely match the logic in section Initialize a Document's CSP list
        of the CSP3 spec., <https://w3c.github.io/webappsec-csp/#initialize-document-csp>.

        Towards this, move more of the inheritance logic out of Document::initContentSecurityPolicy() and into
        DocumentWriter::begin() where details about the document being replaced live. This lets us remove the
        need to track the previous content security policy to pass it to Document::initContentSecurityPolicy().
        Moreover, DocumentWriter::begin() knows the owner document that will be replaced with the result of
        executing a JavaScript URL. This is needed in order to fix up inheritance of CSP for such documents.

        Tests: http/tests/security/contentSecurityPolicy/iframe-allowed-when-loaded-via-javascript-url.html
               http/tests/security/contentSecurityPolicy/iframe-blocked-when-loaded-via-javascript-url.html
               http/tests/security/contentSecurityPolicy/iframe-blocked-when-loaded-via-javascript-url2.html

        * dom/Document.cpp:
        (WebCore::Document::initSecurityContext): If we are inheriting the security origin from the owner
        document then inherit its CSP policy. We copy over both the CSP state from the owner as well as
        update 'self' to match the owner's origin so that CSP source expressions that include 'self' work
        correctly even from about:blank documents.
        (WebCore::Document::initContentSecurityPolicy): Move most of the logic from here into DocumentWriter::begin()
        to take advantage of the fact that DocumentWriter::begin() knows about the outgoing document (if there
        is one) as well as whether the outgoing document is being replaced with a new document that is the result
        of evaluating a JavaScript URL. We need do know both these things in order to inherit the correct CSP
        policy. This function only exists to copy some upgrade-insecure-requests state and to fix up plugin documents
        as we currently do.
        (WebCore::Document::shouldInheritContentSecurityPolicy const): Deleted.
        * dom/Document.h:
        * dom/SecurityContext.cpp:
        (WebCore::SecurityContext::setContentSecurityPolicy): Modified to take its param by rvalue-reference
        to make it less error prone to use.
        * dom/SecurityContext.h: Expose setContentSecurityPolicy() so that we can invoke it from DocumentWriter::begin().
        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::begin): For documents being replaced with the result of a JavaScript URL (i.e. ownerDocument
        is non-null) inherit the CSP from the owner document. Similarly, if we have an existing document in the frame
        and the protocol of the new document's URL is data: or blob: then inherit the CSP from the existing page. The latter
        is what we currently do just moved from Document::initContentSecurityPolicy() and re-written in terms of the
        existingDocument instead of previousContentSecurityPolicy. Also call setInsecureNavigationRequestsToUpgrade()
        both when we have a non-null ownerDocument as well as when we have a non-null existingDocument. The former fixes
        the block-all-mixed-content feature for documents loaded via JavaScript URLs and the latter is what we do now.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::didBeginDocument): Remove parameter previousContentSecurityPolicy as the logic that
        made use of it moved to DocumentWriter::begin().
        * loader/FrameLoader.h:
        * page/csp/ContentSecurityPolicy.h:

2019-09-23  Keith Rollin  <krollin@apple.com>

        Unreviewed build fix after r250173: tvOS build broken due to unused function.

        * platform/network/cocoa/CookieCocoa.mm:
        (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):

2019-09-23  Brent Fulgham  <bfulgham@apple.com>

        Unreviewed WinCairo/FTW Build fix after r250192.

        * platform/network/curl/CurlDownload.cpp:
        (WebCore::CurlDownload::createCurlRequest):

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

        [LFC][IFC] Merge inline box compute functions
        https://bugs.webkit.org/show_bug.cgi?id=202092
        <rdar://problem/55607748>

        Reviewed by Antti Koivisto.

        Make InlineFormattingContext::layoutInFlowContent() logic simpler.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:

2019-09-23  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r249855): Remove debug logging from WebCore::RenderImage::paintIntoRect()
        <https://webkit.org/b/202103>

        Reviewed by Zalan Bujtas.

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintIntoRect): Remove debug logging
        statements.

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

        [LFC][IFC] Pass in the Used*Values to inline layout functions.
        https://bugs.webkit.org/show_bug.cgi?id=202091
        <rdar://problem/55601987>

        Reviewed by Antti Koivisto.

        Only the top level layout functions should generate constraint values.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):

2019-09-23  Antti Koivisto  <antti@apple.com>

        Refcount simple line layout
        https://bugs.webkit.org/show_bug.cgi?id=202104

        Reviewed by Zalan Bujtas.

        Make SimpleLineLayout::Layout refcounted for safety and ease of use.

        * dom/Position.cpp:
        (WebCore::Position::upstream const):
        (WebCore::Position::downstream const):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):
        (WebCore::TextIterator::handleTextNodeFirstLetter):
        * editing/TextIterator.h:
        * rendering/RenderBlockFlow.h:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::write):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::create):
        (WebCore::SimpleLineLayout::Layout::create):
        * rendering/SimpleLineLayout.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::outputLineLayoutForFlow):
        * rendering/SimpleLineLayoutResolver.cpp:
        (WebCore::SimpleLineLayout::RunResolver::Run::rect const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):

        Iterator now refs the layout. Since the resolver is owned by the layout, it is guaranteed to stay alive too.

        (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
        * rendering/SimpleLineLayoutResolver.h:
        (WebCore::SimpleLineLayout::RunResolver::Iterator::layout const):
        (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode const): Deleted.
        (WebCore::SimpleLineLayout::runResolver): Deleted.

        Always use the cached resolver owned by SimpleLineLayout::Layout.

        * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
        (WebCore::LineLayoutInterface::firstTextBoxInVisualOrderFor):
        (WebCore::LineLayoutInterface::firstTextBoxInTextOrderFor):
        (WebCore::LineLayoutInterface::textBoxRangeFor):
        (WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor): Deleted.
        (WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor): Deleted.
        (WebCore::LineLayoutInterface::Provider::textBoxRangeFor): Deleted.

        There is no need for a separate Provider class anymore as the iterator keeps SimpleLineLayout::Layout
        and Resolver instances alive itself.

        * rendering/line/LineLayoutInterfaceTextBoxes.h:
        (WebCore::LineLayoutInterface::hasTextBoxes):
        (WebCore::LineLayoutInterface::Provider::firstTextBoxFor): Deleted.

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

        Simplify UserMediaPermissionRequestManager management of UserMediaRequest
        https://bugs.webkit.org/show_bug.cgi?id=201688

        Reviewed by Eric Carlson.

        Covered by existing tests and modified test.

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::UserMediaRequest):
        * Modules/mediastream/UserMediaRequest.h:
        (WebCore::UserMediaRequest::identifier const):
        Add an identifier generated for each request.

2019-09-23  Charlie Turner  <cturner@igalia.com>

        [GStreamer] isAVC1CodecSupported is crashing several media source tests due to avc1.4d4001 codec type
        https://bugs.webkit.org/show_bug.cgi?id=201870

        Reviewed by Xabier Rodriguez-Calvar.

        The GStreamer codec-utils package expects all level_idc's to be
        multiples of 10 from the spec idc, i.e., 1.1 -> 11, 3.1 -> 31, 1
        -> 10, etc.

        In the WPT tests, there is some confusion of this *10 multiplier,
        and the level_idc is given in several places as simply "1". This
        causes the get_level codec helper to return NULL, which the
        registry scanner was not handling properly, and crashing on.

        Fix this by special casing "web level idc's" that violate the *10
        rule in isAVC1CodecSupported.

        There is prior art along these lines in Gecko:
        https://searchfox.org/mozilla-central/source/dom/media/VideoUtils.cpp#453
        I assume Chrome/IE/etc must do something similar. The fix does not
        belong in GStreamer since these are actually invalid inputs to the
        get_level function.

        Tested by imported/w3c/web-platform-tests/media-source

        * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
        (WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const):
        Special case levels 1..5, even though these *should* be
        represented as 10 through 50 respectively, they are not in
        web-land. The two-byte local storage trick was contributed to me
        by Adrian Perez de Castro.

2019-09-23  Rob Buis  <rbuis@igalia.com>

        Sync operator dictionary
        https://bugs.webkit.org/show_bug.cgi?id=201974

        Reviewed by Frédéric Wang.

        Sync with operator dictionary list from
        https://mathml-refresh.github.io/mathml-core/#operator-dictionary

        Test: imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html

        * mathml/MathMLOperatorDictionary.cpp:

2019-09-22  David Kilzer  <ddkilzer@apple.com>

        clang-tidy: Fix unnecessary copy/ref churn of for loop variables in WebCore
        <https://webkit.org/b/202090>

        Reviewed by Daniel Bates.

        Fix unwanted copying/ref churn of loop variables by making them
        const references.

        * Modules/encryptedmedia/InitDataRegistry.cpp:
        (WebCore::InitDataRegistry::extractKeyIDsCenc):
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::getMisspellingRange const):
        (WebCore::AccessibilityObject::performTextOperation):
        * html/HTMLSlotElement.cpp:
        (WebCore::flattenAssignedNodes):
        * html/track/WebVTTParser.cpp:
        (WebCore::WebVTTParser::checkAndStoreStyleSheet):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers):
        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderPasteboard allDroppedFileURLs]):
        * svg/SVGStringList.h:
        * testing/MockLibWebRTCPeerConnection.cpp:
        (WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
        Also call transceivers.reserve() to optimize allocations.

2019-09-21  Chris Dumez  <cdumez@apple.com>

        Reduce use of SessionID::defaultSessionID() in WebKit
        https://bugs.webkit.org/show_bug.cgi?id=202080

        Reviewed by Alex Christensen.

        Reduce use of SessionID::defaultSessionID() in WebKit. Falling back to the default session
        when you don't know which session to use is never a good idea and a potential privacy issue.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::connect):
        * dom/Document.cpp:
        (WebCore::Document::logger):
        * dom/Document.h:
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::continueAfterContentPolicy):
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoaderClient.h:
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
        (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):
        (WebCore::CachedResourceLoader::requestResource):
        (WebCore::CachedResourceLoader::revalidateResource):
        (WebCore::CachedResourceLoader::loadResource):
        * loader/cache/CachedResourceLoader.h:
        (WebCore::CachedResourceLoader::clearDocumentLoader):
        * page/Frame.cpp:
        * page/Frame.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const):

2019-09-21  Chris Dumez  <cdumez@apple.com>

        ServiceWorkerContextData does not need a sessionID
        https://bugs.webkit.org/show_bug.cgi?id=202087

        Reviewed by Alex Christensen.

        * workers/service/ServiceWorkerContextData.cpp:
        (WebCore::ServiceWorkerContextData::isolatedCopy const):
        * workers/service/ServiceWorkerContextData.h:
        (WebCore::ServiceWorkerContextData::encode const):
        (WebCore::ServiceWorkerContextData::decode):
        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::RegistrationDatabase):
        (WebCore::RegistrationDatabase::importRecords):
        * workers/service/server/RegistrationDatabase.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::updateWorker):
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::contextData const):

2019-09-21  Chris Dumez  <cdumez@apple.com>

        WebIDBConnectionToClient does not need to be RefCounted or a SessionID
        https://bugs.webkit.org/show_bug.cgi?id=202089

        Reviewed by Alex Christensen.

        Drop some dead code.

        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

2019-09-21  Chris Dumez  <cdumez@apple.com>

        [CURL] CurlRequest does not need a sessionID
        https://bugs.webkit.org/show_bug.cgi?id=202086

        Reviewed by Alex Christensen.

        * platform/network/curl/CurlFormDataStream.cpp:
        (WebCore::CurlFormDataStream::CurlFormDataStream):
        * platform/network/curl/CurlFormDataStream.h:
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::CurlRequest):
        * platform/network/curl/CurlRequest.h:
        (WebCore::CurlRequest::create):
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::createCurlRequest):

2019-09-21  Chris Dumez  <cdumez@apple.com>

        CookieRequestHeaderFieldProxy does not need a SessionID
        https://bugs.webkit.org/show_bug.cgi?id=202084

        Reviewed by Alex Christensen.

        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::didOpenSocketStream):
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
        * loader/CookieJar.h:
        * platform/network/CookieRequestHeaderFieldProxy.h:
        (WebCore::CookieRequestHeaderFieldProxy::encode const):
        (WebCore::CookieRequestHeaderFieldProxy::decode):

2019-09-21  Chris Dumez  <cdumez@apple.com>

        DocumentLoader::m_temporaryServiceWorkerClient does not need a sessionID
        https://bugs.webkit.org/show_bug.cgi?id=202083

        Reviewed by Alex Christensen.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
        (WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
        * loader/DocumentLoader.h:

2019-09-21  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Resolve crashes found while running canvas tests
        https://bugs.webkit.org/show_bug.cgi?id=202062

        Reviewed by Don Olmstead.

        * platform/graphics/Pattern.h:
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::FillSource::FillSource): Take GraphicsContext as argument, rather than
        a PlatformContextDirect2D since downstream operations require the former.        
        (WebCore::Direct2D::StrokeSource::StrokeSource): Ditto.
        (WebCore::Direct2D::clip): Use new 'pushClip' helper function.
        * platform/graphics/win/Direct2DOperations.h:
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContext::drawPath):
        (WebCore::GraphicsContext::fillPath):
        (WebCore::GraphicsContext::strokePath):
        (WebCore::GraphicsContext::fillRect):
        (WebCore::GraphicsContext::fillRectWithRoundedHole):
        (WebCore::GraphicsContext::strokeRect):
        * platform/graphics/win/GraphicsContextImplDirect2D.cpp:
        (WebCore::GraphicsContextImplDirect2D::fillRect): Update to pass GraphicsContext.
        (WebCore::GraphicsContextImplDirect2D::fillRectWithRoundedHole): Ditto.
        (WebCore::GraphicsContextImplDirect2D::fillPath): Ditto.
        (WebCore::GraphicsContextImplDirect2D::strokeRect): Ditto.
        (WebCore::GraphicsContextImplDirect2D::strokePath): Ditto.
        (WebCore::GraphicsContextImplDirect2D::drawGlyphs): Ditto.
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::copyRectFromSourceToData): Correct return behavior.
        (WebCore::ImageBufferData::compatibleBitmap): Make a copy if the render target is
        backed by the ID2D1Bitmap we are trying to draw with.
        * platform/graphics/win/PatternDirect2D.cpp:
        (WebCore::Pattern::createPlatformPattern const): Remove 'PlatformContextDirect2D' contructor,
        since we always need a GraphicsContext for the Image class.
        * platform/graphics/win/PlatformContextDirect2D.cpp:
        (WebCore::PlatformContextDirect2D::clipLayer const): Added.
        (WebCore::PlatformContextDirect2D::clearClips): Added.
        (WebCore::PlatformContextDirect2D::restore): Update to use m_stateStack, rather than
        the m_renderStates vector.
        (WebCore::PlatformContextDirect2D::save): Ditto.
        (WebCore::PlatformContextDirect2D::pushRenderClip): Ditto.
        (WebCore::PlatformContextDirect2D::setActiveLayer): Ditto.
        (WebCore::PlatformContextDirect2D::endDraw): Ditto.
        (WebCore::PlatformContextDirect2D::notifyPostDrawObserver): Ditto.
        (WebCore::PlatformContextDirect2D::pushClip): Ditto.
        * platform/graphics/win/PlatformContextDirect2D.h:
        (WebCore::PlatformContextDirect2D::hasSavedState const):
        (WebCore::PlatformContextDirect2D::clipLayer const): Deleted.

2019-09-20  Antoine Quint  <graouts@apple.com>

        releasePointerCapture() not working for implicit capture; can't opt-in to pointerenter/leave for touches
        https://bugs.webkit.org/show_bug.cgi?id=199803
        <rdar://problem/53127223>

        Reviewed by Dean Jackson.

        In order to dispatch boundary events (pointerover/out/enter/leave) when the implicit pointer capture is released on iOS,
        we need to track the target of the pointer events that was dispatched last for a given pointer id. Then we compare that
        target with the current target when dispatching a new pointer event and determine whether we should dispatch boundary
        events using the exact same approach used to dispatch mouse boundary events in EventHandler::updateMouseEventTargetNode().

        Tests: pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html
               pointerevents/ios/boundary-events-without-pointer-capture.html

        * page/PointerCaptureController.cpp:
        (WebCore::hierarchyHasCapturingEventListeners):
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
        (WebCore::PointerCaptureController::pointerEventWillBeDispatched):
        (WebCore::PointerCaptureController::ensureCapturingDataForPointerEvent):
        (WebCore::PointerCaptureController::cancelPointer):
        * page/PointerCaptureController.h:

2019-09-21  Zalan Bujtas  <zalan@apple.com>

        [LFC] LayoutContext::m_formattingContextRootListForLayout should be a WeakHashSet
        https://bugs.webkit.org/show_bug.cgi?id=202068
        <rdar://problem/55579352>

        Reviewed by Alex Christensen.

        * layout/LayoutContext.cpp:
        (WebCore::Layout::LayoutContext::layout):
        (WebCore::Layout::LayoutContext::styleChanged):
        (WebCore::Layout::LayoutContext::markNeedsUpdate):
        * layout/LayoutContext.h:
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

2019-09-19  Andy Estes  <aestes@apple.com>

        [Apple Pay] Clean up handling of summary items and payment method updates
        https://bugs.webkit.org/show_bug.cgi?id=202018
        <rdar://problem/55470632>

        Reviewed by Tim Horton.

        Replaced the PaymentMethodUpdate struct with a class that knows how to convert from
        ApplePayPaymentMethodUpdate structs to PKPaymentRequestPaymentMethodUpdate instances.

        Moved some scattered-around free functions for converting payment summary items into
        PaymentSummaryItems{.h,Cocoa.mm}.

        * Modules/applepay/ApplePayPaymentMethodUpdate.h:
        * Modules/applepay/ApplePaySession.cpp:
        (WebCore::finishConverting):
        (WebCore::convertAndValidateTotal):
        (WebCore::convertAndValidate):
        * Modules/applepay/ApplePaySessionPaymentRequest.h:
        * Modules/applepay/PaymentCoordinator.h:
        * Modules/applepay/PaymentCoordinatorClient.h:
        * Modules/applepay/PaymentHeaders.h:
        * Modules/applepay/PaymentMethodUpdate.h: Added.
        * Modules/applepay/PaymentSummaryItems.h: Added.
        * Modules/applepay/cocoa/PaymentMethodUpdateCocoa.mm: Added.
        (WebCore::PaymentMethodUpdate::PaymentMethodUpdate):
        (WebCore::PaymentMethodUpdate::totalAndLineItems const):
        (WebCore::PaymentMethodUpdate::platformUpdate const):
        * Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm: Added.
        (WebCore::toDecimalNumber):
        (WebCore::toPKPaymentSummaryItemType):
        (WebCore::toPKPaymentSummaryItem):
        (WebCore::platformSummaryItems):
        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
        (WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * testing/MockPaymentCoordinator.cpp:
        (WebCore::MockPaymentCoordinator::completePaymentMethodSelection):

2019-09-20  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Assertion fires when animating a discrete property with values range and multiple animators
        https://bugs.webkit.org/show_bug.cgi?id=201926

        Reviewed by Darin Adler.

        The first animator of a property is considered the result element. The
        other animators will be just contributers to the first animator. For the
        first animator and in SVGSMILElement::progress(), we call resetAnimatedType()
        which creates m_animator in SVGAnimateElementBase::animator(). But for 
        the other animators we do not call resetAnimatedType(). So their m_animator
        will stay null until they are used for the first time.

        If SVGAnimationElement::startedActiveInterval() calls calculateToAtEndOfDurationValue()
        for a discrete property this will have no effect and the call should be
        ignored. So SVGAnimateElementBase::calculateToAtEndOfDurationValue()
        should bail out early if isDiscreteAnimator() is true.

        The bug is isDiscreteAnimator() will return false if the m_animator is 
        null even if the animated property is discrete, e.g. SVGAnimatedString.
        The fix is to make isDiscreteAnimator() ensure m_animator is created.

        Unrelated change:
        Make most of the protected methods of SVGAnimateElementBase be private.

        Test: svg/animations/multiple-discrete-values-animate.svg

        * svg/SVGAnimateElementBase.cpp:
        (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
        (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):

2019-09-20  Keith Rollin  <krollin@apple.com>

        Remove dead code for a specific macOS and iOS SDK
        https://bugs.webkit.org/show_bug.cgi?id=202054
        <rdar://problem/55569619>

        Reviewed by Zalan Bujtas.

        ComplexTextController::collectComplexTextRunsForCharacters in
        ComplexTextControllerCoreText.mm has some code for compatibility with
        specifically macOS 10.14.0 and iOS 12.0 (see Bug 186571). We don't
        build for these targets any more (when we build for macOS 10.14, it's
        for a later minor revision), so this code can be removed.

        No new tests -- no new or changed functionality.

        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

2019-09-20  Alex Christensen  <achristensen@webkit.org>

        Remove unnecessary abstractions around WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=201655

        Reviewed by Chris Dumez.

        * Modules/webdatabase/cocoa/DatabaseManagerCocoa.mm:
        (WebCore::DatabaseManager::platformInitialize):

2019-09-20  Alex Christensen  <achristensen@webkit.org>

        [resource-timing] Report performance entries with all HTTP status codes
        https://bugs.webkit.org/show_bug.cgi?id=202040

        Reviewed by Joseph Pecoraro.

        This follows a Chromium change at https://chromium-review.googlesource.com/c/chromium/src/+/1796544
        The spec change is being discussed at https://github.com/w3c/resource-timing/issues/165

        Test: imported/w3c/web-platform-tests/resource-timing/status-codes-create-entry.html

        I had to slightly modify the test to make sure the entry count was > 0 instead of == 1 to reduce flakyness because sometimes we load the 200 image twice.
        I'll submit a PR to WPT, too.

        * loader/ResourceTimingInformation.cpp:
        (WebCore::ResourceTimingInformation::shouldAddResourceTiming):

2019-09-20  Keith Rollin  <krollin@apple.com>

        Remove check of setSourceAppPid selector that's no longer needed
        https://bugs.webkit.org/show_bug.cgi?id=201971
        <rdar://problem/55505761>

        Reviewed by Andy Estes.

        Bug 172152 introduced a check of the NEFilterSource selector
        setSourceAppPid in order to support OS's that didn't support it. All
        supported Cocoa platforms now support it, so the check can be removed.

        No new tests -- no new or changed functionality.

        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::initialize):

2019-09-20  Keith Rollin  <krollin@apple.com>

        Remove some support for < iOS 13
        https://bugs.webkit.org/show_bug.cgi?id=201967
        <rdar://problem/55504738>

        Reviewed by Andy Estes.

        Remove some support for iOS versions less than 13.0.

        Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
        and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
        values >= 130000. This means that expressions like
        "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
        "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

        After version checks have been removed, there are some cases where the
        preprocessor conditional looks like "#if PLATFORM(MAC) ||
        PLATFORM(IOS_FAMILY)". These can be collapsed into "#if
        PLATFORM(COCOA)". This additional cleanup will be performed in a
        subsequent patch.

        This removal is part of a series of patches effecting the removal of
        dead code for old versions of iOS. This particular pass involves
        changes in which Andy Estes was involved. These changes are isolated
        from other similar changes in order to facilitate the reviewing
        process.

        No new tests -- no new or changed functionality.

        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::initialize):

2019-09-20  Chris Dumez  <cdumez@apple.com>

        Document no longer needs to store a SessionID
        https://bugs.webkit.org/show_bug.cgi?id=202024

        Reviewed by Geoffrey Garen.

        Document no longer needs to store a SessionID, now that we have a single
        session per WebProcess. It can simply get its sessionID from its Page.

        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::create):
        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::didOpenSocketStream):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        * dom/DOMImplementation.cpp:
        (WebCore::createXMLDocument):
        (WebCore::DOMImplementation::createDocument):
        (WebCore::DOMImplementation::createHTMLDocument):
        * dom/DOMImplementation.h:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::m_undoManager):
        (WebCore::Document::create):
        (WebCore::Document::createNonRenderedPlaceholder):
        (WebCore::Document::cloneDocumentWithoutChildren const):
        (WebCore::Document::sessionID const):
        (WebCore::Document::privateBrowsingStateDidChange):
        (WebCore::Document::ensureTemplateDocument):
        (WebCore::Document::logger):
        (WebCore::Document::didLogMessage):
        * dom/Document.h:
        (WebCore::Document::create):
        * dom/XMLDocument.h:
        (WebCore::XMLDocument::create):
        (WebCore::XMLDocument::createXHTML):
        (WebCore::XMLDocument::XMLDocument):
        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
        * html/FTPDirectoryDocument.h:
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::parseAdClickAttribution const):
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createSynthesizedDocument):
        (WebCore::HTMLDocument::HTMLDocument):
        (WebCore::HTMLDocument::cloneDocumentWithoutChildren const):
        * html/HTMLDocument.h:
        (WebCore::HTMLDocument::create):
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::ImageDocument):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocument::MediaDocument):
        * html/MediaDocument.h:
        * html/PluginDocument.cpp:
        (WebCore::PluginDocument::PluginDocument):
        * html/TextDocument.cpp:
        (WebCore::TextDocument::TextDocument):
        * html/TextDocument.h:
        * inspector/DOMPatchSupport.cpp:
        (WebCore::DOMPatchSupport::patchDocument):
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
        (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
        * loader/CookieJar.h:
        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::createDocument):
        * loader/SinkDocument.cpp:
        (WebCore::SinkDocument::SinkDocument):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::setResponse):
        (WebCore::CachedResource::varyHeaderValuesMatch):
        * loader/cache/CachedSVGDocument.cpp:
        (WebCore::CachedSVGDocument::finishLoading):
        * loader/cache/CachedSVGFont.cpp:
        (WebCore::CachedSVGFont::ensureCustomFontData):
        * page/Page.cpp:
        (WebCore::Page::configureLoggingChannel):
        * platform/network/CacheValidation.cpp:
        (WebCore::cookieRequestHeaderFieldValue):
        (WebCore::collectVaryingRequestHeaders):
        (WebCore::verifyVaryingRequestHeaders):
        * platform/network/CacheValidation.h:
        * svg/SVGDocument.cpp:
        (WebCore::SVGDocument::SVGDocument):
        (WebCore::SVGDocument::cloneDocumentWithoutChildren const):
        * svg/SVGDocument.h:
        (WebCore::SVGDocument::create):
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const):
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::WorkletGlobalScope):
        * worklets/WorkletGlobalScope.h:
        * xml/DOMParser.cpp:
        (WebCore::DOMParser::parseFromString):
        * xml/DOMParser.h:
        * xml/DOMParser.idl:
        * xml/XMLHttpRequest.cpp:
        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource):

2019-09-20  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and <rect> elements (Addressing review comments)
        https://bugs.webkit.org/show_bug.cgi?id=199843

        Reviewed by Darin Adler.

        Make RenderSVGEllipse calculate of the ellipse's rx and ry more efficiently.

        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):

2019-09-20  Keith Rollin  <krollin@apple.com>

        Remove some support for < iOS 13
        https://bugs.webkit.org/show_bug.cgi?id=202032
        <rdar://problem/55548468>

        Reviewed by Alex Christensen.

        Remove some support for iOS versions less than 13.0.

        Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
        and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
        values >= 130000. This means that expressions like
        "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
        "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

        This removal is part of a series of patches effecting the removal of
        dead code for old versions of iOS. This particular pass involves
        changes in which Dan Bates was involved. These changes are isolated
        from other similar changes in order to facilitate the reviewing
        process.

        No new tests -- no new or changed functionality.

        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        * platform/network/cocoa/CookieCocoa.mm:
        (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
        * platform/network/cocoa/ResourceRequestCocoa.mm:
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):

2019-09-20  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r250114.

        Broke ~16 webgpu/ tests on Mojave wk2

        Reverted changeset:

        "Web Inspector: Canvas: show WebGPU shader pipelines"
        https://bugs.webkit.org/show_bug.cgi?id=201675
        https://trac.webkit.org/changeset/250114

2019-09-20  Antti Koivisto  <antti@apple.com>

        Implement Position::upstream and Position::downstream with line layout iterator
        https://bugs.webkit.org/show_bug.cgi?id=202043

        Reviewed by Zalan Bujtas.

        These can eventually work without switching to lineboxes.

        * dom/Position.cpp:
        (WebCore::Position::upstream const):
        (WebCore::Position::downstream const):

        Factor the loops into TextBox::isLastOnLine function.

        * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
        (WebCore::LineLayoutInterface::TextBox::isLastOnLine const):

        Looking into root boxes is a much more efficient way to figure this out.

        (WebCore::LineLayoutInterface::TextBox::isLast const):
        (WebCore::LineLayoutInterface::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const):
        (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInTextOrder):
        * rendering/line/LineLayoutInterfaceTextBoxes.h:

2019-09-20  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce LayoutContext class
        https://bugs.webkit.org/show_bug.cgi?id=202026
        <rdar://problem/55546622>

        Reviewed by Antti Koivisto.

        Move context related functionality from LayoutState to LayoutContext.
        To initiate a layout, create a LayoutContext, pass the current LayoutState object in and call layout().  

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
        (WebCore::Layout::LayoutState::updateLayout): Deleted.
        (WebCore::Layout::LayoutState::layoutFormattingContextSubtree): Deleted.
        (WebCore::Layout::LayoutState::styleChanged): Deleted.
        (WebCore::Layout::LayoutState::markNeedsUpdate): Deleted.
        (WebCore::Layout::LayoutState::createFormattingContext): Deleted.
        (WebCore::Layout::LayoutState::run): Deleted.
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::hasFormattingState const):
        (WebCore::Layout::LayoutState::setQuirksMode):
        (WebCore::Layout::LayoutState::inNoQuirksMode const):
        (WebCore::Layout::LayoutState::updateAll): Deleted.
        * layout/Verification.cpp:
        (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
        (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const): Deleted.
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        * layout/blockformatting/BlockInvalidation.cpp:
        (WebCore::Layout::computeUpdateType):
        (WebCore::Layout::computeUpdateTypeForAncestor):
        (WebCore::Layout::BlockInvalidation::invalidate):
        * layout/blockformatting/BlockInvalidation.h:
        * layout/displaytree/DisplayBox.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/inlineformatting/InlineInvalidation.cpp:
        (WebCore::Layout::InlineInvalidation::invalidate):
        * layout/inlineformatting/InlineInvalidation.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        * layout/tableformatting/TableInvalidation.cpp:
        (WebCore::Layout::TableInvalidation::invalidate):
        * layout/tableformatting/TableInvalidation.h:
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

2019-09-19  Joonghun Park  <pjh0718@gmail.com>

        Unreviewed. Fix Build error below since r248879.

        warning: unused variable ‘canvas’ [-Wunused-variable]

        No new tests, no new behavioral changes.

        * html/canvas/GPUBasedCanvasRenderingContext.cpp:
        (WebCore::GPUBasedCanvasRenderingContext::notifyCanvasContentChanged):

2019-09-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: show WebGPU shader pipelines
        https://bugs.webkit.org/show_bug.cgi?id=201675

        Reviewed by Joseph Pecoraro.

        Tests: inspector/canvas/requestShaderSource-webgpu.html
               inspector/canvas/shaderProgram-add-remove-webgpu.html
               inspector/canvas/updateShader-webgpu.html

        Create common base classes for `WebGPUPipeline` and `GPUPipeline` so that Web Inspector can
        instrument both render and compute shader pipelines.

        Refactor `InspectorShaderProgram` to support both `WebGLProgram` and `WebGPUPipeline` so
        that the same object can be used for all types of shader "program"s.

        Keep a copy of each shader module's source, and allow the shader module to be updated.

        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createShaderModule const):
        (WebCore::WebGPUDevice::createRenderPipeline): Added.
        (WebCore::WebGPUDevice::createComputePipeline): Added.
        (WebCore::WebGPUDevice::createRenderPipeline const): Deleted.
        (WebCore::WebGPUDevice::createComputePipeline const): Deleted.

        * Modules/webgpu/WebGPUPipeline.h: Added.
        (WebCore::WebGPUPipeline::isRenderPipeline const):
        (WebCore::WebGPUPipeline::isComputePipeline const):
        (WebCore::WebGPUPipeline::scriptExecutionContext const):
        * Modules/webgpu/WebGPUPipeline.cpp: Added.
        (WebCore::WebGPUPipeline::instancesMutex):
        (WebCore::WebGPUPipeline::WebGPUPipeline):
        (WebCore::WebGPUPipeline::~WebGPUPipeline):
        * platform/graphics/gpu/GPUPipeline.cpp: Added.
        * platform/graphics/gpu/GPUPipeline.h: Added.
        (WebCore::GPUPipeline::isRenderPipeline const):
        (WebCore::GPUPipeline::isComputePipeline const):

        * Modules/webgpu/WebGPUComputePipeline.idl:
        * Modules/webgpu/WebGPUComputePipeline.h:
        (WebCore::WebGPUComputePipeline::computePipeline const): Deleted.
        * Modules/webgpu/WebGPUComputePipeline.cpp:
        (WebCore::WebGPUComputePipeline::create):
        (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
        (WebCore::WebGPUComputePipeline::recompile): Added.
        * platform/graphics/gpu/GPUComputePipeline.h:
        (WebCore::GPUComputePipeline::isComputePipeline): Added.
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):
        (WebCore::GPUComputePipeline::recompile): Added.

        * Modules/webgpu/WebGPURenderPipeline.idl:
        * Modules/webgpu/WebGPURenderPipeline.h:
        (WebCore::WebGPURenderPipeline::renderPipeline const): Deleted.
        * Modules/webgpu/WebGPURenderPipeline.cpp:
        (WebCore::WebGPURenderPipeline::create):
        (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
        (WebCore::WebGPURenderPipeline::recompile): Added.
        * platform/graphics/gpu/GPURenderPipeline.h:
        (WebCore::GPURenderPipeline::isRenderPipeline): Added.
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::GPURenderPipeline::GPURenderPipeline):
        (WebCore::GPURenderPipeline::recompile): Added.

        * Modules/webgpu/WebGPUShaderModule.h:
        (WebCore::WebGPUShaderModule::source const): Added.
        * Modules/webgpu/WebGPUShaderModule.cpp:
        (WebCore::WebGPUShaderModule::update): Added.
        * Modules/webgpu/WebGPUProgrammableStageDescriptor.h:
        * platform/graphics/gpu/GPUProgrammableStageDescriptor.h:
        (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):

        * inspector/InspectorShaderProgram.h:
        * inspector/InspectorShaderProgram.cpp:
        (WebCore::InspectorShaderProgram::create):
        (WebCore::InspectorShaderProgram::InspectorShaderProgram):
        (WebCore::InspectorShaderProgram::program const): Added.
        (WebCore::InspectorShaderProgram::pipeline const): Added.
        (WebCore::shaderForType): Added.
        (WebCore::InspectorShaderProgram::requestShaderSource): Added.
        (WebCore::InspectorShaderProgram::updateShader): Added.
        (WebCore::InspectorShaderProgram::context const): Deleted.
        (WebCore::InspectorShaderProgram::shaderForType): Deleted.

        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
        (WebCore::InspectorCanvasAgent::discardAgent):
        (WebCore::InspectorCanvasAgent::enable):
        (WebCore::InspectorCanvasAgent::disable):
        (WebCore::InspectorCanvasAgent::requestShaderSource):
        (WebCore::InspectorCanvasAgent::updateShader):
        (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
        (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
        (WebCore::InspectorCanvasAgent::frameNavigated):
        (WebCore::InspectorCanvasAgent::didCreateWebGLProgram): Added.
        (WebCore::InspectorCanvasAgent::willDestroyWebGLProgram): Added.
        (WebCore::InspectorCanvasAgent::isWebGLProgramDisabled): Added.
        (WebCore::InspectorCanvasAgent::isWebGLProgramHighlighted): Added.
        (WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Added.
        (WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Added.
        (WebCore::InspectorCanvasAgent::programDestroyedTimerFired): Added.
        (WebCore::InspectorCanvasAgent::reset): Added.
        (WebCore::InspectorCanvasAgent::unbindProgram):
        (WebCore::InspectorCanvasAgent::findInspectorProgram):
        (WebCore::InspectorCanvasAgent::didCreateProgram): Deleted.
        (WebCore::InspectorCanvasAgent::willDeleteProgram): Deleted.
        (WebCore::InspectorCanvasAgent::isShaderProgramDisabled): Deleted.
        (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted): Deleted.
        (WebCore::InspectorCanvasAgent::clearCanvasData): Deleted.
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didCreateWebGLProgram): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGLProgram): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramDisabled): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramHighlighted): Added.
        (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Added.
        (WebCore::InspectorInstrumentation::didCreateProgram): Deleted.
        (WebCore::InspectorInstrumentation::willDeleteProgram): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramDisabled): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramHighlighted): Deleted.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCreateWebGLProgramImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGLProgramImpl): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramDisabledImpl): Added.
        (WebCore::InspectorInstrumentation::isWebGLProgramHighlightedImpl): Added.
        (WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Added.
        (WebCore::InspectorInstrumentation::didCreateProgramImpl): Deleted.
        (WebCore::InspectorInstrumentation::willDeleteProgramImpl): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramDisabledImpl): Deleted.
        (WebCore::InspectorInstrumentation::isShaderProgramHighlightedImpl): Deleted.

        * html/canvas/WebGLProgram.h:
        * html/canvas/WebGLProgram.cpp:
        (WebCore::WebGLProgram::WebGLProgram):
        (WebCore::WebGLProgram::~WebGLProgram):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::InspectorScopedShaderProgramHighlight::showHightlight):
        (WebCore::WebGLRenderingContextBase::createProgram):
        (WebCore::WebGLRenderingContextBase::deleteProgram):
        (WebCore::WebGLRenderingContextBase::drawArrays):
        (WebCore::WebGLRenderingContextBase::drawElements):
        Rename WebGL program instrumentation points to be less ambiguous.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-09-19  Chris Dumez  <cdumez@apple.com>

        WorkerGlobalScope does not need a SessionID
        https://bugs.webkit.org/show_bug.cgi?id=201991

        Reviewed by Alex Christensen.

        WorkerGlobalScope does not need a SessionID, now that we have a single session
        per WebProcess.

        * dom/Document.cpp:
        (WebCore::Document::resume):
        (WebCore::Document::privateBrowsingStateDidChange):
        * dom/Document.h:
        * dom/ScriptExecutionContext.h:
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::matchRegistration):
        (WebCore::DocumentLoader::commitData):
        (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
        (WebCore::DocumentLoader::unregisterTemporaryServiceWorkerClient):
        * testing/Internals.cpp:
        (WebCore::Internals::serviceWorkerClientIdentifier const):
        (WebCore::Internals::storeRegistrationsOnDisk):
        (WebCore::Internals::hasServiceWorkerRegistration):
        (WebCore::Internals::terminateServiceWorker):
        (WebCore::Internals::hasServiceWorkerConnection):
        * workers/DedicatedWorkerGlobalScope.cpp:
        (WebCore::DedicatedWorkerGlobalScope::create):
        (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
        * workers/DedicatedWorkerGlobalScope.h:
        * workers/DedicatedWorkerThread.cpp:
        (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
        (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
        * workers/DedicatedWorkerThread.h:
        * workers/Worker.cpp:
        (WebCore::Worker::notifyFinished):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
        * workers/WorkerGlobalScope.h:
        * workers/WorkerGlobalScopeProxy.h:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * workers/WorkerMessagingProxy.h:
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
        (WebCore::WorkerThread::WorkerThread):
        (WebCore::WorkerThread::workerThread):
        * workers/WorkerThread.h:
        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::postMessage):
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::mainThreadConnection):
        (WebCore::ServiceWorkerContainer::addRegistration):
        (WebCore::ServiceWorkerContainer::removeRegistration):
        (WebCore::ServiceWorkerContainer::updateRegistration):
        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
        (WebCore::ServiceWorkerContainer::notifyRegistrationIsSettled):
        (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
        (WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):
        (WebCore::ServiceWorkerContainer::ensureSWClientConnection):
        * workers/service/ServiceWorkerGlobalScope.cpp:
        (WebCore::ServiceWorkerGlobalScope::create):
        (WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
        * workers/service/ServiceWorkerGlobalScope.h:
        * workers/service/ServiceWorkerProvider.cpp:
        (WebCore::ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin):
        (WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
        * workers/service/ServiceWorkerProvider.h:
        * workers/service/WorkerSWClientConnection.cpp:
        (WebCore::WorkerSWClientConnection::WorkerSWClientConnection):
        (WebCore::WorkerSWClientConnection::matchRegistration):
        (WebCore::WorkerSWClientConnection::getRegistrations):
        (WebCore::WorkerSWClientConnection::whenRegistrationReady):
        (WebCore::WorkerSWClientConnection::addServiceWorkerRegistrationInServer):
        (WebCore::WorkerSWClientConnection::removeServiceWorkerRegistrationInServer):
        (WebCore::WorkerSWClientConnection::didResolveRegistrationPromise):
        (WebCore::WorkerSWClientConnection::postMessageToServiceWorker):
        (WebCore::WorkerSWClientConnection::serverConnectionIdentifier const):
        (WebCore::WorkerSWClientConnection::syncTerminateWorker):
        (WebCore::WorkerSWClientConnection::registerServiceWorkerClient):
        (WebCore::WorkerSWClientConnection::finishFetchingScriptInServer):
        (WebCore::WorkerSWClientConnection::scheduleJob):
        * workers/service/WorkerSWClientConnection.h:
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::ServiceWorkerThread):
        (WebCore::ServiceWorkerThread::createWorkerGlobalScope):
        * workers/service/context/ServiceWorkerThread.h:
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
        * workers/service/context/ServiceWorkerThreadProxy.h:
        * worklets/WorkletGlobalScope.h:
        (WebCore::WorkletGlobalScope::sessionID const):
        * xml/DOMParser.cpp:
        (WebCore::DOMParser::parseFromString):
        * xml/DOMParser.h:
        * xml/DOMParser.idl:
        * xml/XMLHttpRequest.cpp:

2019-09-19  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [SVG2]: Add auto behavior for rx and ry to the SVG <ellipse> and<rect> elements
        https://bugs.webkit.org/show_bug.cgi?id=199843

        Reviewed by Simon Fraser, Nikolas Zimmermann.

        The specification is: https://www.w3.org/TR/SVG2/geometry.html#RxProperty.

        Change the initial value of rx and ry to be "auto". Change the parser to
        parse LengthOrAuto for these properties. Handle the case if one of them
        is missing.

        Tests: svg/custom/ellipse-radius-auto-dynamic.svg
               svg/custom/ellipse-radius-auto-initial.svg
               svg/custom/ellipse-radius-length-initial.svg
               svg/custom/rect-radius-auto-dynamic.svg
               svg/custom/rect-radius-auto-initial.svg
               svg/custom/rect-radius-length-initial.svg

        * css/CSSProperties.json:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeRxOrRy):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::initialRadius):
        * rendering/style/SVGRenderStyleDefs.cpp:
        (WebCore::StyleLayoutData::StyleLayoutData):
        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):

2019-09-19  Peng Liu  <peng.liu6@apple.com>

        HTMLVideoElement with a broken poster image will take square dimension
        https://bugs.webkit.org/show_bug.cgi?id=174122
        <rdar://problem/33121806>

        Reviewed by Daniel Bates.

        For a video element, if only the width attribute is given and the height attribute is missing,
        an invalid poster image will make its aspect ratio to be 1, which is the historical WebKit behavior
        if we're painting alt text and/or a broken image. This fix prevents that behavior to impact video elements.

        We add a virtual function shouldDisplayBrokenImageIcon() to RenderImage and it will return true
        only when the image source is given but cannot be downloaded. RenderMedia overrides this virtual function
        and always return false because it never shows the broken image icon. RenderVideo inherits
        that behavior from RenderMedia.

        Then, in RenderImage::computeIntrinsicRatioInformation(), we only set the aspect ratio to 1
        when we need to show the broken image icon. It is the historical WebKit behavior that we want to keep
        for image element, but we also want to avoid its impact (this bug) on video elements.

        We also replace the imageResource().errorOccurred() with shouldDisplayBrokenImageIcon() in
        TreeBuilder::createLayoutBox() for the same reason.

        The logic to display the broken image icon in RenderImage::renderReplaced() is also cleaned up.

        Test: media/video-poster-not-found.html

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::shouldDisplayBrokenImageIcon const):
        (WebCore::RenderImage::paintReplaced):
        (WebCore::RenderImage::computeIntrinsicRatioInformation const):
        * rendering/RenderImage.h:
        * rendering/RenderMedia.h:

2019-09-19  Antti Koivisto  <antti@apple.com>

        Turn static DocumentRuleSets::s_isInvalidatingStyleWithRuleSets assertion bit into a member
        https://bugs.webkit.org/show_bug.cgi?id=201985
        <rdar://problem/54851871>

        Reviewed by Zalan Bujtas.

        This assert bit was catching cases that are not dangerous. Turn it into a member to narrow the scope.

        * css/DocumentRuleSets.cpp:
        (WebCore::DocumentRuleSets::~DocumentRuleSets):
        (WebCore::DocumentRuleSets::collectFeatures const):
        (): Deleted.
        * css/DocumentRuleSets.h:
        (WebCore::DocumentRuleSets::isInvalidatingStyleWithRuleSets):
        * style/AttributeChangeInvalidation.cpp:
        (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
        * style/ClassChangeInvalidation.cpp:
        (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):

2019-09-19  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove redundant Layout::Box::ElementTypes
        https://bugs.webkit.org/show_bug.cgi?id=201963

        Reviewed by Antti Koivisto.

        These types can be solved through RenderStyle.

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isPaddingApplicable const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isTableHeader const):
        (WebCore::Layout::Box::isTableBody const):
        (WebCore::Layout::Box::isTableFooter const):
        (WebCore::Layout::Box::isTableRow const):
        (WebCore::Layout::Box::isTableColumnGroup const):
        (WebCore::Layout::Box::isTableColumn const):
        (WebCore::Layout::Box::isTableCell const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

2019-09-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] InlineFormattingContext::InlineLayout should not need to call LayoutState::establishedFormattingState
        https://bugs.webkit.org/show_bug.cgi?id=201972
        <rdar://problem/55505869>

        Reviewed by Antti Koivisto.

        InlineLayout has access to InlineFormattingContext, so it should just query it instead of calling LayoutState::establishedFormattingState.

        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const): Deleted.
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const): Deleted.

2019-09-19  Zalan Bujtas  <zalan@apple.com>

        [LFC] FloatingContext should take the root container.
        https://bugs.webkit.org/show_bug.cgi?id=201968
        <rdar://problem/55505090>

        Reviewed by Antti Koivisto.

        Now FormattingContext::root() does not need to be public anymore.

        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::root const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::FloatingContext):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        * layout/floats/FloatingContext.h:
        (WebCore::Layout::FloatingContext::root const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

2019-09-18  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Correct ImageBufferData and clear operations
        https://bugs.webkit.org/show_bug.cgi?id=201862

        Reviewed by Fujii Hironori.

        This patch corrects several problems in the canvas implementation:
        1. The implementation of ImageBufferDataDirect2D did not properly handle the case of a
           'getData' request for less than the size of the full bitmap.
        2. The implementation of 'Clear' was not correct when the size of the region to be
           cleared is less than the size of the render target.
        3. 'endDraw' fails if any clip regions are active at the end of the operation. The
           stack needs to be unwound when endDraw is called.

        This patch corrects all three problems.

        Tested by canvas LayoutTests.

        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::clearRect): Correct partial render target case.
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::getData const): Correct partial buffer case.
        (WebCore::ImageBufferData::putData): Ditto.
        (WebCore::ImageBufferData::readDataFromBitmapIfNeeded): Added.
        (WebCore::copyRectFromSourceToDest): Added.
        (WebCore::ImageBufferData::copyRectFromSourceToData): Added.
        * platform/graphics/win/PlatformContextDirect2D.cpp:
        (WebCore::PlatformContextDirect2D::endDraw): Correct failures caused by
        dangling clip regions when 'endDraw' is called.
        (WebCore::PlatformContextDirect2D::flush): Don't call post-draw observer;
        this is already handled in the draw operations, and endDraw.
        (WebCore::PlatformContextDirect2D::restore): Recognize that the clip
        and transparency stack might be empty when restore is called.

2019-09-18  Andy Estes  <aestes@apple.com>

        Unreviewed, fixed a crash in ssl/applepay/ApplePayCancelEvent.https.html

        After r250060 (which landed very shortly after the patch that introduced ApplePayCancelEvent),
        all Events must be IsoHeap-ed. ApplePayCancelEvent was not IsoHeap-ed, and so this caused
        assertion failures in ssl/applepay/ApplePayCancelEvent.https.html.
        
        Added the WTF_MAKE_ISO_ALLOCATED macros to ApplePayCancelEvent without a review to stop the
        test from failing in EWS.

        * Modules/applepay/ApplePayCancelEvent.cpp:
        * Modules/applepay/ApplePayCancelEvent.h:

2019-09-18  Chris Dumez  <cdumez@apple.com>

        WebSocketStream does not need a SessionID
        https://bugs.webkit.org/show_bug.cgi?id=201960

        Reviewed by Geoffrey Garen.

        WebSocketStream does not need a SessionID, now that we have a single session per WebProcess.

        * platform/network/cf/SocketStreamHandleImpl.h:
        * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
        (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):

2019-09-18  Chris Dumez  <cdumez@apple.com>

        LibWebRTCProvider does not need sessionIDs anymore
        https://bugs.webkit.org/show_bug.cgi?id=201959

        Reviewed by Geoffrey Garen.

        LibWebRTCProvider does not need sessionIDs anymore, now that we have a single session per WebProcess.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::registerMDNSName):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:

2019-09-18  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::Geometry/MarginCollapse/Quirk classes should not need to access non-const Display::Box
        https://bugs.webkit.org/show_bug.cgi?id=201944
        <rdar://problem/55493279>

        Reviewed by Antti Koivisto.

        This patch improves const correctness so that the Geometry/MarginCollapse/Quirk objects could not access non-const Display::Boxes (to mutate the display tree).
        (The MarginCollapse::Update* functions are about updating the margin values on previously processed boxes so strictly speaking they are not margin collapsing related, but they somewhat belong to the MarginCollapse class -since they deal with margins.)

        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::formattingState const):
        (WebCore::Layout::FormattingContext::formattingState):
        * layout/FormattingState.cpp:
        (WebCore::Layout::FormattingState::displayBox):
        (WebCore::Layout::FormattingState::displayBox const): Deleted.
        * layout/FormattingState.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        (WebCore::Layout::BlockFormattingContext::formattingState const):
        (WebCore::Layout::BlockFormattingContext::formattingState):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter): Deleted.
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContent):
        (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::formattingState const):
        (WebCore::Layout::InlineFormattingContext::formattingState):
        * layout/tableformatting/TableFormattingContext.h:
        (WebCore::Layout::TableFormattingContext::formattingState const):
        (WebCore::Layout::TableFormattingContext::formattingState):

2019-09-18  Chris Dumez  <cdumez@apple.com>

        BlobRegistry no longer needs SessionIDs
        https://bugs.webkit.org/show_bug.cgi?id=201936

        Reviewed by Geoffrey Garen.

        BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.

        * Modules/entriesapi/DOMFileSystem.cpp:
        (WebCore::DOMFileSystem::getFile):
        * Modules/entriesapi/DOMFileSystem.h:
        * Modules/entriesapi/FileSystemFileEntry.cpp:
        (WebCore::FileSystemFileEntry::file):
        * Modules/entriesapi/FileSystemFileEntry.h:
        * Modules/entriesapi/FileSystemFileEntry.idl:
        * Modules/fetch/FetchBody.cpp:
        (WebCore::FetchBody::fromFormData):
        * Modules/fetch/FetchBody.h:
        * Modules/fetch/FetchBodyConsumer.cpp:
        (WebCore::blobFromData):
        (WebCore::resolveWithTypeAndData):
        (WebCore::FetchBodyConsumer::resolve):
        (WebCore::FetchBodyConsumer::takeAsBlob):
        * Modules/fetch/FetchBodyConsumer.h:
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::blob):
        * Modules/fetch/FetchLoader.cpp:
        (WebCore::FetchLoader::~FetchLoader):
        (WebCore::FetchLoader::startLoadingBlobURL):
        * Modules/fetch/FetchLoader.h:
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::putOrAddOnServer):
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::createRecordingDataBlob):
        * Modules/mediasource/MediaSourceRegistry.cpp:
        (WebCore::MediaSourceRegistry::unregisterURL):
        * Modules/mediasource/MediaSourceRegistry.h:
        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::didReceiveRawData):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::didReceiveBinaryData):
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneDeserializer::readFile):
        (WebCore::CloneDeserializer::readTerminal):
        (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
        (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
        * bindings/js/SerializedScriptValue.h:
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::DataTransfer):
        (WebCore::DataTransfer::createForCopyAndPaste):
        (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
        (WebCore::DataTransfer::createForInputEvent):
        (WebCore::DataTransfer::createForDrag):
        (WebCore::DataTransfer::createForDragStartEvent):
        (WebCore::DataTransfer::createForDrop):
        (WebCore::DataTransfer::createForUpdatingDropTarget):
        * dom/DataTransfer.h:
        * editing/ReplaceRangeWithTextCommand.cpp:
        (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
        * editing/SpellingCorrectionCommand.cpp:
        (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::inputEventDataTransfer const):
        * editing/WebCorePasteboardFileReader.cpp:
        (WebCore::WebCorePasteboardFileReader::readFilename):
        (WebCore::WebCorePasteboardFileReader::readBuffer):
        * editing/WebCorePasteboardFileReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::createFragmentForImageAttachment):
        (WebCore::replaceRichContentWithAttachments):
        (WebCore::createFragmentAndAddResources):
        (WebCore::sanitizeMarkupWithArchive):
        (WebCore::WebContentReader::readImage):
        (WebCore::attachmentForFilePath):
        (WebCore::attachmentForData):
        * editing/markup.cpp:
        (WebCore::restoreAttachmentElementsInFragment):
        * fileapi/Blob.cpp:
        (WebCore::BlobURLRegistry::registerURL):
        (WebCore::BlobURLRegistry::unregisterURL):
        (WebCore::Blob::Blob):
        (WebCore::Blob::~Blob):
        * fileapi/Blob.h:
        (WebCore::Blob::create):
        (WebCore::Blob::deserialize):
        (WebCore::Blob::slice const):
        * fileapi/Blob.idl:
        * fileapi/File.cpp:
        (WebCore::File::createWithRelativePath):
        (WebCore::File::create):
        (WebCore::File::File):
        * fileapi/File.h:
        * fileapi/File.idl:
        * fileapi/FileReaderLoader.cpp:
        (WebCore::FileReaderLoader::~FileReaderLoader):
        (WebCore::FileReaderLoader::start):
        * fileapi/FileReaderLoader.h:
        * fileapi/ThreadableBlobRegistry.cpp:
        (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
        (WebCore::ThreadableBlobRegistry::registerBlobURL):
        (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
        (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
        (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
        * fileapi/ThreadableBlobRegistry.h:
        * html/FileInputType.cpp:
        (WebCore::FileInputType::appendFormData const):
        (WebCore::FileInputType::filesChosen):
        * html/FileListCreator.cpp:
        (WebCore::appendDirectoryFiles):
        (WebCore::FileListCreator::FileListCreator):
        (WebCore::FileListCreator::createFileList):
        * html/FileListCreator.h:
        (WebCore::FileListCreator::create):
        * html/HTMLAttachmentElement.cpp:
        (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::toBlob):
        * html/PublicURLManager.cpp:
        (WebCore::PublicURLManager::revoke):
        (WebCore::PublicURLManager::stop):
        * html/URLRegistry.h:
        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleDrag):
        * platform/network/BlobRegistry.h:
        * testing/Internals.cpp:
        (WebCore::Internals::createFile):
        * testing/ServiceWorkerInternals.cpp:
        (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
        * workers/service/context/ServiceWorkerFetch.cpp:
        (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createResponseBlob):

2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>

        Make all ScriptWrappable IsoHeap-ed
        https://bugs.webkit.org/show_bug.cgi?id=201846
        <rdar://problem/55407535>

        Reviewed by Mark Lam.

        This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.

        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
        (WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
        (WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
        * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
        * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
        (WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
        (WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
        * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
        * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
        * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
        * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
        * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
        * Modules/applepay/ApplePayValidateMerchantEvent.h:
        (WebCore::ApplePayValidateMerchantEvent::create): Deleted.
        (WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
        * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
        * Modules/encryptedmedia/MediaKeyMessageEvent.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
        (WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
        (WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
        (WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
        (WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
        (WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
        * Modules/gamepad/GamepadEvent.cpp:
        * Modules/gamepad/GamepadEvent.h:
        (WebCore::GamepadEvent::create): Deleted.
        (WebCore::GamepadEvent::gamepad const): Deleted.
        * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
        * Modules/indexeddb/IDBRequestCompletionEvent.h:
        (WebCore::IDBRequestCompletionEvent::create): Deleted.
        * Modules/indexeddb/IDBVersionChangeEvent.cpp:
        * Modules/indexeddb/IDBVersionChangeEvent.h:
        * Modules/mediarecorder/BlobEvent.cpp:
        * Modules/mediarecorder/BlobEvent.h:
        * Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
        * Modules/mediarecorder/MediaRecorderErrorEvent.h:
        * Modules/mediastream/MediaStreamTrackEvent.cpp:
        * Modules/mediastream/MediaStreamTrackEvent.h:
        * Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediarecorder/BlobEvent.h.
        * Modules/mediastream/OverconstrainedErrorEvent.h:
        (WebCore::OverconstrainedErrorEvent::create): Deleted.
        (WebCore::OverconstrainedErrorEvent::error const): Deleted.
        (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
        * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
        * Modules/mediastream/RTCDTMFToneChangeEvent.h:
        * Modules/mediastream/RTCDataChannelEvent.cpp:
        * Modules/mediastream/RTCDataChannelEvent.h:
        * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
        * Modules/mediastream/RTCPeerConnectionIceEvent.h:
        (WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
        * Modules/mediastream/RTCTrackEvent.cpp:
        * Modules/mediastream/RTCTrackEvent.h:
        (WebCore::RTCTrackEvent::receiver const): Deleted.
        (WebCore::RTCTrackEvent::track const): Deleted.
        (WebCore::RTCTrackEvent::streams const): Deleted.
        (WebCore::RTCTrackEvent::transceiver const): Deleted.
        (WebCore::RTCTrackEvent::eventInterface const): Deleted.
        * Modules/paymentrequest/MerchantValidationEvent.cpp:
        * Modules/paymentrequest/MerchantValidationEvent.h:
        * Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
        * Modules/paymentrequest/PaymentMethodChangeEvent.h:
        * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
        * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
        * Modules/speech/SpeechSynthesisEvent.cpp:
        * Modules/speech/SpeechSynthesisEvent.h:
        (WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
        (WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
        (WebCore::SpeechSynthesisEvent::name const): Deleted.
        (WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
        * Modules/webaudio/AudioProcessingEvent.cpp:
        * Modules/webaudio/AudioProcessingEvent.h:
        * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
        * Modules/webaudio/OfflineAudioCompletionEvent.h:
        * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
        * Modules/webgpu/GPUUncapturedErrorEvent.h:
        * Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * Modules/websockets/CloseEvent.h:
        (WebCore::CloseEvent::create): Deleted.
        (WebCore::CloseEvent::wasClean const): Deleted.
        (WebCore::CloseEvent::code const): Deleted.
        (WebCore::CloseEvent::reason const): Deleted.
        (WebCore::CloseEvent::CloseEvent): Deleted.
        * Modules/webvr/VRDisplayEvent.cpp:
        * Modules/webvr/VRDisplayEvent.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AccessibleSetValueEvent.cpp:
        * accessibility/AccessibleSetValueEvent.h:
        (WebCore::AccessibleSetValueEvent::create): Deleted.
        (WebCore::AccessibleSetValueEvent::value const): Deleted.
        * animation/AnimationPlaybackEvent.cpp:
        * animation/AnimationPlaybackEvent.h:
        * bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
        * bindings/js/ScriptWrappable.h:
        * dom/AnimationEvent.cpp:
        * dom/AnimationEvent.h:
        * dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * dom/BeforeLoadEvent.h:
        * dom/BeforeTextInsertedEvent.cpp:
        * dom/BeforeTextInsertedEvent.h:
        * dom/BeforeUnloadEvent.cpp:
        * dom/BeforeUnloadEvent.h:
        * dom/ClipboardEvent.cpp:
        * dom/ClipboardEvent.h:
        * dom/CompositionEvent.cpp:
        * dom/CompositionEvent.h:
        * dom/CustomEvent.cpp:
        * dom/CustomEvent.h:
        * dom/DeviceMotionEvent.cpp:
        * dom/DeviceMotionEvent.h:
        * dom/DeviceOrientationEvent.cpp:
        * dom/DeviceOrientationEvent.h:
        * dom/ErrorEvent.cpp:
        * dom/ErrorEvent.h:
        * dom/Event.cpp:
        * dom/Event.h:
        * dom/FocusEvent.cpp:
        * dom/FocusEvent.h:
        * dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * dom/HashChangeEvent.h:
        * dom/InputEvent.cpp:
        * dom/InputEvent.h:
        * dom/KeyboardEvent.cpp:
        * dom/KeyboardEvent.h:
        * dom/MessageEvent.cpp:
        * dom/MessageEvent.h:
        * dom/MouseEvent.cpp:
        * dom/MouseEvent.h:
        * dom/MouseRelatedEvent.cpp:
        * dom/MouseRelatedEvent.h:
        * dom/MutationEvent.cpp:
        * dom/MutationEvent.h:
        * dom/OverflowEvent.cpp:
        * dom/OverflowEvent.h:
        * dom/PageTransitionEvent.cpp:
        * dom/PageTransitionEvent.h:
        * dom/PointerEvent.cpp:
        * dom/PointerEvent.h:
        * dom/PopStateEvent.cpp:
        * dom/PopStateEvent.h:
        * dom/ProgressEvent.cpp:
        * dom/ProgressEvent.h:
        * dom/PromiseRejectionEvent.cpp:
        * dom/PromiseRejectionEvent.h:
        * dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * dom/SecurityPolicyViolationEvent.h:
        * dom/TextEvent.cpp:
        * dom/TextEvent.h:
        * dom/TouchEvent.cpp:
        * dom/TouchEvent.h:
        * dom/TransitionEvent.cpp:
        * dom/TransitionEvent.h:
        * dom/UIEvent.cpp:
        * dom/UIEvent.h:
        * dom/UIEventWithKeyState.cpp:
        * dom/UIEventWithKeyState.h:
        * dom/WebKitAnimationEvent.cpp:
        * dom/WebKitAnimationEvent.h:
        * dom/WebKitTransitionEvent.cpp:
        * dom/WebKitTransitionEvent.h:
        * dom/WheelEvent.cpp:
        * dom/WheelEvent.h:
        * html/MediaEncryptedEvent.cpp:
        * html/MediaEncryptedEvent.h:
        * html/canvas/WebGLContextEvent.cpp:
        * html/canvas/WebGLContextEvent.h:
        * html/shadow/ProgressShadowElement.h:
        * html/track/TrackEvent.cpp:
        * html/track/TrackEvent.h:
        * storage/StorageEvent.cpp:
        * storage/StorageEvent.h:
        (WebCore::StorageEvent::key const): Deleted.
        (WebCore::StorageEvent::oldValue const): Deleted.
        (WebCore::StorageEvent::newValue const): Deleted.
        (WebCore::StorageEvent::url const): Deleted.
        (WebCore::StorageEvent::storageArea const): Deleted.
        * svg/SVGFEDistantLightElement.h:
        * svg/SVGFEFuncAElement.h:
        * svg/SVGFEFuncBElement.h:
        * svg/SVGFEFuncGElement.h:
        * svg/SVGFEFuncRElement.h:
        * svg/SVGFEPointLightElement.h:
        * svg/SVGFESpotLightElement.h:
        * svg/SVGZoomEvent.cpp:
        * svg/SVGZoomEvent.h:
        * workers/service/ExtendableEvent.cpp:
        * workers/service/ExtendableEvent.h:
        * workers/service/ExtendableMessageEvent.cpp:
        * workers/service/ExtendableMessageEvent.h:
        * workers/service/FetchEvent.cpp:
        * workers/service/FetchEvent.h:
        * xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
        * xml/XMLHttpRequestProgressEvent.h:
        (WebCore::XMLHttpRequestProgressEvent::create): Deleted.
        (WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
        (WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
        (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.

2019-09-18  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce UsedVerticalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=201933
        <rdar://problem/55487485>

        Reviewed by Antti Koivisto.

        UsedVerticalValues::Constraints holds the constraint values ((optional)containing block height and contentbox top) for a particular box geometry computation. 
        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/FormattingContext.cpp:
        (WebCore::Layout::outOfFlowHorizontalConstraints):
        (WebCore::Layout::outOfFlowVerticalConstraints):
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::outOfFlowConstraints): Deleted.
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        * layout/LayoutUnits.cpp:
        (WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
        * layout/LayoutUnits.h:
        (WebCore::Layout::UsedVerticalValues::Constraints::Constraints):
        (WebCore::Layout::UsedVerticalValues::UsedVerticalValues):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

2019-09-18  Chris Dumez  <cdumez@apple.com>

        Unreviewed, WinCairo build fix after r250045.

        * platform/network/curl/CurlFormDataStream.cpp:
        (WebCore::CurlFormDataStream::computeContentLength):

2019-09-18  Zalan Bujtas  <zalan@apple.com>

        [LFC] Add contentbox left constraint to UsedHorizontalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=201923
        <rdar://problem/55485796>

        Reviewed by Antti Koivisto.

        Pass in the contentbox left constraint value to the FormattingContext::compute*() functions so that they don't need to read the containg block's geometry.
        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/FormattingContext.cpp:
        (WebCore::Layout::outOfFlowConstraints):
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        * layout/LayoutUnits.cpp:
        (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
        * layout/LayoutUnits.h:
        (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

2019-09-18  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce UsedHorizontalValues::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=201919
        <rdar://problem/55481927>

        Reviewed by Antti Koivisto.

        UsedHorizontalValues::Constraints holds the constraint values for a particular box geometry computation (currently it only has the horizontal width constraint) 

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/LayoutUnits.h:
        (WebCore::Layout::UsedHorizontalValues::Constraints::Constraints):
        (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
        * layout/floats/FloatingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

2019-09-18  Andy Estes  <aestes@apple.com>

        [Apple Pay] Tell websites why a session was cancelled
        https://bugs.webkit.org/show_bug.cgi?id=201912

        Reviewed by Brady Eidson.

        Added ApplePayCancelEvent as the interface for ApplePaySession's cancel event. This event
        object includes a `sessionError` attribute that exposes a Web-safe version of the PassKit
        domain error we received from PKPaymentAuthorization(View)Controller. Currently, we report
        all errors with code "unknown", but more codes will be added in future patches.

        Test: http/tests/ssl/applepay/ApplePayCancelEvent.https.html

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/applepay/ApplePayCancelEvent.cpp: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
        (WebCore::ApplePayCancelEvent::ApplePayCancelEvent):
        (WebCore::ApplePayCancelEvent::sessionError const):
        (WebCore::ApplePayCancelEvent::eventInterface const):
        * Modules/applepay/ApplePayCancelEvent.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
        (WebCore::ApplePayCancelEvent::create):
        * Modules/applepay/ApplePayCancelEvent.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
        * Modules/applepay/ApplePaySession.cpp:
        (WebCore::ApplePaySession::didCancelPaymentSession):
        * Modules/applepay/ApplePaySession.h:
        * Modules/applepay/ApplePaySessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
        * Modules/applepay/ApplePaySessionError.idl: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
        * Modules/applepay/PaymentCoordinator.cpp:
        (WebCore::PaymentCoordinator::didCancelPaymentSession):
        * Modules/applepay/PaymentCoordinator.h:
        * Modules/applepay/PaymentHeaders.h:
        * Modules/applepay/PaymentSession.cpp:
        * Modules/applepay/PaymentSession.h:
        * Modules/applepay/PaymentSessionError.h: Copied from Source/WebCore/Modules/applepay/PaymentHeaders.h.
        * Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm: Copied from Source/WebCore/Modules/applepay/PaymentSession.h.
        (WebCore::additionalError):
        (WebCore::PaymentSessionError::PaymentSessionError):
        (WebCore::PaymentSessionError::sessionError const):
        (WebCore::PaymentSessionError::platformError const):
        (WebCore::PaymentSessionError::unknownError const):
        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
        (WebCore::ApplePayPaymentHandler::didCancelPaymentSession):
        * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/EventNames.in:
        * testing/MockPaymentCoordinator.cpp:
        (WebCore::MockPaymentCoordinator::cancelPayment):

2019-09-18  Chris Dumez  <cdumez@apple.com>

        WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
        https://bugs.webkit.org/show_bug.cgi?id=201882

        Reviewed by Geoffrey Garen.

        WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
        sessionID per WebProcess.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::installContextData):
        (WebCore::SWServer::runServiceWorker):
        * workers/service/server/SWServerToContextConnection.h:

2019-09-18  Chris Dumez  <cdumez@apple.com>

        CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
        https://bugs.webkit.org/show_bug.cgi?id=201920

        Reviewed by Geoffrey Garen.

        CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID.
        This sessionID is no longer used now that we have a session per WebProcess.

        * Modules/cache/CacheStorageConnection.cpp:
        (WebCore::formDataSize):
        (WebCore::CacheStorageConnection::computeRealBodySize):
        * Modules/cache/CacheStorageConnection.h:
        * Modules/cache/DOMWindowCaches.cpp:
        (WebCore::DOMWindowCaches::caches const):
        * Modules/cache/WorkerCacheStorageConnection.cpp:
        (WebCore::WorkerCacheStorageConnection::sessionID const): Deleted.
        * Modules/cache/WorkerCacheStorageConnection.h:
        * fileapi/Blob.cpp:
        (WebCore::Blob::size const):
        * fileapi/ThreadableBlobRegistry.cpp:
        (WebCore::ThreadableBlobRegistry::blobSize):
        * fileapi/ThreadableBlobRegistry.h:
        * loader/cache/KeepaliveRequestTracker.cpp:
        (WebCore::KeepaliveRequestTracker::tryRegisterRequest):
        (WebCore::KeepaliveRequestTracker::registerRequest):
        (WebCore::KeepaliveRequestTracker::unregisterRequest):
        * page/CacheStorageProvider.h:
        (WebCore::CacheStorageProvider::createCacheStorageConnection):
        * platform/network/BlobRegistry.h:
        * platform/network/FormData.cpp:
        (WebCore::FormDataElement::lengthInBytes const):
        (WebCore::FormData::lengthInBytes const):
        * platform/network/FormData.h:
        * testing/Internals.cpp:
        (WebCore::Internals::clearCacheStorageMemoryRepresentation):
        (WebCore::Internals::cacheStorageEngineRepresentation):
        (WebCore::Internals::updateQuotaBasedOnSpaceUsage):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::createCacheStorageConnection):
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
        (WebCore::ServiceWorkerThreadProxy::createCacheStorageConnection):
        * workers/service/context/ServiceWorkerThreadProxy.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createRequest):

2019-09-18  Chris Dumez  <cdumez@apple.com>

        Drop FrameLoaderClient::sessionID()
        https://bugs.webkit.org/show_bug.cgi?id=201916

        Reviewed by Geoffrey Garen.

        Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
        what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
        can get the sessionID from the WebProcess singleton.

        * loader/EmptyClients.cpp:
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoaderClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::sessionID const):

2019-09-18  Chris Dumez  <cdumez@apple.com>

        WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID
        https://bugs.webkit.org/show_bug.cgi?id=201883

        Reviewed by Geoffrey Garen.

        WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID,
        now that we have a single session per WebProcess.

        * workers/service/ServiceWorkerClient.cpp:
        (WebCore::ServiceWorkerClient::postMessage):
        * workers/service/context/SWContextManager.h:

2019-09-18  Russell Epstein  <repstein@apple.com>

        Unreviewed, rolling out r250030.

        Cause of Recent Build Failures.

        Reverted changeset:

        "Make all ScriptWrappable IsoHeap-ed"
        https://bugs.webkit.org/show_bug.cgi?id=201846
        https://trac.webkit.org/changeset/250030

2019-09-18  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::Geometry::computedHeight* functions need containingBlockHeight only.
        https://bugs.webkit.org/show_bug.cgi?id=201880
        <rdar://problem/55449623>

        Reviewed by Antti Koivisto.

        Let's tighten the incoming vertical parameter.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
        (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):

2019-09-18  Antti Koivisto  <antti@apple.com>

        DocumentMarkerController should not invoke ensureLineBoxes during TextIterator traversal
        https://bugs.webkit.org/show_bug.cgi?id=201911
        <rdar://problem/55455458>

        Reviewed by Zalan Bujtas.

        DocumentMarkerController::addMarker may call ensureLineBoxes but TextIterator doesn't expect mutations during traversal.
        Fix by doing range collection as a separate step.

        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::collectTextRanges):
        (WebCore::DocumentMarkerController::addMarker):
        (WebCore::DocumentMarkerController::addTextMatchMarker):
        (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
        (WebCore::DocumentMarkerController::addDictationResultMarker):
        (WebCore::DocumentMarkerController::addDraggedContentMarker):
        (WebCore::DocumentMarkerController::addPlatformTextCheckingMarker):
        (WebCore::DocumentMarkerController::removeMarkers):
        (WebCore::DocumentMarkerController::filterMarkers):
        * dom/DocumentMarkerController.h:

2019-09-18  Zalan Bujtas  <zalan@apple.com>

        [LFC] Shrink-to-fit-width needs the available width constraint value only
        https://bugs.webkit.org/show_bug.cgi?id=201896
        <rdar://problem/55465382>

        Reviewed by Antti Koivisto.

        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

2019-09-18  David Kilzer  <ddkilzer@apple.com>

        REGRESSION (r247566): Leak of UICTFontDescriptor in WebCore::FontDatabase::InstalledFont::InstalledFont()
        <https://webkit.org/b/201893>
        <rdar://problem/55464115>

        Reviewed by Brent Fulgham.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontDatabase::InstalledFont::InstalledFont): Use
        adoptCF() to fix the leak.

2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>

        Make all ScriptWrappable IsoHeap-ed
        https://bugs.webkit.org/show_bug.cgi?id=201846
        <rdar://problem/55407535>

        Reviewed by Mark Lam.

        This patch puts Event and derived classes under IsoHeap to make all ScriptWrappable classes IsoHeap-ed.

        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
        (WebCore::WebKitPlaybackTargetAvailabilityEvent::create): Deleted.
        (WebCore::WebKitPlaybackTargetAvailabilityEvent::availability const): Deleted.
        * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
        * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
        * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
        (WebCore::ApplePayPaymentMethodSelectedEvent::create): Deleted.
        (WebCore::ApplePayPaymentMethodSelectedEvent::paymentMethod): Deleted.
        * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
        * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
        * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
        * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
        * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
        * Modules/applepay/ApplePayValidateMerchantEvent.h:
        (WebCore::ApplePayValidateMerchantEvent::create): Deleted.
        (WebCore::ApplePayValidateMerchantEvent::validationURL const): Deleted.
        * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
        * Modules/encryptedmedia/MediaKeyMessageEvent.h:
        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
        * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h:
        (WebCore::WebKitMediaKeyMessageEvent::create): Deleted.
        (WebCore::WebKitMediaKeyMessageEvent::message const): Deleted.
        (WebCore::WebKitMediaKeyMessageEvent::destinationURL const): Deleted.
        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
        * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h:
        (WebCore::WebKitMediaKeyNeededEvent::create): Deleted.
        (WebCore::WebKitMediaKeyNeededEvent::initData const): Deleted.
        * Modules/gamepad/GamepadEvent.cpp:
        * Modules/gamepad/GamepadEvent.h:
        (WebCore::GamepadEvent::create): Deleted.
        (WebCore::GamepadEvent::gamepad const): Deleted.
        * Modules/indexeddb/IDBRequestCompletionEvent.cpp:
        * Modules/indexeddb/IDBRequestCompletionEvent.h:
        (WebCore::IDBRequestCompletionEvent::create): Deleted.
        * Modules/indexeddb/IDBVersionChangeEvent.cpp:
        * Modules/indexeddb/IDBVersionChangeEvent.h:
        * Modules/mediarecorder/BlobEvent.cpp:
        * Modules/mediarecorder/BlobEvent.h:
        * Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
        * Modules/mediarecorder/MediaRecorderErrorEvent.h:
        * Modules/mediastream/MediaStreamTrackEvent.cpp:
        * Modules/mediastream/MediaStreamTrackEvent.h:
        * Modules/mediastream/OverconstrainedErrorEvent.cpp: Copied from Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h.
        * Modules/mediastream/OverconstrainedErrorEvent.h:
        (WebCore::OverconstrainedErrorEvent::create): Deleted.
        (WebCore::OverconstrainedErrorEvent::error const): Deleted.
        (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): Deleted.
        * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
        * Modules/mediastream/RTCDTMFToneChangeEvent.h:
        * Modules/mediastream/RTCDataChannelEvent.cpp:
        * Modules/mediastream/RTCDataChannelEvent.h:
        * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
        * Modules/mediastream/RTCPeerConnectionIceEvent.h:
        (WebCore::RTCPeerConnectionIceEvent::url const): Deleted.
        * Modules/mediastream/RTCTrackEvent.cpp:
        * Modules/mediastream/RTCTrackEvent.h:
        (WebCore::RTCTrackEvent::receiver const): Deleted.
        (WebCore::RTCTrackEvent::track const): Deleted.
        (WebCore::RTCTrackEvent::streams const): Deleted.
        (WebCore::RTCTrackEvent::transceiver const): Deleted.
        (WebCore::RTCTrackEvent::eventInterface const): Deleted.
        * Modules/paymentrequest/MerchantValidationEvent.cpp:
        * Modules/paymentrequest/MerchantValidationEvent.h:
        * Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
        * Modules/paymentrequest/PaymentMethodChangeEvent.h:
        * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
        * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
        * Modules/speech/SpeechSynthesisEvent.cpp:
        * Modules/speech/SpeechSynthesisEvent.h:
        (WebCore::SpeechSynthesisEvent::charIndex const): Deleted.
        (WebCore::SpeechSynthesisEvent::elapsedTime const): Deleted.
        (WebCore::SpeechSynthesisEvent::name const): Deleted.
        (WebCore::SpeechSynthesisEvent::eventInterface const): Deleted.
        * Modules/webaudio/AudioProcessingEvent.cpp:
        * Modules/webaudio/AudioProcessingEvent.h:
        * Modules/webaudio/OfflineAudioCompletionEvent.cpp:
        * Modules/webaudio/OfflineAudioCompletionEvent.h:
        * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
        * Modules/webgpu/GPUUncapturedErrorEvent.h:
        * Modules/websockets/CloseEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * Modules/websockets/CloseEvent.h:
        (WebCore::CloseEvent::create): Deleted.
        (WebCore::CloseEvent::wasClean const): Deleted.
        (WebCore::CloseEvent::code const): Deleted.
        (WebCore::CloseEvent::reason const): Deleted.
        (WebCore::CloseEvent::CloseEvent): Deleted.
        * Modules/webvr/VRDisplayEvent.cpp:
        * Modules/webvr/VRDisplayEvent.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * accessibility/AccessibleSetValueEvent.cpp:
        * accessibility/AccessibleSetValueEvent.h:
        (WebCore::AccessibleSetValueEvent::create): Deleted.
        (WebCore::AccessibleSetValueEvent::value const): Deleted.
        * animation/AnimationPlaybackEvent.cpp:
        * animation/AnimationPlaybackEvent.h:
        * bindings/js/ScriptWrappable.cpp: Copied from Source/WebCore/html/canvas/WebGLContextEvent.cpp.
        * bindings/js/ScriptWrappable.h:
        * dom/AnimationEvent.cpp:
        * dom/AnimationEvent.h:
        * dom/BeforeLoadEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * dom/BeforeLoadEvent.h:
        * dom/BeforeTextInsertedEvent.cpp:
        * dom/BeforeTextInsertedEvent.h:
        * dom/BeforeUnloadEvent.cpp:
        * dom/BeforeUnloadEvent.h:
        * dom/ClipboardEvent.cpp:
        * dom/ClipboardEvent.h:
        * dom/CompositionEvent.cpp:
        * dom/CompositionEvent.h:
        * dom/CustomEvent.cpp:
        * dom/CustomEvent.h:
        * dom/DeviceMotionEvent.cpp:
        * dom/DeviceMotionEvent.h:
        * dom/DeviceOrientationEvent.cpp:
        * dom/DeviceOrientationEvent.h:
        * dom/ErrorEvent.cpp:
        * dom/ErrorEvent.h:
        * dom/Event.cpp:
        * dom/Event.h:
        * dom/FocusEvent.cpp:
        * dom/FocusEvent.h:
        * dom/HashChangeEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * dom/HashChangeEvent.h:
        * dom/InputEvent.cpp:
        * dom/InputEvent.h:
        * dom/KeyboardEvent.cpp:
        * dom/KeyboardEvent.h:
        * dom/MessageEvent.cpp:
        * dom/MessageEvent.h:
        * dom/MouseEvent.cpp:
        * dom/MouseEvent.h:
        * dom/MouseRelatedEvent.cpp:
        * dom/MouseRelatedEvent.h:
        * dom/MutationEvent.cpp:
        * dom/MutationEvent.h:
        * dom/OverflowEvent.cpp:
        * dom/OverflowEvent.h:
        * dom/PageTransitionEvent.cpp:
        * dom/PageTransitionEvent.h:
        * dom/PointerEvent.cpp:
        * dom/PointerEvent.h:
        * dom/PopStateEvent.cpp:
        * dom/PopStateEvent.h:
        * dom/ProgressEvent.cpp:
        * dom/ProgressEvent.h:
        * dom/PromiseRejectionEvent.cpp:
        * dom/PromiseRejectionEvent.h:
        * dom/SecurityPolicyViolationEvent.cpp: Copied from Source/WebCore/dom/BeforeTextInsertedEvent.cpp.
        * dom/SecurityPolicyViolationEvent.h:
        * dom/TextEvent.cpp:
        * dom/TextEvent.h:
        * dom/TouchEvent.cpp:
        * dom/TouchEvent.h:
        * dom/TransitionEvent.cpp:
        * dom/TransitionEvent.h:
        * dom/UIEvent.cpp:
        * dom/UIEvent.h:
        * dom/UIEventWithKeyState.cpp:
        * dom/UIEventWithKeyState.h:
        * dom/WebKitAnimationEvent.cpp:
        * dom/WebKitAnimationEvent.h:
        * dom/WebKitTransitionEvent.cpp:
        * dom/WebKitTransitionEvent.h:
        * dom/WheelEvent.cpp:
        * dom/WheelEvent.h:
        * html/MediaEncryptedEvent.cpp:
        * html/MediaEncryptedEvent.h:
        * html/canvas/WebGLContextEvent.cpp:
        * html/canvas/WebGLContextEvent.h:
        * html/shadow/ProgressShadowElement.h:
        * html/track/TrackEvent.cpp:
        * html/track/TrackEvent.h:
        * storage/StorageEvent.cpp:
        * storage/StorageEvent.h:
        (WebCore::StorageEvent::key const): Deleted.
        (WebCore::StorageEvent::oldValue const): Deleted.
        (WebCore::StorageEvent::newValue const): Deleted.
        (WebCore::StorageEvent::url const): Deleted.
        (WebCore::StorageEvent::storageArea const): Deleted.
        * svg/SVGFEDistantLightElement.h:
        * svg/SVGFEFuncAElement.h:
        * svg/SVGFEFuncBElement.h:
        * svg/SVGFEFuncGElement.h:
        * svg/SVGFEFuncRElement.h:
        * svg/SVGFEPointLightElement.h:
        * svg/SVGFESpotLightElement.h:
        * svg/SVGZoomEvent.cpp:
        * svg/SVGZoomEvent.h:
        * workers/service/ExtendableEvent.cpp:
        * workers/service/ExtendableEvent.h:
        * workers/service/ExtendableMessageEvent.cpp:
        * workers/service/ExtendableMessageEvent.h:
        * workers/service/FetchEvent.cpp:
        * workers/service/FetchEvent.h:
        * xml/XMLHttpRequestProgressEvent.cpp: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
        * xml/XMLHttpRequestProgressEvent.h:
        (WebCore::XMLHttpRequestProgressEvent::create): Deleted.
        (WebCore::XMLHttpRequestProgressEvent::position const): Deleted.
        (WebCore::XMLHttpRequestProgressEvent::totalSize const): Deleted.
        (WebCore::XMLHttpRequestProgressEvent::XMLHttpRequestProgressEvent): Deleted.

2019-09-18  Loïc Yhuel  <loic.yhuel@softathome.com>  and  Fujii Hironori  <Hironori.Fujii@sony.com>

        JPEGImageDecoder: use libjpeg-turbo RGBA output path even for Adobe transform=0 JPEGs
        https://bugs.webkit.org/show_bug.cgi?id=200163

        Reviewed by Carlos Garcia Campos.

        Remove the workaround for old libjpeg-turbo which doesn't support
        BGRA output for Adobe transform=0 images. The bug was fixed in
        libjpeg-turbo 1.2.1.

        No new tests, no behavior change.

        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::JPEGImageReader::decode): Removed code in #if defined(TURBO_JPEG_RGB_SWIZZLE).
        (colorSpaceHasAlpha): Removed an unused inline function.

2019-09-18  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Remove build warning since r248998.

        This patch removes build warning below.
        warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

        No new tests, no behavioral change.

        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::rowAvailable):

2019-09-18  Fujii Hironori  <Hironori.Fujii@sony.com>

        [cairo] Incorrect targetRect in BackingStoreBackendCairoImpl::scroll
        https://bugs.webkit.org/show_bug.cgi?id=201895

        Reviewed by Carlos Garcia Campos.

        In BackingStoreBackendCairoImpl::scroll, targetRect is calculated
        wrongly by shifting maxX and maxY. Bug 59655 fixed the issue by
        removing the shifting, but only for BackingStoreBackendCairoX11::scroll.

        No new tests, no behavior change.

        * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:
        (WebCore::BackingStoreBackendCairoImpl::scroll): Take intersection of targetRect and scrollRect.

2019-09-18  Andy Estes  <aestes@apple.com>

        [Cocoa] Add a WKA extension point
        https://bugs.webkit.org/show_bug.cgi?id=201801
        <rdar://problem/55372507>

        Reviewed by Alexey Proskuryakov.

        * Modules/applepay/ApplePayRequestBase.cpp:
        (WebCore::requiresSupportedNetworks):
        (WebCore::convertAndValidate):

2019-09-17  Chris Dumez  <cdumez@apple.com>

        Unreviewed, revert change that Alex mistakenly committed at the same time as r250006 and broke the build.

        * page/PerformanceObserver.idl:

2019-09-17  Chris Dumez  <cdumez@apple.com>

        Stop calling Page::setSessionID() from WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=201888

        Reviewed by Alex Christensen.

        Stop calling Page::setSessionID() from WebKit2 since Page's sessionID can never change when
        using WebKit2 (We process-swap and create a new Page in a new process when changing data
        store). Instead, we now pass the sessionID ID when constructing the Page, as part of the
        PageConfiguration structure.

        * editing/markup.cpp:
        (WebCore::createPageForSanitizingWebContent):
        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * loader/EmptyClients.h:
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::setSessionID):
        * page/PageConfiguration.cpp:
        (WebCore::PageConfiguration::PageConfiguration):
        * page/PageConfiguration.h:
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::createPageForServiceWorker):
        (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):

2019-09-17  Mark Lam  <mark.lam@apple.com>

        Use constexpr instead of const in symbol definitions that are obviously constexpr.
        https://bugs.webkit.org/show_bug.cgi?id=201879

        Rubber-stamped by Joseph Pecoraro.

        No new tests.  Covered by existing tests.

        * bindings/js/JSDOMConstructorBase.h:
        * bindings/js/JSDOMWindowProperties.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GeneratePrototypeDeclaration):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
        * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
        * bindings/scripts/test/JS/JSTestEnabledForContext.h:
        * bindings/scripts/test/JS/JSTestEventTarget.h:
        * bindings/scripts/test/JS/JSTestGlobalObject.h:
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
        * bindings/scripts/test/JS/JSTestObj.h:
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
        * bindings/scripts/test/JS/JSTestPluginInterface.h:
        * bindings/scripts/test/JS/JSTestTypedefs.h:
        * bridge/objc/objc_runtime.h:
        * bridge/runtime_array.h:
        * bridge/runtime_method.h:
        * bridge/runtime_object.h:

2019-09-17  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed restabilization of non-unified build.

        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::resolveContext const):
        * platform/win/BString.h:
        * svg/PatternAttributes.h:
        * svg/SVGLengthValue.cpp:
        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
        * workers/service/ServiceWorkerJob.cpp:
        * workers/service/WorkerSWClientConnection.cpp:
        * workers/service/server/SWServerRegistration.cpp:

2019-09-17  Keith Rollin  <krollin@apple.com>

        Remove some support for < iOS 12
        https://bugs.webkit.org/show_bug.cgi?id=201851
        <rdar://problem/55422044>

        Reviewed by Jiewen Tan and Alexey Proskuryakov.

        Remove some support for iOS versions less than 12.0.

        Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
        and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
        values >= 120000. This means that expressions like
        "__IPHONE_OS_VERSION_MIN_REQUIRED < 101200" are always False and
        "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101200" are always True.

        This removal is part of a series of patches effecting such removal.

        No new tests -- no new or changed functionality.

        * crypto/mac/CryptoKeyRSAMac.cpp:
        (WebCore::CryptoKeyRSA::create):
        (WebCore::castDataArgumentToCCRSACryptorCreateFromDataIfNeeded): Deleted.

2019-09-17  Nikolas Zimmermann  <zimmermann@kde.org>

        SVG <animateMotion> does not reset the element to its first animation frame if its fill is "remove"
        https://bugs.webkit.org/show_bug.cgi?id=201565

        Reviewed by Said Abou-Hallawa.

        Fix fill="remove" support for <animateMotion>: properly trigger visual updates.
        Motion animations are implemented by provding an additional transformation on
        SVGGraphicsElements: the supplementalTransform().

        When an <animateMotion> element specifies fill="remove" the supplemental transform is
        correctly reset, when the animation is finished. However, nobody is notified about the
        change of transformation matrix. Fix by marking the target elements renderer as
        setNeedsTransformUpdate() and call markForLayoutAndParentResourceInvalidation().

        <animate> elements are not affected by the bug:
        SVGAnimateElementBase::clearAnimatedType()
         -> invokes SVGAttributeAnimator::stop()
            -> invokes applyAnimatedPropertyChange() [via SVGAnimatedPropertyAnimator]
            -> invokes SVGXXXElement::svgAttributeChanged().

        When animating e.g. the 'transform' attribute SVGGraphicsElement::svgAttributeChanged()
        will use exactly the same mechanism to trigger visul updates: first call
        setNeedsTransformUpdate() on the associated renderer, followd by a call to
        markForLayoutAndParentResourceInvalidation().

        --> Both code paths are now consistent.
        Also fixes http://web-platform-tests.live/svg/animations/animateMotion-fill-remove.html.

        Tests: svg/animations/fill-remove-support.html
               svg/animations/animateMotion-remove-freeze-use.svg

        * svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::clearAnimatedType): Call applyResultsToTarget().
        (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): Stop calling
        setNeedsTransformUpdate() on the target elements renderer, since applyResultsToTarget()
        is responsible for modifications of the renderer state.
        (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Always mark the renderer
        as setNeedsTransformUpdate() when applying the results, before the call to
        RenderSVGResource::markForLayoutAndParentResourceInvalidation(). This is more consistent
        with respect to the code path that updates the SVGElements instances (<use> support).

2019-09-17  Andy Estes  <aestes@apple.com>

        [Cocoa] Add a WKA extension point
        https://bugs.webkit.org/show_bug.cgi?id=201801
        <rdar://problem/55372507>

        Reviewed by Alexey Proskuryakov.

        * Modules/applepay/ApplePayRequestBase.cpp:
        (WebCore::requiresSupportedNetworks):
        (WebCore::convertAndValidate):

2019-09-17  Antti Koivisto  <antti@apple.com>

        TextIterator should convert tabs to spaces
        https://bugs.webkit.org/show_bug.cgi?id=201863

        Reviewed by Zalan Bujtas.

        As seen in tests

        imported/w3c/web-platform-tests/innerText/getter.html
        imported/w3c/web-platform-tests/html/dom/elements/the-innertext-idl-attribute/getter.html

        The old simple line layout path in TextIterator used to do this.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextBox):

2019-09-17  Zalan Bujtas  <zalan@apple.com>

        [LFC[MarginCollapsing] MarginCollapse::estimatedMarginBefore should take pre-computed non-collapsed margin values.
        https://bugs.webkit.org/show_bug.cgi?id=201848
        <rdar://problem/55419419>

        Reviewed by Antti Koivisto.

        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):

2019-09-17  Zalan Bujtas  <zalan@apple.com>

        [First-letter] Use WeakPtr for the first-letter insertion point.
        https://bugs.webkit.org/show_bug.cgi?id=201842
        <rdar://problem/51373788>

        Reviewed by Antti Koivisto.

        The about-to-be-removed first letter renderer's sibling could potentially be destroyed too as the result of the anonymous subtree collapsing logic (when the next sibling is a generated anonymous block and it is not needed anymore.)

        Test: fast/text/first-letter-with-columns-crash.html

        * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
        (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):

2019-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
        https://bugs.webkit.org/show_bug.cgi?id=201505

        Reviewed by Žan Doberšek.

        This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE
        renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC.

        * platform/graphics/egl/GLContextEGL.cpp:
        (WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use
        eglCreateWindowSurface().

2019-09-17  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Use WebPreferences instead of RuntimeEnabledFeatures in UIProcess
        https://bugs.webkit.org/show_bug.cgi?id=198176
        <rdar://problem/55285709>

        Reviewed by Youenn Fablet.

        No changes of behavior.

        * Modules/webauthn/PublicKeyCredential.cpp:
        (WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
        Resolves the promise with false immediately when the feature flag is false.

2019-09-17  Rob Buis  <rbuis@igalia.com>

        Access-Control-Expose-Headers parsed incorrectly
        https://bugs.webkit.org/show_bug.cgi?id=172357

        Reviewed by Youenn Fablet.

        When parsing the list, strip HTTP spaces and verify
        that the list items are valid HTTP tokens.

        Behavior matches Firefox and Chrome.

        Test: imported/w3c/web-platform-tests/cors/access-control-expose-headers-parsing.window.html

        * platform/network/HTTPParsers.h:
        (WebCore::addToAccessControlAllowList):
        (WebCore::parseAccessControlAllowList):

2019-09-17  Youenn Fablet  <youenn@apple.com>

        Content-Type should be preserved on responses created from DOMCache
        https://bugs.webkit.org/show_bug.cgi?id=201815

        Reviewed by Alex Christensen.

       Covered by updated test expectations

        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::create):
        Update content type when creating the response from DOMCache.

2019-09-16  Antti Koivisto  <antti@apple.com>

        Move code for traversing reversed text boxes from TextIterator to TextBoxIterator
        https://bugs.webkit.org/show_bug.cgi?id=201819

        Reviewed by Zalan Bujtas.

        Handle traversal order in TextBoxIterator.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):
        (WebCore::TextIterator::handleTextNodeFirstLetter):
        * editing/TextIterator.h:
        * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
        (WebCore::LineLayoutInterface::TextBox::rect const):
        (WebCore::LineLayoutInterface::TextBox::logicalRect const):
        (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
        (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
        (WebCore::LineLayoutInterface::TextBox::dirOverride const):
        (WebCore::LineLayoutInterface::TextBox::text const):
        (WebCore::LineLayoutInterface::TextBox::localStartOffset const):
        (WebCore::LineLayoutInterface::TextBox::localEndOffset const):
        (WebCore::LineLayoutInterface::TextBox::length const):
        (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInVisualOrder):
        (WebCore::LineLayoutInterface::TextBoxIterator::traverseNextInTextOrder):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
        (WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
        (WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor):
        (WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor):
        (WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
        * rendering/line/LineLayoutInterfaceTextBoxes.h:
        (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator++):
        (WebCore::LineLayoutInterface::Provider::firstTextBoxFor):

2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][curl] Don't compile unused CertificateCFWin.cpp
        https://bugs.webkit.org/show_bug.cgi?id=201860

        Reviewed by Alex Christensen.

        Curl port is using ResourceHandle::setClientCertificateInfo
        instead of ResourceHandle::setClientCertificate.

        * PlatformWin.cmake: Added CertificateCFWin.cpp to WebCore_SOURCES only if USE_CFURLCONNECTION.
        * platform/network/ResourceHandle.h: Removed an unused method setClientCertificate.
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::setClientCertificate): Deleted.

2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        [AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
        https://bugs.webkit.org/show_bug.cgi?id=198286

        Reviewed by Brent Fulgham.

        Some image types aren't supported by CG for Windows.

        No new tests, covered by existing tests.

        * platform/graphics/cg/ImageSourceCGWin.cpp:
        (WebCore::MIMETypeForImageType): Return the correct MIME types for
        com.microsoft.cur and com.microsoft.ico.
        * platform/graphics/cg/UTIRegistry.cpp:
        (WebCore::defaultSupportedImageTypes): Excluded public.jpeg-2000 and public.mpo-image if PLATFORM(WIN).

2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault happens in pixman
        https://bugs.webkit.org/show_bug.cgi?id=201755

        Reviewed by Don Olmstead.

        Segmentation faults happened in pixman while painting a image. In
        Cairo::drawSurface, originalSrcRect can be slightly larger than
        the surface size because of floating number calculations.
        Cairo::drawSurface created a subsurface which is running over the
        parent surface boundaries.

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawSurface): Calculated a intersection with
        expandedSrcRect and the parent surface size for subsurface size.

2019-09-16  Eric Liang  <ericliang@apple.com>

        AX: USER: VO: Messages > Message > Shift-VO-M doesn't reveal correct actions
        https://bugs.webkit.org/show_bug.cgi?id=201840

        Reviewed by Chris Fleizach.

        menuForEvent: expects event-position in window's space, but we pass the position in Core's space. In this case, we need to convert core's space to window's space.
        Tested that existing tests passed with WK1 and WK2

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):

2019-09-16  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Support more than two FIDO protocol versions
        https://bugs.webkit.org/show_bug.cgi?id=198408
        <rdar://problem/51292176>

        Reviewed by Chris Dumez.

        Covered by new API tests.

        * Modules/webauthn/fido/DeviceResponseConverter.cpp:
        (fido::readCTAPGetInfoResponse):
        Remove the check for the array size.

2019-09-16  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Correct lifespan of other SharedBitmaps
        https://bugs.webkit.org/show_bug.cgi?id=201800

        Reviewed by Dean Jackson.

        The pop-up menu code creates its own SharedBitmap in the WebContent process,
        which needs to release its handle before destruction, otherwise the UIProcess
        will be unable to access the GPU texture (since it will have been cleaned up).

        This patch also audits other uses of SharedBitmap to make sure a similar
        problem doesn't exist elsewhere.

        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::toDXGIDevice): Switch to IDXGIDevice1 (since that is our
        minimum target DX).
        (WebCore::Direct2D::factoryForDXGIDevice): Ditto.
        (WebCore::Direct2D::swapChainOfSizeForWindowAndDevice): Added.
        * platform/graphics/win/Direct2DUtilities.h:
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Correct
        a very silly use-after-move in the implementation.
        * platform/graphics/win/PlatformContextDirect2D.h:
        (WebCore::PlatformContextDirect2D::d3dDevice const): Added.
        (WebCore::PlatformContextDirect2D::setD3DDevice):

2019-09-16  Chris Dumez  <cdumez@apple.com>

        Simplify WebResourceLoadObserver now that we have one WebProcess per session
        https://bugs.webkit.org/show_bug.cgi?id=201821

        Reviewed by Brent Fulgham.

        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::connect):
        * loader/ResourceLoadObserver.h:
        (WebCore::ResourceLoadObserver::logWebSocketLoading):
        (WebCore::ResourceLoadObserver::statisticsForURL):
        * testing/Internals.cpp:
        (WebCore::Internals::resourceLoadStatisticsForURL):

2019-09-16  ChangSeok Oh  <changseok@webkit.org>

        [GTK] Remove GraphicsContext3D dependency from the outside of WebGL
        https://bugs.webkit.org/show_bug.cgi?id=201748

        Reviewed by Alex Christensen.

        This is a preliminary change to bring ANGLE support for WebGL to GTK port.
        GraphicsContext3DANGLE has its own egl context but we want to make ANGLE egl context
        for WebGL and other GL contexts (i.e., glx, gles/egl) for TextureMapper live together.
        Mixed uses of GraphicsContext3D outside of WebGL code could cause unintended behaviors.
        We want to make sure that only WebGL code uses it.

        No new tests since no functionality changed.

        * platform/graphics/GLContext.cpp:
        * platform/graphics/GLContext.h:
        * platform/graphics/glx/GLContextGLX.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::GstVideoFrameHolder::platformLayerBuffer):
        (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

2019-09-16  Zalan Bujtas  <zalan@apple.com>

        [LFC] Make the nested Geometry/MarginCollapse/Quirks c'tors private.
        https://bugs.webkit.org/show_bug.cgi?id=201825
        <rdar://problem/55403474>

        Reviewed by Antti Koivisto.

        The Geometry/MarginCollapse/Quirks objects should be constructed through the corresponding accessor functions.
        This is also a preparation for being able to pass the layout box in to these stack objects and call geometry(layoutBox)->outOfFlowVerticalGeometry() vs. geometry()->outOfFlowVerticalGeometry(layoutBox). 

        * layout/FormattingContext.h:
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/tableformatting/TableFormattingContext.h:

2019-09-16  Jon Davis  <jond@apple.com>

        Update feature status for Battery Status API, WebGL 2, and Dialog Element
        https://bugs.webkit.org/show_bug.cgi?id=201469

        Reviewed by Joseph Pecoraro.

        * features.json:

2019-09-16  Andres Gonzalez  <andresg_22@apple.com>

        Rename [WebAccessibilityObjectWrapper _accessibilityInsertText] to accessibilityInsertText to match accessibility client.
        https://bugs.webkit.org/show_bug.cgi?id=201820

        Reviewed by Chris Fleizach.

        No new tests necessary since this is a method rename.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]): Deleted.

2019-09-16  Zalan Bujtas  <zalan@apple.com>

        [LFC] Always provide a containing block width value to compute* functions.
        https://bugs.webkit.org/show_bug.cgi?id=201809
        <rdar://problem/55383153>

        Reviewed by Antti Koivisto.

        The caller can always make a more informative decision about the default value when the containing block width is not available.
        (Currently the only case is when computing the preferred width.)

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
        * layout/LayoutUnits.h:
        (WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):

2019-09-16  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin should not read containing block's width
        https://bugs.webkit.org/show_bug.cgi?id=201807
        <rdar://problem/55381342>

        Reviewed by Antti Koivisto.

        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

2019-09-16  Antti Koivisto  <antti@apple.com>

        Eliminate separate simple line layout path from TextIterator
        https://bugs.webkit.org/show_bug.cgi?id=201760

        Reviewed by Zalan Bujtas.

        Use the new line layout iterator to implement linebox traversal in TextIterator.

        * WebCore.xcodeproj/project.pbxproj:
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::advance):
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):

        InlineTextBox* -> LineLayoutInterface::TextBoxIterator
        Delete the seperate simple line layout path.

        (WebCore::TextIterator::handleTextNodeFirstLetter):
        (WebCore::TextIterator::emitCharacter):
        (WebCore::TextIterator::emitText):
        * editing/TextIterator.h:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::write):
        * rendering/SimpleLineLayoutResolver.cpp:
        (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
        * rendering/SimpleLineLayoutResolver.h:
        (WebCore::SimpleLineLayout::RunResolver::Iterator::resolver const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::operator== const):
        (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun const):

        Make RunResolver::Iterator copyable (so TextBoxIterator becomes copyable too).

        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
        (WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
        * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
        (WebCore::LineLayoutInterface::TextBox::rect const):
        (WebCore::LineLayoutInterface::TextBox::logicalRect const):
        (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
        (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
        (WebCore::LineLayoutInterface::TextBox::dirOverride const):
        (WebCore::LineLayoutInterface::TextBox::text const):
        (WebCore::LineLayoutInterface::TextBox::localStartOffset const):
        (WebCore::LineLayoutInterface::TextBox::localEndOffset const):
        (WebCore::LineLayoutInterface::TextBox::length const):

        Add offset and length functions.

        (WebCore::LineLayoutInterface::TextBox::iterator const):
        (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutInterface::TextBoxIterator::traverseNext):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
        (WebCore::LineLayoutInterface::TextBoxIterator::atEnd const):
        (WebCore::LineLayoutInterface::Provider::firstTextBoxFor):
        (WebCore::LineLayoutInterface::Provider::textBoxRangeFor):
        (WebCore::LineLayoutInterface::Provider::iteratorForInlineTextBox):

        Add Provider class for making iterators. It constructs and keeps SimpleLineLayout::Resolvers alive during traversal as needed.

        * rendering/line/LineLayoutInterfaceTextBoxes.h:
        (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator bool const):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator!= const):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator* const):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator-> const):

        Make TextBoxIterator privately inherit TextBox. This way we don't need to construct temporaries and can easily implement operator->.

        (WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange):
        (WebCore::LineLayoutInterface::TextBoxRange::begin const):
        (WebCore::LineLayoutInterface::TextBoxRange::end const):

        Use separate end() type of C++17 ranges.

2019-09-16  Andres Gonzalez  <andresg_22@apple.com>

        Expose misspelling ranges for editable content to accessibility clients.
        https://bugs.webkit.org/show_bug.cgi?id=201752
        <rdar://problem/49556828>

        Reviewed by Chris Fleizach.

        Test: accessibility/misspelling-range.html

        Added [WebAccessibilityObjectWrapper misspellingTextMarkerRange] and
        underlying AccessibilityObject implementation to expose misspellings to
        accessibility clients that provide an alternative user interface to
        spell checking.
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::getMisspellingRange const):
        * accessibility/AccessibilityObject.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper misspellingTextMarkerRange:direction:]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (accessibilityMisspellingSearchCriteriaForParameterizedAttribute):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2019-09-15  Andy Estes  <aestes@apple.com>

        [WebIDL] Derived dictionaries should inherit their inherited dictionaries' partials
        https://bugs.webkit.org/show_bug.cgi?id=201802

        Reviewed by Sam Weinig.

        Prior to this change, a dictionary D that inherits from dictionary B would not inherit B's
        partial dictionaries. Fixed this by moving supplemental dependencies processing from
        generate-bindings.pl to CodeGenerator.pm and reusing it in GetDictionaryByType.

        Added new bindings tests.

        * bindings/scripts/CodeGenerator.pm:
        (new):
        (ProcessDocument):
        (ProcessSupplementalDependencies):
        (shouldPropertyBeExposed):
        (GetDictionaryByType):
        * bindings/scripts/generate-bindings.pl:
        (generateBindings):
        (shouldPropertyBeExposed): Deleted.
        * bindings/scripts/test/JS/JSTestDerivedDictionary.cpp: Added.
        (WebCore::convertDictionary<TestDerivedDictionary>):
        (WebCore::convertDictionaryToJS):
        * bindings/scripts/test/JS/JSTestDerivedDictionary.h: Added.
        * bindings/scripts/test/JS/JSTestInheritedDictionary.cpp: Added.
        (WebCore::convertDictionary<TestInheritedDictionary>):
        (WebCore::convertDictionaryToJS):
        * bindings/scripts/test/JS/JSTestInheritedDictionary.h: Added.
        * bindings/scripts/test/TestDerivedDictionary.idl: Added.
        * bindings/scripts/test/TestInheritedDictionary.idl: Added.
        * bindings/scripts/test/TestSupplemental.idl:

2019-09-15  David Kilzer  <ddkilzer@apple.com>

        Missing call to [self init] in -[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]
        <https://webkit.org/b/201806>

        Reviewed by Simon Fraser.

        * platform/mac/ScrollAnimatorMac.mm:
        (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
        Call [self init] and return early if the result is nil.

2019-09-14  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Make WebGPURenderPipeline and WebGPUComputePipeline inherit from GPUObjectBase
        https://bugs.webkit.org/show_bug.cgi?id=201207

        Reviewed by Dean Jackson.

        Make remaining WebGPU "client" classes manage their error scopes, instead of the internal classes.
        Matches Web/GPUBuffer, and allows "invalid" WebGPU objects to create errors.

        Covered by existing tests.

        * Modules/webgpu/WebGPUComputePipeline.cpp:
        (WebCore::WebGPUComputePipeline::create):
        (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
        * Modules/webgpu/WebGPUComputePipeline.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createRenderPipeline const):
        (WebCore::WebGPUDevice::createComputePipeline const):
        * Modules/webgpu/WebGPURenderPipeline.cpp:
        (WebCore::WebGPURenderPipeline::create):
        (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
        * Modules/webgpu/WebGPURenderPipeline.h:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUComputePipeline.h:
        * platform/graphics/gpu/GPURenderPipeline.h:
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::GPURenderPipeline::GPURenderPipeline):

2019-09-14  Yusuke Suzuki  <ysuzuki@apple.com>

        Retire x86 32bit JIT support
        https://bugs.webkit.org/show_bug.cgi?id=201790

        Reviewed by Mark Lam.

        * cssjit/FunctionCall.h:
        (WebCore::FunctionCall::callAndBranchOnBooleanReturnValue):
        (WebCore::FunctionCall::swapArguments):

2019-09-14  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::Geometry::inFlowPositionedPositionOffset should not read containing block's width
        https://bugs.webkit.org/show_bug.cgi?id=201797
        <rdar://problem/55366244>

        Reviewed by Antti Koivisto.

        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

2019-09-14  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::Geometry::inlineReplacedHeightAndMargin should not read containing block's width
        https://bugs.webkit.org/show_bug.cgi?id=201796
        <rdar://problem/55366109>

        Reviewed by Antti Koivisto.

        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

2019-09-14  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry should not read containing block's width.
        https://bugs.webkit.org/show_bug.cgi?id=201794
        <rdar://problem/55365669>

        Reviewed by Antti Koivisto.

        This is in preparation for using constraint values instead of querying the display tree for containing block geometry information.
        See webkit.org/b/201795

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):

2019-09-14  Chris Dumez  <cdumez@apple.com>

        newController may be moved several times under SWClientConnection::notifyClientsOfControllerChange()
        https://bugs.webkit.org/show_bug.cgi?id=201792
        <rdar://problem/55351284>

        Reviewed by Youenn Fablet.

        Stop WTFMove()'ing inside the for loop.

        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::notifyClientsOfControllerChange):

2019-09-14  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::Geometry::computedHeightValue should not read containing block's height.
        https://bugs.webkit.org/show_bug.cgi?id=201791
        <rdar://problem/55361695>

        Reviewed by Antti Koivisto.

        While sizing/positioning a particular box, we oftentimes need some containing block geometry information.
        The idea here is that instead of calling formattingContext().geometry(containingBlock), these constraint values
        would be pushed in to those compute* functions. It helps controlling the access to the display box tree and
        prevents formatting context escaping.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
        (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        * layout/LayoutUnits.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):

2019-09-11  Dean Jackson  <dino@apple.com>

        Provide a prototype for AR QuickLook to trigger processing in the originating page
        https://bugs.webkit.org/show_bug.cgi?id=201371
        <rdar://54904781>

        Reviewed by Simon Fraser.

        * dom/Document.cpp:
        (WebCore::Document::dispatchSystemPreviewActionEvent): Create and dispatch a MessageEvent.
        * dom/Document.h:

        * html/HTMLAnchorElement.cpp: Send along the page and frame identifiers for this
        object to ensure that any reply goes to the correct place.
        (WebCore::HTMLAnchorElement::handleClick):

        * loader/FrameLoadRequest.h: Use the new SystemPreviewInfo type.
        (WebCore::FrameLoadRequest::isSystemPreview const):
        (WebCore::FrameLoadRequest::systemPreviewInfo const):
        (WebCore::FrameLoadRequest::systemPreviewRect const): Deleted.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadURL):

        * loader/FrameLoaderTypes.h: Provide encoders for the type.
        (WebCore::SystemPreviewInfo::encode const):
        (WebCore::SystemPreviewInfo::decode):

        * platform/network/ResourceRequestBase.cpp: Use the new type.
        (WebCore::ResourceRequestBase::isSystemPreview const):
        (WebCore::ResourceRequestBase::systemPreviewInfo const):
        (WebCore::ResourceRequestBase::setSystemPreviewInfo):
        (WebCore::ResourceRequestBase::setSystemPreview): Deleted.
        (WebCore::ResourceRequestBase::systemPreviewRect const): Deleted.
        (WebCore::ResourceRequestBase::setSystemPreviewRect): Deleted.
        * platform/network/ResourceRequestBase.h:

        * testing/Internals.cpp: Expose the frame and page identifiers to testing.
        (WebCore::Internals::frameIdentifier const):
        (WebCore::Internals::pageIdentifier const):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-09-13  Chris Dumez  <cdumez@apple.com>

        Crash under WebCore::firstPositionInNode()
        https://bugs.webkit.org/show_bug.cgi?id=201764
        <rdar://problem/54823754>

        Reviewed by Wenson Hsieh and Geoff Garen.

        Make sure to keep a Ref<> to the textNode when we call insertNodeAtTabSpanPosition()
        or insertNodeAt().

        Test: editing/firstPositionInNode-crash.html

        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::positionInsideTextNode):

2019-09-13  Youenn Fablet  <youenn@apple.com>

        Partition processes running service workers by session ID
        https://bugs.webkit.org/show_bug.cgi?id=201643

        Reviewed by Chris Dumez.

        Move the creation of service worker context connection management to SWServer.
        This allows to partition service worker context connections by registrable domain and sessionID.
        WebKit2 is still responsible to create the IPC creation through a Function given to SWServer at construction
        time.
        SWServer now keeps a map of registrable domain -> context connection to use for running workers.
        It also keeps a map of being-created connections.
        In case a context connection is removed from the SWServer, the SWServer will notify all related worker instances
        that they are not running. The SWServer will also recreate a context connection if needed.

        This allows removing the global server context connection map.
        Make SWServerToContextConnection no longer refcounted to simplify the lifetime management.

        Covered by API test.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::SWServer):
        (WebCore::SWServer::tryInstallContextData):
        (WebCore::SWServer::contextConnectionCreated):
        (WebCore::SWServer::unregisterServiceWorkerClient):
        (WebCore::SWServer::needsContextConnectionForRegistrableDomain const):
        (WebCore::SWServer::addContextConnection):
        (WebCore::SWServer::removeContextConnection):
        (WebCore::SWServer::createContextConnection):
        * workers/service/server/SWServer.h:
        (WebCore::SWServer::contextConnectionForRegistrableDomain):
        * workers/service/server/SWServerToContextConnection.cpp:
        (WebCore::SWServerToContextConnection::SWServerToContextConnection):
        (WebCore::SWServerToContextConnection::~SWServerToContextConnection):
        * workers/service/server/SWServerToContextConnection.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::contextConnection):

2019-09-13  Zalan Bujtas  <zalan@apple.com>

        [LFC] Do not create FormattingContext unless the root has child boxes.
        https://bugs.webkit.org/show_bug.cgi?id=201766
        <rdar://problem/55344449>

        Reviewed by Antti Koivisto.

        Just because a box establishes a formatting context, it does not necessarily mean we need to create a formatting context object for it.
        The established formatting context is responsible for laying out the descendant content. The formatting context root itself is
        laid out in the formatting context it lives in. So if there's no descendent content, we don't need to construct the context objects.

        <body><div style="float: left;"></div></body> <- this div establishes a block formatting context (float) but it does not have any content so laying
        it out simply means sizing and positioning it in the initial block formatting context.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::FormattingContext):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::root const):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
        (WebCore::Layout::LayoutState::establishedFormattingState const):
        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
        (WebCore::Layout::LayoutState::createFormattingContext):
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::hasFormattingState const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        * layout/floats/FloatingContext.h:
        (WebCore::Layout::FloatingContext::root const):
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::FloatingState):
        (WebCore::Layout::FloatingState::bottom const):
        (WebCore::Layout::FloatingState::top const):
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::create):
        (WebCore::Layout::FloatingState::root const):
        (WebCore::Layout::FloatingState::leftBottom const):
        (WebCore::Layout::FloatingState::rightBottom const):
        (WebCore::Layout::FloatingState::bottom const):
        (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::TableFormattingContext):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
        (WebCore::Layout::TableFormattingContext::ensureTableGrid):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        * layout/tableformatting/TableFormattingContext.h:

2019-09-13  Ali Juma  <ajuma@chromium.org>

        IntersectionObserverEntry#intersectionRatio can be larger than 1
        https://bugs.webkit.org/show_bug.cgi?id=200776

        Reviewed by Simon Fraser.

        When computing the intersection between a target and an intersection observer's 
        root, RenderBox::computeVisibleRectInContainer is used to map the target rect
        up the containing block chain, clipping along the way. When a RenderBox has
        a transform, this method expands the given rect to the enclosing rect in device
        pixels. This is fine for the use case of computing an invalidation rect, but for
        the intersection observer use case it means that it is possible for the computed
        intersection rect to be slightly larger than the original target rect, resulting
        in an intersection ratio greater than 1.

        Fix this by performing a final intersection between the intersection rect as
        computed above and the target rect.

        Test: intersection-observer/intersection-clipped-to-target.html

        * dom/Document.cpp:
        (WebCore::computeIntersectionState):

2019-09-13  Nikolas Zimmermann  <zimmermann@kde.org>

        SMIL animations of SVG <view> element have no effect
        https://bugs.webkit.org/show_bug.cgi?id=94469

        Reviewed by Said Abou-Hallawa.

        SMIL animations of the attributes associated with SVGViewElement work fine, but without any
        visual effect. When loading an SVG document with a given fragment identifier
        (e.g. test.svg#customView) where 'customView' references to an embedded SVGViewElement, the
        viewBox/preserveAspectRatio settings should be taken from the SVGViewElement. Currently
        there is no link between the SVGViewElement and the SVGSVGElement. The settings from the
        SVGViewElement are only pasrsed onco in SVGSVGElement::scrollToFragment(). Dynamic updates
        of the 'viewBox' and 'preserveAspectRatio' attributes of the SVGViewElement thus have no
        visual effect, since the SVGSVGElement does not re-evaluates its viewBox.

        Store a RefPtr to the currently used SVGViewElement in SVGSVGElement, and a WeakPtr back
        to the SVGSVGElement that currently references the SVGViewElement. This allows us to
        propagate SVGViewElement attribute changes to SVGSVGElement and re-evaluate the viewBox
        stored in SVGSVGElement and trigger visual updates.

        Tests: svg/custom/animation-on-view-element.html
               svg/custom/multiple-view-elements.html

        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::scrollToFragment):
        * svg/SVGSVGElement.h:
        * svg/SVGViewElement.cpp:
        (WebCore::SVGViewElement::svgAttributeChanged): Add missing implementation, tracked by
        webkit.org/b/196554. Correctly handle SVGFitToViewBox property changes. Update the viewBox
        stored in the SVGSVGElement, that references the SVGViewElement. Afterwards invalidate the
        renderer associated with the SVGSVGElement, which properly triggers visual updates.
        * svg/SVGViewElement.h:

2019-09-13  Brent Fulgham  <bfulgham@apple.com>

        [FTW] ImageBuffer/ImageBufferData is highly inefficient
        https://bugs.webkit.org/show_bug.cgi?id=201594

        Reviewed by Said Abou-Hallawa.

        My initial implementation of ImageBuffer and ImageBufferData for Direct2D involves too
        much moving of data from GPU to CPU and back. We only need to make a renderable version
        of the ImageBuffer when ImageBuffer::sinkIntoNativeImage or ImageBuffer::copyNativeImage
        are called.

        Currently, each ImageBuffer putData operation uploads the data to the GPU, and each
        ImageBuffer getData pulls the data from the GPU.

        This patch does the following:

        1. It makes the assumption that the ID2D1Bitmap it holds is under its control (i.e.,
           external draw operations do not manipulate the bitmap without marking it dirty).
        2. It holds a CPU copy of the data from the ID2D1Bitmap originally used to create it.
           It uses this data for all manipulations, and uploads to the bitmap only when
           an ID2D1Bitmap is requested for drawing, and before a drawing operation is performed
           on the associated ImageBuffer context.
        3. It does not read back from the ID2D1Bitmap unless it is told that it is dirty.
        4. It does not call 'ID2D1RenderTarget::SetTags' if ASSERTS are disabled because
           they are costly, and don't help in release builds.
 
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::fillRect): Use new 'setTags' method.
        (WebCore::Direct2D::fillRoundedRect): Ditto.
        (WebCore::Direct2D::fillRectWithRoundedHole): Ditto.
        (WebCore::Direct2D::fillRectWithGradient): Ditto.
        (WebCore::Direct2D::fillPath): Ditto.
        (WebCore::Direct2D::strokeRect): Ditto.
        (WebCore::Direct2D::strokePath): Ditto.
        (WebCore::Direct2D::drawPath): Ditto.
        (WebCore::Direct2D::drawWithShadow): Notify observers before and after we drew.
        (WebCore::Direct2D::drawWithoutShadow): Ditto.
        (WebCore::Direct2D::clearRect): Use new 'setTags' method.
        (WebCore::Direct2D::drawGlyphs): Ditto.
        (WebCore::Direct2D::drawNativeImage): Ditto.
        (WebCore::Direct2D::drawRect): Ditto.
        (WebCore::Direct2D::drawLine): Ditto.
        (WebCore::Direct2D::fillEllipse): Ditto.
        (WebCore::Direct2D::drawEllipse): Ditto.
        (WebCore::Direct2D::flush): Notify observer after we drew.
        * platform/graphics/win/GradientDirect2D.cpp:
        (WebCore::Gradient::fill): Don't call SetTags in non-ASSERT builds.
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::ensureBackingStore const): Added.
        (WebCore::ImageBufferData::getData const): Only read from the GPU if the in-memory
        store is empty or out-of-sync.
        (WebCore::ImageBufferData::putData): Mark the bitmap as out-of-sync, but don't
        upload the data yet.
        (WebCore::ImageBufferData::loadDataToBitmapIfNeeded): Helper function to upload data to the GPU.
        (WebCore::ImageBufferData::compatibleBitmap): Only upload data if the relevant
        bitmap is out of date.
        * platform/graphics/win/ImageBufferDataDirect2D.h:
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::ImageBuffer): Update constructor to register the ImageBufferData
        lambdas as observer for draw operations.
        * platform/graphics/win/PlatformContextDirect2D.cpp:
        (WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Update constructor to accept
        lambdas to run before and after draw operations.
        (WebCore::PlatformContextDirect2D::setTags): Added.
        (WebCore::PlatformContextDirect2D::notifyPreDrawObserver): Added.
        (WebCore::PlatformContextDirect2D::notifyPostDrawObserver): Added.
        * platform/graphics/win/PlatformContextDirect2D.h:
        (WebCore::PlatformContextDirect2D::PlatformContextDirect2D):

2019-09-13  Russell Epstein  <repstein@apple.com>

        Unreviewed, rolling out r249709.

        Layout test added in this patch has been consistently failing
        since it landed.

        Reverted changeset:

        "Option + arrow moves caret past whitespace on iOS"
        https://bugs.webkit.org/show_bug.cgi?id=201575
        https://trac.webkit.org/changeset/249709

2019-09-13  Zalan Bujtas  <zalan@apple.com>

        [LFC] Rename FormattingContext::layout to layoutInFlowContent()
        https://bugs.webkit.org/show_bug.cgi?id=201763
        <rdar://problem/55340435>

        Reviewed by Antti Koivisto.

        FormattingContext::layout() only takes care of the inflow content. Out-out-flow boxes are laid out through FormattingContext::layoutOutOfFlowContent.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        * layout/FormattingContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::layout): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::layout): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::layout): Deleted.
        * layout/tableformatting/TableFormattingContext.h:

2019-09-13  Zalan Bujtas  <zalan@apple.com>

        [LFC] FormattingContext::displayBoxForLayoutBox should be split into 2 functions
        https://bugs.webkit.org/show_bug.cgi?id=201754
        <rdar://problem/55328753>

        Reviewed by Antti Koivisto.

        1. FormattingContext::geometryForBox() returns a const Display::Box. Use this function to access
        already computed geometry such as the containing block's content box width.
        This function can escape the current formatting context in certain cases and read geometry from parent/ancestor formatting contexts. 
        2. FormattingState::displayBox() returns a non-const version of the Display::Box. Use this function to
        create/get the display box of a particular layout box to set computed values. This call should never escape the
        current formatting context (as no one should mutate ancestor boxes).
        
        Normally while laying out a particular box, we need to collect some geometry information from other boxes in the tree like previous sibling, containing block.
        <div style="width: 100px"><div></div></div> <- the inner div's used width is based on the outer div's width. 
        However we should never mutate the geometry information on those other boxes (outer div). This patch helps avoiding accidental mutation on ancestors by
        returning a const version of the Display::Box.  

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        (WebCore::Layout::mapHorizontalPositionToAncestor):
        (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::geometryForBox const):
        (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
        (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const): Deleted.
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::hasDisplayBox const): Deleted.
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/FormattingState.cpp:
        (WebCore::Layout::FormattingState::displayBox const):
        * layout/FormattingState.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
        (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::hasClearance const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
        (WebCore::Layout::hasClearance): Deleted.
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::positionForFloat const):
        (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
        (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
        (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::isInlineContainerConsideredEmpty):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::positionTableCells):
        (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows):
        (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
        (WebCore::Layout::TableFormattingContext::computedTableWidth):

2019-09-13  Youenn Fablet  <youenn@apple.com>

        Use WebProcess processIdentifier to identify Service Worker connections
        https://bugs.webkit.org/show_bug.cgi?id=201459

        Reviewed by Chris Dumez.

        No observable change of behavior.

        * workers/service/ServiceWorkerClient.cpp:
        (WebCore::ServiceWorkerClient::postMessage):
        Pass sessionID to ease NetworkProcess selection of the client process connection.
        * workers/service/ServiceWorkerTypes.h:
        Mark server connection identifier be process identifier based.
        * workers/service/context/SWContextManager.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::Connection::Connection):
        * workers/service/server/SWServer.h:
        Let connection identifier be set in constructor instead of generated.

2019-09-13  Adrian Perez de Castro  <aperez@igalia.com>

        Factor out duplicated functions from HTTPParsers.cpp and HTTPHeaderField.cpp
        https://bugs.webkit.org/show_bug.cgi?id=201721

        Reviewed by Don Olmstead.

        No new tests needed.

        * loader/HTTPHeaderField.cpp: Remove "static" from prototypes of functions needed in HTTPParsers.cpp.
        (WebCore::RFC7230::isDelimiter):
        (WebCore::RFC7230::isQuotedPairSecondOctet):
        (WebCore::RFC7230::isCommentText):
        * loader/HTTPHeaderField.h: Add prototypes of functions needed in HTTPParsers.cpp.
        * platform/network/HTTPParsers.cpp: Use functionality from WebCore::RFC7230 where possible.
        (WebCore::skipWhile): Moved to allow implementing skipWhiteSpace() in terms of skipWhile().
        (WebCore::skipWhiteSpace): Implement using skipWhile() and the RFC7230::isWhitespace() predicate.
        (WebCore::isValidAcceptHeaderValue): Replace usage of isDelimiterCharacter() with RFC7230::isDelimiter().
        (WebCore::isValidHTTPToken): Replace usage of isHTTPTokenCharacter() with RFC7230::isTokenCharacter().
        (WebCore::skipQuotedPair): Partially reimplement in terms of RFC7230::isQuotedPairSecondOctet().
        (WebCore::skipComment): Replace usage of isCommentTextCharacter() with RFC7230::isCommentText().
        (WebCore::skipHTTPToken): Replace usage of isHTTPTokenCharacter() with RFC7230::isTokenCharacter().

2019-09-12  Zan Dobersek  <zdobersek@igalia.com>

        Unreviewed debug build fix for GLib-based ports.

        * platform/glib/UserAgentGLib.cpp: Add the HTTPParsers.h header
        inclusion to bring in the isValidUserAgentHeaderValue() declaration as
        required for an assertion check.

2019-09-12  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVGLengthValue should use two enums for 'type' and 'mode' instead of one unsigned for 'units'
        https://bugs.webkit.org/show_bug.cgi?id=201663

        Reviewed by Simon Fraser, Nikolas Zimmermann.

        SVGLengthValue had one unsigned to store SVGLengthMode and SVGLengthType.
        It used to allocate the least significant 4 bits of this unsigned to the
        SVGLengthMode while it leaves the rest for SVGLengthType.

        This will not be needed if SVGLengthMode and SVGLengthType are made of
        size uint_8.

        Also in this patch:

        -- SVGLengthNegativeValuesMode is made enum class.

        -- SVGLengthValue::blend() is moved to SVGLengthValue.cpp so we do not
           need to include SVGLengthContext.h in SVGLengthValue.h.

        -- SVGLengthType and SVGLengthMode are moved to SVGLengthValue.h. Instead
           of having SVGLengthValue.h includes SVGLengthConttext.h, the opposite
           will happen.

        -- SVGAnimatedPropertyDescription.h is deleted. It should have been deleted
           with the SVG tear off objects removal.

        -- SVGPropertyTraits<SVGAngleValue> and SVGPropertyTraits<SVGLengthValue>
           are deleted. They should have been deleted with SVGAnimatedType removal.

        -- SVGLengthValue::lengthModeForAnimatedLengthAttribute() is deleted. It
           was only called from SVGPropertyTraits<SVGLengthValue>.

        * WebCore.xcodeproj/project.pbxproj:
        * css/StyleResolver.h:
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc):
        * rendering/style/SVGRenderStyle.h:
        (WebCore::SVGRenderStyle::initialBaselineShiftValue):
        (WebCore::SVGRenderStyle::initialKerning):
        * rendering/svg/RenderSVGEllipse.cpp:
        (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
        * rendering/svg/RenderSVGRect.cpp:
        (WebCore::RenderSVGRect::updateShapeFromElement):
        * rendering/svg/SVGPathData.cpp:
        (WebCore::pathFromCircleElement):
        (WebCore::pathFromEllipseElement):
        (WebCore::pathFromRectElement):
        * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
        (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
        * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
        (WebCore::SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing):
        * svg/LinearGradientAttributes.h:
        (WebCore::LinearGradientAttributes::LinearGradientAttributes):
        * svg/RadialGradientAttributes.h:
        (WebCore::RadialGradientAttributes::RadialGradientAttributes):
        * svg/SVGAngleValue.h:
        (WebCore::SVGPropertyTraits<SVGAngleValue>::initialValue): Deleted.
        (WebCore::SVGPropertyTraits<SVGAngleValue>::toString): Deleted.
        * svg/SVGCircleElement.cpp:
        (WebCore::SVGCircleElement::parseAttribute):
        * svg/SVGCircleElement.h:
        * svg/SVGCursorElement.cpp:
        (WebCore::SVGCursorElement::parseAttribute):
        * svg/SVGCursorElement.h:
        * svg/SVGEllipseElement.cpp:
        (WebCore::SVGEllipseElement::parseAttribute):
        * svg/SVGEllipseElement.h:
        * svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::parseAttribute):
        * svg/SVGFilterElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
        (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        * svg/SVGForeignObjectElement.cpp:
        (WebCore::SVGForeignObjectElement::parseAttribute):
        * svg/SVGForeignObjectElement.h:
        * svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::parseAttribute):
        * svg/SVGImageElement.h:
        * svg/SVGLength.h:
        (WebCore::SVGLength::unitType const):
        (WebCore::SVGLength::setValueForBindings):
        (WebCore::SVGLength::newValueSpecifiedUnits):
        (WebCore::SVGLength::convertToSpecifiedUnits):
        (WebCore::SVGLength::unitType): Deleted.
        * svg/SVGLengthContext.cpp:
        (WebCore::SVGLengthContext::valueForLength):
        (WebCore::SVGLengthContext::convertValueToUserUnits const):
        (WebCore::SVGLengthContext::convertValueFromUserUnits const):
        (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage const):
        (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits const):
        * svg/SVGLengthContext.h:
        (): Deleted.
        * svg/SVGLengthList.h:
        (WebCore::SVGLengthList::create):
        * svg/SVGLengthValue.cpp:
        (WebCore::lengthTypeToString):
        (WebCore::parseLengthType):
        (WebCore::primitiveTypeToLengthType):
        (WebCore::lengthTypeToPrimitiveType):
        (WebCore::SVGLengthValue::SVGLengthValue):
        (WebCore::SVGLengthValue::construct):
        (WebCore::SVGLengthValue::blend):
        (WebCore::SVGLengthValue::fromCSSPrimitiveValue):
        (WebCore::SVGLengthValue::toCSSPrimitiveValue):
        (WebCore::SVGLengthValue::setValueAsString):
        (WebCore::SVGLengthValue::valueAsString const):
        (WebCore::SVGLengthValue::valueForBindings const):
        (WebCore::SVGLengthValue::setValue):
        (WebCore::SVGLengthValue::convertToSpecifiedUnits):
        (WebCore::storeUnit): Deleted.
        (WebCore::extractMode): Deleted.
        (WebCore::extractType): Deleted.
        (WebCore::SVGLengthValue::operator== const): Deleted.
        (WebCore::SVGLengthValue::operator!= const): Deleted.
        (WebCore::SVGLengthValue::unitType const): Deleted.
        (WebCore::SVGLengthValue::unitMode const): Deleted.
        (WebCore::SVGLengthValue::valueAsPercentage const): Deleted.
        (WebCore::SVGLengthValue::newValueSpecifiedUnits): Deleted.
        (WebCore::SVGLengthValue::lengthModeForAnimatedLengthAttribute): Deleted.
        * svg/SVGLengthValue.h:
        (WebCore::SVGLengthValue::lengthType const):
        (WebCore::SVGLengthValue::lengthMode const):
        (WebCore::SVGLengthValue::isZero const):
        (WebCore::SVGLengthValue::isRelative const):
        (WebCore::SVGLengthValue::valueAsPercentage const):
        (WebCore::SVGLengthValue::valueInSpecifiedUnits const):
        (WebCore::operator==):
        (WebCore::operator!=):
        (WebCore::SVGLengthValue::blend const): Deleted.
        (WebCore::SVGPropertyTraits<SVGLengthValue>::initialValue): Deleted.
        (WebCore::SVGPropertyTraits<SVGLengthValue>::parse): Deleted.
        (WebCore::SVGPropertyTraits<SVGLengthValue>::toString): Deleted.
        * svg/SVGLineElement.cpp:
        (WebCore::SVGLineElement::parseAttribute):
        * svg/SVGLineElement.h:
        * svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::parseAttribute):
        * svg/SVGLinearGradientElement.h:
        * svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::parseAttribute):
        * svg/SVGMarkerElement.h:
        * svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::parseAttribute):
        * svg/SVGMaskElement.h:
        * svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::parseAttribute):
        * svg/SVGPatternElement.h:
        * svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::parseAttribute):
        * svg/SVGRadialGradientElement.h:
        * svg/SVGRectElement.cpp:
        (WebCore::SVGRectElement::parseAttribute):
        * svg/SVGRectElement.h:
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::parseAttribute):
        (WebCore::SVGSVGElement::hasIntrinsicWidth const):
        (WebCore::SVGSVGElement::hasIntrinsicHeight const):
        (WebCore::SVGSVGElement::intrinsicWidth const):
        (WebCore::SVGSVGElement::intrinsicHeight const):
        * svg/SVGSVGElement.h:
        * svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::parseAttribute):
        (WebCore::SVGTextContentElement::textLengthAnimated):
        * svg/SVGTextContentElement.h:
        * svg/SVGTextPathElement.cpp:
        (WebCore::SVGTextPathElement::parseAttribute):
        * svg/SVGTextPathElement.h:
        * svg/SVGTextPositioningElement.h:
        * svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::parseAttribute):
        * svg/SVGUseElement.h:
        * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
        * svg/properties/SVGAnimatedPropertyDescription.h: Removed.
        * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
        (WebCore::SVGAnimationLengthListFunction::animate):
        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
        (WebCore::SVGAnimationLengthFunction::animate):
        * svg/properties/SVGValuePropertyAnimatorImpl.h:
        * svg/properties/SVGValuePropertyListAnimatorImpl.h:

2019-09-12  Chris Dumez  <cdumez@apple.com>

        Node.replaceChild()'s pre-replacement validations are not done in the right order
        https://bugs.webkit.org/show_bug.cgi?id=201741

        Reviewed by Geoffrey Garen.

        Node.replaceChild()'s pre-replacement validations are not done in the right order (spec order):
        - https://dom.spec.whatwg.org/#concept-node-replace

        In particular, we do not do check 3 (If child’s parent is not parent, then throw a
        "NotFoundError" DOMException.) at the right time, because we were making this check
        *after* checkPreReplacementValidity(), instead of *during*.

        No new tests, rebaselined existing test.

        * dom/ContainerNode.cpp:
        (WebCore::checkAcceptChild):
        (WebCore::ContainerNode::ensurePreInsertionValidity):
        (WebCore::checkPreReplacementValidity):
        (WebCore::ContainerNode::replaceChild):

2019-09-12  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r249801.

        Caused two servier worker layout tests to become flaky.

        Reverted changeset:

        "Use WebProcess processIdentifier to identify Service Worker
        connections"
        https://bugs.webkit.org/show_bug.cgi?id=201459
        https://trac.webkit.org/changeset/249801

2019-09-12  Chris Dumez  <cdumez@apple.com>

        [WKTR] Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED()
        https://bugs.webkit.org/show_bug.cgi?id=201546

        Reviewed by Alex Christensen.

        Drop TestRunner.setPrivateBrowsingEnabled_DEPRECATED() from WebKitTestRunner as it does not do
        the right thing for WebKit2 and tests have been rewritten to not use it.

        * page/PageGroup.cpp:
        (WebCore::PageGroup::addPage):
        (WebCore::PageGroup::setSessionIDForTesting): Deleted.
        * page/PageGroup.h:
        (): Deleted.

2019-09-12  Saam Barati  <sbarati@apple.com>

        [WHLSL] Slim down WSLMatrix and inline constructors in native code
        https://bugs.webkit.org/show_bug.cgi?id=201568

        Reviewed by Robin Morisset.

        Before, our WSL Matrix in MSL had templates to figure out how we're 
        constructing it. For example, with a list of elements, or a list of
        columns. However, we can remove this template code since when we're
        emitting Metal code, we know exactly how we're constructing the WSL
        matrix. So the NativeFunctionWriter now inlines the proper stores
        into the WSLMatrix elements.
        
        This patch speeds up Metal compile times in boids by ~4ms (16%) with
        a p-value of 0.0001.

        Covered by existing tests.

        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
        (WebCore::WHLSL::Metal::metalCodePrologue):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):

2019-09-12  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Cocoa] Text indicator for an image link on the front page of apple.com looks wrong
        https://bugs.webkit.org/show_bug.cgi?id=201724
        <rdar://problem/54622894>

        Reviewed by Tim Horton.

        When computing the bounds of the range (<a>, 0) to (<a>, 1) for a text indicator snapshot where <a> is a link
        with a single non-breaking whitespace character, we currently use the text rect of the single space. This leads
        to a confusing text indicator, as the resulting snapshot is a tiny blank square in the top left corner of the
        link. This problem manifests when starting a drag or showing the system context menu on iOS, or force clicking
        or three-finger tapping to show a preview on macOS.

        To address this scenario, tweak the heuristic in the case where the text indicator option
        TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges is specified, such that we consider a range
        containing only text with whitespaces to be "complex"; additionally, instead of falling back to the range's
        bounding rect (which in this case is still tiny), fall back to the common ancestor container's bounding rect,
        which encompasses not only the text inside the range but also the element containing the range (in this case,
        the anchor element).

        Test: fast/text-indicator/text-indicator-empty-link.html

        * page/TextIndicator.cpp:
        (WebCore::containsOnlyWhiteSpaceText):

        Add a helper to determine whether a Range is comprised only of rendered text that only contains whitespace
        characters.

        (WebCore::initializeIndicator):

        See ChangeLog entry above for more detail.

2019-09-12  Brady Eidson  <beidson@apple.com>

        PDF exporting on iOS should include URL rects.
        <rdar://problem/54900133> and https://bugs.webkit.org/show_bug.cgi?id=201693

        Reviewed by Tim Horton.

        Turns out that PDF exporting on iOS works fine.

        Tracking back through history it was disabled at least pre-2014.

        It was almost certainly disabled because it didn't work way back then,
        but it works great now.

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setURLForRect): Remove the iOS platform exclusion.

2019-09-12  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers
        https://bugs.webkit.org/show_bug.cgi?id=201077

        Reviewed by Carlos Garcia Campos.

        Add a function to validate whether a string contains a valid value
        which can be used in a HTTP User-Agent header.

        Covered by new WebCore API test HTTPParsers.ValidateUserAgentValues.

        * platform/glib/UserAgentGLib.cpp:
        (WebCore::standardUserAgent): Assert that the returned string is a valid User-Agent.
        (WebCore::standardUserAgentForURL): Ditto.
        * platform/network/HTTPParsers.cpp: Added a series of helper functions which skip over
        characters of a string, which can be used to scan over the different elements of an
        User-Agent value; all of them receive the position from the input string where to start
        scanning, updating it to the position right after the scanned item (this follow the
        convention already in use by other functions in the source file). Each of them has
        been annotated with the RFC number and section which contains the definition of the
        scanned item, and the corresponding BNF rules to make the code easier to follow.
        (WebCore::skipWhile): Added.
        (WebCore::isVisibleCharacter): Added.
        (WebCore::isOctectInFieldContentCharacter): Added.
        (WebCore::isCommentTextCharacter): Added.
        (WebCore::isHTTPTokenCharacter): Added.
        (WebCore::isValidHTTPToken): Refactored to use the new isHTTPTokenCharacter()
        helper function instead of having the test inside the loop.
        (WebCore::skipCharacter): Added.
        (WebCore::skipQuotedPair): Added.
        (WebCore::skipComment): Added.
        (WebCore::skipHTTPToken): Added.
        (WebCore::skipUserAgentProduct): Added.
        (WebCore::isValidUserAgentHeaderValue): Added.
        * platform/network/HTTPParsers.h: Add prototype for isValidUserAgentHeaderValue().

2019-09-12  Mark Lam  <mark.lam@apple.com>

        Harden JSC against the abuse of runtime options.
        https://bugs.webkit.org/show_bug.cgi?id=201597
        <rdar://problem/55167068>

        Reviewed by Filip Pizlo.

        No new tests.  Covered by existing tests.

        Enable Options::useDollarVM before we tell the JSGlobalObject to exposeDollarVM().
        The $vm utility is now hardened to require that Options::useDollarVM be
        enabled in order for it to be used.

        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::injectInternalsObject):

2019-09-12  Youenn Fablet  <youenn@apple.com>

        Use typed identifiers for IDB connection identifiers
        https://bugs.webkit.org/show_bug.cgi?id=201682

        Reviewed by Chris Dumez.

        Migrate from uint64_t to a typed identifier for IDB connection identifiers.
        The identifier is reusing the process identifier type.
        No change of behavior.

        * Modules/indexeddb/client/IDBConnectionProxy.h:
        (WebCore::IDBClient::IDBConnectionProxy::serverConnectionIdentifier const):
        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
        (WebCore::IDBClient::IDBConnectionToServer::identifier const):
        * Modules/indexeddb/client/IDBConnectionToServer.h:
        * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
        * Modules/indexeddb/server/IDBConnectionToClient.cpp:
        (WebCore::IDBServer::IDBConnectionToClient::identifier const):
        * Modules/indexeddb/server/IDBConnectionToClient.h:
        * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::getAllDatabaseNames):
        (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
        (WebCore::IDBServer::IDBServer::didGetAllDatabaseNames):
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/shared/IDBRequestData.cpp:
        (WebCore::IDBRequestData::serverConnectionIdentifier const):
        * Modules/indexeddb/shared/IDBRequestData.h:
        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
        (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
        (WebCore::IDBResourceIdentifier::emptyValue):
        (WebCore::IDBResourceIdentifier::deletedValue):
        (WebCore::IDBResourceIdentifier::isHashTableDeletedValue const):
        (WebCore::IDBResourceIdentifier::loggingString const):
        * Modules/indexeddb/shared/IDBResourceIdentifier.h:
        (WebCore::IDBResourceIdentifier::hash const):
        (WebCore::IDBResourceIdentifier::connectionIdentifier const):
        (WTF::crossThreadCopy):
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::InProcessIDBServer::identifier const):
        * Modules/indexeddb/shared/InProcessIDBServer.h:

2019-09-12  Youenn Fablet  <youenn@apple.com>

        Use WebProcess processIdentifier to identify Service Worker connections
        https://bugs.webkit.org/show_bug.cgi?id=201459

        Reviewed by Chris Dumez.

        No observable change of behavior.

        * workers/service/ServiceWorkerClient.cpp:
        (WebCore::ServiceWorkerClient::postMessage):
        Pass sessionID to ease NetworkProcess selection of the client process connection.
        * workers/service/ServiceWorkerTypes.h:
        Mark server connection identifier be process identifier based.
        * workers/service/context/SWContextManager.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::Connection::Connection):
        * workers/service/server/SWServer.h:
        Let connection identifier be set in constructor instead of generated.

2019-09-11  Youenn Fablet  <youenn@apple.com>

        Disable DTLS1.0
        https://bugs.webkit.org/show_bug.cgi?id=201679

        Reviewed by Alex Christensen.

        Add an option to force to use DTLS1.0 and nothing else.
        Add internals API to enter in that mode to verify that normal configurations cannot communicate with DTLS1.0.

        Test: webrtc/datachannel/dtls10.html

        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::LibWebRTCProvider::setEnableWebRTCEncryption):
        (WebCore::LibWebRTCProvider::setUseDTLS10):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setUseDTLS10):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-09-11  Keith Rollin  <krollin@apple.com>

        Log timeoutValue passed on to CFNetwork
        https://bugs.webkit.org/show_bug.cgi?id=201701
        <rdar://problem/55279683>

        Reviewed by Chris Dumez.

        Export ResourceRequest::timeoutValue for use in WebKit.

        No new tests -- no new or changed functionality.

        * platform/network/ResourceRequestBase.h:

2019-09-11  Saam Barati  <sbarati@apple.com>

        [WHLSL] Remove null from the standard library
        https://bugs.webkit.org/show_bug.cgi?id=201672

        Reviewed by Robin Morisset.

        I meant to remove `null` from the standard library in r249351, but
        I had omitted the code I wrote to do that when I rebased that patch.
        This patch removes it and ensures all tests pass when parsing the entire
        standard library.

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-09-11  Chris Dumez  <cdumez@apple.com>

        Use same parser for <meta http-equiv="refresh"> and `Refresh` HTTP header
        https://bugs.webkit.org/show_bug.cgi?id=201694

        Reviewed by Alex Christensen.

        Use same parser for <meta http-equiv="refresh"> and `Refresh` HTTP header. This aligns
        our behavior with Blink and makes us more compliant on web-platform-tests. This also
        simplifies our code.

        No new tests, rebaselined existing test.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::receivedFirstData):
        * platform/network/HTTPParsers.cpp:
        (WebCore::parseHTTPRefresh): Deleted.
        * platform/network/HTTPParsers.h:

2019-09-11  Saam Barati  <sbarati@apple.com>

        [WHLSL] Ensure structs/arrays with pointers as fields are disallowed
        https://bugs.webkit.org/show_bug.cgi?id=201525

        Reviewed by Robin Morisset.

        This patch adds a pass which both ensures that references are always initialized with
        concrete values and that we support logical mode validation by disallowing nested references.
        
        Specifically, the pass:
        
        1. Disallows structs to have fields which are references. This prevents us from having to
        figure out how to default initialize such a struct. We could relax this in the future if we
        did an analysis on which structs contain reference fields, and ensure such struct variables
        always have initializers. This would also require us to create constructors for structs which
        initialize each field.
        2. We also do the same for arrays.
        3. References can only be one level deep. So no pointers to pointers. No references to
        references, etc. This is to support logical mode validation rules.

        Test: webgpu/whlsl/ensure-proper-pointer-usage.html

        * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp: Added.
        (WebCore::WHLSL::checkReferenceTypes):
        * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h: Added.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-09-11  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: instrument WebGPUDevice instead of GPUCanvasContext
        https://bugs.webkit.org/show_bug.cgi?id=201650

        Reviewed by Joseph Pecoraro.

        Most of the actual "work" done with Web GPU actually uses a `WebGPUDevice`.

        A `GPUCanvasContext` is basically just a display "client" of the device, and isn't even
        required (e.g. compute pipeline).  We should treat the `GPUCanvasContext` almost like a
        `-webkit-canvas` client of a `WebGPUDevice`.

        Tests: inspector/canvas/create-context-webgpu.html
               inspector/canvas/requestClientNodes-webgpu.html
               inspector/canvas/resolveContext-webgpu.html

        * Modules/webgpu/WebGPUAdapter.cpp:
        (WebCore::WebGPUAdapter::requestDevice const):
        Notify web inspector after a device is created.

        * Modules/webgpu/WebGPUDevice.idl:
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::instances): Added.
        (WebCore::WebGPUDevice::instancesMutex): Added.
        (WebCore::WebGPUDevice::~WebGPUDevice): Added.
        Notify web inspector when the device is about to be destructed.

        * Modules/webgpu/GPUCanvasContext.h:
        * Modules/webgpu/GPUCanvasContext.cpp:
        (WebCore::GPUCanvasContext::create):
        (WebCore::GPUCanvasContext::configureSwapChain):

        * inspector/InspectorCanvas.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::canvasIfContextMatchesDevice): Added.
        (WebCore::InspectorCanvas::create):
        (WebCore::InspectorCanvas::InspectorCanvas):
        (WebCore::InspectorCanvas::canvasContext const): Added.
        (WebCore::InspectorCanvas::canvasElement const): Added.
        (WebCore::InspectorCanvas::isDeviceForCanvasContext const): Added.
        (WebCore::InspectorCanvas::deviceContext const): Added.
        (WebCore::InspectorCanvas::scriptExecutionContext const): Added.
        (WebCore::InspectorCanvas::resolveContext const): Added.
        (WebCore::InspectorCanvas::clientNodes const): Added.
        (WebCore::InspectorCanvas::canvasChanged):
        (WebCore::InspectorCanvas::resetRecordingData):
        (WebCore::InspectorCanvas::recordAction):
        (WebCore::InspectorCanvas::buildObjectForCanvas):
        (WebCore::InspectorCanvas::releaseObjectForRecording):
        (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
        (WebCore::InspectorCanvas::buildInitialState):
        (WebCore::InspectorCanvas::canvasElement): Deleted.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCreateWebGPUDeviceImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUDeviceImpl): Added.
        (WebCore::InspectorInstrumentation::willConfigureSwapChainImpl): Added.
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didCreateWebGPUDevice): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice): Added.
        (WebCore::InspectorInstrumentation::willConfigureSwapChain): Added.

        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::enable):
        (WebCore::InspectorCanvasAgent::requestClientNodes): Added.
        (WebCore::InspectorCanvasAgent::resolveContext): Added.
        (WebCore::InspectorCanvasAgent::startRecording):
        (WebCore::InspectorCanvasAgent::stopRecording):
        (WebCore::InspectorCanvasAgent::frameNavigated):
        (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
        (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
        (WebCore::InspectorCanvasAgent::canvasDestroyed):
        (WebCore::InspectorCanvasAgent::recordCanvasAction):
        (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
        (WebCore::InspectorCanvasAgent::didCreateWebGPUDevice): Added.
        (WebCore::InspectorCanvasAgent::willDestroyWebGPUDevice): Added.
        (WebCore::InspectorCanvasAgent::willConfigureSwapChain): Added.
        (WebCore::InspectorCanvasAgent::clearCanvasData):
        (WebCore::InspectorCanvasAgent::bindCanvas):
        (WebCore::InspectorCanvasAgent::unbindCanvas):
        (WebCore::InspectorCanvasAgent::findInspectorCanvas):
        (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes): Deleted.
        (WebCore::contextAsScriptValue): Deleted.
        (WebCore::InspectorCanvasAgent::resolveCanvasContext): Deleted.

        * inspector/InspectorShaderProgram.cpp:
        (WebCore::InspectorShaderProgram::context const):

2019-09-11  Chris Dumez  <cdumez@apple.com>

        Posting a message to a redundant service worker should fail silently instead of throwing
        https://bugs.webkit.org/show_bug.cgi?id=201696

        Reviewed by Geoffrey Garen.

        Posting a message to a redundant service worker should fail silently instead of throwing:
        - https://w3c.github.io/ServiceWorker/#dom-serviceworker-postmessage-message-options
        - https://w3c.github.io/ServiceWorker/#run-service-worker (step 2)

        No new tests, rebaselined existing test.

        * workers/service/ServiceWorker.cpp:
        (WebCore::ServiceWorker::postMessage):
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::runServiceWorkerIfNecessary):

2019-09-11  Chris Dumez  <cdumez@apple.com>

        Align our XPath API with the specification and other browsers
        https://bugs.webkit.org/show_bug.cgi?id=201660

        Reviewed by Geoffrey Garen.

        Align our XPath API with the specification and other browsers:
        - Document/XPathEvaluator.createExpression()'s first parameter should be mandatory
        - Document/XPathEvaluator.evaluate()'s first 2 parameters should be mandatory
        - XPathExpression.evaluate()'s first parameter should be mandatory

        I have confirmed in the latest Chrome and Firefox that they match the specification.
        
        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::evaluate):
        * dom/Document.h:
        * dom/Document.idl:
        * inspector/InspectorNodeFinder.cpp:
        (WebCore::InspectorNodeFinder::searchUsingXPath):
        * xml/XPathEvaluator.cpp:
        (WebCore::XPathEvaluator::evaluate):
        * xml/XPathEvaluator.h:
        * xml/XPathEvaluator.idl:
        * xml/XPathExpression.cpp:
        (WebCore::XPathExpression::evaluate):
        * xml/XPathExpression.h:
        * xml/XPathExpression.idl:
        * xml/XPathUtil.cpp:
        (WebCore::XPath::isValidContextNode):
        * xml/XPathUtil.h:

2019-09-11  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (iOS 13): Top fixed element on apple.com flickers in size while pinching in
        https://bugs.webkit.org/show_bug.cgi?id=201668
        rdar://problem/51934041

        Reviewed by Frédéric Wang.

        When computing the new layout viewport rect in ScrollingTreeFrameScrollingNode, use
        "StickToDocumentBounds" mode, not "StickToViewportBounds", because otherwise we'll compute
        a layout viewport that has negative top/left offsets which causes fixed elements to jump outside
        the viewport. The only code that should be moving things outside the viewport (a temporary effect
        that happens when pinching) is the 'isBelowMinimumScale' path in WebPageProxy::computeCustomFixedPositionRect().

        With this change ScrollingTreeFrameScrollingNode no longer needs m_behaviorForFixed; it can be removed later.

        Not currently testable, since it involves pinching in past minimum zoom and transients state.

        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition const):

2019-09-11  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r249753.

        caused inspector/canvas/shaderProgram-add-remove-webgl.html to
        crash on all Mac platforms.

        Reverted changeset:

        "Web Inspector: Canvas: instrument WebGPUDevice instead of
        GPUCanvasContext"
        https://bugs.webkit.org/show_bug.cgi?id=201650
        https://trac.webkit.org/changeset/249753

2019-09-11  Antti Koivisto  <antti@apple.com>

        REGRESSION (245006): can't scroll in "read more" view in Eventbrite app
        https://bugs.webkit.org/show_bug.cgi?id=201683
        <rdar://problem/54582602>

        Reviewed by Simon Fraser.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isEventbrite):

2019-09-11  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r249758.

        Breaks the watchOS build.

        Reverted changeset:

        "[WHLSL] Ensure structs/arrays with pointers as fields are
        disallowed"
        https://bugs.webkit.org/show_bug.cgi?id=201525
        https://trac.webkit.org/changeset/249758

2019-09-11  Ali Juma  <ajuma@chromium.org>

        Prevent reentrancy FrameLoader::dispatchUnloadEvents()
        https://bugs.webkit.org/show_bug.cgi?id=200738

        Reviewed by Brady Eidson.

        Reentrancy causes m_pageDismissalEventBeingDispatched to be incorrectly
        updated, so don't allow reentrancy.

        Since this prevents m_pageDismissalEventBeingDispatched from being reset
        inside a reentrant call, it can have the unintended effect of causing
        FrameLoader::stopAllLoaders to early-out when called from
        FrameLoader::detachFromParent while a frame's unload event handler
        calls document.open() on a parent frame and causes itself to become
        detached. Allowing a load to continue in a detached frame will lead to
        a crash. To prevent this, add a new argument to FrameLoader::stopAllLoaders
        that FrameLoader::detachFromParent can use to prevent an early-out.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopAllLoaders):
        (WebCore::FrameLoader::detachFromParent):
        (WebCore::FrameLoader::dispatchUnloadEvents):
        (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
        Ensure that m_pageDismissalEventBeingDispatched is reset to its previous value, even if this is not None.
        * loader/FrameLoader.h:
        * loader/FrameLoaderTypes.h:
        Add a StopLoadingPolicy enum.

2019-09-11  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Do not adopt floating references.
        https://bugs.webkit.org/show_bug.cgi?id=201685

        Reviewed by Carlos Garcia Campos.

        Covered by existing tests.

        * platform/graphics/gstreamer/GStreamerCommon.cpp:
        (WebCore::initializeGStreamer): gst_element_factory_make returns
        floating references, you do not adopt such references, rather you
        sink them.

2019-09-11  Saam Barati  <sbarati@apple.com>

        [WHLSL] Ensure structs/arrays with pointers as fields are disallowed
        https://bugs.webkit.org/show_bug.cgi?id=201525

        Reviewed by Robin Morisset.

        This patch adds a pass which both ensures that references are always initialized with
        concrete values and that we support logical mode validation by disallowing nested references.
        
        Specifically, the pass:
        
        1. Disallows structs to have fields which are references. This prevents us from having to
        figure out how to default initialize such a struct. We could relax this in the future if we
        did an analysis on which structs contain reference fields, and ensure such struct variables
        always have initializers. This would also require us to create constructors for structs which
        initialize each field.
        2. We also do the same for arrays.
        3. References can only be one level deep. So no pointers to pointers. No references to
        references, etc. This is to support logical mode validation rules.

        Test: webgpu/whlsl/ensure-proper-pointer-usage.html

        * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp: Added.
        (WebCore::WHLSL::checkReferenceTypes):
        * Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h: Added.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-09-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: instrument WebGPUDevice instead of GPUCanvasContext
        https://bugs.webkit.org/show_bug.cgi?id=201650

        Reviewed by Joseph Pecoraro.

        Most of the actual "work" done with Web GPU actually uses a `WebGPUDevice`.

        A `GPUCanvasContext` is basically just a display "client" of the device, and isn't even
        required (e.g. compute pipeline).  We should treat the `GPUCanvasContext` almost like a
        `-webkit-canvas` client of a `WebGPUDevice`.

        Tests: inspector/canvas/create-context-webgpu.html
               inspector/canvas/requestClientNodes-webgpu.html
               inspector/canvas/resolveContext-webgpu.html

        * Modules/webgpu/WebGPUAdapter.cpp:
        (WebCore::WebGPUAdapter::requestDevice const):
        Notify web inspector after a device is created.

        * Modules/webgpu/WebGPUDevice.idl:
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::instances): Added.
        (WebCore::WebGPUDevice::instancesMutex): Added.
        (WebCore::WebGPUDevice::~WebGPUDevice): Added.
        Notify web inspector when the device is about to be destructed.

        * Modules/webgpu/GPUCanvasContext.h:
        * Modules/webgpu/GPUCanvasContext.cpp:
        (WebCore::GPUCanvasContext::create):
        (WebCore::GPUCanvasContext::configureSwapChain):

        * inspector/InspectorCanvas.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::canvasIfContextMatchesDevice): Added.
        (WebCore::InspectorCanvas::create):
        (WebCore::InspectorCanvas::InspectorCanvas):
        (WebCore::InspectorCanvas::canvasContext const): Added.
        (WebCore::InspectorCanvas::canvasElement const): Added.
        (WebCore::InspectorCanvas::isDeviceForCanvasContext const): Added.
        (WebCore::InspectorCanvas::deviceContext const): Added.
        (WebCore::InspectorCanvas::scriptExecutionContext const): Added.
        (WebCore::InspectorCanvas::resolveContext const): Added.
        (WebCore::InspectorCanvas::clientNodes const): Added.
        (WebCore::InspectorCanvas::canvasChanged):
        (WebCore::InspectorCanvas::resetRecordingData):
        (WebCore::InspectorCanvas::recordAction):
        (WebCore::InspectorCanvas::buildObjectForCanvas):
        (WebCore::InspectorCanvas::releaseObjectForRecording):
        (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
        (WebCore::InspectorCanvas::buildInitialState):
        (WebCore::InspectorCanvas::canvasElement): Deleted.
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didCreateWebGPUDeviceImpl): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUDeviceImpl): Added.
        (WebCore::InspectorInstrumentation::willConfigureSwapChainImpl): Added.
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didCreateWebGPUDevice): Added.
        (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice): Added.
        (WebCore::InspectorInstrumentation::willConfigureSwapChain): Added.

        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::enable):
        (WebCore::InspectorCanvasAgent::requestClientNodes): Added.
        (WebCore::InspectorCanvasAgent::resolveContext): Added.
        (WebCore::InspectorCanvasAgent::startRecording):
        (WebCore::InspectorCanvasAgent::stopRecording):
        (WebCore::InspectorCanvasAgent::frameNavigated):
        (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
        (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
        (WebCore::InspectorCanvasAgent::canvasDestroyed):
        (WebCore::InspectorCanvasAgent::recordCanvasAction):
        (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
        (WebCore::InspectorCanvasAgent::didCreateWebGPUDevice): Added.
        (WebCore::InspectorCanvasAgent::willDestroyWebGPUDevice): Added.
        (WebCore::InspectorCanvasAgent::willConfigureSwapChain): Added.
        (WebCore::InspectorCanvasAgent::clearCanvasData):
        (WebCore::InspectorCanvasAgent::bindCanvas):
        (WebCore::InspectorCanvasAgent::unbindCanvas):
        (WebCore::InspectorCanvasAgent::findInspectorCanvas):
        (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes): Deleted.
        (WebCore::contextAsScriptValue): Deleted.
        (WebCore::InspectorCanvasAgent::resolveCanvasContext): Deleted.

        * inspector/InspectorShaderProgram.cpp:
        (WebCore::InspectorShaderProgram::context const):

2019-09-10  Chris Dumez  <cdumez@apple.com>

        Nullptr crash in Page::sessionID() via WebKit::WebFrameLoaderClient::detachedFromParent2()
        https://bugs.webkit.org/show_bug.cgi?id=201625

        Reviewed by Ryosuke Niwa.

        This is based on a patch from Ryosuke Niwa.

        Drop setHasFrameSpecificStorageAccess() in WebCore and call it from the WebKit layer instead.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess):
        (WebCore::DocumentStorageAccess::setHasFrameSpecificStorageAccess): Deleted.
        * dom/DocumentStorageAccess.h:
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoaderClient.h:

2019-09-10  Brady Eidson  <beidson@apple.com>

        Add SPI to save a PDF from the contents of a WKWebView.
        <rdar://problem/48955900> and https://bugs.webkit.org/show_bug.cgi?id=195765

        Reviewed by Tim Horton.

        Covered by API tests.

        * page/FrameView.cpp:
        (WebCore::FrameView::paintContents): Don't paint the debug color outside of the FrameRect.

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setURLForRect):

        * rendering/PaintPhase.h: Add "AnnotateLinks" option to always gather and annotation links.

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::hasOutlineAnnotation const): Also return true when the PaintOptions include "AnnotateLinks"

2019-09-10  Jiewen Tan  <jiewen_tan@apple.com>

        REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-credential-create-success-u2f.https.html is failing
        https://bugs.webkit.org/show_bug.cgi?id=201620
        <rdar://problem/51524958>

        Reviewed by Alex Christensen.

        Covered by existing tests.

        * Modules/webauthn/fido/U2fResponseConverter.cpp:
        (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
        Change the way how the aaguid is initialized to see if that fixes the issue.

2019-09-10  Chris Dumez  <cdumez@apple.com>

        Add missing origin check for Service-Worker-Allowed header
        https://bugs.webkit.org/show_bug.cgi?id=201653

        Reviewed by Geoffrey Garen.

        Add missing origin check for Service-Worker-Allowed header:
        - https://w3c.github.io/ServiceWorker/#update-algorithm (step 15. 2.)

        * workers/service/ServiceWorkerJob.cpp:
        (WebCore::ServiceWorkerJob::didReceiveResponse):

2019-09-10  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: cache prepared SQLiteStatement in SQLiteIDBCursor
        https://bugs.webkit.org/show_bug.cgi?id=201548

        Reviewed by Alex Christensen.

        This should be a performance improvement as we don't compile the same SQLiteStatement everytime it is used.

        No new tests, no behavior change.

        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
        * Modules/indexeddb/server/SQLiteIDBCursor.h:

2019-09-10  Youenn Fablet  <youenn@apple.com>

        RTCPeerConnection can only be instantiated in documents
        https://bugs.webkit.org/show_bug.cgi?id=201639

        Reviewed by Alex Christensen.

        Make it clear that RTCDataChannel expects Document since peer connections
        and data channels can only be instantiated in document environments.
        We keep one downcast in RTCPeerConnection constructor due to a limitation
        in binding generator for JS built-ins.
        No change of behavior.

        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::create):
        (WebCore::RTCDataChannel::RTCDataChannel):
        * Modules/mediastream/RTCDataChannel.h:
        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::create):
        (WebCore::RTCPeerConnection::RTCPeerConnection):
        (WebCore::RTCPeerConnection::certificatesFromConfiguration):
        (WebCore::RTCPeerConnection::createDataChannel):
        (WebCore::RTCPeerConnection::document):
        * Modules/mediastream/RTCPeerConnection.h:
        * Modules/mediastream/RTCPeerConnection.idl:
        * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
        (WebCore::LibWebRTCDataChannelHandler::channelEvent):
        * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::OnDataChannel):

2019-09-10  Youenn Fablet  <youenn@apple.com>

        Remove MediaStreamPrivate::scheduleDeferredTask
        https://bugs.webkit.org/show_bug.cgi?id=200975

        Reviewed by Eric Carlson.

        All calls to scheduleDeferredTask are done on the main thread.
        This was initially done to trigger less reconfiguration.
        But this makes the implementation significantly more complex.

        For instance, we have to wait for the document to update its media state
        and send it to UIProcess before calling the allow completion handler.

        Covered by existing tests.

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::MediaStream):
        Make sure to update the document media state once the tracks have been added, similarly to the other constructor.
        This ensures the document media state is computed with the new MediaStreamTrack.
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::isMediaStreamCorrectlyStarted):
        (WebCore::UserMediaRequest::allow):
        (WebCore::UserMediaRequest::stop):
        (WebCore::UserMediaRequest::mediaStreamDidFail):
        * Modules/mediastream/UserMediaRequest.h:
        * page/MediaProducer.h:
        (WebCore::MediaProducer::isCapturing):
        Make sure to include getDisplayMedia as part of capture check.
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::trackMutedChanged):
        (WebCore::MediaStreamPrivate::trackEnabledChanged):
        (WebCore::MediaStreamPrivate::trackStarted):
        (WebCore::MediaStreamPrivate::trackEnded):
        * platform/mediastream/MediaStreamPrivate.h:

2019-09-10  Youenn Fablet  <youenn@apple.com>

        Audio sometimes fail to capture in WebRTC
        https://bugs.webkit.org/show_bug.cgi?id=180748
        <rdar://problem/36032346>

        Reviewed by Eric Carlson.

        In some cases, Safari is not receiving unsuspend notifications.
        In that case, the capture unit might stay in suspend state forever.
        To work around that, we force to unsuspend whenever there is a new capture happening.
        This will make it so that reloading the page will unsuspend the page.

        Manually tested by triggering Siri, starting to use the microphone and quickly going back to a capturing page.

        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::provideSpeakerData):
        When suspension happens, the buffer size might change.
        Since this is only an issue if there are some references data, we now do not fail the capture when there
        is no reference data.
        (WebCore::CoreAudioSharedUnit::resume):
        (WebCore::CoreAudioSharedUnit::prepareForNewCapture):
        Make sure to start with a clean slate by setting suspend state to false for the shared unit.
        And failing all previous sources in case we are going back from suspension.
        (WebCore::CoreAudioSharedUnit::startInternal):
        (WebCore::CoreAudioCaptureSourceFactory::audioCaptureDeviceManager):
        (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):

2019-09-10  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fixes for non-unified builds after r249022
        https://bugs.webkit.org/show_bug.cgi?id=201610

        Reviewed by Joseph Pecoraro.

        No new tests needed.

        * fileapi/NetworkSendQueue.h: Add missing inclusion of wtf/WeakPtr.h; add the namespace to WTF::WeakPtr
        which is needed because there is no "using" clause.
        * inspector/InspectorInstrumentation.cpp: Add missing inclusion of the PageDOMDebuggerAgent.h header.
        * inspector/agents/WebDebuggerAgent.cpp: Add missing inclusion of the ScriptExecutionContext.h header.
        * inspector/agents/page/PageDOMDebuggerAgent.cpp: Add missing inclusion of the InstrumentingAgents.h header.

2019-09-10  Youenn Fablet  <youenn@apple.com>

        Add support to RTCDataChannel.send(Blob)
        https://bugs.webkit.org/show_bug.cgi?id=201377

        Reviewed by Chris Dumez.

        Make use of NetworkSendQueue to enqueue and send properly messages.
        Test: imported/w3c/web-platform-tests/webrtc/RTCDataChannel-send-blob-order.html

        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::createMessageQueue):
        (WebCore::RTCDataChannel::RTCDataChannel):
        (WebCore::RTCDataChannel::send):
        (WebCore::RTCDataChannel::close):
        * Modules/mediastream/RTCDataChannel.h:

2019-09-10  Ryosuke Niwa  <rniwa@webkit.org>

        Option + arrow moves caret past whitespace on iOS
        https://bugs.webkit.org/show_bug.cgi?id=201575

        Reviewed by Wenson Hsieh.

        The bug was caused by findNextWordFromIndex on iOS behaving differently from macOS and UIKit by skipping
        trailing whitespace after a word when moving forward and not skipping leading whitespace when moving backward.

        This patch introduces a new mode (StopAfterWord) of findNextWordFromIndex in iOS that better matches
        the behavior of findNextWordFromIndex on macOS and UIKit, and use it in various modify* functions of
        FrameSelection when the selection update is triggered by user.

        The legacy mode (LegacyStopBeforeWord) is used in all other call sites as well as when modify* functions
        are invoked from author scripts.

        Test: editing/selection/ios/move-by-word-with-keyboard.html

        * editing/FrameSelection.cpp:
        (WebCore::nextWordWhitespaceModeInIOS): Added. A helper to convert EUserTriggered to NextWordModeInIOS.
        (WebCore::FrameSelection::nextWordPositionForPlatform):
        (WebCore::FrameSelection::modifyExtendingRight):
        (WebCore::FrameSelection::modifyExtendingForward):
        (WebCore::FrameSelection::modifyMovingRight):
        (WebCore::FrameSelection::modifyMovingForward):
        (WebCore::FrameSelection::modifyExtendingLeft):
        (WebCore::FrameSelection::modifyExtendingBackward):
        (WebCore::FrameSelection::modifyMovingLeft):
        (WebCore::FrameSelection::modifyMovingBackward):
        (WebCore::FrameSelection::modify):
        (WebCore::FrameSelection::updateAppearance):
        * editing/FrameSelection.h:
        * editing/TextIterator.cpp:
        (WebCore::SearchBuffer::isWordStartMatch const):
        * editing/VisibleUnits.cpp:
        (WebCore::previousWordPositionBoundary):
        (WebCore::previousWordPosition):
        (WebCore::nextWordPositionBoundary):
        (WebCore::nextWordPosition):
        * editing/VisibleUnits.h:
        * platform/text/TextBoundaries.cpp:
        (WebCore::findNextWordFromIndex):
        * platform/text/TextBoundaries.h:
        * platform/text/mac/TextBoundaries.mm:
        (WebCore::findNextWordFromIndex): Added a new mode.

2019-09-09  Chris Dumez  <cdumez@apple.com>

        REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
        https://bugs.webkit.org/show_bug.cgi?id=201550

        Reviewed by Alex Christensen.

        * loader/ResourceLoadObserver.h:
        (WebCore::ResourceLoadObserver::hasStatistics const):

2019-09-09  Timothy Hatcher  <timothy@apple.com>

        Tap and hold on Facebook sometimes creates a tall empty selection.
        https://bugs.webkit.org/show_bug.cgi?id=201618
        rdar://53630145

        Reviewed by Megan Gardner.

        API Test: SelectionTests.ByWordAtEndOfDocument

        * editing/VisibleUnits.cpp:
        (WebCore::wordRangeFromPosition):
        Remove special case code for the possibility of an empty paragraph and at the end
        of the document. This is no longer needed and was causing a large selection to be
        created on Facebook due to large areas of non-selectable content on the page.

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

        getComputedStyle for line-height: normal should return the keyword instead of a length
        https://bugs.webkit.org/show_bug.cgi?id=201296

        Reviewed by Ryosuke Niwa.

        Per https://github.com/w3c/csswg-drafts/issues/3749,
        Gecko and Blink has this behavior already.

        This patch makes WebKit has the same behavior with them.

        Tests: imported/w3c/web-platform-tests/css/css-inline/parsing/line-height-computed.html
               imported/w3c/web-platform-tests/css/cssom/getComputedStyle-line-height.html
               imported/w3c/web-platform-tests/html/rendering/replaced-elements/the-select-element/select-1-line-height.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::lineHeightFromStyle):

2019-09-09  Alex Christensen  <achristensen@webkit.org>

        Disable TLS 1.0 and 1.1 in WebSockets
        https://bugs.webkit.org/show_bug.cgi?id=201573

        Reviewed by Youenn Fablet.

        This expands on what I started in r249019 when I disabled legacy TLS for our use of NSURLSession.
        Since our WebSocket implementation uses a different network interface, disable legacy TLS for them, too.
        I use the same temporary default to re-enable legacy TLS.  I also add a unit test for both WebSockets and NSURLSession use.

        * platform/network/cf/SocketStreamHandleImpl.h:
        * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
        (WebCore::Function<bool):
        (WebCore::SocketStreamHandleImpl::setLegacyTLSEnabledCheck):
        (WebCore::SocketStreamHandleImpl::createStreams):

2019-09-09  Saam Barati  <sbarati@apple.com>

        Unreviewed follow up to r249630. We need padding for ADDRESS32 CPUs to allow replaceWith to work on the intended types.

        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:

2019-09-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Introduce cell spacing.
        https://bugs.webkit.org/show_bug.cgi?id=201605
        <rdar://problem/55184009>

        Reviewed by Antti Koivisto.

        This patch adds support for horizontal and vertical cell spacing (border-spacing). Now LFC matches table geometry for simple table content with multiple columns and rows. 

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const): Now we can use the generic, check the inflow content logic for table height.
        * layout/LayoutUnits.h:
        (WebCore::Layout::HorizontalEdges::width const):
        (WebCore::Layout::VerticalEdges::height const):
        * layout/Verification.cpp:
        (WebCore::Layout::verifyAndOutputSubtree):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout):
        (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
        (WebCore::Layout::TableFormattingContext::positionTableCells):
        (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows):
        (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections):
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::TableFormattingContext::ensureTableGrid):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        (WebCore::Layout::TableFormattingContext::computedTableWidth):
        (WebCore::Layout::TableFormattingContext::useAsContentLogicalWidth):
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableFormattingContextGeometry.cpp:
        (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::appendCell):
        (WebCore::Layout::TableGrid::widthConstraints const):
        (WebCore::Layout::TableGrid::ColumnsContext::useAsLogicalWidth): Deleted.
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::setHorizontalSpacing):
        (WebCore::Layout::TableGrid::horizontalSpacing const):
        (WebCore::Layout::TableGrid::setVerticalSpacing):
        (WebCore::Layout::TableGrid::verticalSpacing const):
        (WebCore::Layout::TableGrid::ColumnsContext::logicalWidth const):

2019-09-09  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r249574.

        Caused fast/mediastream/media-stream-track-source-failure.html
        to become flaky.

        Reverted changeset:

        "Remove MediaStreamPrivate::scheduleDeferredTask"
        https://bugs.webkit.org/show_bug.cgi?id=200975
        https://trac.webkit.org/changeset/249574

2019-09-09  Rob Buis  <rbuis@igalia.com>

        [GTK][WPE] Remove attributes deprecated from MathML3
        https://bugs.webkit.org/show_bug.cgi?id=197492

        Reviewed by Frédéric Wang.

        Remove some MathML3 deprecated attributes:
        https://github.com/mathml-refresh/mathml/issues/5#issuecomment-475506856

        This change also maps the dir attribute to direction for MathML Core.

        Test: imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html

        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::collectStyleForPresentationAttribute):

2019-09-09  Youenn Fablet  <youenn@apple.com>

        Move checkProcessLocalPortForActivity from provider to registry
        https://bugs.webkit.org/show_bug.cgi?id=201400

        Reviewed by Alex Christensen.

        Update the registry to take a callback that is used to implement checkProcessLocalPortForActivity.
        This allows WK1 and WK2 to have their own implementation.

        Make the call to checkProcessLocalPortForActivity directly on the registry.
        Remove unneeded worker checkProcessLocalPortForActivity method.
        No change of behavior.

        * dom/messageports/MessagePortChannel.cpp:
        (WebCore::MessagePortChannel::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannelProvider.h:
        * dom/messageports/MessagePortChannelProviderImpl.cpp:
        (WebCore::createMessagePortChannelRegistry):
        (WebCore::MessagePortChannelProviderImpl::MessagePortChannelProviderImpl):
        (WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity): Deleted.
        * dom/messageports/MessagePortChannelProviderImpl.h:
        * dom/messageports/MessagePortChannelRegistry.cpp:
        (WebCore::MessagePortChannelRegistry::MessagePortChannelRegistry):
        (WebCore::MessagePortChannelRegistry::checkProcessLocalPortForActivity):
        * dom/messageports/MessagePortChannelRegistry.h:
        (WebCore::MessagePortChannelRegistry::provider): Deleted.
        * dom/messageports/WorkerMessagePortChannelProvider.cpp:
        (WebCore::WorkerMessagePortChannelProvider::checkProcessLocalPortForActivity): Deleted.
        * dom/messageports/WorkerMessagePortChannelProvider.h:

2019-09-08  Saam Barati  <sbarati@apple.com>

        [WHLSL] Add back a version of the property resolver
        https://bugs.webkit.org/show_bug.cgi?id=201251

        Reviewed by Robin Morisset.

        This patch adds back the property resolver to aid in how we emit metal code.
        The goal of the new property resolver phase is to allow two things:
        1. For property access expressions, metal codegen should be allowed to evaluate
        the base, and if it's an index expression, the index, as many times as needed.
        So this patch ensures that if Metal evaluates such things, effects aren't performed
        more than once.
        
        2. For ReadModifyWrite expressions, metal codegen should be able to evaluate the
        leftValueExpression as many times as it'd like without performing the effects of
        leftValueExpression more than once.
        
        Here are a couple examples of this transformation:
        `a()[b()]` -> `(temp1 = a(), temp2 = b(), temp1[temp2])`
        `(*a())[b()] += 42;` -> `(temp1 = &*a(), temp2 = b(), (*temp1)[temp2] += 42)`
        
        The interesting rules break down like:
        - When the base is an lvalue, we take its address and replace the old base
        with a dereference of the new pointer variable.
        - When the base is an rvalue, we evaluate it and store it in a temporary
        variable, and switch the base to be a reference of that variable.
        - All indices are evaluated before the property access instruction and
        replaced with a reference to the temporary variable.

        Test: webgpu/whlsl/property-evaluation-order.html

        * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp:
        (WebCore::WHLSL::AST::Expression::mayBeEffectful const):
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
        (WebCore::WHLSL::findHighZombies):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::handleLeftHandSideBase):
        (WebCore::WHLSL::PropertyResolver::handlePropertyAccess):
        (WebCore::WHLSL::resolveProperties):

2019-09-07  Chris Dumez  <cdumez@apple.com>

        Add support for postMessage buffering between the service worker and window
        https://bugs.webkit.org/show_bug.cgi?id=201169

        Reviewed by Youenn Fablet.

        As per the Service Worker specification, a service worker client's message
        queue is initially disabled and only gets enabled after:
        - The DOMContentLoaded event has been fired
        or
        - The client sets the navigator.serviceWorker.onmessage event handler
        or
        - navigator.serviceWorker.startMessages() is called

        While the message queue is disabled, messages posted by the service worker
        to the client simply get queued and only get processed once the queue gets
        enabled.

        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::finishedParsing):
        Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
        been fired.

        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
        * dom/ScriptExecutionContext.h:
        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
        Fix a bug where a service worker would not be able to post a message to a client until
        that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
        lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
        when a message is received from the service worker. Previously, messages were just
        getting dropped.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        When the ServiceWorkerContainer is constructed, suspend its message queue if its context
        document is still parsing.

        (WebCore::ServiceWorkerContainer::startMessages):
        Resume the message queue when startMessages() is called.

        (WebCore::ServiceWorkerContainer::postMessage):
        Enqueue the event instead of firing it right away.

        (WebCore::ServiceWorkerContainer::addEventListener):
        if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
        startMessages().

        * workers/service/ServiceWorkerContainer.h:

2019-09-07  Chris Dumez  <cdumez@apple.com>

        [Service Workers] Drop support for registration resurrection
        https://bugs.webkit.org/show_bug.cgi?id=201584

        Reviewed by Alex Christensen.

        Drop support for registration resurrection (Unregistering then quickly re-registering would resurrect
        the original registration instead of creating a new one). This behavior is no longer in the
        specification (No more "isUninstalling" flag on the registration, and the registration is removed
        from the "scope to registration map" right away upon unregistering).

        This resurrection behavior was causing a lot of flakiness in the tests so it is likely we will be able
        to unskip some tests. This is also what was causing the flakiness that caused Bug 201169 to be rolled
        out.

        No new tests, updated existing tests.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::activeWorkerFromRegistrationID):
        (WebCore::SWServer::getRegistration):
        (WebCore::SWServer::addRegistration):
        (WebCore::SWServer::removeRegistration):
        (WebCore::SWServer::getRegistrations):
        (WebCore::SWServer::clearAll):
        (WebCore::SWServer::clear):
        (WebCore::SWServer::terminatePreinstallationWorker):
        (WebCore::SWServer::didFinishActivation):
        (WebCore::SWServer::claim):
        (WebCore::SWServer::addClientServiceWorkerRegistration):
        (WebCore::SWServer::removeClientServiceWorkerRegistration):
        (WebCore::SWServer::installContextData):
        (WebCore::SWServer::runServiceWorker):
        (WebCore::SWServer::doRegistrationMatching):
        (WebCore::SWServer::registrationFromServiceWorkerIdentifier):
        (WebCore::SWServer::registerServiceWorkerClient):
        (WebCore::SWServer::unregisterServiceWorkerClient):
        (WebCore::SWServer::removeFromScopeToRegistrationMap):
        (WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::runRegisterJob):
        (WebCore::SWServerJobQueue::runUnregisterJob):
        (WebCore::SWServerJobQueue::runUpdateJob):
        * workers/service/server/SWServerRegistration.cpp:
        (WebCore::SWServerRegistration::clear):
        (WebCore::SWServerRegistration::handleClientUnload):
        (WebCore::SWServerRegistration::isUnregistered const):
        * workers/service/server/SWServerRegistration.h:
        (WebCore::SWServerRegistration::scopeURLWithoutFragment const):
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::SWServerWorker):
        (WebCore::m_scriptResourceMap):
        (WebCore::SWServerWorker::contextData const):
        (WebCore::SWServerWorker::skipWaiting):
        (WebCore::SWServerWorker::setHasPendingEvents):
        (WebCore::SWServerWorker::setState):
        (WebCore::SWServerWorker::registration const):
        * workers/service/server/SWServerWorker.h:

2019-09-07  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r249353.

        The test for this change is a flaky failure.

        Reverted changeset:

        "Add support for postMessage buffering between the service
        worker and window"
        https://bugs.webkit.org/show_bug.cgi?id=201169
        https://trac.webkit.org/changeset/249353

2019-09-07  Alex Christensen  <achristensen@webkit.org>

        Deprecate WKContextGetWebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=200050

        Reviewed by Geoff Garen.

        * platform/network/CacheValidation.cpp:
        (WebCore::collectVaryingRequestHeaders):
        (WebCore::verifyVaryingRequestHeaders):
        * platform/network/CacheValidation.h:
        Replace a few NetworkStorageSession& with NetworkStorageSession*
        so I can replace defaultStorageSession with the correct NetworkStorageSession in NetworkCache.cpp.

2019-09-06  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Minor cleanups to avoid crashes during web browsing
        https://bugs.webkit.org/show_bug.cgi?id=201572

        Reviewed by Alexey Proskuryakov.

        This patch addresses a few crashes seen when doing general web browsing using
        the FTW build of WebKit:

        1. ImageBuffer::sinkIntoImage was attempting to use a render target after WTFMoving it elsewhere.
        2. ImageBuffer::copyNativeImage was not properly checking the type of the render
           target to make sure it was suitable for Bitmap operations.
        3. BackingStoreBackendDirect2DImpl::scroll would crash if the scroll offset was
           outside the bounds of the current view. In that case, it would attempt to allocate
           a zero-size texture, which triggered a crash.

        * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
        (WebCore::BackingStoreBackendDirect2DImpl::scroll):
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::sinkIntoImage):
        (WebCore::ImageBuffer::copyNativeImage const):

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

        Incorrect selection rect revealed after pasting images in a contenteditable element
        https://bugs.webkit.org/show_bug.cgi?id=201549
        <rdar://problem/50956429>

        Reviewed by Simon Fraser.

        Editor::replaceSelectionWithFragment currently scrolls to reveal the selection after inserting the given
        DocumentFragment. However, this scrolling occurs before any inserted images have loaded yet, which causes the
        wrong caret rect to be revealed, since all image elements inserted during paste will be empty.

        To fix this, we defer revealing the selection after inserting the fragment until after all images that have
        been inserted are done loading. While waiting for images to load, if any layers which may be scrolled as a
        result of revealing the selection are scrolled, we additionally cancel the deferred selection reveal. See
        comments below for more detail.

        Tests: editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll.html
               editing/pasteboard/reveal-selection-after-pasting-images.html
               PasteImage.RevealSelectionAfterPastingImage

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

        Add a new helper to iterate through a range and collect all image elements in that range, that contain cached
        images that have not finished loading yet.

        * editing/Editing.h:
        * editing/Editor.cpp:
        (WebCore::Editor::replaceSelectionWithFragment):

        Instead of always immediately revealing the selection after applying the ReplaceSelectionCommand, collect the
        image elements that were just inserted, and avoid immediately revealing the selection if any of these images
        have non-null cached images, but are not loaded yet. Instead, hold on to these images in a set, remove them once
        they finish loading using the new method below, and once all images are removed, reveal the selection.

        (WebCore::Editor::revealSelectionIfNeededAfterLoadingImageForElement):
        (WebCore::Editor::renderLayerDidScroll):

        Called whenever a scrollable RenderLayer is scrolled (or in the case of FrameView, the root layer). In the case
        where Editor is waiting to reveal the selection, we check to see if the scrolled layer is an ancestor of the
        layer enclosing the start of the selection.

        (WebCore::Editor::respondToChangedSelection):

        If the selection changes between pasting and waiting for pasted images to load, just cancel waiting to reveal
        the selection after pasting.

        * editing/Editor.h:
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::insertedContentRange const):

        Add a helper method to grab the Range of content inserted after applying the command.

        * editing/ReplaceSelectionCommand.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollPositionChanged):
        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::didFinishLoadingImageForElement):

        Notify Editor after an image finishes loading.

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

2019-09-06  Brent Fulgham  <bfulgham@apple.com>

        PathDirect2D Cleanups
        https://bugs.webkit.org/show_bug.cgi?id=201534

        Reviewed by Fujii Hironori.

        1. Add a COMPtr<> move operator.
        2. Reduce copying ID2D1Geometry objects.
        3. Protect against using the ID2D1PathGeometry after the
           ID2D1GeometrySink's Close operation is used.
        4. Add a debug-only 'refCount' function to COMPtr to help
           track down memory errors.

        * platform/graphics/Path.h:
        (WebCore::Path::activePath const): Deleted.
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::fillPath):
        (WebCore::Direct2D::drawPath):
        * platform/graphics/win/PathDirect2D.cpp:
        * platform/win/COMPtr.h:
        (COMPtr::COMPtr):
        (=):
        (refCount):

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

        Move the ResourceLoadObserver logic to WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=201517

        Reviewed by Brent Fulgham.

        Move the ResourceLoadObserver logic to WebKit2 since it is not used by WebKit1. This allows us to simplify
        code.

        In a follow-up patch, I will simplify the code even further by leveraging the fact that a WebContent process
        is always associated with a single WebsiteDataStore / sessionID:
        - No need for a HashMap of sessionIDs
        - No need to even allocate the ResourceLoadObserver if the WebProcess is associated with an ephemeral session.

        * dom/Document.h:
        * loader/ResourceLoadObserver.cpp:
        (WebCore::sharedObserver):
        (WebCore::ResourceLoadObserver::setShared):
        (WebCore::ResourceLoadObserver::shared):
        * loader/ResourceLoadObserver.h:
        (WebCore::ResourceLoadObserver::~ResourceLoadObserver):
        (WebCore::ResourceLoadObserver::logSubresourceLoading):
        (WebCore::ResourceLoadObserver::logWebSocketLoading):
        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
        (WebCore::ResourceLoadObserver::logFontLoad):
        (WebCore::ResourceLoadObserver::logCanvasRead):
        (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
        (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
        (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
        (WebCore::ResourceLoadObserver::statisticsForURL):
        (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
        (WebCore::ResourceLoadObserver::clearState):
        (WebCore::ResourceLoadObserver::setShouldLogUserInteraction):
        * page/DeprecatedGlobalSettings.h:

2019-09-06  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Update several interface and enum names to match spec
        https://bugs.webkit.org/show_bug.cgi?id=201564

        Reviewed by Dean Jackson.

        Rename GPUShaderStageBit -> GPUShaderStage.
        Rename GPUColorWriteBits -> GPUColorWrite.
        Rename TRANSFER_SRC/DST -> COPY_SRC/DST.
        Rename GPUPipelineStageDescriptor -> GPUProgrammableStageDescriptor.

        Existing tests trivially updated to match.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/webgpu/GPUBindGroupLayoutBinding.h:
        * Modules/webgpu/GPUBufferUsage.idl:
        * Modules/webgpu/GPUColorStateDescriptor.idl:
        * Modules/webgpu/GPUColorWrite.idl: Renamed from Source/WebCore/Modules/webgpu/GPUColorWriteBits.idl.
        * Modules/webgpu/GPUShaderStage.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.h.
        * Modules/webgpu/GPUShaderStage.idl: Renamed from Source/WebCore/Modules/webgpu/GPUShaderStageBit.idl.
        * Modules/webgpu/GPUTextureUsage.idl:
        * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp:
        (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
        * Modules/webgpu/WebGPUComputePipelineDescriptor.h:
        * Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
        * Modules/webgpu/WebGPUDevice.cpp:
        * Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.cpp.
        (WebCore::WebGPUProgrammableStageDescriptor::tryCreateGPUProgrammableStageDescriptor const):
        * Modules/webgpu/WebGPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.h.
        * Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUPipelineStageDescriptor.idl.
        * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
        (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
        * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
        * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * platform/graphics/gpu/GPUBuffer.h:
        (WebCore::GPUBuffer::isCopySource const):
        (WebCore::GPUBuffer::isCopyDestination const):
        (WebCore::GPUBuffer::isTransferSource const): Deleted.
        (WebCore::GPUBuffer::isTransferDestination const): Deleted.
        * platform/graphics/gpu/GPUBufferUsage.h:
        * platform/graphics/gpu/GPUColorStateDescriptor.h:
        * platform/graphics/gpu/GPUColorWrite.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUColorWriteBits.h.
        * platform/graphics/gpu/GPUComputePipelineDescriptor.h:
        (WebCore::GPUComputePipelineDescriptor::GPUComputePipelineDescriptor):
        * platform/graphics/gpu/GPUPipelineDescriptorBase.h:
        * platform/graphics/gpu/GPUProgrammableStageDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPUPipelineStageDescriptor.h.
        (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):
        * platform/graphics/gpu/GPURenderPipelineDescriptor.h:
        (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
        * platform/graphics/gpu/GPUTexture.h:
        (WebCore::GPUTexture::isCopySource const):
        (WebCore::GPUTexture::isCopyDestination const):
        (WebCore::GPUTexture::isReadOnly const):
        (WebCore::GPUTexture::isTransferSource const): Deleted.
        (WebCore::GPUTexture::isTransferDestination const): Deleted.
        * platform/graphics/gpu/GPUTextureUsage.h:
        * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
        (WebCore::GPUBindGroupLayout::tryCreate):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::GPUBindGroup::tryCreate):
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
        (WebCore::GPUCommandBuffer::copyBufferToBuffer):
        (WebCore::GPUCommandBuffer::copyBufferToTexture):
        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
        (WebCore::GPUCommandBuffer::copyTextureToTexture):
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):
        * platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp:
        (WebCore::convertShaderStageFlags):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::mtlColorWriteMaskForGPUColorWriteFlags):
        (WebCore::trySetFunctions):
        * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
        (WebCore::mtlTextureUsageForGPUTextureUsageFlags):

2019-09-06  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction
        https://bugs.webkit.org/show_bug.cgi?id=201402

        Reviewed by Youenn Fablet and Daniel Bates.

        Add the static functions resolvePromises() and rejectPromises(). These 
        functions take an lvalue reference to a Vector of promises. Inside them,
        the lvalue reference argument are exchanged with an empty Vector of
        promises then the promises are processed. This clears m_decodingPromises
        and fixes the leak.

        Add an internal API which returns the count of the pending promises of
        an HTMLImageElement. This internal API will be used in the attached test.

        Test: fast/images/decode-resolve-reject-no-leak.html

        * html/HTMLImageElement.h:
        (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const):
        * loader/ImageLoader.cpp:
        (WebCore::resolvePromises):
        ImageLoader::decode() calls BitmapImage::decode() and moves m_decodingPromises
        in capture. When decoding finishes, this function is called to resolve the
        promises. But ImageLoader might get deleted before the image decoding
        finishes. So this function has to be static.

        (WebCore::rejectPromises):
        (WebCore::ImageLoader::resolveDecodePromises):
        (WebCore::ImageLoader::rejectDecodePromises):
        (WebCore::ImageLoader::notifyFinished):
        (WebCore::ImageLoader::decode):
        (WebCore::resolveDecodePromises): Deleted.
        (WebCore::rejectDecodePromises): Deleted.
        * loader/ImageLoader.h:
        (WebCore::ImageLoader::pendingDecodePromisesCountForTesting const):
        * testing/Internals.cpp:
        (WebCore::Internals::imagePendingDecodePromisesCountForTesting):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-09-06  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Prefer null namespace 'href' over 'xlink:href' on SVG elements
        https://bugs.webkit.org/show_bug.cgi?id=195802

        Reviewed by Youenn Fablet.

        -- When the attribute "href" is set, its value is always reflected in
           SVGURIReference::m_href.

        -- When the attribute "href" is removed, the value of the attribute
           "xlink:href" is always reflected in SVGURIReference::m_href.

        -- When the "xlink:href" is set, its value is reflected in
           SVGURIReference::m_href only if the attribute "href" is not set.

        Tests: svg/custom/href-xlink-href-gradient-element-expected.svg
               svg/custom/href-xlink-href-gradient-element.svg
               svg/custom/href-xlink-href-use-element-expected.svg
               svg/custom/href-xlink-href-use-element.svg

        * svg/SVGURIReference.cpp:
        (WebCore::SVGURIReference::parseAttribute):

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

        [LFC][TFC] Set computed row width.
        https://bugs.webkit.org/show_bug.cgi?id=201533
        <rdar://problem/55098828>

        Reviewed by Antti Koivisto.

        Decouple cell box layout/display box setup and set the computed row width.    

        * layout/Verification.cpp:
        (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout):

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

        [LFC] A formatting context root is always a containing block for relative: static boxes.
        https://bugs.webkit.org/show_bug.cgi?id=201554
        <rdar://problem/55123295>

        Reviewed by Antti Koivisto.

        "For other elements, if the element's position is 'relative' or 'static', the containing block is formed by the content
        edge of the nearest ancestor box that is a block container or which establishes a formatting context."

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::containingBlock const):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

2019-09-06  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: use SQL COUNT statement for count operation
        https://bugs.webkit.org/show_bug.cgi?id=201465

        Reviewed by Geoffrey Garen.

        We did count operation by moving objectStore/index iterator from begin to end and counting the steps. We can
        utilize the SQL COUNT statement, and improve the performance further by caching the statement.

        Tested on release build minibrowser. Without the change, the mean time to complete one iteration in 
        PerformanceTests/IndexedDB/basic/index-count.html and PerformanceTests/IndexedDB/basic/objectStore-count.html is
        about 50ms. With the change it is about 2ms.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
        (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement):
        (WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:

2019-09-06  Alex Christensen  <achristensen@webkit.org>

        When disabling legacy private browsing for testing, change the SessionID back to what it was, not the defaultSessionID
        https://bugs.webkit.org/show_bug.cgi?id=201480

        Reviewed by Youenn Fablet.

        No change in behavior, but this blocks bug 200050 which will make WebKitTestRunner use a persistent, non-default session.
        Without this change, that change causes lots of test failures because we are switching from the legacy private browsing session
        to the default session instead of the session we were using.

        * page/Page.cpp:
        (WebCore::Page::enableLegacyPrivateBrowsing): Deleted.
        * page/Page.h:
        * page/PageGroup.cpp:
        (WebCore::PageGroup::addPage):
        (WebCore::PageGroup::setSessionIDForTesting):
        (WebCore::PageGroup::enableLegacyPrivateBrowsingForTesting): Deleted.
        * page/PageGroup.h:
        * storage/StorageNamespaceProvider.cpp:
        (WebCore::StorageNamespaceProvider::setSessionIDForTesting):
        (WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): Deleted.
        * storage/StorageNamespaceProvider.h:

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

        Remove MediaStreamPrivate::scheduleDeferredTask
        https://bugs.webkit.org/show_bug.cgi?id=200975

        Reviewed by Eric Carlson.

        All calls to scheduleDeferredTask are done on the main thread.
        This was initially done to trigger less reconfiguration.
        But this makes the implementation significantly more complex.

        For instance, we have to wait for the document to update its media state
        and send it to UIProcess before calling the allow completion handler.

        Covered by existing tests.

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::MediaStream):
        Make sure to update the document media state once the tracks have been added, similarly to the other constructor.
        This ensures the document media state is computed with the new MediaStreamTrack.
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::isMediaStreamCorrectlyStarted):
        (WebCore::UserMediaRequest::allow):
        (WebCore::UserMediaRequest::stop):
        (WebCore::UserMediaRequest::mediaStreamDidFail):
        * Modules/mediastream/UserMediaRequest.h:
        * page/MediaProducer.h:
        (WebCore::MediaProducer::isCapturing):
        Make sure to include getDisplayMedia as part of capture check.
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::trackMutedChanged):
        (WebCore::MediaStreamPrivate::trackEnabledChanged):
        (WebCore::MediaStreamPrivate::trackStarted):
        (WebCore::MediaStreamPrivate::trackEnded):
        * platform/mediastream/MediaStreamPrivate.h:

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

        Implement MathML DOM
        https://bugs.webkit.org/show_bug.cgi?id=200470

        Reviewed by Ryosuke Niwa.

        Expose MathML DOM as specified here [1].

        [1] https://mathml-refresh.github.io/mathml-core/#dom-mathmlelement

        Tests: imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative.html
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-dynamic.tentative.html
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/css-inline-style-interface.tentative.html
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative.html
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/integration-point-4.html
               imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html
               mathml/focus-event-handling.html
               mathml/tabindex-order.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSElementCustom.cpp:
        (WebCore::createNewElementWrapper):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::createWrapperInline):
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::parseAttribute):
        * mathml/MathMLElement.idl: Copied from Source/WebCore/html/HTMLOrForeignElement.idl.
        * mathml/MathMLMathElement.idl: Copied from Source/WebCore/html/HTMLOrForeignElement.idl.
        * mathml/mathtags.in:

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

        [GStreamer] YUV buffers on iMX platforms have to be treated as RGBA
        https://bugs.webkit.org/show_bug.cgi?id=201537

        Reviewed by Philippe Normand.

        The imxvpudecoder element on iMX platforms decodes YUV data in a
        platform-specific way, gathering the YUV data in a single texture and
        then relying on the sampler in the Vivante graphics drivers to
        automagically decode that YUV data into RGBA values.

        To correctly display such decoded data, we have to represent that
        single texture as an RGBA texture, even when the GStreamer buffer is
        crafted as containing planar YUV data.

        * platform/graphics/gstreamer/GStreamerCommon.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::platformLayerBuffer):
        (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
        (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
        (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

2019-09-06  Andres Gonzalez  <andresg_22@apple.com>

        AccessibilityRenderObject::setSelectedTextRange fails to set the selection passed an empty line.
        https://bugs.webkit.org/show_bug.cgi?id=201518
        <rdar://problem/54835122>

        Reviewed by Ryosuke Niwa.

        Test: accessibility/set-selected-text-range-after-newline.html

        In the case of an empty line, the CharacterIterator range start and end
        were not equal, thus we were not advancing the iterator and returning
        the iterator range end, which is not correct. With this change we are
        always advancing the iterator if its text is just '\n'. This covers all
        the cases we fixed before plus empty lines.

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

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

        [Win] Add support for MouseEvent.buttons
        https://bugs.webkit.org/show_bug.cgi?id=201445

        Reviewed by Brent Fulgham.

        Spec: <https://www.w3.org/TR/uievents/#dom-mouseevent-buttons>

        * platform/win/GDIUtilities.h:
        (buttonsForEvent): Added.
        * platform/win/PlatformMouseEventWin.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        Set m_buttons.

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

        [Win] Support Per-Monitor (V2) DPI Awareness
        https://bugs.webkit.org/show_bug.cgi?id=201450

        Reviewed by Don Olmstead.

        * platform/win/GDIUtilities.cpp:
        (WebCore::deviceScaleFactorForWindow): Use GetDpiForWindow if available by using soft linking.

2019-09-05  Charlie Turner  <cturner@igalia.com>

        [EME] Introduce a Proxy CDM for thread-safe access to CDM instances from background decryption threads
        https://bugs.webkit.org/show_bug.cgi?id=201339

        Reviewed by Xabier Rodriguez-Calvar.

        Covered by existing tests.

        * platform/encryptedmedia/CDMInstance.h:
        * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
        (WebCore::isolatedKey):
        (WebCore::ProxyCDMClearKey::isolatedKeys const):
        (WebCore::CDMInstanceClearKey::CDMInstanceClearKey):
        * platform/encryptedmedia/clearkey/CDMClearKey.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
        (handleKeyResponse):
        (findAndSetKey):
        (decrypt):
        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
        (isCDMInstanceAvailable):
        (sinkEventHandler):
        (setContext):
        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
        * testing/MockCDMFactory.cpp:
        (WebCore::MockCDMInstance::proxyCDM const):
        * testing/MockCDMFactory.h:

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

        [LFC] LayoutState should not need the initial containing block
        https://bugs.webkit.org/show_bug.cgi?id=201511
        <rdar://problem/55079241>

        Reviewed by Antti Koivisto.

        Throw-away layouts should just be able to initialize a dedicated LayoutState without passing in the ICB.

        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::markNeedsUpdate):
        (WebCore::Layout::LayoutState::run):
        (WebCore::Layout::LayoutState::LayoutState): Deleted.
        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::initialContainingBlock const): Deleted.
        * layout/Verification.cpp:
        (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
        * layout/floats/FloatingContext.cpp: Fix a (very sad)typo.
        (WebCore::Layout::FloatingContext::constraints const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):

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

        [WebGPU] Implement GPUUncapturedErrorEvent
        https://bugs.webkit.org/show_bug.cgi?id=199676

        Reviewed by Dean Jackson.

        Implement GPUUncapturedErrorEvent and "uncapturederror" event name.
        Add the onuncapturederror EventHandler attribute to GPUDevice.

        Test: webgpu/uncaptured-errors.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Modules/webgpu/GPUUncapturedErrorEvent.cpp:
        (WebCore::GPUUncapturedErrorEvent::create):
        (WebCore::GPUUncapturedErrorEvent::GPUUncapturedErrorEvent):
        (WebCore::GPUUncapturedErrorEvent::eventInterface const):
        * Modules/webgpu/GPUUncapturedErrorEvent.h:
        * Modules/webgpu/GPUUncapturedErrorEvent.idl:
        * Modules/webgpu/WebGPUAdapter.cpp: Must now provide ScriptExecutionContext to any created GPUDevice.
        (WebCore::WebGPUAdapter::requestDevice const):
        * Modules/webgpu/WebGPUAdapter.h:
        * Modules/webgpu/WebGPUAdapter.idl:
        * Modules/webgpu/WebGPUDevice.cpp: Is now an EventTarget.
        (WebCore::WebGPUDevice::tryCreate):
        (WebCore::WebGPUDevice::WebGPUDevice):
        (WebCore::printValidationErrorToConsole):
        (WebCore::WebGPUDevice::dispatchUncapturedError): Events should only be fired from the main thread.
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.idl:
        * Modules/webgpu/WebGPUDeviceEventHandler.idl:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * dom/EventNames.h:
        * dom/EventNames.in:
        * dom/EventTargetFactory.in:
        * platform/graphics/gpu/GPUError.cpp: GPUErrors can only be created internally; creation should never fail.
        (WebCore::createError):
        * platform/graphics/gpu/GPUError.h:
        * platform/graphics/gpu/GPUErrorScopes.cpp:
        (WebCore::GPUErrorScopes::create):
        (WebCore::GPUErrorScopes::GPUErrorScopes):
        (WebCore::GPUErrorScopes::generateError): Use a callback for now, since GPUErrorScopes is still under platform.
        * platform/graphics/gpu/GPUErrorScopes.h:
        (WebCore::GPUErrorScopes::create): Deleted.

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

        Generate event region for both the main graphics layer and the scrolled contents layer
        https://bugs.webkit.org/show_bug.cgi?id=201487

        Reviewed by Simon Fraser.

        We currently generate region for one of them only. With borders both need it.
        
        Also share more code with painting paths.

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

        Generate region for both layers.

        (WebCore::RenderLayerBacking::paintIntoLayer):

        Add event region context parameter so we can use this function for event region update too.

        * rendering/RenderLayerBacking.h:

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

        REGRESSION (iOS 13): Bulleted list copied from Notes to Mail results in Times New Roman
        https://bugs.webkit.org/show_bug.cgi?id=201490

        Reviewed by Daniel Bates.

        The bug was caused by an element in the pasted content not having any explicit font name resolving
        to use the font-family value of `-webkit-standard`. When such an inline style is inserted into
        Mail's WKWebView which sets a different font family, ReplaceSelectionCommand would fail to strip away,
        making the pasted content using the default font family of Times New Roman.

        Fixed the bug by stripping away font-family set to -webkit-standard in the sanitization document
        since that's indicative of the pasted content not having any font family being specified.

        In the future, we should consider making regular copy (as opposed to the copy for sanitization)
        resolve generic font family names to concrete font names since different WKWebView might be using
        different concrete font names. Unfortuantely, such a change is quite involved and risky since various
        paste side code in EditingStyle that removes redundant inline styles (i.e. redundant `font-family`)
        need to be aware of this special font family resolution.

        Tests: editing/pasteboard/paste-cocoa-writer-markup-with-webkit-standard-font-family.html
               PasteHTML.DoesNotAddStandardFontFamily

        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
        (WebCore::EditingStyle::wrappingStyleForSerialization):
        (WebCore::familyNameFromCSSPrimitiveValue): Added.
        (WebCore::loneFontFamilyName): Extracted from usesForbiddenSystemFontAsOnlyFontFamilyName. Fixed
        a bug that it was not handling the case when `font-family` property's value is a CSSPrimitiveValue
        instead of a CSSValueList.
        (WebCore::usesForbiddenSystemFontAsOnlyFontFamilyName): Deleted.
        (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): Remove `font-family` property when
        StandardFontFamilySerializationMode::Strip is specified and its value is `-webkit-standard`.
        * editing/EditingStyle.h:
        * editing/markup.cpp:
        (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Added
        StandardFontFamilySerializationMode as an argument.
        (WebCore::StyledMarkupAccumulator::appendStartTag):
        (WebCore::StyledMarkupAccumulator::serializeNodes):
        (WebCore::serializePreservingVisualAppearanceInternal): Ditto.
        (WebCore::serializePreservingVisualAppearance): Use StandardFontFamilySerializationMode::Keep
        to preserve the pre-existing behavior.
        (WebCore::sanitizedMarkupForFragmentInDocument): Use StandardFontFamilySerializationMode::Strip
        as this is the code used by sanitization code.

2019-09-05  Chris Fleizach  <cfleizach@apple.com>

        AX: children cache are not re-computed if tab index is removed
        https://bugs.webkit.org/show_bug.cgi?id=201502

        Reviewed by Zalan Bujtas.

        Test: accessibility/tabindex-removed.html

        If the tabindex changes, it can potentially affect whether an element is accessible. If we don't update the children cache
        information can be stale and lead to incorrect navigation with VoiceOver.

        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::handleAttributeChange):

2019-09-05  Konstantin Tokarev  <annulen@yandex.ru>

        Don't call PlatformMediaSessionManager methods when neither VIDEO nor WEB_AUDIO is enabled
        https://bugs.webkit.org/show_bug.cgi?id=201508

        Reviewed by Jer Noble.

        Definitions of these methods are guarded with #if ENABLE(VIDEO) || ENABLE(WEB_AUDIO),
        so calling them causes linking errors.

        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setShouldDeactivateAudioSession):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::processWillSuspend):
        (WebCore::Internals::processDidResume):
        (WebCore::Internals::setIsPlayingToAutomotiveHeadUnit):

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

        Fix implicit conversion that loses precision
        https://bugs.webkit.org/show_bug.cgi?id=201476
        <rdar://problem/55043129>

        Reviewed by Youenn Fablet, Alex Christensen.

        Building for watchOS results in the following error:

            .../Source/WebCore/fileapi/NetworkSendQueue.cpp:66:42: error: implicit conversion loses integer precision: 'unsigned long long' to 'unsigned int' [-Werror,-Wshorten-64-to-32]
                    enqueue(JSC::ArrayBuffer::create(byteLength, 1), 0, 0);

        Fix this by replacing byteLength (which is known to be zero at this
        point) with 0U.

        No new tests -- no new or changed functionality.

        * fileapi/NetworkSendQueue.cpp:
        (WebCore::NetworkSendQueue::enqueue):

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

        Introduce WorkerSWClientConnection to make SWClientConnection mono-thread
        https://bugs.webkit.org/show_bug.cgi?id=201430

        Reviewed by Alex Christensen.

        Make SWClientConnection RefCounted.
        Add a WorkerSWClientConnection dedicated to be used by worker/service worker contexts.
        Simplify ServiceWorkerContainer logic based on this refactoring.

        Covered by existing tests.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::swClientConnection):
        * workers/WorkerGlobalScope.h:
        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::scheduleJob):
        (WebCore::SWClientConnection::failedFetchingScript):
        (WebCore::SWClientConnection::postTaskForJob):
        * workers/service/SWClientConnection.h:
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::mainThreadConnection):
        (WebCore::ServiceWorkerContainer::ready):
        (WebCore::ServiceWorkerContainer::scheduleJob):
        (WebCore::ServiceWorkerContainer::getRegistration):
        (WebCore::ServiceWorkerContainer::updateRegistrationState):
        (WebCore::ServiceWorkerContainer::getRegistrations):
        (WebCore::ServiceWorkerContainer::notifyRegistrationIsSettled):
        (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
        (WebCore::ServiceWorkerContainer::notifyFailedFetchingScript):
        (WebCore::ServiceWorkerContainer::ensureSWClientConnection):
        (WebCore::ServiceWorkerContainer::stop):
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerFetchResult.h:
        (WebCore::ServiceWorkerFetchResult::isolatedCopy const):
        * workers/service/WorkerSWClientConnection.cpp: Added.
        (WebCore::WorkerSWClientConnection::WorkerSWClientConnection):
        (WebCore::WorkerSWClientConnection::~WorkerSWClientConnection):
        (WebCore::WorkerSWClientConnection::matchRegistration):
        (WebCore::WorkerSWClientConnection::getRegistrations):
        (WebCore::WorkerSWClientConnection::whenRegistrationReady):
        (WebCore::WorkerSWClientConnection::addServiceWorkerRegistrationInServer):
        (WebCore::WorkerSWClientConnection::removeServiceWorkerRegistrationInServer):
        (WebCore::WorkerSWClientConnection::didResolveRegistrationPromise):
        (WebCore::WorkerSWClientConnection::postMessageToServiceWorker):
        (WebCore::WorkerSWClientConnection::serverConnectionIdentifier const):
        (WebCore::WorkerSWClientConnection::mayHaveServiceWorkerRegisteredForOrigin const):
        (WebCore::WorkerSWClientConnection::syncTerminateWorker):
        (WebCore::WorkerSWClientConnection::registerServiceWorkerClient):
        (WebCore::WorkerSWClientConnection::unregisterServiceWorkerClient):
        (WebCore::WorkerSWClientConnection::finishFetchingScriptInServer):
        (WebCore::WorkerSWClientConnection::isThrottleable const):
        (WebCore::WorkerSWClientConnection::updateThrottleState):
        (WebCore::WorkerSWClientConnection::scheduleJob):
        (WebCore::WorkerSWClientConnection::scheduleJobInServer):
        * workers/service/WorkerSWClientConnection.h: Added.

2019-09-04  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Win][Clang] InspectorNetworkAgent.cpp(1122,20): error: cannot decompose this type; 'std::tuple_size<const WTF::KeyValuePair<WTF::String, WTF::RefPtr<WTF::JSONImpl::Value, WTF::DumbPtrTraits<WTF::JSONImpl::Value> > >>::value' is not a valid integral const
        https://bugs.webkit.org/show_bug.cgi?id=201489

        Unreviewed build fix for clang-cl.

        clang-cl 8 can't use a structured binding for a const struct.

        No behavior change.

        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::interceptWithResponse): Not to use a structured binding for a const struct.

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

        Unreviewed, another build fix after r249501.

        * loader/EmptyFrameLoaderClient.h:

2019-09-04  Timothy Hatcher  <timothy@apple.com>

        Mail appears to be double inverting code copied from Notes, Xcode, or Terminal.
        https://bugs.webkit.org/show_bug.cgi?id=201368
        rdar://problem/40529867

        Reviewed by Ryosuke Niwa.

        Dark mode content that is pasted should have the inline styles inverse color
        transformed by the color filter to match the color filtered document contents.

        Layout Test: editing/pasteboard/paste-dark-mode-color-filtered.html
        API Tests: PasteHTML.TransformColorsOfDarkContent, PasteHTML.DoesNotTransformColorsOfLightContent,
            PasteRTFD.TransformColorsOfDarkContent, PasteRTFD.DoesNotTransformColorsOfLightContent

        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::inverseTransformColorIfNeeded): Added caret-color to the transformed properties.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::fragmentNeedsColorTransformed): Added.
        (WebCore::ReplaceSelectionCommand::inverseTransformColor): Added.
        (WebCore::ReplaceSelectionCommand::doApply): Call fragmentNeedsColorTransformed() and inverseTransformColor().
        * editing/ReplaceSelectionCommand.h:

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

        Unreviewed, drop extra whitespace added in r249515.

        * loader/EmptyFrameLoaderClient.h:

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

        Unreviewed build fix after r249501.

        r249501 seems to have exposed the fact that EmptyFrameLoaderClient.h is missing a #pragma once.

        * loader/EmptyFrameLoaderClient.h:

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

        REGRESSION (iOS 13): If an overflow:hidden with a non-zero scroll position is toggled to overflow:scroll, some other scroll causes its scroll position to get reset
        https://bugs.webkit.org/show_bug.cgi?id=201528
        rdar://problem/55044885

        Reviewed by Frédéric Wang.
        
        If, when an overflow scrolling node is created, the scroller has non-zero scroll
        position (for example, via toggling to overflow:hidden, setting scrollTop, then toggling
        to overflow:scroll), then on the next update its scroll position will reset back to zero.

        The bug was that newly created ScrollingTreeScrollingNodes didn't set m_currentScrollPosition
        to the scroll position coming from the state node, so a subsequent update could cause
        the 0,0 currentScrollPosition to get applied. If we're making a new node, and there's no
        requestedScrollPosition, then initialize m_currentScrollPosition.

        Test: scrollingcoordinator/ios/scroller-initial-scroll-position.html

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
        * page/scrolling/ScrollingTreeScrollingNode.h:

2019-09-04  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Make Promise implementation faster
        https://bugs.webkit.org/show_bug.cgi?id=200898

        Reviewed by Saam Barati.

        * Modules/streams/ReadableStream.js:
        (pipeThrough):
        * Modules/streams/ReadableStreamInternals.js:
        (readableStreamError):
        (readableStreamReaderGenericRelease):

2019-09-04  Tim Horton  <timothy_horton@apple.com>

        Line artifacts in note body after viewing note with <attachment>s
        https://bugs.webkit.org/show_bug.cgi?id=201474
        <rdar://problem/51306108>

        Reviewed by Simon Fraser.

        Test: fast/attachment/attachment-border-should-stay-inside-attachment.html

        * rendering/RenderThemeIOS.mm:
        (WebCore::attachmentBorderPath):
        (WebCore::paintAttachmentBorder):
        Inset the border rect by half the width, so that <attachment> doesn't
        paint out-of-bounds.

2019-09-04  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Local Overrides - Provide substitution content for resource loads (URL based)
        https://bugs.webkit.org/show_bug.cgi?id=201262
        <rdar://problem/13108764>

        Reviewed by Devin Rousso.

        Tests: http/tests/inspector/network/local-resource-override-basic.html
               http/tests/inspector/network/local-resource-override-main-resource.html
               http/tests/inspector/network/local-resource-override-script-tag.html
               http/tests/inspector/network/resource-response-inspector-override.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * Headers.cmake:
        New files.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willInterceptRequestImpl):
        (WebCore::InspectorInstrumentation::shouldInterceptResponseImpl):
        (WebCore::InspectorInstrumentation::interceptResponseImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::hasFrontends):
        (WebCore::InspectorInstrumentation::willInterceptRequest):
        (WebCore::InspectorInstrumentation::shouldInterceptResponse):
        (WebCore::InspectorInstrumentation::interceptResponse):
        (WebCore::InspectorInstrumentation::frontendCreated):
        (WebCore::InspectorInstrumentation::frontendDeleted):
        * inspector/InspectorInstrumentationPublic.cpp:
        * inspector/InspectorInstrumentationPublic.h:
        * inspector/InspectorInstrumentationWebKit.cpp:
        (WebCore::InspectorInstrumentationWebKit::shouldInterceptResponseInternal):
        (WebCore::InspectorInstrumentationWebKit::interceptResponseInternal):
        * inspector/InspectorInstrumentationWebKit.h: Added.
        (WebCore::InspectorInstrumentationWebKit::shouldInterceptResponse):
        (WebCore::InspectorInstrumentationWebKit::interceptResponse):
        Provide a slim InspectorInstrumentation API that can be used in the WebKit
        layer without a ton of includes.

        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::responseSource):
        (WebCore::InspectorNetworkAgent::disable):
        (WebCore::InspectorNetworkAgent::continuePendingResponses):
        (WebCore::InspectorNetworkAgent::setInterceptionEnabled):
        (WebCore::InspectorNetworkAgent::addInterception):
        (WebCore::InspectorNetworkAgent::removeInterception):
        (WebCore::InspectorNetworkAgent::willInterceptRequest):
        (WebCore::InspectorNetworkAgent::shouldInterceptResponse):
        (WebCore::InspectorNetworkAgent::interceptResponse):
        (WebCore::InspectorNetworkAgent::interceptContinue):
        (WebCore::InspectorNetworkAgent::interceptWithResponse):
        Manage a list of URLs that will be intercepted and send
        intercepts to an active frontend for response content.

        * inspector/agents/InspectorNetworkAgent.h:
        (WebCore::InspectorNetworkAgent::PendingInterceptResponse::PendingInterceptResponse):
        (WebCore::InspectorNetworkAgent::PendingInterceptResponse::~PendingInterceptResponse):
        (WebCore::InspectorNetworkAgent::PendingInterceptResponse::originalResponse):
        (WebCore::InspectorNetworkAgent::PendingInterceptResponse::respondWithOriginalResponse):
        (WebCore::InspectorNetworkAgent::PendingInterceptResponse::respond):
        Callback for an eventual intercept response.

        * platform/network/ResourceResponseBase.h:
        New ResponseSource - Inspector Override.

        * loader/DocumentLoader.cpp:
        (WebCore::logResourceResponseSource):
        * testing/Internals.cpp:
        (WebCore::responseSourceToString):
        Handle new response sources.

        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        (WebCore::CachedResourceLoader::preload):
        Avoid preloading or using the cache for URLs that would be intercepted
        by an active Inspector frontend.

        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::remove):
        Assertion to help detect if we ever get override content into the MemoryCache.

        * loader/ResourceLoader.h:
        (WebCore::DocumentLoader::responseReceived):
        * loader/ResourceLoader.cpp:
        Fix typos.

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

        Expose WebPageProxy identifier to the Network Process
        https://bugs.webkit.org/show_bug.cgi?id=201467

        Reviewed by Geoffrey Garen.

        * loader/EmptyFrameLoaderClient.h:
        (isType):
        * loader/FrameLoaderClient.h:

2019-09-04  Alex Christensen  <achristensen@webkit.org>

        Remove unused SPI that accesses MemoryCache directly
        https://bugs.webkit.org/show_bug.cgi?id=201468

        Reviewed by Tim Horton.

        * loader/cache/MemoryCache.cpp:
        (WebCore::dummyCachedImageClient): Deleted.
        (WebCore::MemoryCache::addImageToCache): Deleted.
        (WebCore::MemoryCache::removeImageFromCache): Deleted.
        * loader/cache/MemoryCache.h:

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

        [LFC] Assert on FormattingContext escaping
        https://bugs.webkit.org/show_bug.cgi?id=201464
        <rdar://problem/55029574>

        Reviewed by Antti Koivisto.

        This patch asserts on accidental formatting context escaping. This is only a correctness issue at the moment,
        since we don't support multithreaded subtree layout yet.
        Normally we should not need to access display boxes in different formatting contexts during layout, but there are a few, justified cases when it is required.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const):
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const): Deleted.
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
        (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        [LFC] FormattingContext::map* functions are too generic.
        https://bugs.webkit.org/show_bug.cgi?id=201447
        <rdar://problem/55005733>

        Reviewed by Antti Koivisto.

        We don't need such generic mapping functions yet. This patch is also in preparation for
        asserting on formatting context escaping. 

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::mapTopToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapLeftToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapRightToFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::mapLeftToAncestor const): Deleted.
        (WebCore::Layout::FormattingContext::mapRightToAncestor const): Deleted.
        (WebCore::Layout::FormattingContext::mapBoxToAncestor const): Deleted.
        (WebCore::Layout::FormattingContext::mapTopToAncestor const): Deleted.
        (WebCore::Layout::FormattingContext::mapPointToAncestor const): Deleted.
        (WebCore::Layout::FormattingContext::mapPointToDescendent const): Deleted.
        * layout/FormattingContext.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::positionForFloat const):
        (WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
        (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
        (WebCore::Layout::FloatingContext::constraints const):
        (WebCore::Layout::FloatingContext::append):
        (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const):
        (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const):
        (WebCore::Layout::FloatingContext::mapPointFromFormattingContextRootToFloatingStateRoot const):
        (WebCore::Layout::mapToFormattingContextRoot): Deleted.
        * layout/floats/FloatingContext.h:
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        [iPadOS] Unable to change sheets on Airtable.com
        https://bugs.webkit.org/show_bug.cgi?id=201456
        <rdar://problem/51557377>

        Reviewed by Dean Jackson.

        Simulated mouse events are required to be able to manipulate cells and and columns on Airtable.com. However, dispatching a "mousedown" event on
        tabs allowing to pick a different sheet ends up calling preventDefault() and prevent "click" events from being dispatched, which makes it
        impossible to change sheet. We now limit the dispatch of simulated mouse events to the grid.

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

2019-09-04  Youenn Fablet  <youenn@apple.com>

        Abstract out WebSocketChannel message queue
        https://bugs.webkit.org/show_bug.cgi?id=201359

        Reviewed by Alex Christensen.

        Move BlobLoader in its own file.
        Introduce NetworkSendQueue class to handle the sending of messages, some of them being blobs.
        This class ensures that messages will be sent in order, even though blob data is resolved asynchronously.

        Covered by existing tests.

        * Headers.cmake:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * fileapi/BlobLoader.h: Added.
        (WebCore::BlobLoader::BlobLoader):
        (WebCore::BlobLoader::~BlobLoader):
        (WebCore::BlobLoader::didFinishLoading):
        (WebCore::BlobLoader::didFail):
        (WebCore::BlobLoader::complete):
        * fileapi/NetworkSendQueue.cpp: Added.
        (WebCore::NetworkSendQueue::NetworkSendQueue):
        (WebCore::NetworkSendQueue::enqueue):
        (WebCore::NetworkSendQueue::clear):
        (WebCore::NetworkSendQueue::processMessages):
        * fileapi/NetworkSendQueue.h: Added.

2019-09-04  Rob Buis  <rbuis@igalia.com>

        Allow checking whether image was created from JavaScript
        https://bugs.webkit.org/show_bug.cgi?id=200662

        Reviewed by Darin Adler.

        No behavior change.

        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::HTMLImageElement):
        (WebCore::HTMLImageElement::create):
        * html/HTMLImageElement.h:
        (WebCore::HTMLImageElement::createdByParser const):
        * html/HTMLTagNames.in:

2019-09-04  Zan Dobersek  <zdobersek@igalia.com>

        Remove unused ScrollingTreeOverflowScrollProxyNode implementation
        https://bugs.webkit.org/show_bug.cgi?id=201376

        Reviewed by Simon Fraser.

        Remove the unused ScrollingTreeOverflowScrollProxyNode implementation
        and header files that were added in r246723 but are not included in any
        build. Cocoa-specific implementation remains untouched, and other
        scrolling systems should be providing their own (as is the case with
        other types of nodes).

        * page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Removed.
        * page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Removed.

2019-09-04  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Sound is down-pitched when playing video from YLE Areena
        https://bugs.webkit.org/show_bug.cgi?id=201399

        Reviewed by Xabier Rodriguez-Calvar.

        If the FDK-AAC decoder is available, promote it and downrank the
        libav AAC decoders, due to their broken LC support, as reported in:
        https://ffmpeg.org/pipermail/ffmpeg-devel/2019-July/247063.html

        * platform/graphics/gstreamer/GStreamerCommon.cpp:
        (WebCore::initializeGStreamer):

2019-09-04  Pablo Saavedra  <psaavedra@igalia.com>

        [GTK] Build failure in Debian Stable and Ubuntu LTS bots after r249427
        https://bugs.webkit.org/show_bug.cgi?id=201434

        Reviewed by Xabier Rodriguez-Calvar.

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

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

        [macCatalyst] Unable to upload non-image files using drag and drop
        https://bugs.webkit.org/show_bug.cgi?id=201438

        Reviewed by Tim Horton.

        On recent builds of macOS 10.15, NSItemProviders that are produced when dropping files from Finder into a
        macCatalyst app no longer contain `kUTTypeFileURL` as a registered type identifier. This means that the current
        heuristic for figuring out whether or not an item provider can be represented as a file upload is broken, since
        it thinks all dropped content is inline data.

        On iOS, we treat an NSItemProvider as an "uploaded" file as long as it hasn't been explicitly marked as inline
        data, such as a dragged selection from a native text field. However, on macCatalyst, all item providers return
        preferredPresentationStyle of UIPreferredPresentationStyleUnspecified, regardless of the source, so this check
        is useless on macCatalyst since it would consider all dropped content as a file upload (text selections, plain
        URLs, etc.).

        Luckily, NSItemProvider's -suggestedName is now populated in recent macOS builds, which means we have a much
        stronger (and more robust) hint that a dropped item provider is actually a file. For the time being, use this
        instead of always returning `NO`.

        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):

        Make a minor tweak to move the UIPreferredPresentationStyleInline check to shared code, such that when
        <rdar://55002929> is fixed, our code will automatically correctly treat inline item providers that have been
        explicitly marked as such.

2019-09-03  Antti Koivisto  <antti@apple.com>

        Remove redundant painting phase arguments from GraphicsLayerClient functions
        https://bugs.webkit.org/show_bug.cgi?id=201443

        Reviewed by Simon Fraser.

        It is available from the GraphicsLayer.

        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::paintContents):
        * page/PageOverlayController.h:
        * page/mac/ServicesOverlayController.h:
        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::paintContents):
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::paintGraphicsLayerContents):
        * platform/graphics/GraphicsLayerClient.h:
        (WebCore::GraphicsLayerClient::paintContents):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintIntoLayer):
        (WebCore::RenderLayerBacking::paintFlagsForLayer const):

        Factor into a function.

        (WebCore::RenderLayerBacking::paintContents):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::paintContents):
        * rendering/RenderLayerCompositor.h:

2019-09-03  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Implement SampleLevel(), SampleBias(), and SampleGrad()
        https://bugs.webkit.org/show_bug.cgi?id=201385

        Reviewed by Dean Jackson.

        These are used in the Babylon.js demo.

        Tests: webgpu/whlsl/textures-sample-bias.html
               webgpu/whlsl/textures-sample-grad.html
               webgpu/whlsl/textures-sample-level.html

        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::sampleType):
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
        (WebCore::WHLSL::Intrinsics::addFullTexture):
        (WebCore::WHLSL::Intrinsics::addDepthTexture):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-09-03  Chris Dumez  <cdumez@apple.com>

        FrameLoader::FrameProgressTracker::progressCompleted() does not need a pageID
        https://bugs.webkit.org/show_bug.cgi?id=201431

        Reviewed by Antti Koivisto.

        FrameLoader::FrameProgressTracker::progressCompleted() does not need to request a pageID
        from the client. It can merely pass the Page object and the upper layers can very easily
        get the identifier of that page.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameProgressTracker::progressCompleted):
        * loader/LoaderStrategy.h:

2019-09-03  Devin Rousso  <drousso@apple.com>

        REGRESSION (r249078): Flaky crash in com.apple.JavaScriptCore: Inspector::InjectedScriptModule::ensureInjected
        https://bugs.webkit.org/show_bug.cgi?id=201201
        <rdar://problem/54771560>

        Reviewed by Joseph Pecoraro.

        Tests: inspector/debugger/tail-deleted-frames-this-value.html
               inspector/heap/getRemoteObject.html

        * inspector/CommandLineAPIModuleSource.js:
        Avoid executing functions when injecting. Instead, modify the `CommandLineAPI` directly.

2019-09-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Initialize <thead><tbody><tfoot> display boxes.
        https://bugs.webkit.org/show_bug.cgi?id=201235
        <rdar://problem/54807060>

        Reviewed by Antti Koivisto.

        Set them as blank for now.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout const):

2019-09-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floating] Replace all LayoutState::displayBoxForLayoutBox() calls with FormattingContext::displayBoxForLayoutBox()
        https://bugs.webkit.org/show_bug.cgi?id=201414
        <rdar://problem/54963302>

        Reviewed by Antti Koivisto.

        Fix the final LayoutState::displayBoxForLayoutBox() callsites. Now all displayBoxForLayoutBox() calls are directed to the
        established FormattingContext.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::mapHorizontalPositionToAncestor):
        (WebCore::Layout::FormattingContext::mapLeftToAncestor const):
        (WebCore::Layout::FormattingContext::mapRightToAncestor const):
        (WebCore::Layout::FormattingContext::mapBoxToAncestor const):
        (WebCore::Layout::FormattingContext::mapTopToAncestor const):
        (WebCore::Layout::FormattingContext::mapPointToAncestor const):
        (WebCore::Layout::FormattingContext::mapPointToDescendent const):
        (WebCore::Layout::FormattingContext::mapLeftToAncestor): Deleted.
        (WebCore::Layout::FormattingContext::mapRightToAncestor): Deleted.
        (WebCore::Layout::FormattingContext::mapBoxToAncestor): Deleted.
        (WebCore::Layout::FormattingContext::mapTopToAncestor): Deleted.
        (WebCore::Layout::FormattingContext::mapPointToAncestor): Deleted.
        (WebCore::Layout::FormattingContext::mapPointToDescendent): Deleted.
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::root const):
        (WebCore::Layout::FormattingContext::formattingState const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layout):
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::mapToFormattingContextRoot):
        (WebCore::Layout::FloatingContext::FloatingContext):
        (WebCore::Layout::FloatingContext::positionForFloat const):
        (WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
        (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
        (WebCore::Layout::FloatingContext::constraints const):
        (WebCore::Layout::FloatingContext::append):
        * layout/floats/FloatingContext.h:
        (WebCore::Layout::FloatingContext::formattingContext const):
        (WebCore::Layout::FloatingContext::root const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

2019-09-04  Simon Fraser  <simon.fraser@apple.com>

        Cancelled transitions on Google image search leave content with opacity 0 sometimes
        https://bugs.webkit.org/show_bug.cgi?id=201482
        rdar://problem/54921036

        Reviewed by Tim Horton.
        
        If, in a single rendering update, we started an accelerated opacity transition, and then removed
        it, we'd still push the transition onto the CALayer with fillForwards and never remove it, so its
        effects would last forever.

        Fix by making GraphicsLayerCA::removeAnimation() remove animations from the uncomittedAnimations
        list as well.
        
        Also fix layer names in debug; if a layer's primaryLayerID changed, we'd fail to rename the
        CALayer, causing confusion when logging at layer dumps. Fix by adding the layer ID just
        before pushing the name to the platform layer.

        Some drive-by logging cleanup.

        Test: legacy-animation-engine/compositing/transitions/add-remove-transition.html

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::debugName const):
        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::setName):
        (WebCore::GraphicsLayerCA::debugName const):
        (WebCore::GraphicsLayerCA::addAnimation):
        (WebCore::GraphicsLayerCA::pauseAnimation):
        (WebCore::GraphicsLayerCA::seekAnimation):
        (WebCore::GraphicsLayerCA::removeAnimation):
        (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
        (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
        (WebCore::GraphicsLayerCA::updateNames):
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::logLayerInfo):

2019-09-03  Zalan Bujtas  <zalan@apple.com>

        [LFC] FloatingState should not need to query for display boxes.
        https://bugs.webkit.org/show_bug.cgi?id=201408
        <rdar://problem/54958348>

        Reviewed by Antti Koivisto.

        This is in preparation for transitioning the floating codebase to use the formatting context for
        retrieving display boxes.
        FloatingContext should be responsible for adding/removing the new/existing float boxes to the state.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::append):
        (WebCore::Layout::FloatingContext::remove):
        * layout/floats/FloatingContext.h:
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::append):
        (WebCore::Layout::belongsToThisFloatingContext): Deleted.
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::FloatItem::horizontalMargin const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

2019-09-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] Do not pass FloatingState to FloatItem
        https://bugs.webkit.org/show_bug.cgi?id=201406
        <rdar://problem/54957097>

        Reviewed by Antti Koivisto.

        This is in preparation for transitioning the floating codebase to use the formatting context for
        retrieving display boxes. Now FloatItems don't need the FloatingState to compute absolute display boxes.  

        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::FloatItem::FloatItem):
        (WebCore::Layout::FloatingState::append):
        * layout/floats/FloatingState.h:

2019-09-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] Do not pass FloatingState to FloatAvoider/FloatBox
        https://bugs.webkit.org/show_bug.cgi?id=201405
        <rdar://problem/54956381>

        Reviewed by Antti Koivisto.

        This is in preparation for transitioning the floating codebase to use the formatting context for
        retrieving display boxes. Now FloatAvoiders/FloatBoxes don't need the FloatingState to compute absolute display boxes.

        * layout/floats/FloatAvoider.cpp:
        (WebCore::Layout::FloatAvoider::FloatAvoider):
        (WebCore::Layout::FloatAvoider::setHorizontalConstraints):
        (WebCore::Layout::FloatAvoider::initialHorizontalPosition const):
        (WebCore::Layout::FloatAvoider::overflowsContainingBlock const):
        (WebCore::Layout::FloatAvoider::rectInContainingBlock const):
        * layout/floats/FloatAvoider.h:
        (WebCore::Layout::FloatAvoider::floatingState const): Deleted.
        * layout/floats/FloatBox.cpp:
        (WebCore::Layout::FloatBox::FloatBox):
        (WebCore::Layout::FloatBox::initialVerticalPosition const):
        * layout/floats/FloatBox.h:
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::mapToFormattingContextRoot):
        (WebCore::Layout::FloatingContext::positionForFloat const):
        (WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
        * platform/graphics/LayoutPoint.h:
        (WebCore::LayoutPoint::isZero const):

2019-09-03  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
        https://bugs.webkit.org/show_bug.cgi?id=201369
        <rdar://problem/54903724>

        Reviewed by Brent Fulgham.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isSafariViewService):
        Adds a way to detect SafariViewService.

2019-09-03  Simon Fraser  <simon.fraser@apple.com>

        Cache "compositingAncestor" during the compositing updateBackingAndHierarchy() tree walk
        https://bugs.webkit.org/show_bug.cgi?id=201403

        Reviewed by Antti Koivisto.

        Finding a layer's compositingAncestor requires an ancestor tree walk. We can avoid this during
        compositing updates, since we're already in the middle of a paint-order tree walk, and can just
        keep track of the current compositingAncestor on the way down.

        Shaves a few % off time in updateCompositingLayers().

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateConfiguration):
        (WebCore::ComputedOffsets::ComputedOffsets):
        (WebCore::ComputedOffsets::fromAncestorGraphicsLayer):
        (WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const):
        (WebCore::RenderLayerBacking::updateGeometry):
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::UpdateBackingTraversalState::UpdateBackingTraversalState):
        (WebCore::RenderLayerCompositor::UpdateBackingTraversalState::stateForDescendants const):
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
        (WebCore::RenderLayerCompositor::updateLayerCompositingState):
        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
        (WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const):
        (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
        (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
        * rendering/RenderLayerCompositor.h:

2019-09-03  Simon Fraser  <simon.fraser@apple.com>

        Make "clips compositing descendants" an indirect compositing reason
        https://bugs.webkit.org/show_bug.cgi?id=201381

        Reviewed by Antti Koivisto.

        Whether a layer has to composite to clip composited descendants is an "indirect" reason,
        just like having to composite for filters if there's a composited descendant. So add
        IndirectCompositingReason::Clipping, and have computeIndirectCompositingReason() compute this,
        replacing the code that ran in computeCompositingRequirements().

        This is some preparatory cleanup for webkit.org/b/201330.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
        (WebCore::RenderLayerCompositor::reasonsForCompositing const):
        (WebCore::RenderLayerCompositor::computeIndirectCompositingReason const):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-09-03  Zalan Bujtas  <zalan@apple.com>

        [LFC][Floats] Move FloatingState::constraints to FloatingContext
        https://bugs.webkit.org/show_bug.cgi?id=201393
        <rdar://problem/54939361>

        Reviewed by Antti Koivisto.

        This is in preparation for transitioning the floating codebase to use the formatting context for
        retrieving display boxes. Now FloatingContext (just like any other formatting context) holds on to the formatting
        context root.

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layout):
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
        * layout/floats/FloatingContext.cpp:
        (WebCore::Layout::FloatingContext::FloatingContext):
        (WebCore::Layout::FloatingContext::positionForFloat const):
        (WebCore::Layout::FloatingContext::positionForFormattingContextRoot const):
        (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
        (WebCore::Layout::FloatingContext::constraints const):
        * layout/floats/FloatingContext.h:
        (WebCore::Layout::FloatingContext::isEmpty const):
        (WebCore::Layout::FloatingContext::root const):
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::constraints const): Deleted.
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::last const):
        (WebCore::Layout::FloatingState::isEmpty const): Deleted.
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):

2019-09-03  Chris Lord  <clord@igalia.com>

        [GStreamer] Add support to copy YUV video textures into images
        https://bugs.webkit.org/show_bug.cgi?id=200922

        Reviewed by Philippe Normand and Xabier Rodriguez-Calvar.

        Use gst_gl_color_convert to convert to RGB before using ImageGStreamer
        with gstreamer-gl.

        No new tests, not changing behavior.

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

2019-09-03  Chris Lord  <clord@igalia.com>

        [GStreamer] Add support to copy YUV video textures into platform textures
        https://bugs.webkit.org/show_bug.cgi?id=200914

        Reviewed by Xabier Rodriguez-Calvar and Miguel Gomez.

        Enable YUV (including planar and semi-planar) video texture to platform
        texture copy in VideoTextureCopierGStreamer.

        No new tests, not changing behavior.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::GstVideoFrameHolder::platformLayerBuffer):
        (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
        (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
        (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
        (WebCore::TextureMapperPlatformLayerBuffer::textureVariant):

2019-09-03  Zan Dobersek  <zdobersek@igalia.com>  and  Chris Lord  <clord@igalia.com>

        [Texmap][GStreamer] Add support to upload more color formats into the texture
        https://bugs.webkit.org/show_bug.cgi?id=132869

        Reviewed by Xabier Rodriguez-Calvar.

        Support non-interleaved YUV color for gstreamer-gl

        This adds direct support for rendering I420, I444, YV12, YV21, Y42B,
        NV12, NV21 and VUYA color formats using GLGL shaders when using
        gstreamer-gl for video rendering. This avoids a surface copy on the GPU
        in those cases.

        No new tests, not changing behavior.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
        (WebCore::GstVideoFrameHolder::waitForCPUSync):
        (WebCore::GstVideoFrameHolder::hasMappedTextures const):
        (WebCore::GstVideoFrameHolder::videoFrame const):
        (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
        (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
        * platform/graphics/texmap/TextureMapperGL.cpp:
        (WebCore::optionsForFilterType):
        (WebCore::TextureMapperGL::drawTexture):
        (WebCore::prepareTransformationMatrixWithFlags):
        (WebCore::TextureMapperGL::drawTexturePlanarYUV):
        (WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
        (WebCore::TextureMapperGL::drawTexturePackedYUV):
        (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
        * platform/graphics/texmap/TextureMapperGL.h:
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
        (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
        (WebCore::TextureMapperPlatformLayerBuffer::~TextureMapperPlatformLayerBuffer):
        (WebCore::TextureMapperPlatformLayerBuffer::clone):
        (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
        * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
        (WebCore::TextureMapperShaderProgram::create):
        * platform/graphics/texmap/TextureMapperShaderProgram.h:

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

        Remove support for load/error on link=prefetch
        https://bugs.webkit.org/show_bug.cgi?id=201348

        Reviewed by Youenn Fablet.

        Remove support for firing load/error on link=prefetch
        to address tracking concerns.

        Tests: http/wpt/prefetch/load-events-dynamic.html
               http/wpt/prefetch/load-events.html

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::linkLoaded):
        (WebCore::HTMLLinkElement::linkLoadingErrored):
        * html/HTMLLinkElement.h:
        * testing/Internals.cpp:
        (WebCore::Internals::addPrefetchLoadEventListener):

2019-09-02  Yusuke Suzuki  <ysuzuki@apple.com>

        [WebCore] Resource usage accounting should accept non KERN_SUCCESS
        https://bugs.webkit.org/show_bug.cgi?id=201409

        Reviewed by Andreas Kling.

        While iterating threads, we are not suspending these threads. Underlying threads can have gone
        at any time and we will get non KERN_SUCCESS error code when a thread has gone. We should ignore
        these threads.

        * page/cocoa/ResourceUsageThreadCocoa.mm:
        (WebCore::threadInfos):

2019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>

        [SVG] fragment-only url 'url(#fragment)' should be resolved against the current document with regardless to HTML <base> element
        https://bugs.webkit.org/show_bug.cgi?id=189499
        <rdar://problem/44466206>

        Reviewed by Said Abou-Hallawa.

        Fragment-only URL 'url(#fragment)' should be resolved against the
        current document even if HTML <base> element is specified.
        Spec: <https://drafts.csswg.org/css-values/#local-urls>

        Tests: css3/filters/effect-reference-local-url-with-base.html
               css3/masking/clip-path-reference-local-url-with-base.html
               http/tests/svg/local-url-with-valid-base-and-resource.html
               svg/animations/local-url-target-reference.html
               svg/custom/local-url-reference-clip-path.html
               svg/custom/local-url-reference-fill.html
               svg/custom/local-url-reference-filter.html
               svg/custom/local-url-reference-marker.html
               svg/custom/local-url-reference-mask.html
               svg/custom/local-url-reference-pattern.html
               svg/custom/local-url-reference-radial-gradient.html
               svg/custom/local-url-reference-srcdoc.html
               svg/custom/local-url-reference-stroke.html
               svg/custom/local-url-reference-use.html
               svg/text/textpath-local-url-reference.html

        * svg/SVGURIReference.cpp:
        (WebCore::SVGURIReference::fragmentIdentifierFromIRIString): Return the fragment if the URL starts with '#'.

2019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Win] Remove a unused PlatformWheelEvent constructor
        https://bugs.webkit.org/show_bug.cgi?id=201398

        Reviewed by Don Olmstead.

        No behavior change.

        * platform/PlatformWheelEvent.h:
        * platform/win/WheelEventWin.cpp:
        Removed a unused PlatformWheelEvent constructor.

2019-09-02  Brent Fulgham  <bfulgham@apple.com>

        [FTW] NativeImagePtr is drawn with invalid scaling
        https://bugs.webkit.org/show_bug.cgi?id=201391

        Reviewed by Don Olmstead.

        The current implementation of FTW improperly applies scaling factors to native images,
        resulting in blocky images (in some cases).

        This patch corrects the handling of native images, corrects a bug in bitmap render
        context scaling, and retrieves more data from the ImageDecoder's metadata system.

        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::createBitmapRenderTargetOfSize): Supply an appropriately sized
        pixel dimension for non-unity scale factors.
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::ImageBuffer): Include the scale factor when creating a
        bitmap render target.
        * platform/graphics/win/ImageDecoderDirect2D.cpp:
        (WebCore::ImageDecoderDirect2D::frameOrientationAtIndex const): Read the orientation
        data form the image metadata.
        (WebCore::ImageDecoderDirect2D::frameAllowSubsamplingAtIndex const): Always return
        true, to match the CG implementation.
        (WebCore::ImageDecoderDirect2D::frameHasAlphaAtIndex const): Correct to match the
        behavior of CG.
        * platform/graphics/win/NativeImageDirect2D.cpp:
        (WebCore::drawNativeImage): Pass through the Direct2DOperations helper method, which
        handles scaling and subsampling properly.

2019-09-02  Youenn Fablet  <youenn@apple.com>

        Introduce WorkerMessagePortChannelRegistry
        https://bugs.webkit.org/show_bug.cgi?id=201333

        Reviewed by Alex Christensen.

        This patch introduces a dedicated registry for workers.
        This registry will hop to the main thread and use the
        regular main thread registry to do the actual processing.

        Covered by existing tests.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::messagePortChannelProvider):
        * dom/Document.h:
        * dom/MessageChannel.cpp:
        (WebCore::MessageChannel::MessageChannel):
        * dom/MessagePort.cpp:
        (WebCore::MessagePort::entangle):
        (WebCore::MessagePort::postMessage):
        (WebCore::MessagePort::disentangle):
        (WebCore::MessagePort::close):
        (WebCore::MessagePort::dispatchMessages):
        (WebCore::MessagePort::hasPendingActivity const):
        * dom/messageports/MessagePortChannel.cpp:
        (WebCore::MessagePortChannel::takeAllMessagesForPort):
        (WebCore::MessagePortChannel::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannel.h:
        * dom/messageports/MessagePortChannelProvider.cpp:
        (WebCore::MessagePortChannelProvider::singleton):
        (WebCore::MessagePortChannelProvider::fromContext):
        * dom/messageports/MessagePortChannelProvider.h:
        * dom/messageports/MessagePortChannelProviderImpl.cpp:
        (WebCore::MessagePortChannelProviderImpl::takeAllMessagesForPort):
        (WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannelProviderImpl.h:
        * dom/messageports/MessagePortChannelRegistry.cpp:
        (WebCore::MessagePortChannelRegistry::takeAllMessagesForPort):
        (WebCore::MessagePortChannelRegistry::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannelRegistry.h:
        * dom/messageports/WorkerMessagePortChannelProvider.cpp: Added.
        (WebCore::WorkerMessagePortChannelProvider::WorkerMessagePortChannelProvider):
        (WebCore::WorkerMessagePortChannelProvider::~WorkerMessagePortChannelProvider):
        (WebCore::WorkerMessagePortChannelProvider::createNewMessagePortChannel):
        (WebCore::WorkerMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote):
        (WebCore::WorkerMessagePortChannelProvider::messagePortDisentangled):
        (WebCore::WorkerMessagePortChannelProvider::messagePortClosed):
        (WebCore::WorkerMessagePortChannelProvider::postMessageToRemote):
        (WebCore::WorkerMessagePortChannelProvider::takeAllMessagesForPort):
        (WebCore::WorkerMessagePortChannelProvider::checkRemotePortForActivity):
        (WebCore::WorkerMessagePortChannelProvider::checkProcessLocalPortForActivity):
        * dom/messageports/WorkerMessagePortChannelProvider.h: Added.
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::messagePortChannelProvider):
        * workers/WorkerGlobalScope.h:

2019-09-01  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Resources don't work when only a subset of a bind group is referenced by a shader
        https://bugs.webkit.org/show_bug.cgi?id=201383

        Reviewed by Dean Jackson.

        Bind groups correspond to argument buffers in Metal. Both the Metal API and Metal Shading Language
        have to agree on the layout of exactly which resources lie at which byte offsets within an argument
        buffer.

        Before this patch, we only emitted code for the items in the argument buffer that were actually
        referenced by the shader source code. However, because these items are held inside a struct, if
        we omit one item from the middle of the struct, the byte offets of all the successive items would
        be wrong. This means that the Metal API and the shader would disagree about how to access these
        resources, making the resources inaccessible (and causing security problems).

        Tests: webgpu/whlsl/sparse-bind-group-2.html
               webgpu/whlsl/sparse-bind-group-3.html
               webgpu/whlsl/sparse-bind-group.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
        (WebCore::WHLSL::matchResources):
        (WebCore::WHLSL::matchVertexAttributes):
        (WebCore::WHLSL::matchColorAttachments):

2019-09-01  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r249369.
        https://bugs.webkit.org/show_bug.cgi?id=201394

        broke WHLSL tests (Requested by litherum on #webkit).

        Reverted changeset:

        "[WHLSL] Resources don't work when only a subset of a bind
        group is referenced by a shader"
        https://bugs.webkit.org/show_bug.cgi?id=201383
        https://trac.webkit.org/changeset/249369

2019-09-01  Fujii Hironori  <Hironori.Fujii@sony.com>

        Unreviewed, rolling out r249366.

        WinCairo WebKit2 crashes in some websites and the device scale
        factor is not correct in high DPI.

        Reverted changeset:

        "[WinCairo, FTW] Properly handle device scale factor"
        https://bugs.webkit.org/show_bug.cgi?id=201361
        https://trac.webkit.org/changeset/249366

2019-09-01  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Resources don't work when only a subset of a bind group is referenced by a shader
        https://bugs.webkit.org/show_bug.cgi?id=201383

        Reviewed by Dean Jackson.

        Bind groups correspond to argument buffers in Metal. Both the Metal API and Metal Shading Language
        have to agree on the layout of exactly which resources lie at which byte offsets within an argument
        buffer.

        Before this patch, we only emitted code for the items in the argument buffer that were actually
        referenced by the shader source code. However, because these items are held inside a struct, if
        we omit one item from the middle of the struct, the byte offets of all the successive items would
        be wrong. This means that the Metal API and the shader would disagree about how to access these
        resources, making the resources inaccessible (and causing security problems).

        Tests: webgpu/whlsl/sparse-bind-group-2.html
               webgpu/whlsl/sparse-bind-group-3.html
               webgpu/whlsl/sparse-bind-group.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
        (WebCore::WHLSL::matchResources):
        (WebCore::WHLSL::matchVertexAttributes):
        (WebCore::WHLSL::matchColorAttachments):

2019-09-01  Said Abou-Hallawa  <sabouhallawa@apple.com>

        HTMLImageElement::decode() should return a resolved promise for decoding non bitmap images
        https://bugs.webkit.org/show_bug.cgi?id=201243

        Reviewed by Youenn Fablet.

        The specs: https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode
        states that, decode() should resolve the pending promise if the decoding
        was requested for a non bitmap image.

        Test: fast/images/decode-non-bitmap-image-resolve.html

        * loader/ImageLoader.cpp:
        (WebCore::resolveDecodePromises):
        (WebCore::rejectDecodePromises):
        (WebCore::ImageLoader::notifyFinished):
        (WebCore::ImageLoader::decode):
        (WebCore::ImageLoader::decodeError): Deleted.
        * loader/ImageLoader.h:
        (WebCore::ImageLoader::hasPendingDecodePromises const):

2019-08-30  Brent Fulgham  <bfulgham@apple.com>

        [WinCairo, FTW] Properly handle device scale factor
        https://bugs.webkit.org/show_bug.cgi?id=201361

        Reviewed by Don Olmstead.

        Update the Direct2D ImageBuffer/ImageBufferData classes to correctly handle
        the device scale factor.

        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::putData):
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::putByteArray):

2019-08-31  Said Abou-Hallawa  <sabouhallawa@apple.com>

        EXIF orientation should be respected when rendering images 
        https://bugs.webkit.org/show_bug.cgi?id=201123

        Reviewed by Simon Fraser.

        -- Image::size() will return the rendered size based on the image
           orientation. If image orientation is FromImage, ImageSource will query
           the actual image orientation from the ImageDecoder. The low level APIs
           might transpose the size just before calling the system API to draw
           the image.

        -- RenderElement::imageOrientation() will return ImageOrientation::FromImage
           for all images and for all ports till the CSS image-orientation specs
           is finalized.

        -- The default of ImagePaintingOptions argument of GraphicsContext::drawImage()
           will be changed to { ImageOrientation::FromImage }.

        -- Image element: RenderImage::paintIntoRect() will pass imageOrientation()
           which returns ImageOrientation::FromImage to GraphicsContext::drawImage().

        -- CSS background image: RenderBoxModelObject::paintFillLayerExtended will
           pass ImageOrientation::FromImage by default to GraphicsContext::drawTiledImage().

        -- Images on canvas: CanvasRenderingContext2DBase::drawImage() will pass
           ImageOrientation::FromImage by default to GraphicsContext::drawImage().

        -- SVG images: RenderSVGImage::paintForeground() calls GraphicsContext::drawImage()
           with the default ImagePaintingOptions which is now { ImageOrientation::FromImage }.

        -- SVG feImage filters: FEImage::platformApplySoftware() calls
           GraphicsContext::drawImage() with the default ImagePaintingOptions
           which is now { ImageOrientation::FromImage }.

        -- ImageDocument: RenderElement::imageOrientation() returns FromImage
           always and for all ports.

        Tests: fast/images/exif-orientation-background.html
               fast/images/exif-orientation-canvas.html
               fast/images/exif-orientation-content.html
               fast/images/exif-orientation-element-object-fit.html
               fast/images/exif-orientation-element.html
               fast/images/exif-orientation-image-object.html
               fast/images/exif-orientation-svg-feimage.html
               fast/images/exif-orientation-svg-image.html

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::imageSizeForRenderer const):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/CrossfadeGeneratedImage.h:
        * platform/graphics/GeneratedImage.h:
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContext::drawImage):
        * platform/graphics/Image.h:
        * platform/graphics/ImageFrame.h:
        (WebCore::ImageFrame::sizeRespectingOrientation const): Deleted.
        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::ImageSource):
        (WebCore::ImageSource::orientation):
        (WebCore::ImageSource::size):
        (WebCore::ImageSource::sizeRespectingOrientation): Deleted.
        * platform/graphics/ImageSource.h:
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::size const):
        * platform/graphics/cg/PDFDocumentImage.h:
        * platform/mac/DragImageMac.mm:
        (WebCore::createDragImageFromImage):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::imageOrientation const):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintIntoRect):
        * svg/graphics/SVGImage.h:
        * svg/graphics/SVGImageForContainer.cpp:
        (WebCore::SVGImageForContainer::size const):
        * svg/graphics/SVGImageForContainer.h:

2019-08-31  Rob Buis  <rbuis@igalia.com>

        XMLHttpRequest: responseXML returns null if the Content-Type is valid (end in +xml) in some cases
        https://bugs.webkit.org/show_bug.cgi?id=46146

        Reviewed by Youenn Fablet.

        Make response MIME type fallback to text/xml in case mimeType could
        not be extracted [1] and use the stricter ParsedContentType for that.

        Behavior matches Firefox.

        Test: web-platform-tests/xhr/responsexml-media-type.htm

        [1] https://xhr.spec.whatwg.org/#response-mime-type

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::responseMIMEType const):

2019-08-31  Frederic Wang  <fwang@igalia.com>

        Fix interpretation of fraction shifts
        https://bugs.webkit.org/show_bug.cgi?id=201242

        Reviewed by Rob Buis.

        In fractions, numerator/denominator shifts are currently interpreted relative to the math
        axis while they should be relative to the baseline [1]. This patch refactors the
        RenderMathMLFraction to do that and aligns more on MathML Core [2] [3]. This fixes serious
        rendering bugs in fractions.

        [1] https://github.com/mathml-refresh/mathml/issues/123
        [2] https://mathml-refresh.github.io/mathml-core/#fraction-with-nonzero-line-thickness
        [3] https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness

        No new tests, existing tests updated.

        * rendering/mathml/RenderMathMLFraction.h: ascentOverHorizontalAxis() is replaced with
        fractionAscent() which gives the actual baseline position rather than the math axis position.
        fractionParameters() and stackParameters() are modified so that they only return the shifts,
        now stored in a shared FractionParameters struct.
        * rendering/mathml/RenderMathMLFraction.cpp:
        (WebCore::RenderMathMLFraction::fractionParameters const): Store existing parameters in local
        variables and perform adjustments to the shift values so that the minimal gap constraints
        are satisfied. Return them as a FractionParameters.
        (WebCore::RenderMathMLFraction::stackParameters const): Ditto.
        (WebCore::RenderMathMLFraction::fractionAscent const): This calculates the ascent above
        the baseline as described in [2] [3] and replaces ascentOverHorizontalAxis. To minimize
        changeset, this continues to ignore contribution of denominator size and not to distinguish
        ink or non-ink metrics.
        (WebCore::RenderMathMLFraction::layoutBlock): The position of the denominator is now just
        calculated as a shift from the baseline. The height is given by the bottom of the
        denominator. The old "ascent + mathAxisHeight() + denominatorDescent" does not make any
        sense.
        (WebCore::RenderMathMLFraction::paint): Use fractionAscent() instead of
        ascentOverHorizontalAxis().
        (WebCore::RenderMathMLFraction::firstLineBaseline const): Ditto.

2019-08-31  Chris Dumez  <cdumez@apple.com>

        DocumentStorageAccess::hasStorageAccess() / requestStorageAccess() don't need to know about pageID / frameID
        https://bugs.webkit.org/show_bug.cgi?id=201364

        Reviewed by John Wilander.

        DocumentStorageAccess::hasStorageAccess() / requestStorageAccess() don't need to know about pageID / frameID. pageID is
        redundant since it is being ignored by the callee. For the frame, simply pass the frame object in.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::hasStorageAccess):
        (WebCore::DocumentStorageAccess::requestStorageAccess):
        * page/ChromeClient.h:
        (WebCore::ChromeClient::hasStorageAccess):
        (WebCore::ChromeClient::requestStorageAccess):

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

        [LFC] Transition from Geometry(formattingContext()) to formattingContext().quirks()
        https://bugs.webkit.org/show_bug.cgi?id=201372
        <rdar://problem/54905514>

        Reviewed by Antti Koivisto.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):

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

        [LFC] Proxy LayoutState::displayBoxForLayoutBox() calls through FormattingContext
        https://bugs.webkit.org/show_bug.cgi?id=201365
        <rdar://problem/54900815>

        Reviewed by Antti Koivisto.

        This patch is in preparation for enforcing displayBoxForLayoutBox() calls to stay within the current formatting context.
        (There are a few odd cases left (floats and coordinate mapping) and they are going to be addressed in a separate patch.)

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::displayBoxForLayoutBox const):
        (WebCore::Layout::FormattingContext::hasDisplayBox const):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
        (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::hasClearance):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::formattingContext const):
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        (WebCore::Layout::LineLayout::layoutState const): Deleted.
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::isInlineContainerConsideredEmpty):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout):
        (WebCore::Layout::TableFormattingContext::computedTableWidth):

2019-08-30  Chris Dumez  <cdumez@apple.com>

        WebPage::fromCorePage() to take and return a C++ reference
        https://bugs.webkit.org/show_bug.cgi?id=201367

        Reviewed by Antti Koivisto.

        * page/Chrome.cpp:
        (WebCore::Chrome::createWindow const):

2019-08-30  Chris Dumez  <cdumez@apple.com>

        Add support for postMessage buffering between the service worker and window
        https://bugs.webkit.org/show_bug.cgi?id=201169

        Reviewed by Youenn Fablet.

        As per the Service Worker specification, a service worker client's message
        queue is initially disabled and only gets enabled after:
        - The DOMContentLoaded event has been fired
        or
        - The client sets the navigator.serviceWorker.onmessage event handler
        or
        - navigator.serviceWorker.startMessages() is called

        While the message queue is disabled, messages posted by the service worker
        to the client simply get queued and only get processed once the queue gets
        enabled.

        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::finishedParsing):
        Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
        been fired.

        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
        * dom/ScriptExecutionContext.h:
        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
        Fix a bug where a service worker would not be able to post a message to a client until
        that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
        lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
        when a message is received from the service worker. Previously, messages were just
        getting dropped.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        When the ServiceWorkerContainer is constructed, suspend its message queue if its context
        document is still parsing.

        (WebCore::ServiceWorkerContainer::startMessages):
        Resume the message queue when startMessages() is called.

        (WebCore::ServiceWorkerContainer::postMessage):
        Enqueue the event instead of firing it right away.

        (WebCore::ServiceWorkerContainer::addEventListener):
        if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
        startMessages().

        * workers/service/ServiceWorkerContainer.h:

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

        Minor optimization in determineNonLayerDescendantsPaintedContent()
        https://bugs.webkit.org/show_bug.cgi?id=201352

        Reviewed by Antti Koivisto.

        It's cheaper to call renderText.hasRenderedText() than renderText.linesBoundingBox(), because
        the latter has to traverse all the InlineTextBoxes. This code path is fairly hot when
        scrolling twitter feeds, since it's called from RenderLayer::updateLayerPositionsAfterScroll()
        which calls RenderLayer::isVisuallyNonEmpty().

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):

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

        [WHLSL] Remove getters/setters/anders
        https://bugs.webkit.org/show_bug.cgi?id=201008

        Reviewed by Robin Morisset.

        This patch changes WHLSL in a significant way. This patch removes getters/setters/anders
        from the language. In our experience writing WHLSL shaders, these parts of the language
        went unused, and they added a lot of complexity to the implementation of the compiler.
        
        This patch now treats field accesses and array indexes as intrinsics inside the compiler.
        This patch removes all notions of named operators, anders, and indexed operators
        from the compiler and the standard library. The checker now intrinsically knows the
        return type for property accesses and indexed expressions based on what the
        base type is.
        
        To make this work in practice was difficult, since getters/setters/anders
        solved a lot of the difficult problems we had in generating metal code. For
        example, all swizzle operators were getters and setters, so assigning to a
        swizzle fell out naturally from implementing setters. However, during metal
        codegen, all we see is a dot expression with "xy" as a property. Our previous
        architecture of emitting Metal code using pointers which represent lvalues
        doesn't work because you can't take the address of a swizzle. For example,
        "auto* x = &vector.yz" is invalid metal code.
        
        So, this patch changes the entire metal code generator to emit WHLSL expressions
        as Metal expressions. To do this, I had to change a lot about how the compiler
        was implemented:
        - I changed the indexed accesses of matrices to return columns instead of
        rows. This allowed WHLSL code like `mat[0].xy = 42` to be compiled into
        the equivalent metal code of `mat[0].xy = 42`.
        - I changed the native function inliner to emit expressions instead of
        statements.
        - We also simplify the language by removing null and requiring all
        reference type variables to have an initializer. This means that
        null is no longer a valid value, which allows us to omit null checks
        inside the metal code generator. To make this work with array
        accesses, we now clamp accesses instead of returning null for OOB
        accesses.
        
        I've also filed one required bug as a followup. I didn't include it in this
        patch to make it easier to review along. Currently, there are two places in
        metal codegen where we evaluate effects twice. That will be fixed in:
        https://bugs.webkit.org/show_bug.cgi?id=201251

        Tests: webgpu/whlsl/address-of-swizzle.html
               webgpu/whlsl/array-oob-alias.html
               webgpu/whlsl/matrix-index-assign.html
               webgpu/whlsl/matrix-index-order.html
               webgpu/whlsl/oob-access-2.html
               webgpu/whlsl/operator-syntax.html

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
        * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp:
        (WebCore::WHLSL::AST::Expression::destroy):
        (WebCore::WHLSL::AST::Expression::destruct):
        (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::copyTypeTo const):
        (WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
        (WebCore::WHLSL::AST::Expression::isNullLiteral const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h: Removed.
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.cpp: Removed.
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h: Removed.
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::threadAnderFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setGetterFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setAnderFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setThreadAnderFunction): Deleted.
        (WebCore::WHLSL::AST::PropertyAccessExpression::setSetterFunction): Deleted.
        (): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLType.cpp:
        (WebCore::WHLSL::AST::Type::destroy):
        (WebCore::WHLSL::AST::Type::destruct):
        (WebCore::WHLSL::AST::ResolvableType::canResolve const):
        (WebCore::WHLSL::AST::ResolvableType::conversionCost const):
        * Modules/webgpu/WHLSL/AST/WHLSLType.h:
        (WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
        (WebCore::WHLSL::AST::Type::isNullLiteralType const): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::HoistedVariableCollector::HoistedVariableCollector):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
        (WebCore::WHLSL::Metal::metalCodePrologue):
        (WebCore::WHLSL::Metal::generateMetalCode):
        (WebCore::WHLSL::Metal::metalCodeProlog): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        (WebCore::WHLSL::Metal::vectorInnerType): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::checkDuplicateFunctions):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveByInstantiation):
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::wrappedUintType):
        (WebCore::WHLSL::Checker::normalizedTypeForFunctionKey):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::matchAndCommit):
        (WebCore::WHLSL::Checker::resolveFunction):
        (WebCore::WHLSL::Checker::assignConcreteType):
        (WebCore::WHLSL::resolveWithOperatorLength): Deleted.
        (WebCore::WHLSL::Checker::genericPointerType): Deleted.
        (WebCore::WHLSL::Checker::finishVisiting): Deleted.
        * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp:
        (WebCore::WHLSL::findHighZombies):
        (): Deleted.
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matchAndCommit):
        (WebCore::WHLSL::commit):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
        (WebCore::WHLSL::Intrinsics::boolVectorTypeForSize const):
        (WebCore::WHLSL::Intrinsics::uintVectorTypeForSize const):
        (WebCore::WHLSL::Intrinsics::intVectorTypeForSize const):
        (WebCore::WHLSL::Intrinsics::floatVectorTypeForSize const):
        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Lexer::consumeTokenFromStream):
        * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseConstantExpression):
        (WebCore::WHLSL::Parser::parseEnumerationMember):
        (WebCore::WHLSL::Parser::parseTerm):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLProgram.cpp: Added.
        (WebCore::WHLSL::Program::isValidVectorProperty):
        * Modules/webgpu/WHLSL/WHLSLProgram.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::resolveProperties):
        (WebCore::WHLSL::PropertyResolver::visit): Deleted.
        (WebCore::WHLSL::wrapAnderCallArgument): Deleted.
        (WebCore::WHLSL::anderCallArgument): Deleted.
        (WebCore::WHLSL::setterCall): Deleted.
        (WebCore::WHLSL::getterCall): Deleted.
        (WebCore::WHLSL::modify): Deleted.
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue): Deleted.
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting): Deleted.
        (WebCore::WHLSL::LeftValueSimplifier::visit): Deleted.
        (WebCore::WHLSL::PropertyResolver::simplifyLeftValue): Deleted.
        * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp: Removed.
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.h: Removed.
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

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

        [LFC] Pass FormattingContext to Geometry/Quirks/BlockMarginCollapsing classes
        https://bugs.webkit.org/show_bug.cgi?id=201355
        <rdar://problem/54895959>

        Reviewed by Antti Koivisto.

        This is in preparation for enforcing LFC to not call outside of the formatting context.
        LayoutState::displayBoxForLayoutBox calls will be forced to go through the FormattingContext class to
        check LFC escaping.


        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::isBlockFormattingContext const):
        (WebCore::Layout::FormattingContext::isInlineFormattingContext const):
        (WebCore::Layout::FormattingContext::isTableFormattingContext const):
        (WebCore::Layout::FormattingContext::Geometry::layoutState const):
        (WebCore::Layout::FormattingContext::Geometry::layoutState):
        (WebCore::Layout::FormattingContext::Geometry::formattingContext const):
        (WebCore::Layout::FormattingContext::geometry const):
        (WebCore::Layout::FormattingContext::Quirks::layoutState const):
        (WebCore::Layout::FormattingContext::Quirks::layoutState):
        (WebCore::Layout::FormattingContext::Quirks::formattingContext const):
        (WebCore::Layout::FormattingContext::quirks const):
        (WebCore::Layout::FormattingContext::Geometry::Geometry):
        (WebCore::Layout::FormattingContext::Quirks::Quirks):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContext.h:
        (WebCore::Layout::BlockFormattingContext::Geometry::formattingContext const):
        (WebCore::Layout::BlockFormattingContext::geometry const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::formattingContext const):
        (WebCore::Layout::BlockFormattingContext::marginCollapse const):
        (WebCore::Layout::BlockFormattingContext::Quirks::formattingContext const):
        (WebCore::Layout::BlockFormattingContext::quirks const):
        (WebCore::Layout::BlockFormattingContext::Geometry::Geometry):
        (WebCore::Layout::BlockFormattingContext::Quirks::Quirks):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::MarginCollapse):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const):
        (WebCore::Layout::InlineFormattingContext::Quirks::formattingContext const):
        (WebCore::Layout::InlineFormattingContext::quirks const):
        (WebCore::Layout::InlineFormattingContext::Geometry::formattingContext const):
        (WebCore::Layout::InlineFormattingContext::geometry const):
        (WebCore::Layout::InlineFormattingContext::Geometry::Geometry):
        (WebCore::Layout::InlineFormattingContext::Quirks::Quirks):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        (WebCore::Layout::Line::layoutState const):
        (WebCore::Layout::Line::formattingContext const):
        * layout/inlineformatting/InlineLine.h:
        * layout/tableformatting/TableFormattingContext.h:
        (WebCore::Layout::TableFormattingContext::Geometry::formattingContext const):
        (WebCore::Layout::TableFormattingContext::geometry const):
        (WebCore::Layout::TableFormattingContext::Geometry::Geometry):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        Unreviewed, rolling out r249338.

        Caused 500+ layout test failures on WK1

        Reverted changeset:

        "Add support for postMessage buffering between the service
        worker and window"
        https://bugs.webkit.org/show_bug.cgi?id=201169
        https://trac.webkit.org/changeset/249338

2019-08-30  Alex Christensen  <achristensen@webkit.org>

        Remove HAVE_CFNETWORK_WITH_IGNORE_HSTS conditional
        https://bugs.webkit.org/show_bug.cgi?id=201279

        Reviewed by Darin Adler.

        * platform/network/mac/WebCoreURLResponse.mm:
        (WebCore::synthesizeRedirectResponseIfNecessary):
        (WebCore::schemeWasUpgradedDueToDynamicHSTS): Deleted.

2019-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>

        Caret does not appear in text field inside a transformed, overflow: hidden container
        https://bugs.webkit.org/show_bug.cgi?id=201317
        <rdar://problem/54859264>

        Reviewed by Simon Fraser.

        This patch refactors the heuristic for determining whether to suppress selection gestures and UI in a way that
        fixes the corner case encountered in this bug. To understand why this test case fails with our existing
        heuristic, consider the below test case.

        Let's say we have an input field inside an "overflow: hidden;" container, which is positioned in such a way that
        it is completely clipped by its enclosing container which is also "overflow: hidden". Our existing logic would
        appropriately identify this as a hidden editable element.

        However, let's now apply a transform to the input field's closest "overflow: hidden" ancestor, such that the
        field is now visible. Since RenderLayer::offsetFromAncestor doesn't take transforms into account when we try to
        find the offset of the "overflow: hidden" layer relative to the root view, we end up passing an offsetFromRoot
        of (0, 100vw) to RenderLayer::calculateClipRects, which computes a background clip rect of (0, 0, 100vw, 100vh).

        This means that at the end of RenderLayer::calculateClipRects, we end up intersecting the background clip rect
        (0, 0, 100vw, 100vh) against (100vw, 0, 100vw, 100vh), which results in the empty rect, and subsequently makes
        us believe we're editing a hidden editable element.

        Instead of tacking on more logic to isTransparentOrFullyClippedRespectingParentFrames, we can fix this by using
        RenderObject::computeVisibleRectInContainer instead, performing a similar walk up the render tree to compute the
        visible rect of each focused element or subframe relative to its root. This is capable of taking transforms into
        account. See comments below for more details.

        Test: editing/selection/ios/show-selection-in-transformed-container-2.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::isTransparentRespectingParentFrames const):

        Split out isTransparentOrFullyClippedRespectingParentFrames into two methods: RenderLayer's
        isTransparentRespectingParentFrames, and RenderObject's hasNonEmptyVisibleRectRespectingParentFrames. The
        transparency check starts at the enclosing layer and walks up the layer tree, while the non-empty visible rect
        check looks for renderers that are completely empty relative to their root views.

        * rendering/RenderLayer.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::hasNonEmptyVisibleRectRespectingParentFrames const):

        Rewrite logic for detecting completely clipped editable areas (that formerly lived in
        isTransparentOrFullyClippedRespectingParentFrames) to use computeVisibleRectInContainer instead.

        * rendering/RenderObject.h:

2019-08-30  Chris Dumez  <cdumez@apple.com>

        Add support for postMessage buffering between the service worker and window
        https://bugs.webkit.org/show_bug.cgi?id=201169

        Reviewed by Youenn Fablet.

        As per the Service Worker specification, a service worker client's message
        queue is initially disabled and only gets enabled after:
        - The DOMContentLoaded event has been fired
        or
        - The client sets the navigator.serviceWorker.onmessage event handler
        or
        - navigator.serviceWorker.startMessages() is called

        While the message queue is disabled, messages posted by the service worker
        to the client simply get queued and only get processed once the queue gets
        enabled.

        No new tests, rebaselined existing test.

        * dom/Document.cpp:
        (WebCore::Document::finishedParsing):
        Call startMessages() on the ServiceWorkerContainer once the DOMContentLoaded event has
        been fired.

        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::ensureServiceWorkerContainer):
        * dom/ScriptExecutionContext.h:
        * workers/service/SWClientConnection.cpp:
        (WebCore::SWClientConnection::postMessageToServiceWorkerClient):
        Fix a bug where a service worker would not be able to post a message to a client until
        that client has accessed navigator.serviceWorker (since the ServiceWorkerContainer is
        lazy initialized). To address the issue, we now initialize the ServiceWorkerContainer
        when a message is received from the service worker. Previously, messages were just
        getting dropped.

        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
        When the ServiceWorkerContainer is constructed, suspend its message queue if its context
        document is still parsing.

        (WebCore::ServiceWorkerContainer::startMessages):
        Resume the message queue when startMessages() is called.

        (WebCore::ServiceWorkerContainer::postMessage):
        Enqueue the event instead of firing it right away.

        (WebCore::ServiceWorkerContainer::addEventListener):
        if navigator.serviceWorker.onmessage event handler gets set by the JavaScript, call
        startMessages().

        * workers/service/ServiceWorkerContainer.h:

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

        Add system tracing points for compositing updates, and touch-event dispatching
        https://bugs.webkit.org/show_bug.cgi?id=201327

        Reviewed by Alex Christensen.

        TraceScope in RenderLayerCompositor::updateCompositingLayers().

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

2019-08-30  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Use DirectX SharedResource as basis for SharedBitmap
        https://bugs.webkit.org/show_bug.cgi?id=201157

        Reviewed by Alex Christensen.

        Currently an ID2D1Bitmap is used as the backing store for the SharedBitmap that is the
        base type for sharing data between the WebContent Process and the UIProcess. However, this
        involves moving GPU memory to local memory, copying that memory into the SharedMemory member
        of the SharedBitmap, then building a new GPU bitmap on the UIProcess side from that SharedMemory.

        Profiling indicates that this is the single largest place FTW WebKit spends its time.

        Instead, we should use Direct2D's ability to render to an IDXGISurface, which can be shared
        between multiple processes. This should avoid the GPU->CPU copy, the Direct2D-allocated
        CPU->Shared Memory copy, and the shared memory to GPU copy.
 
        * platform/graphics/win/BackingStoreBackendDirect2D.h:
        (WebCore::BackingStoreBackendDirect2D::renderTarget const): Change type.
        (WebCore::BackingStoreBackendDirect2D::dxSurface const): Added.
        (WebCore::BackingStoreBackendDirect2D::BackingStoreBackendDirect2D): Require a DXD11 device.
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
        (WebCore::BackingStoreBackendDirect2DImpl::BackingStoreBackendDirect2DImpl): Use Direct2D's
        IDXGISurface to make a render target we can use to support our fast cross-process sharing.
        (WebCore::BackingStoreBackendDirect2DImpl::scroll):
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::fillRect): Remove unneeded PlatformContextStateSaver.
        (WebCore::Direct2D::fillRoundedRect): Ditto.
        (WebCore::Direct2D::fillRectWithGradient): Ditto.
        (WebCore::Direct2D::fillPath): Ditto.
        (WebCore::Direct2D::strokePath): Ditto.
        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::pixelFormat): Switch to constants for bitmap format.
        (WebCore::Direct2D::createDXGISurfaceOfSize): Added.
        (WebCore::Direct2D::createSurfaceRenderTarget): Added.
        (WebCore::Direct2D::writeDiagnosticPNGToPath):
        (WebCore::Direct2D::dxgiImmediateContext): Added.
        (WebCore::Direct2D::defaultDirectXDevice): Added.
        (WebCore::Direct2D::createDeviceAndContext): Added.
        (WebCore::Direct2D::toDXGIDevice): Added.
        (WebCore::Direct2D::factoryForDXGIDevice): Added.
        * platform/graphics/win/Direct2DUtilities.h:

2019-08-30  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: update size of database when database operation is completed
        https://bugs.webkit.org/show_bug.cgi?id=201057

        Reviewed by Youenn Fablet.

        Currently when a database operation was completed, we re-computed the disk usage of the origin. This computation 
        listed all databases in the origin directory and read the size of each database file, which was very inefficient 
        because the completed operation should only affect one database.

        This patch makes UniqueIDBDatabase keep track of database size and reports size change to QuotaUser.

        Tested PerformanceTests/IndexedDB/basic/objectstore-add.html on release build minibrowser. This change makes
        the test over 50% faster.

        * Modules/indexeddb/server/IDBBackingStore.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed):
        (WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed):
        (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
        (WebCore::IDBServer::IDBServer::increaseSpaceUsed):
        (WebCore::IDBServer::IDBServer::decreaseSpaceUsed):
        (WebCore::IDBServer::IDBServer::setSpaceUsed): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::databaseSize const):
        (WebCore::IDBServer::MemoryIDBBackingStore::close):
        (WebCore::IDBServer::MemoryIDBBackingStore::databasesSizeForOrigin const): Deleted.
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory):
        (WebCore::IDBServer::SQLiteIDBBackingStore::databaseSize const):
        (WebCore::IDBServer::SQLiteIDBBackingStore::close):
        (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForFolder): Deleted.
        (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
        (WebCore::IDBServer::UniqueIDBDatabase::updateSpaceUsedIfNeeded):
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-08-30  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Replaying the video should update currentTime
        https://bugs.webkit.org/show_bug.cgi?id=201307

        Reviewed by Xabier Rodriguez-Calvar.

        While writing a test to confirm that https://bugs.webkit.org/show_bug.cgi?id=190050
        has indeed been fixed I noticed a non-conformity: when the video has
        ended, right after calling .play() for a second playback currentTime
        did not return zero, but the video duration.

        This turned to be due to the m_isEndReached flag not being reseted on
        seeks (replaying a video incurs in a seek done from multi-platform
        code).

        Test: imported/w3c/web-platform-tests/media-source/mediasource-replay.html

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

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

        [LFC] Make Geometry/Quirk/MarginCollapse subclasses stateful.
        https://bugs.webkit.org/show_bug.cgi?id=201343
        <rdar://problem/54883787>

        Reviewed by Antti Koivisto.

        This is in preparation for enforcing LFC to not call outside of the formatting context.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):
        (WebCore::Layout::FormattingContext::computeBorderAndPadding):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent):
        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const): Deleted.
        (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const): Deleted.
        (WebCore::Layout::FormattingContext::computeBorderAndPadding const): Deleted.
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const): Deleted.
        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::Geometry::layoutState const):
        (WebCore::Layout::FormattingContext::Geometry::layoutState):
        (WebCore::Layout::FormattingContext::geometry const):
        (WebCore::Layout::FormattingContext::Quirks::layoutState const):
        (WebCore::Layout::FormattingContext::Quirks::layoutState):
        (WebCore::Layout::FormattingContext::quirks const):
        (WebCore::Layout::FormattingContext::Geometry::Geometry):
        (WebCore::Layout::FormattingContext::Quirks::Quirks):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const):
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):
        (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto const):
        (WebCore::Layout::FormattingContext::Geometry::fixedValue const):
        (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight const):
        (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const):
        (WebCore::Layout::FormattingContext::Geometry::staticVerticalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::staticHorizontalPositionForOutOfFlowPositioned const):
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
        (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry const):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const):
        (WebCore::Layout::FormattingContext::Geometry::computedBorder const):
        (WebCore::Layout::FormattingContext::Geometry::computedPadding const):
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const):
        (WebCore::Layout::FormattingContext::Geometry::constrainByMinMaxWidth const):
        (WebCore::Layout::FormattingContext::Geometry::computedHeightValue): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::fixedValue): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedMinHeight): Deleted.
        (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned): Deleted.
        (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedBorder): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedPadding): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin): Deleted.
        (WebCore::Layout::FormattingContext::Geometry::constrainByMinMaxWidth): Deleted.
        * layout/FormattingContextQuirks.cpp:
        (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layout):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
        (WebCore::Layout::BlockFormattingContext::computeFloatingPosition):
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):
        (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::layout const): Deleted.
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): Deleted.
        (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const): Deleted.
        (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
        (WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore const): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::geometry const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::layoutState const):
        (WebCore::Layout::BlockFormattingContext::marginCollapse const):
        (WebCore::Layout::BlockFormattingContext::quirks const):
        (WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::Geometry::Geometry):
        (WebCore::Layout::BlockFormattingContext::Quirks::Quirks):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::MarginCollapse):
        (WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore const): Deleted.
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition const):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): Deleted.
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin): Deleted.
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition): Deleted.
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition): Deleted.
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition): Deleted.
        * layout/blockformatting/BlockFormattingContextQuirks.cpp:
        (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching const):
        (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
        (WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin const):
        (WebCore::Layout::BlockFormattingContext::Quirks::needsStretching): Deleted.
        (WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreCollapsedQuirkMargin): Deleted.
        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling const):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updatePositiveNegativeMarginValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough): Deleted.
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::updateMarginAfterForPreviousSibling): Deleted.
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox):
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
        (WebCore::Layout::InlineFormattingContext::layout const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const): Deleted.
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::quirks const):
        (WebCore::Layout::InlineFormattingContext::geometry const):
        (WebCore::Layout::InlineFormattingContext::Geometry::Geometry):
        (WebCore::Layout::InlineFormattingContext::Quirks::Quirks):
        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):
        (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin): Deleted.
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing): Deleted.
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints): Deleted.
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout):
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
        (WebCore::Layout::TableFormattingContext::ensureTableGrid):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):
        (WebCore::Layout::TableFormattingContext::computedTableWidth):
        (WebCore::Layout::TableFormattingContext::distributeAvailableWidth):
        (WebCore::Layout::TableFormattingContext::layout const): Deleted.
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const): Deleted.
        (WebCore::Layout::TableFormattingContext::ensureTableGrid const): Deleted.
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const): Deleted.
        (WebCore::Layout::TableFormattingContext::computedTableWidth const): Deleted.
        (WebCore::Layout::TableFormattingContext::distributeAvailableWidth const): Deleted.
        * layout/tableformatting/TableFormattingContext.h:
        (WebCore::Layout::TableFormattingContext::geometry const):
        (WebCore::Layout::TableFormattingContext::Geometry::Geometry):
        * layout/tableformatting/TableFormattingContextGeometry.cpp:
        (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):
        (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin): Deleted.

2019-08-30  Keith Rollin  <krollin@apple.com>

        Remove AppKitCompatibilityDeclarations.h
        https://bugs.webkit.org/show_bug.cgi?id=201283
        <rdar://problem/54822042>

        Reviewed by Alexey Proskuryakov.

        The two copies of these files -- on in WTF, one in MiniBrowser -- are
        empty and can be removed.

        No new tests -- no new or changed functionality.

        * WebCorePrefix.h:

2019-08-30  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Gracefully fail on invalid non-first initialization segment
        https://bugs.webkit.org/show_bug.cgi?id=201322

        Reviewed by Xabier Rodriguez-Calvar.

        In normal operation of AppendPipeline, except during tear down,
        qtdemux never removes a pad. Even if a new initialization segment is
        appended, the pad is reused.

        There is an exception though: when the new initialization segment has
        an incompatible set of tracks. This is invalid under the MSE spec and
        should produce an error, but in this case this was making an assertion
        fail -- in particular by sending an EOS to the to-be-removed pad, which
        AppendPipeline doesn't expect.

        This patch changes the assertion with graceful error handling for that
        error.

        Fixes media/media-source/media-source-seek-detach-crash.html

        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
        (WebCore::AppendPipeline::AppendPipeline):
        (WebCore::AppendPipeline::handleErrorConditionFromStreamingThread):
        (WebCore::AppendPipeline::handleErrorSyncMessage):
        * platform/graphics/gstreamer/mse/AppendPipeline.h:

2019-08-30  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Do not ref the player count from background threads.
        https://bugs.webkit.org/show_bug.cgi?id=201222

        Reviewed by Xabier Rodriguez-Calvar.

        Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html

        In the sync-message handler, a ref() was being taken waiting for a
        CDM instance to be attached. This hits asserts since you are not
        allowed to ref() an object created on the main thread
        (BasePlayer) on a background thread.

        The protection condition was overly scoped, tidied up the locking
        and made it more granular. To avoid needing to hold a ref() in the
        background thread, use instead a semaphore to signal when a CDM
        instance is attached, or the player has been destroyed.

        Also remove an erroneous safe-guard, the operator= in
        isCDMInstanceAvailable will ref() the CDMInstance for us. This use
        of holding a reference to CDMInstance in the decryptors is not
        thread-safe, and now we have a problem since there's no clean way
        to communicate with CDMInstance from background threads without
        being thread unsafe. For ClearKey and Widevine, a thread safe
        ProxyCDM needs to be designed and passed to background
        threads (upcoming patch).

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
        (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
        (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached):
        (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
        (isCDMInstanceAvailable):

2019-08-30  Sihui Liu  <sihui_liu@apple.com>

        [wk2] LayoutTest imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a flaky failure
        https://bugs.webkit.org/show_bug.cgi?id=169621

        Reviewed by Alex Christensen.

        Event handlers of IDB objects were called in unexpected order because of race, which made the console messages 
        in the tests come out of order.
        Usually, an operation/request result is handled as follows:
        1. IDBServer sends IDBResultData to IDBClient.
        2. IDBClient receives IDBResultData and finishes a IDBTransaction operation with that result.
        3. IDBTransaction schedules operation completed timer.
        4. (Some time later) Timer fires, and IDBTransaction completes a request with the result and dispatches event.
        5. (Some time later) IDBTransaction is notified that event is dispatched. If there are other results received, 
        IDBTransaction schedules operation completed timer.

        In previous implementation, if the IDBClient received a second IDBResultData for the same IDBTransaction between
        step 3 and step 4, it would not schedule timer because timer was still active; if it received the result between
        step 4 and step 5, it would schedule timer again.

        Consider a flow like this:
        result1 of transaction1 received, timer of transaction1 scheduled
        result2 of transaction2 received, timer of transaction2 scheduled
        result3 of transaction1 is received, timer of transaction1 active so no scheduling
        timer of transaction1 fired, event1 to be dispatched to request1
        timer of transaction2 fired, event2 to be dispatched to request2
        result4 of transaction2 received, timer of transaction2 scheduled
        event1 dispatched, timer of transaction1 scheduled (for handling result3)
        event2 dispatched, timer of transaction2 active so no scheduling
        timer of transaction2 fired, event3 to dispatch to request4
        timer of transaction1 fired, event4 to dispatch to request3

        request4 would get event before request3, though result3 was received before result4. We should stop scheduling
        event if an IDBTransaction is in between step 4 and 5, which means its m_currentlyCompletingRequest is not null.

        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::operationCompletedOnServer):

2019-08-29  Devin Rousso  <drousso@apple.com>

        Web Inspector: Debugger: async event listener stack traces should be available in Workers
        https://bugs.webkit.org/show_bug.cgi?id=200903

        Reviewed by Joseph Pecoraro.

        Tests: inspector/worker/dom-debugger-event-interval-breakpoints.html
               inspector/worker/dom-debugger-event-listener-breakpoints.html
               inspector/worker/dom-debugger-event-timeout-breakpoints.html
               inspector/worker/dom-debugger-url-breakpoints.html

        * inspector/agents/WebDebuggerAgent.h:
        * inspector/agents/WebDebuggerAgent.cpp:
        (WebCore::WebDebuggerAgent::enabled const): Added.
        (WebCore::WebDebuggerAgent::enable):
        (WebCore::WebDebuggerAgent::disable):
        (WebCore::WebDebuggerAgent::didAddEventListener): Added.
        (WebCore::WebDebuggerAgent::willRemoveEventListener): Added.
        (WebCore::WebDebuggerAgent::willHandleEvent): Added.
        (WebCore::WebDebuggerAgent::didPostMessage): Added.
        (WebCore::WebDebuggerAgent::didFailPostMessage): Added.
        (WebCore::WebDebuggerAgent::willDispatchPostMessage): Added.
        (WebCore::WebDebuggerAgent::didDispatchPostMessage): Added.
        (WebCore::WebDebuggerAgent::didClearAsyncStackTraceData): Added.
        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::enabled const): Added.
        (WebCore::PageDebuggerAgent::enable):
        (WebCore::PageDebuggerAgent::disable):
        (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData): Deleted.
        (WebCore::PageDebuggerAgent::didAddEventListener): Deleted.
        (WebCore::PageDebuggerAgent::willRemoveEventListener): Deleted.
        (WebCore::PageDebuggerAgent::willHandleEvent): Deleted.
        (WebCore::PageDebuggerAgent::didPostMessage): Deleted.
        (WebCore::PageDebuggerAgent::didFailPostMessage): Deleted.
        (WebCore::PageDebuggerAgent::willDispatchPostMessage): Deleted.
        (WebCore::PageDebuggerAgent::didDispatchPostMessage): Deleted.
        Move various `InspectorInstrumentation` calls from `PageDebuggerAgent` to `WebDebuggerAgent`
        so that `WorkerDebuggerAgent` also inherits them.

        * inspector/InstrumentingAgents.h:
        (WebCore::InstrumentingAgents::webDebuggerAgent const): Added.
        (WebCore::InstrumentingAgents::setWebDebuggerAgent): Added.
        (WebCore::InstrumentingAgents::inspectorDebuggerAgent const): Deleted.
        (WebCore::InstrumentingAgents::setInspectorDebuggerAgent): Deleted.
        * inspector/InstrumentingAgents.cpp:
        (WebCore::InstrumentingAgents::reset):
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
        (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
        (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
        (WebCore::InspectorInstrumentation::isDebuggerPausedImpl):
        (WebCore::InspectorInstrumentation::didInstallTimerImpl):
        (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
        (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
        (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
        (WebCore::InspectorInstrumentation::didPostMessageImpl):
        (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
        (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
        (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
        (WebCore::InspectorInstrumentation::willHandleEventImpl):
        (WebCore::InspectorInstrumentation::didHandleEventImpl):
        (WebCore::InspectorInstrumentation::willFireTimerImpl):
        (WebCore::InspectorInstrumentation::didFireTimerImpl):
        (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
        (WebCore::InspectorInstrumentation::frameStoppedLoadingImpl):
        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
        (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
        Replace `inspectorDebuggerAgent` with `webDebuggerAgent` so the right instrumentation hooks
        are available.

2019-08-29  Chris Dumez  <cdumez@apple.com>

        Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string
        https://bugs.webkit.org/show_bug.cgi?id=201318

        Reviewed by Alex Christensen.

        Add "IsolatedCopy" in the name of String getters that call isolatedCopy() on the string, for clarity.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore):
        (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
        (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
        (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
        (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
        (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
        (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
        (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::databaseDirectoryPathIsolatedCopy const):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
        (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectoryIsolatedCopy const):
        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::markAsDeletedAndClose):
        (WebCore::Database::stringIdentifierIsolatedCopy const):
        (WebCore::Database::displayNameIsolatedCopy const):
        (WebCore::Database::expectedVersionIsolatedCopy const):
        (WebCore::Database::fileNameIsolatedCopy const):
        (WebCore::Database::details const):
        (WebCore::Database::didCommitWriteTransaction):
        (WebCore::Database::didExceedQuota):
        * Modules/webdatabase/Database.h:
        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::maximumSize):
        (WebCore::DatabaseTracker::doneCreatingDatabase):
        (WebCore::DatabaseTracker::addOpenDatabase):
        (WebCore::DatabaseTracker::removeOpenDatabase):
        * Modules/webdatabase/SQLError.h:
        (WebCore::SQLError::messageIsolatedCopy const):
        * Modules/webdatabase/SQLError.idl:
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::openTransactionAndPreflight):
        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::openSQLiteDatabase):
        (WebCore::RegistrationDatabase::clearAll):
        * workers/service/server/RegistrationDatabase.h:
        (WebCore::RegistrationDatabase::databaseDirectoryIsolatedCopy const):

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

        Update .xcconfig symbols to reflect the current set of past and future product versions.
        https://bugs.webkit.org/show_bug.cgi?id=200720
        <rdar://problem/54305032>

        Reviewed by Alex Christensen.

        Remove version symbols related to old OS's we no longer support,
        ensure that version symbols are defined for OS's we do support.

        No new tests -- no new or changed functionality.

        * Configurations/Base.xcconfig:
        * Configurations/DebugRelease.xcconfig:
        * Configurations/Version.xcconfig:

2019-08-29  Timothy Hatcher  <timothy@apple.com>

        Copying and pasting two paragraphs with a newline between them results in stray paragraph with newline inside.
        https://bugs.webkit.org/show_bug.cgi?id=201306

        Reviewed by Wenson Hsieh.

        Test: editing/pasteboard/paste-without-nesting.html

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Consider the ancestor node safe to remove
        if there is no rendered text inside, not just if there are any child nodes.

2019-08-29  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOMDebugger: support event breakpoints in Worker contexts
        https://bugs.webkit.org/show_bug.cgi?id=200651

        Reviewed by Joseph Pecoraro.

        Tests: inspector/worker/dom-debugger-dom-breakpoints.html
               inspector/worker/dom-debugger-event-animation-frame-breakpoints.html
               inspector/worker/dom-debugger-event-interval-breakpoints.html
               inspector/worker/dom-debugger-event-listener-breakpoints.html
               inspector/worker/dom-debugger-event-timeout-breakpoints.html
               inspector/worker/dom-debugger-url-breakpoints.html

        * inspector/agents/InspectorDOMDebuggerAgent.h:
        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
        (WebCore::InspectorDOMDebuggerAgent::enabled const):
        (WebCore::InspectorDOMDebuggerAgent::enable):
        (WebCore::InspectorDOMDebuggerAgent::disable):
        (WebCore::InspectorDOMDebuggerAgent::debuggerWasEnabled):
        (WebCore::InspectorDOMDebuggerAgent::debuggerWasDisabled):
        (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::didInsertDOMNode): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::didRemoveDOMNode): Deleted.
        (WebCore::domTypeForName): Deleted.
        (WebCore::domTypeName): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::hasBreakpoint): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::updateSubtreeBreakpoints): Deleted.
        (WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame): Deleted.
        * inspector/agents/page/PageDOMDebuggerAgent.h: Added.
        * inspector/agents/page/PageDOMDebuggerAgent.cpp: Added.
        (WebCore::domTypeForName):
        (WebCore::domTypeName):
        (WebCore::PageDOMDebuggerAgent::PageDOMDebuggerAgent):
        (WebCore::PageDOMDebuggerAgent::enabled const):
        (WebCore::PageDOMDebuggerAgent::enable):
        (WebCore::PageDOMDebuggerAgent::disable):
        (WebCore::PageDOMDebuggerAgent::setDOMBreakpoint):
        (WebCore::PageDOMDebuggerAgent::removeDOMBreakpoint):
        (WebCore::PageDOMDebuggerAgent::frameDocumentUpdated):
        (WebCore::PageDOMDebuggerAgent::willInsertDOMNode):
        (WebCore::PageDOMDebuggerAgent::didInsertDOMNode):
        (WebCore::PageDOMDebuggerAgent::willRemoveDOMNode):
        (WebCore::PageDOMDebuggerAgent::didRemoveDOMNode):
        (WebCore::PageDOMDebuggerAgent::willModifyDOMAttr):
        (WebCore::PageDOMDebuggerAgent::willFireAnimationFrame):
        (WebCore::PageDOMDebuggerAgent::willInvalidateStyleAttr):
        (WebCore::PageDOMDebuggerAgent::setAnimationFrameBreakpoint):
        (WebCore::PageDOMDebuggerAgent::descriptionForDOMEvent):
        (WebCore::PageDOMDebuggerAgent::updateSubtreeBreakpoints):
        (WebCore::PageDOMDebuggerAgent::hasBreakpoint):
        * inspector/agents/worker/WorkerDOMDebuggerAgent.h: Added.
        * inspector/agents/worker/WorkerDOMDebuggerAgent.cpp: Added.
        (WebCore::WorkerDOMDebuggerAgent::WorkerDOMDebuggerAgent):
        (WebCore::WorkerDOMDebuggerAgent::setDOMBreakpoint):
        (WebCore::WorkerDOMDebuggerAgent::removeDOMBreakpoint):
        (WebCore::WorkerDOMDebuggerAgent::setAnimationFrameBreakpoint):
        Split the `InspectorDOMDebuggerAgent` into two subclasses depending on the inspected target
        type, as certain `DOMDebugger` commands don't make sense for a `Worker` context:
         - DOM breakpoints, as there is no DOM in a `Worker` context
         - animation frame event breakpoints, as there is no `requestAnimationFrame` function

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::createLazyAgents):
        * inspector/WorkerInspectorController.cpp:
        (WebCore::WorkerInspectorController::createLazyAgents):

        * inspector/InstrumentingAgents.h:
        (WebCore::InstrumentingAgents::pageDOMDebuggerAgent const): Added.
        (WebCore::InstrumentingAgents::setPageDOMDebuggerAgent): Added.
        * inspector/InstrumentingAgents.cpp:
        (WebCore::InstrumentingAgents::reset):

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
        (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
        (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
        (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
        (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
        (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl):
        (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl):
        (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

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

        Remove CCBigNum fallback code
        https://bugs.webkit.org/show_bug.cgi?id=201250
        <rdar://problem/54814330>

        Reviewed by Jiewen Tan.

        Bug 184637 added support for CCRSAGetCRTComponents, falling back to
        the older CCBigNum code if CCRSAGetCRTComponents was not available. We
        now only support OS's that have CCRSAGetCRTComponents so remove the
        fallback code.

        No new tests -- no new or changed functionality.

        * crypto/CommonCryptoUtilities.cpp:
        (WebCore::CCBigNum::CCBigNum): Deleted.
        (WebCore::CCBigNum::~CCBigNum): Deleted.
        (WebCore::CCBigNum::operator=): Deleted.
        (WebCore::CCBigNum::data const): Deleted.
        (WebCore::CCBigNum::operator- const): Deleted.
        (WebCore::CCBigNum::operator% const): Deleted.
        (WebCore::CCBigNum::inverse const): Deleted.
        * crypto/CommonCryptoUtilities.h:
        * crypto/mac/CryptoKeyRSAMac.cpp:
        (WebCore::getPrivateKeyComponents):

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

        [LFC][TFC] Initialize <tr> display boxes.
        https://bugs.webkit.org/show_bug.cgi?id=201232
        <rdar://problem/54806789>

        Reviewed by Antti Koivisto.

        Set them as blank for now.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::initializeDisplayBoxToBlank const):
        (WebCore::Layout::TableFormattingContext::layout const):
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::Row::Row):
        (WebCore::Layout::TableGrid::appendCell):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::Row::box const):

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

        document.fonts.ready is resolved too quickly
        https://bugs.webkit.org/show_bug.cgi?id=174030
        <rdar://problem/33083550>

        Reviewed by Frédéric Wang.

        As described in https://drafts.csswg.org/css-font-loading/#font-face-set-ready, the ready promise
        is only fulfilled after layout operations complete and no additional font loads are necessary.

        This patch implements this by notifying the FontFaceSet created for the document when the document
        is finished loading. At that time, the promise will be resolved as soon as fonts are finished loading if any.

        Test: imported/w3c/web-platform-tests/infrastructure/assumptions/document-fonts-ready.html

        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::optionalFontFaceSet):
        * css/CSSFontSelector.h:
        * css/FontFaceSet.cpp:
        (WebCore::FontFaceSet::FontFaceSet):
        (WebCore::FontFaceSet::startedLoading):
        (WebCore::FontFaceSet::didFirstLayout):
        (WebCore::FontFaceSet::completedLoading):
        * css/FontFaceSet.h:
        * dom/Document.cpp:
        (WebCore::Document::implicitClose):

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

        [LFC][BFC] BlockFormattingContext::usedAvailableWidthForFloatAvoider should only be called on float avoiders.
        https://bugs.webkit.org/show_bug.cgi?id=201238
        <rdar://problem/54807663>

        Reviewed by Antti Koivisto.

        Make the horizontal available space logic for float avoiders more explicit/readable. 

        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):

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

        [LFC] Inline content logging should have some extra space for better readability
        https://bugs.webkit.org/show_bug.cgi?id=201236
        <rdar://problem/54807336>

        Reviewed by Antti Koivisto.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputInlineRuns):

2019-08-29  Simon Fraser  <simon.fraser@apple.com>

        Avoid running the outline painting phase if no renderers have outlines
        https://bugs.webkit.org/show_bug.cgi?id=201284

        Reviewed by Said Abou-Hallawa.

        The outline painting phase (paintOutlineForFragments()) can take up to 20% of the painting time
        even when there are no outlines. Keep track of which renderers have outlines, and only run the phase
        when printing (for hasOutlineAnnotation()) or if there are any renderers with outlines.

        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::styleWillChange):
        (WebCore::RenderElement::styleDidChange):
        (WebCore::RenderElement::willBeDestroyed):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayerContents):
        * rendering/RenderView.h:

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

        [LFC][TFC] Use the "complicated-cases" category for computing the TFC root's height
        https://bugs.webkit.org/show_bug.cgi?id=201230
        <rdar://problem/54806131>

        Reviewed by Antti Koivisto.

        This might change in the future but for now let's use the "complicated cases" when we need to compute the TFC's height and vertical margin.
        This is very BFC specific since (block)TFC is always parented in a BFC.

        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

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

        [LFC][TFC] The table wrapper box is a block level box
        https://bugs.webkit.org/show_bug.cgi?id=201229
        <rdar://problem/54805515>

        Reviewed by Antti Koivisto.

        This is the anonymous box that we inject as the parent of the table caption/actual table box.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesBlockFormattingContext const):
        (WebCore::Layout::Box::isFloatAvoider const):
        (WebCore::Layout::Box::isBlockLevelBox const):

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

        Skip fetch event dispatching if no fetch event handler is added at script evaluation time
        https://bugs.webkit.org/show_bug.cgi?id=201174

        Reviewed by Chris Dumez.

        At end of worker script evaluation, store whether a fetch event handler is registered.
        Send it back to the SWServer that will store it in the corresponding SWServerWorker.

        Add support for soft update directly from the registration.
        This will trigger a soft-update from the worker context itself.
        In theory, this should be started by the job queue but we do not have a way yet to implement this as per spec.

        Test: http/wpt/service-workers/skipFetchEvent.https.html

        * workers/DedicatedWorkerThread.h:
        (WebCore::DedicatedWorkerThread::start):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::workerThread):
        * workers/WorkerThread.h:
        (WebCore::WorkerThread::finishedEvaluatingScript):
        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::registerServiceWorkerThreadForInstall):
        (WebCore::SWContextManager::startedServiceWorker):
        (WebCore::SWContextManager::softUpdate):
        * workers/service/context/SWContextManager.h:
        * workers/service/context/ServiceWorkerThread.cpp:
        (WebCore::ServiceWorkerThread::postFetchTask):
        (WebCore::ServiceWorkerThread::softUpdate):
        (WebCore::ServiceWorkerThread::finishedEvaluatingScript):
        (WebCore::ServiceWorkerThread::start):
        * workers/service/context/ServiceWorkerThread.h:
        (WebCore::ServiceWorkerThread::doesHandleFetch const):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerRegistration.cpp:
        (WebCore::SWServerRegistration::shouldSoftUpdate const):
        (WebCore::SWServerRegistration::softUpdate):
        * workers/service/server/SWServerRegistration.h:
        (WebCore::SWServerRegistration::isStale const):
        * workers/service/server/SWServerToContextConnection.cpp:
        (WebCore::SWServerToContextConnection::generateConnectionIdentifier):
        (WebCore::SWServerToContextConnection::SWServerToContextConnection):
        (WebCore::SWServerToContextConnection::scriptContextStarted):
        * workers/service/server/SWServerToContextConnection.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::scriptContextStarted):
        (WebCore::SWServerWorker::setState):
        * workers/service/server/SWServerWorker.h:
        (WebCore::SWServerWorker::shouldSkipFetchEvent const):

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

        Remove support for macOS < 10.13 (part 3)
        https://bugs.webkit.org/show_bug.cgi?id=201224
        <rdar://problem/54795934>

        Reviewed by Darin Adler.

        Remove symbols in WebKitTargetConditionals.xcconfig related to macOS
        10.13, including WK_MACOS_1013 and WK_MACOS_BEFORE_1013, and suffixes
        like _MACOS_SINCE_1013.

        No new tests -- no new or changed functionality.

        * Configurations/WebKitTargetConditionals.xcconfig:

2019-08-29  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Do not use makeWeakPtr from streaming thread.
        https://bugs.webkit.org/show_bug.cgi?id=201220

        Reviewed by Xabier Rodriguez-Calvar.

        Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https.html

        Recently some asserts were added that you can't create WeakPtr's
        from streaming threads when the factory is created on the
        main-thread. The fix is to eagerly create the WeakPtr at player
        initialization time, rather than lazily when the streaming thread
        first asks for it.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

2019-08-29  Rob Buis  <rbuis@igalia.com>

        Address some MathML FIXMEs 
        https://bugs.webkit.org/show_bug.cgi?id=201293

        Reviewed by Frédéric Wang.

        Add element tag checks for data, time and dialog.

        * mathml/MathMLOperatorDictionary.h:
        * mathml/MathMLPresentationElement.cpp:
        (WebCore::MathMLPresentationElement::isPhrasingContent):
        (WebCore::MathMLPresentationElement::isFlowContent):

2019-08-29  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Nicosia::Animation is missing the copy assignment operator
        https://bugs.webkit.org/show_bug.cgi?id=201298

        Reviewed by Carlos Garcia Campos.

        Along with the copy constructor, the Nicosia::Animation class also
        requires the copy assignment operator that's invoked whenever
        the containing Nicosia::Animations object is copied across different
        state objects.

        Much like the constructor, the copy assignment should clone the
        TimingFunction object to make it safely reusable in other contexts.
        This fixes the assertion failures in debug configurations over the
        improper cross-thread RefCounted usage.

        * platform/graphics/nicosia/NicosiaAnimation.cpp:
        (Nicosia::Animation::operator=):
        * platform/graphics/nicosia/NicosiaAnimation.h:
        Explicitly default the move constructor and assignment operator,
        providing the whole quartet.

2019-08-29  Rob Buis  <rbuis@igalia.com>

        https://bugs.webkit.org/show_bug.cgi?id=200917
        Do not call addHTTPOriginIfNeeded for window.open

        window.open() always uses GET requests and addHTTPOriginIfNeeded
        has no effect for GET, so do not call it.

        Reviewed by Frédéric Wang.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::createWindow):

2019-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        WebSockets: first-party for cookies not set in handshake request when using platform APIs
        https://bugs.webkit.org/show_bug.cgi?id=200165

        Reviewed by Youenn Fablet.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):

2019-08-29  Rob Buis  <rbuis@igalia.com>

        Implement HTMLOrForeignElement
        https://bugs.webkit.org/show_bug.cgi?id=201219

        Reviewed by Frédéric Wang.

        Add FIXME for updating the spec link.

        * html/HTMLOrForeignElement.idl:

2019-08-28  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Implement layer representation retain, release mechanics
        https://bugs.webkit.org/show_bug.cgi?id=201133

        Reviewed by Carlos Garcia Campos.

        * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp:
        (WebCore::LayerRepresentation::retainPlatformLayer):
        Type-cast the layer object to the reference-counted
        Nicosia::PlatformLayer type and reference that object.
        (WebCore::LayerRepresentation::releasePlatformLayer):
        Ditto, but dereference the object.

2019-08-28  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Add Nicosia::PlatformLayer::accessStaging() helper
        https://bugs.webkit.org/show_bug.cgi?id=201132

        Reviewed by Carlos Garcia Campos.

        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
        (Nicosia::CompositionLayer::accessStaging):
        Add an accessor into the staging state of the Nicosia::PlatformLayer
        object. This will be needed for the application of scrolling changes
        in the asynchronous scrolling system.

2019-08-28  Zan Dobersek  <zdobersek@igalia.com>

        [CoordGraphics] Expose Nicosia layer as the underlying CoordinatedGraphicsLayer platform layer
        https://bugs.webkit.org/show_bug.cgi?id=201131

        Reviewed by Carlos Garcia Campos.

        Add the CoordinatedGraphicsLayer::platformLayer() override, returning
        the Nicosia::CompositionLayer object as the underlying platform layer.
        This will come in handy for asynchronous scrolling.

        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::platformLayer const):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

2019-08-28  Zan Dobersek  <zdobersek@igalia.com>

        [Nicosia] Polish ScrollingCoordinator implementation
        https://bugs.webkit.org/show_bug.cgi?id=201130

        Reviewed by Carlos Garcia Campos.

        These changes primarily mirror the Mac implementation of this class.

        * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
        (WebCore::ScrollingCoordinatorNicosia::pageDestroyed):
        Upon releasing the ThreadedScrollingTree, it should also be invalidated
        on the scrolling thread.
        (WebCore::ScrollingCoordinatorNicosia::commitTreeState):
        Invoke willCommitTree() at the beginning of this method. Additionally
        the pending-commit-count is incremented for the ThreadedScrollingTree
        object.

2019-08-28  Ryosuke Niwa  <rniwa@webkit.org>

        Make tabIndex IDL attribute reflect its content attribute
        https://bugs.webkit.org/show_bug.cgi?id=199606
        <rdar://problem/52811448>

        Reviewed by Chris Dumez.

        This patch makes tabIndex IDL attribute no longer return 0 when the element is focusable
        to match the latest HTML5 specification. Instead, the IDL attribute simply reflect the tabindex
        content attribute with some elements having 0 as the default tab index (see r248784):
        https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute

        The practical implication is that tabIndex IDL attribute on a root editable element (a.k.a.
        editing host in HTML5 spec term), body element in design mode, and media elements with
        media controls would start returning -1 instead of 0.

        Mechanically, this is accomplished by removing the special case in Element::tabIndexForBindings
        when supportsFocus returned true. The effect, if any, this patch has on each element which
        overrides Element::supportsFocus is summarized as follows (indentation simplies inheritance):

        HTMLAnchorElement -> No effect since defaultTabIndex returns 0.
            HTMLAreaElement -> Ditto.
        HTMLBodyElement -> Changes to return -1 in design mode.
        HTMLElement -> Changes to return -1 on a root editable element.
        HTMLFormControlElement
            HTMLButtonElement -> No effect since defaultTabIndex returns 0.
            HTMLFieldSetElement -> No effect since this is an override to use HTMLElement's supportsFocus.
            HTMLFormControlElementWithState
                HTMLKeygenElement -> No effect since defaultTabIndex returns 0.
                HTMLSelectElement -> Ditto.
                HTMLTextFormControlElement -> Ditto.
                    HTMLInputElement -> Ditto.
                    HTMLTextAreaElement -> Ditto.
            HTMLOutputElement -> No effect since this is an override to use HTMLElement's supportsFocus.
        HTMLFrameElementBase - No change. Added defaultTabIndex on HTMLIFrameElement and HTMLFrameElement
            to returns 0.
        HTMLImageElement - No impact since it only affects when an image is set to be editable via SPI.
        HTMLMediaElement - Changes to return -1 when media controls is present.
        HTMLPlugInElement - applet and embed elements change to return -1 when the plugin is available.
        HTMLSummaryElement - No change. Added defaultTabIndex to return 0 when it's active to match
            supportsFocus as well as the HTML5 specification.
        MathMLElement - No effect since tabIndex IDL attribute does not exist in MathML.
        SVGAElement - No effect since defaultTabIndex returns 0.
        SVGClipPathElement - No effect since it always returns false.
        SVGDefsElement - No effect since it always returns false.

        Tests: fast/dom/tabindex-defaults.html
               plugins/focus.html

        * dom/Element.cpp:
        (WebCore::Element::tabIndexForBindings const): Made the change.
        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::defaultTabIndex const): Added to preserve the existing behavior.
        * html/HTMLFrameElement.h:
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::defaultTabIndex const): Ditto.
        * html/HTMLIFrameElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::defaultTabIndex const): Added. Always return 0 to match the spec.
        * html/HTMLObjectElement.h:
        * html/HTMLSummaryElement.cpp:
        (WebCore::HTMLSummaryElement::defaultTabIndex const): Added. Return 0 when the this summary
        is the active summary element of the details element.
        * html/HTMLSummaryElement.h:

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

        Make FillLayer::hasImage() inline
        https://bugs.webkit.org/show_bug.cgi?id=201265

        Reviewed by Zalan Bujtas.

        FillLayer::hasImage() shows up on profiles because it's called from hot functions like
        isTransparent() and hasMask(), so make a basic inline version that doens't have
        to walk the list.

        * rendering/style/FillLayer.cpp:
        (WebCore::FillLayer::hasImageInAnyLayer const):
        (WebCore::FillLayer::hasImage const): Deleted.
        * rendering/style/FillLayer.h:
        (WebCore::FillLayer::hasImage const):

2019-08-28  Peng Liu  <peng.liu6@apple.com>

        REGRESSION: String check: “realtime” Suggesting “real time”
        https://bugs.webkit.org/show_bug.cgi?id=201107
        <rdar://problem/46372620>

        Reviewed by Jer Noble.

        Update Localizable.strings.

        No new test.

        * en.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::localizedMediaControlElementString):

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

        PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting
        https://bugs.webkit.org/show_bug.cgi?id=201261

        Reviewed by Zalan Bujtas.

        MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker
        makes two calls per layer paint.

        Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially
        change the behavior of the tracker.

        * rendering/PaintFrequencyTracker.h:
        (WebCore::PaintFrequencyTracker::begin):
        (WebCore::PaintFrequencyTracker::end):

2019-08-28  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed. Restabilize non-unified build.

        * inspector/agents/WebConsoleAgent.h:
        * loader/ResourceLoadObserver.h:

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

        Devirtualize RenderBox::visualOverflowRect()
        https://bugs.webkit.org/show_bug.cgi?id=201231

        Reviewed by Zalan Bujtas.

        The only override of RenderBox::visualOverflowRect() was in RenderView, for "paintsEntireContents" views, and as
        far as I can tell this is not necessary. visualOverflowRect() is hot when called from RenderLayer::localBoundingBox() --
        this shows in profiles when scrolling large patch reviews, so making it non-virtual is a performance enhancement.
        
        RenderLayer::localBoundingBox() can also just call visualOverflowRect(), since that returns borderBoxRect()
        when there is no overflow.

        * rendering/RenderBox.h:
        (WebCore::RenderBox::visualOverflowRect const):
        * rendering/RenderLayer.cpp:
        (WebCore::performOverlapTests): Minor optimization to avoid a call to boundingBox().
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::visualOverflowRect const): Deleted.
        * rendering/RenderView.h:

2019-08-28  Austin Eng  <enga@chromium.org>

        Create ANGLE EGL Context with all extensions disabled by default
        https://bugs.webkit.org/show_bug.cgi?id=200900

        Reviewed by Alex Christensen.

        In WebGL, extensions must be explicitly requested before they are enabled.
        Fixes the following WebGL conformance tests with the ANGLE backend
        LayoutTests/webgl/*/conformance/extensions/ext-blend-minmax.html
        LayoutTests/webgl/*/conformance/extensions/ext-frag-depth.html
        LayoutTests/webgl/*/conformance/extensions/ext-shader-texture-lod.html
        LayoutTests/webgl/*/conformance/extensions/ext-sRGB.html
        LayoutTests/webgl/*/conformance/extensions/oes-standard-derivatives.html
        LayoutTests/webgl/*/conformance/extensions/oes-texture-float.html
        LayoutTests/webgl/*/conformance/extensions/webgl-compressed-texture-s3tc.html
        LayoutTests/webgl/*/conformance/glsl/misc/shader-with-dfdx.frag.html
        LayoutTests/webgl/*/conformance/glsl/variables/glsl-built-ins.html
        LayoutTests/webgl/*/conformance/textures/misc/texture-npot-video.html
        LayoutTests/webgl/*/conformance/textures/misc/texture-npot.html

        * html/canvas/ANGLEInstancedArrays.cpp:
        (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
        (WebCore::ANGLEInstancedArrays::supported):
        * html/canvas/WebGLCompressedTextureASTC.cpp:
        (WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC):
        * html/canvas/WebGLCompressedTextureATC.cpp:
        (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
        * html/canvas/WebGLCompressedTexturePVRTC.cpp:
        (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
        * html/canvas/WebGLCompressedTextureS3TC.cpp:
        (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
        (WebCore::WebGLCompressedTextureS3TC::supported):
        * html/canvas/WebGLDebugShaders.cpp:
        (WebCore::WebGLDebugShaders::WebGLDebugShaders):
        * html/canvas/WebGLDepthTexture.cpp:
        (WebCore::WebGLDepthTexture::WebGLDepthTexture):
        * html/canvas/WebGLDrawBuffers.cpp:
        (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
        (WebCore::WebGLDrawBuffers::supported):
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::validateDepthStencil):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):

2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>

        All image drawing functions should take an argument of type ImagePaintingOptions
        https://bugs.webkit.org/show_bug.cgi?id=201059

        Reviewed by Simon Fraser.

        In this patch:
        -- All the image drawing function will take an argument of type
           ImagePaintingOptions instead of passing individual options.

        -- ImagePaintingOptions is made like a set of options. It can be
           initialized with any number of options and the order does not matter

        -- Image::originalSize() is deleted because it returns size() and none
           of the Image concrete classes overrides this implementation.

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * html/ImageBitmap.cpp:
        (WebCore::ImageBitmap::createPromise):
        (WebCore::ImageBitmap::createFromBuffer):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        (WebCore::drawImageToContext):
        (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::draw):
        (WebCore::BitmapImage::drawPattern):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/CrossfadeGeneratedImage.cpp:
        (WebCore::drawCrossfadeSubimage):
        (WebCore::CrossfadeGeneratedImage::draw):
        (WebCore::CrossfadeGeneratedImage::drawPattern):
        * platform/graphics/CrossfadeGeneratedImage.h:
        * platform/graphics/CustomPaintImage.cpp:
        (WebCore::CustomPaintImage::draw):
        (WebCore::CustomPaintImage::drawPattern):
        * platform/graphics/CustomPaintImage.h:
        * platform/graphics/GeneratedImage.h:
        (WebCore::GeneratedImage::draw):
        (WebCore::GeneratedImage::drawPattern):
        * platform/graphics/GradientImage.cpp:
        (WebCore::GradientImage::draw):
        (WebCore::GradientImage::drawPattern):
        * platform/graphics/GradientImage.h:
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawImage):
        (WebCore::GraphicsContext::drawTiledImage):
        (WebCore::GraphicsContext::drawImageBuffer):
        (WebCore::GraphicsContext::drawConsumingImageBuffer):
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContext::drawNativeImage):
        (WebCore::GraphicsContext::drawImage):
        (WebCore::GraphicsContext::drawTiledImage):
        (WebCore::GraphicsContext::drawImageBuffer):
        (WebCore::GraphicsContext::drawPattern):
        (WebCore::GraphicsContext::drawConsumingImageBuffer):
        (WebCore::ImagePaintingOptions::ImagePaintingOptions): Deleted.
        (WebCore::ImagePaintingOptions::usesDefaultInterpolation const): Deleted.
        * platform/graphics/GraphicsContextImpl.cpp:
        (WebCore::GraphicsContextImpl::drawImageImpl):
        (WebCore::GraphicsContextImpl::drawTiledImageImpl):
        * platform/graphics/GraphicsContextImpl.h:
        * platform/graphics/Image.cpp:
        (WebCore::Image::drawPattern):
        (WebCore::Image::drawTiled):
        (WebCore::Image::computeIntrinsicDimensions):
        * platform/graphics/Image.h:
        (WebCore::Image::drawPattern):
        (WebCore::Image::draw):
        (WebCore::Image::drawTiled):
        (WebCore::Image::originalSize const): Deleted.
        * platform/graphics/ImageBuffer.h:
        (WebCore::ImageBuffer::draw):
        (WebCore::ImageBuffer::drawPattern):
        (WebCore::ImageBuffer::drawConsuming):
        * platform/graphics/ImagePaintingOptions.h: Added.
        (WebCore::ImagePaintingOptions::ImagePaintingOptions):
        (WebCore::ImagePaintingOptions::compositeOperator const):
        (WebCore::ImagePaintingOptions::blendMode const):
        (WebCore::ImagePaintingOptions::decodingMode const):
        (WebCore::ImagePaintingOptions::orientation const):
        (WebCore::ImagePaintingOptions::interpolationQuality const):
        (WebCore::ImagePaintingOptions::setOption):
        * platform/graphics/NamedImageGeneratedImage.cpp:
        (WebCore::NamedImageGeneratedImage::draw):
        (WebCore::NamedImageGeneratedImage::drawPattern):
        * platform/graphics/NamedImageGeneratedImage.h:
        * platform/graphics/NativeImage.h:
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawShadowLayerBuffer):
        (WebCore::Cairo::drawShadowImage):
        (WebCore::Cairo::drawNativeImage):
        (WebCore::Cairo::drawPattern):
        * platform/graphics/cairo/CairoOperations.h:
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::drawNativeImage):
        (WebCore::GraphicsContext::drawPattern):
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::drawNativeImage):
        (WebCore::GraphicsContextImplCairo::drawPattern):
        * platform/graphics/cairo/GraphicsContextImplCairo.h:
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::drawConsuming):
        (WebCore::ImageBuffer::draw):
        (WebCore::ImageBuffer::drawPattern):
        * platform/graphics/cairo/NativeImageCairo.cpp:
        (WebCore::drawNativeImage):
        * platform/graphics/cg/GraphicsContext3DCG.cpp:
        (WebCore::GraphicsContext3D::paintToCanvas):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawNativeImage):
        (WebCore::GraphicsContext::drawPattern):
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::drawConsuming):
        (WebCore::ImageBuffer::draw):
        (WebCore::ImageBuffer::drawPattern):
        * platform/graphics/cg/NativeImageCG.cpp:
        (WebCore::drawNativeImage):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::draw):
        * platform/graphics/cg/PDFDocumentImage.h:
        * platform/graphics/displaylists/DisplayListItems.cpp:
        (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
        (WebCore::DisplayList::DrawNativeImage::apply const):
        (WebCore::DisplayList::DrawPattern::DrawPattern):
        (WebCore::DisplayList::DrawPattern::apply const):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawNativeImage::create):
        (WebCore::DisplayList::DrawPattern::create):
        (WebCore::DisplayList::DrawPattern::DrawPattern):
        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        (WebCore::DisplayList::Recorder::drawNativeImage):
        (WebCore::DisplayList::Recorder::drawPattern):
        * platform/graphics/displaylists/DisplayListRecorder.h:
        * platform/graphics/filters/FEBlend.cpp:
        (WebCore::FEBlend::platformApplySoftware):
        * platform/graphics/filters/FEComposite.cpp:
        (WebCore::FEComposite::platformApplySoftware):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::paint):
        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
        (Nicosia::CairoOperationRecorder::drawNativeImage):
        (Nicosia::CairoOperationRecorder::drawPattern):
        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::drawNativeImage):
        (WebCore::Direct2D::drawPattern):
        * platform/graphics/win/Direct2DOperations.h:
        * platform/graphics/win/GraphicsContextImplDirect2D.h:
        * platform/graphics/win/ImageCGWin.cpp:
        (WebCore::BitmapImage::getHBITMAPOfSize):
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):
        * platform/graphics/win/ImageCairoWin.cpp:
        (WebCore::BitmapImage::getHBITMAPOfSize):
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):
        * platform/graphics/win/NativeImageDirect2D.cpp:
        (WebCore::drawNativeImage):
        * platform/ios/DragImageIOS.mm:
        (WebCore::createDragImageFromImage):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintSnapshotImage):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintReplaced):
        (WebCore::RenderImage::paintIntoRect):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::drawForContainer):
        (WebCore::SVGImage::nativeImageForCurrentFrame):
        (WebCore::SVGImage::nativeImage):
        (WebCore::SVGImage::drawPatternForContainer):
        (WebCore::SVGImage::draw):
        * svg/graphics/SVGImage.h:
        * svg/graphics/SVGImageForContainer.cpp:
        (WebCore::SVGImageForContainer::draw):
        (WebCore::SVGImageForContainer::drawPattern):
        * svg/graphics/SVGImageForContainer.h:

2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>

        XLinkNames namespace is required before the 'href' attribute of SVG animate elements
        https://bugs.webkit.org/show_bug.cgi?id=201227

        Reviewed by Ryosuke Niwa.

        To get the animation target element, get the value of the "href" attribute
        or the "xlink:href" attribute.

        Tests: svg/custom/href-svg-namespace-animate-target.svg

        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::buildPendingResource):

2019-08-28  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r249209.

        Broke 19 webgpu/ tests

        Reverted changeset:

        "[WHLSL] Inline typedef'd types during Metal code generation
        to simplify generated code while also making it easier to
        read"
        https://bugs.webkit.org/show_bug.cgi?id=201185
        https://trac.webkit.org/changeset/249209

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

        [WHLSL] Matrices need to have correct alignment
        https://bugs.webkit.org/show_bug.cgi?id=201212

        Reviewed by Robin Morisset.

        Matrices have particular alignment requirements and size requirements.

          Type   | Alignment | Size
        ---------------------------
        float2x2 |         8 |   16
        float2x3 |        16 |   32
        float2x4 |        16 |   32
        float3x2 |         8 |   24
        float3x3 |        16 |   48
        float3x4 |        16 |   48
        float4x2 |         8 |   32
        float4x3 |        16 |   64
        float4x4 |        16 |   64

        These are important because they may be a member of a struct, and we don't want to misplace
        every successive item in the struct.

        Test: webgpu/whlsl/matrix-alignment.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):

2019-08-28  Rob Buis  <rbuis@igalia.com>

        Implement HTMLOrForeignElement
        https://bugs.webkit.org/show_bug.cgi?id=201219

        Reviewed by Ryosuke Niwa.

        Add the HTMLOrForeignElement [1] interface to share properties
        and methods between HTML, SVG and MathML.

        [1] https://github.com/mathml-refresh/mathml/issues/83

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/StaticRange.h:
        * html/HTMLElement.idl:
        * html/HTMLOrForeignElement.idl: Added.
        * svg/SVGElement.idl:

2019-08-28  Sam Weinig  <weinig@apple.com>

        [WHLSL] Inline typedef'd types during Metal code generation to simplify generated code while also making it easier to read
        https://bugs.webkit.org/show_bug.cgi?id=201185

        Reviewed by Saam Barati.

        The current Metal code generation generates many unnecessary typedefs during TypeNamer::emitMetalTypeDefinitions
        such as 'typedef float2 type19;' that can be removed by just using resolved type whereever the typedef would have
        been used. The only types that actually need to be predefined are the types that declare a new struct or enum, which 
        means we can stop emitting for AST::TypeReference, AST::Pointer, AST::Array, and AST::TypeDefinition. Instead, the
        relevent mangledNameForType constructs the computed name on the fly. 
        
        This is a 25% speedup in the metal code generation phase.

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        Switch to using auto rather than Mangled*Name when it is obvious and the actual return type
        may need to become more complicated (e.g. MangledOrNativeTypeName).

        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::visit):
        There is no need to generate typenames for AST::TypeDefinitions if they are never used.

        (WebCore::WHLSL::Metal::TypeNamer::generateUniquedTypeName):
        The only UnnamedType that needs a generated typename now is AST::ArrayReferenceType, which emits a struct interface.

        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        Stop generating type definitions for AST::TypeReference, AST::Pointer, AST::Array.

        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        Stop generating type definitions for AST::TypeDefinition.

        (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
        Update for rename from m_unnamedTypeMapping to m_arrayReferenceTypeMapping.

        (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
        Look into the types and generate a concrete type name when necessary. Lazily cache the constructed
        names for AST::ArrayType and AST::Pointer.

2019-08-28  Keith Rollin  <krollin@apple.com>

        Remove support for macOS < 10.13 (part 2)
        https://bugs.webkit.org/show_bug.cgi?id=201197
        <rdar://problem/54759985>

        Reviewed by Darin Adler.

        Update conditionals that reference WK_MACOS_1013 and suffixes like
        _MACOS_SINCE_1013, assuming that we're always building on 10.13 or
        later and that these conditionals are always True or False.

        See Bug 200694 for earlier changes in this area.

        No new tests -- no new or changed functionality.

        * Configurations/FeatureDefines.xcconfig:

2019-08-28  Chris Dumez  <cdumez@apple.com>

        geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure
        https://bugs.webkit.org/show_bug.cgi?id=201221

        Reviewed by Ryosuke Niwa.

        geolocation.watchPosition() / getCurrentPosition() should return PERMISSION_DENIED when context is not secure,
        not POSITION_UNAVAILABLE. Both Gecko and Blink agree on PERMISSION_DENIED.

        No new tests, updated existing tests.

        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::startRequest):

2019-08-28  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] WebKitMediaSrc rework
        https://bugs.webkit.org/show_bug.cgi?id=199719

        Reviewed by Xabier Rodriguez-Calvar.

        This patch reworks the WebKitMediaSrc element and many of the player
        private methods that interacted with it.

        In comparison with the old WebKitMediaSrc, in the new one seeks have
        been massively simplified.

        The new WebKitMediaSrc no longer relies on a bin or appsrc, having
        greater control over its operation. This made it comparatively much
        easier to implement features such as seek before playback or
        single-stream flushing.

        stream-collection events are emitted from the WebKitMediaSrc to reuse
        the track handling in MediaPlayerPrivateGStreamer for playbin3, which
        is now used for MSE pipelines.

        Additional tests have been added to check some assumptions, and some
        bugs that have surfaced with the changes have been fixed but no new
        features (like multi-track support) are implemented in this patch.

        One instance of these bugs is `resized` events, which were previously
        being emitted when frames with different resolutions where appended.
        This is a wrong behavior that has not been preserved in the rework, as
        resize events should be emitted when the frames are shown, not
        just appended.

        There are subtler bugfixes, such as ignoring PTS-less frames in
        AppendPipeline::appsinkNewSample(). These frames are problematic for
        MSE, yet they were somehow passing through the pipelines. Since
        WebKitMediaSrc is stricter with assertions, these have to be filtered.

        This test gets rid of !m_mseSeekCompleted assertion failures in tests
        and potentially other hard to debug bugs in the previous seek
        algorithm.

        This patch makes the following existing tests pass:

        imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html
        imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-v-framesize.html

        New test: imported/w3c/web-platform-tests/media-source/mediasource-buffered-seek.html
        New test: LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html (non-MSE related)

        * Headers.cmake:
        * platform/GStreamer.cmake:
        * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
        (WTF::adoptGRef):
        (WTF::refGPtr<GstMiniObject>):
        (WTF::derefGPtr<GstMiniObject>):
        * platform/graphics/gstreamer/GRefPtrGStreamer.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
        (WebCore::MediaPlayerPrivateGStreamer::paused const):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
        (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivateGStreamer::invalidateCachedPosition):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
        (WebCore::MediaPlayerPrivateGStreamerBase::naturalSizeFromCaps const):
        (WebCore::MediaPlayerPrivateGStreamerBase::samplesHaveDifferentNaturalSize const):
        (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
        (WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
        (WebCore::AppendPipeline::appsinkNewSample):
        (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
        * platform/graphics/gstreamer/mse/AppendPipeline.h:
        (WebCore::AppendPipeline::appsinkCaps):
        (WebCore::AppendPipeline::streamType):
        (WebCore::AppendPipeline::demuxerSrcPadCaps):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::~MediaPlayerPrivateGStreamerMSE):
        (WebCore::MediaPlayerPrivateGStreamerMSE::load):
        (WebCore::MediaPlayerPrivateGStreamerMSE::play):
        (WebCore::MediaPlayerPrivateGStreamerMSE::pause):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
        (WebCore::MediaPlayerPrivateGStreamerMSE::seekCompleted):
        (WebCore::MediaPlayerPrivateGStreamerMSE::setReadyState):
        (WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates):
        (WebCore::MediaPlayerPrivateGStreamerMSE::didEnd):
        (WebCore::MediaPlayerPrivateGStreamerMSE::unblockDurationChanges):
        (WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
        (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
        (WebCore::MediaSourceClientGStreamerMSE::addSourceBuffer):
        (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
        (WebCore::MediaSourceClientGStreamerMSE::flush):
        (WebCore::MediaSourceClientGStreamerMSE::enqueueSample):
        (WebCore::MediaSourceClientGStreamerMSE::isReadyForMoreSamples):
        (WebCore::MediaSourceClientGStreamerMSE::notifyClientWhenReadyForMoreSamples):
        (WebCore::MediaSourceClientGStreamerMSE::allSamplesInTrackEnqueued):
        * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
        * platform/graphics/gstreamer/mse/MediaSourceGStreamer.cpp:
        (WebCore::MediaSourceGStreamer::markEndOfStream):
        (WebCore::MediaSourceGStreamer::unmarkEndOfStream):
        (WebCore::MediaSourceGStreamer::waitForSeekCompleted):
        * platform/graphics/gstreamer/mse/MediaSourceGStreamer.h:
        * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: Removed.
        * platform/graphics/gstreamer/mse/PlaybackPipeline.h: Removed.
        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
        (WebCore::SourceBufferPrivateGStreamer::enqueueSample):
        (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples):
        (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
        (WebKitMediaSrcPrivate::streamByName):
        (Stream::Stream):
        (Stream::StreamingMembers::StreamingMembers):
        (Stream::StreamingMembers::durationEnqueued const):
        (findPipeline):
        (webkit_media_src_class_init):
        (webkit_media_src_init):
        (webKitMediaSrcFinalize):
        (debugProbe):
        (collectionPlusStream):
        (collectionMinusStream):
        (gstStreamType):
        (webKitMediaSrcAddStream):
        (webKitMediaSrcRemoveStream):
        (webKitMediaSrcActivateMode):
        (webKitMediaSrcPadLinked):
        (webKitMediaSrcStreamNotifyLowWaterLevel):
        (webKitMediaSrcLoop):
        (webKitMediaSrcEnqueueObject):
        (webKitMediaSrcEnqueueSample):
        (webKitMediaSrcEnqueueEvent):
        (webKitMediaSrcEndOfStream):
        (webKitMediaSrcIsReadyForMoreSamples):
        (webKitMediaSrcNotifyWhenReadyForMoreSamples):
        (webKitMediaSrcChangeState):
        (webKitMediaSrcStreamFlushStart):
        (webKitMediaSrcStreamFlushStop):
        (webKitMediaSrcFlush):
        (webKitMediaSrcSeek):
        (countStreamsOfType):
        (webKitMediaSrcGetProperty):
        (webKitMediaSrcUriGetType):
        (webKitMediaSrcGetProtocols):
        (webKitMediaSrcGetUri):
        (webKitMediaSrcSetUri):
        (webKitMediaSrcUriHandlerInit):
        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.h:
        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h: Removed.

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

        Have RenderSVGBlock compute visual overflow just like everyone else
        https://bugs.webkit.org/show_bug.cgi?id=201211

        Reviewed by Zalan Bujtas.

        RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers
        optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow()
        and call addVisualOverflow().

        * rendering/svg/RenderSVGBlock.cpp:
        (WebCore::RenderSVGBlock::computeOverflow):
        (WebCore::RenderSVGBlock::visualOverflowRect const): Deleted.
        * rendering/svg/RenderSVGBlock.h:

2019-08-28  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (r248807): Objects stored in ElementRareData are leaked
        https://bugs.webkit.org/show_bug.cgi?id=200954

        Reviewed by Antti Koivisto.

        Use a custom deleter in std::unique_ptr to call the correct destructor instead of making
        NodeRareData's destructor virtual. Added NodeRareData::isElementRareData to differentiate
        ElementRareData and NodeRareData by borrowing 1 bit from the frame count.

        No new tests since there should be no behavioral change.

        * dom/ElementRareData.h:
        (WebCore::ElementRareData::ElementRareData):
        * dom/Node.cpp:
        (WebCore::Node::materializeRareData): Call the constructors of unique_ptr directly since
        make_unique does not take a custom deleter. We can't add the support to makeUnique either
        without making it three arguments since we need to cast ElementRareData to NodeRareData
        in addition to specifying a custom deleter (normal casting wouldn't work due to
        the presence of a custom deleter).
        (WebCore::Node::NodeRareDataDeleter::operator() const): Added.
        * dom/Node.h:
        (WebCore::Node::NodeRareDataDeleter): Added.
        * dom/NodeRareData.cpp:
        * dom/NodeRareData.h:
        (WebCore::NodeRareData::NodeRareData): Makes newly added Type.
        (WebCore::NodeRareData::isElementRareData): Added.
        (WebCore::NodeRareData::~NodeRareData): Deleted.

2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>

        [SOUP] Shut compilation warning

        Unreviewed. RELEASE_LOG_ERROR() needs a channel.

        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::setupHSTSEnforcer):

2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>

        [SOUP] Fix the debug build after r249192

        Unreviewed build fix.

        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::setupHSTSEnforcer):

2019-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unable to enter text in https://eat.fi
        https://bugs.webkit.org/show_bug.cgi?id=193046

        Reviewed by Ryosuke Niwa.

        This is because the button element inside the label is receiving the click event, which causes the form to be
        submitted. According to the spec we should do nothing in this case, because button element is considered to be
        interactive content.

        "The activation behavior of a label element for events targeted at interactive content descendants of a label
        element, and any descendants of those interactive content descendants, must be to do nothing."
        https://html.spec.whatwg.org/#the-label-element

        This patch adds HTMLElement::isInteractiveContent() according to the HTML spec:

        "Interactive content is content that is specifically intended for user interaction.
        a (if the href attribute is present), audio (if the controls attribute is present), button, details, embed,
        iframe, img (if the usemap attribute is present), input (if the type attribute is not in the Hidden state),
        label, object (if the usemap attribute is present), select, textarea, video (if the controls attribute is
        present)"
        https://html.spec.whatwg.org/#interactive-content-2

        That's used in HTMLLabelElement::defaultEventHandler() using the helper method
        isEventTargetedAtInteractiveDescendants() to decide whether to simulate a click event or do nothing.

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::isInteractiveContent const):
        * html/HTMLAnchorElement.h:
        * html/HTMLButtonElement.h:
        * html/HTMLDetailsElement.h:
        * html/HTMLElement.h:
        (WebCore::HTMLElement::isInteractiveContent const):
        * html/HTMLEmbedElement.h:
        * html/HTMLIFrameElement.h:
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::isInteractiveContent const):
        * html/HTMLImageElement.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::isInteractiveContent const):
        * html/HTMLInputElement.h:
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::isEventTargetedAtInteractiveDescendants const):
        (WebCore::HTMLLabelElement::defaultEventHandler):
        * html/HTMLLabelElement.h:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::isInteractiveContent const):
        * html/HTMLMediaElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::isInteractiveContent const):
        * html/HTMLObjectElement.h:
        * html/HTMLSelectElement.h:
        * html/HTMLTextAreaElement.h:
        * html/HiddenInputType.h:
        * html/InputType.cpp:
        (WebCore::InputType::isInteractiveContent const):
        * html/InputType.h:

2019-08-28  Claudio Saavedra  <csaavedra@igalia.com>

        [GTK][WPE] Implement HSTS for the soup network backend
        https://bugs.webkit.org/show_bug.cgi?id=192074

        Reviewed by Carlos Garcia Campos.

        libsoup 2.67.1 introduced HSTS support via a SoupSessionFeature.
        Add support to the soup network backend by adding the feature to
        SoupNetworkSession and handling HSTS protocol upgrades, by
        propagating the scheme change further to clients. This patch adds
        the HSTS feature unconditionally, but it still possible to add
        a boolean property to the web context class if desired.

        Additionally, add API to the WebKitWebsiteDataManager to specify
        the directory where the HSTS database is saved. If the directory
        is not set or if the data manager is ephemeral, use a
        non-persistent, memory only HSTS enforcer.

        Implement as well the methods needed to clean-up and delete HSTS
        policies from the storage and expose the feature in GTK+ MiniBrowser's
        about:data.

        * platform/network/soup/GUniquePtrSoup.h:
        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::hstsStorageDirectory):
        (WebCore::SoupNetworkSession::SoupNetworkSession):
        (WebCore::SoupNetworkSession::setHSTSPersistentStorage):
        (WebCore::SoupNetworkSession::setupHSTSEnforcer):
        (WebCore::SoupNetworkSession::getHostNamesWithHSTSCache):
        (WebCore::SoupNetworkSession::deleteHSTSCacheForHostNames):
        (WebCore::SoupNetworkSession::clearHSTSCache):
        * platform/network/soup/SoupNetworkSession.h:

2019-08-28  Said Abou-Hallawa  <sabouhallawa@apple.com>

        SVG2: Add length, item getter and item setter to all SVG lists
        https://bugs.webkit.org/show_bug.cgi?id=199526

        Reviewed by Simon Fraser.

        -- Implement the SVG2 specs for SVG lists:
        https://svgwg.org/svg2-draft/types.html#TermListInterface.

        -- Match the arguments' names in the IDL files with the specs.

        Tests: svg/dom/SVGLengthList-length-indexed-access.xhtml
               svg/dom/SVGPathSegList-length-indexed-access.xhtml

        * svg/SVGLengthList.idl:
        * svg/SVGNumberList.idl:
        * svg/SVGPathSegList.h:
        * svg/SVGPathSegList.idl:
        * svg/SVGPointList.idl:
        * svg/SVGStringList.idl:
        * svg/SVGTransformList.idl:
        * svg/properties/SVGList.h:
        (WebCore::SVGList::length const):
        (WebCore::SVGList::setItem):

2019-08-27  John Wilander  <wilander@apple.com>  and  Fujii Hironori  <Hironori.Fujii@sony.com>

        Make FrameLoader::open() set outgoing referrer properly
        https://bugs.webkit.org/show_bug.cgi?id=167050
        <rdar://problem/27972404>

        Reviewed by Youenn Fablet.

        In debug builds, an assertion failed in WebCore::SecurityPolicy::generateReferrerHeader:
        ASSERTION FAILED: referrer == URL(URL(), referrer).strippedForUseAsReferrer()

        In release builds, cached pages with a URL fragment sent its URL fragment in the referrer.

        m_outgoingReferrer mistakenly had a URL fragment.

        Test: http/tests/navigation/page-cache-fragment-referrer.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::open): Set m_outgoingReferrer by using
        FrameLoader::setOutgoingReferrer to remove URL fragments.

2019-08-27  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Unreviewed. Build fix after r249175.

        Fix the condition which generates the declaration of vm in
        GenerateGetOwnPropertySlotByIndex.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateGetOwnPropertySlotByIndex):

2019-08-27  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Implement GPUErrors for and relax GPUBuffer validation rules
        https://bugs.webkit.org/show_bug.cgi?id=200852

        Reviewed by Dean Jackson.

        Fix incorrect usage validation during GPUBuffer creation.
        Implement GPUError reporting for GPUBuffer creation and methods.

        Test: webgpu/buffer-errors.html

        * Modules/webgpu/WebGPUBuffer.cpp:
        (WebCore::WebGPUBuffer::create):
        (WebCore::WebGPUBuffer::WebGPUBuffer):
        (WebCore::WebGPUBuffer::unmap):
        (WebCore::WebGPUBuffer::destroy):
        (WebCore::WebGPUBuffer::rejectOrRegisterPromiseCallback):
        * Modules/webgpu/WebGPUBuffer.h: Now inherits from GPUObjectBase.
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createBuffer const):
        (WebCore::WebGPUDevice::createBufferMapped const):
        * platform/graphics/gpu/GPUBuffer.h: No longer inherits from GPUObjectBase.
        * platform/graphics/gpu/GPUObjectBase.h:
        (WebCore::GPUObjectBase::errorScopes):
        (WebCore::GPUObjectBase::generateError): Deleted.
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::validateBufferUsage):
        (WebCore::GPUBuffer::tryCreate): Alignment issue should be general WebGPU requirement.
        (WebCore::GPUBuffer::GPUBuffer):
        (WebCore::GPUBuffer::~GPUBuffer): Must do cleanup without generating errors.
        (WebCore::GPUBuffer::registerMappingCallback):
        (WebCore::GPUBuffer::copyStagingBufferToGPU):
        (WebCore::GPUBuffer::unmap):
        (WebCore::GPUBuffer::destroy):

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

        [LFC][TFC] Layout and position the cell boxes
        https://bugs.webkit.org/show_bug.cgi?id=201192
        <rdar://problem/54758638>

        Reviewed by Antti Koivisto.

        Add a very basic (and faily incomplete) table cell layout logic. This is mostly WIP.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingContext.h:
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot):
        (WebCore::Layout::contentHeightForFormattingContextRoot): Deleted.
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout const):
        (WebCore::Layout::TableFormattingContext::computedTableWidth const):
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableFormattingContextGeometry.cpp: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.
        (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::Column::setLogicalLeft):
        (WebCore::Layout::TableGrid::Column::logicalLeft const):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::Column::logicalRight const):
        (WebCore::Layout::TableGrid::Row::setLogicalTop):
        (WebCore::Layout::TableGrid::Row::logicalTop const):
        (WebCore::Layout::TableGrid::Row::setLogicalHeight):
        (WebCore::Layout::TableGrid::Row::logicalHeight const):
        (WebCore::Layout::TableGrid::Row::logicalBottom const):

2019-08-27  Mark Lam  <mark.lam@apple.com>

        Refactor to use VM& instead of VM* at as many places as possible.
        https://bugs.webkit.org/show_bug.cgi?id=201172

        Reviewed by Yusuke Suzuki.

        No new tests.  Covered by existing tests.

        * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
        (WebCore::CDMSessionClearKey::update):
        * Modules/plugins/QuickTimePluginReplacement.mm:
        (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
        (WebCore::QuickTimePluginReplacement::installReplacement):
        * animation/KeyframeEffect.cpp:
        (WebCore::processKeyframeLikeObject):
        * bindings/js/GCController.cpp:
        (WebCore::GCController::dumpHeap):
        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::get):
        (WebCore::set):
        * bindings/js/JSCSSRuleListCustom.cpp:
        (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
        * bindings/js/JSCustomElementRegistryCustom.cpp:
        (WebCore::JSCustomElementRegistry::define):
        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
        * bindings/js/JSDOMConvertRecord.h:
        * bindings/js/JSDOMConvertStrings.h:
        (WebCore::JSConverter<IDLDOMString>::convert):
        (WebCore::JSConverter<IDLByteString>::convert):
        (WebCore::JSConverter<IDLUSVString>::convert):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
        (WebCore::addScopedChildrenIndexes):
        (WebCore::JSDOMWindow::defineOwnProperty):
        (WebCore::DialogHandler::dialogCreated):
        (WebCore::DialogHandler::returnValue const):
        (WebCore::JSDOMWindow::setOpener):
        (WebCore::JSDOMWindow::setOpenDatabase):
        * bindings/js/JSDOMWindowProperties.cpp:
        (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
        * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
        (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::handleEvent):
        * bindings/js/JSImageDataCustom.cpp:
        (WebCore::toJSNewlyCreated):
        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::JSLazyEventListener::initializeJSFunction const):
        * bindings/js/JSLocationCustom.cpp:
        (WebCore::JSLocation::getOwnPropertySlotByIndex):
        (WebCore::JSLocation::putByIndex):
        * bindings/js/JSNodeListCustom.cpp:
        (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
        * bindings/js/JSPluginElementFunctions.cpp:
        (WebCore::pluginElementCustomGetCallData):
        * bindings/js/JSRemoteDOMWindowCustom.cpp:
        (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex):
        * bindings/js/ReadableStreamDefaultController.cpp:
        (WebCore::ReadableStreamDefaultController::invoke):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
        * bindings/js/ScriptModuleLoader.cpp:
        (WebCore::ScriptModuleLoader::resolve):
        (WebCore::ScriptModuleLoader::importModule):
        (WebCore::ScriptModuleLoader::createImportMetaProperties):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::CloneSerializer):
        (WebCore::CloneSerializer::write):
        (WebCore::CloneSerializer::serialize):
        (WebCore::CloneDeserializer::CachedString::jsString):
        (WebCore::CloneDeserializer::readTerminal):
        (WebCore::CloneDeserializer::deserialize):
        * bindings/js/WebCoreBuiltinNames.h:
        (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):
        * bindings/js/WindowProxy.cpp:
        (WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateGetOwnPropertySlotByIndex):
        (GenerateGetOwnPropertyNames):
        (GeneratePutByIndex):
        (GenerateDeletePropertyByIndex):
        (GenerateDictionaryImplementationContent):
        (addUnscopableProperties):
        (GenerateImplementation):
        (GenerateAttributeSetterBodyDefinition):
        (GenerateOperationDefinition):
        (GenerateSerializerDefinition):
        (GenerateCallbackImplementationContent):
        (GenerateConstructorHelperMethods):
        * bindings/scripts/test/JS/JSInterfaceName.cpp:
        (WebCore::JSInterfaceNameConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSMapLike.cpp:
        (WebCore::JSMapLikeConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
        (WebCore::JSReadOnlyMapLikeConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
        (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
        (WebCore::JSTestCEReactionsConstructor::initializeProperties):
        (WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter):
        (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter):
        (WebCore::setJSTestCEReactionsStringifierAttributeSetter):
        (WebCore::setJSTestCEReactionsAttributeWithCEReactionsNotNeededSetter):
        (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsNotNeededSetter):
        (WebCore::setJSTestCEReactionsStringifierAttributeNotNeededSetter):
        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
        (WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties):
        (WebCore::setJSTestCEReactionsStringifierValueSetter):
        (WebCore::setJSTestCEReactionsStringifierValueWithoutReactionsSetter):
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:
        (WebCore::JSTestCallTracerConstructor::initializeProperties):
        (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
        (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
        (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
        * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
        (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
        (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
        (WebCore::JSTestCallbackInterface::callbackWithNoParam):
        (WebCore::JSTestCallbackInterface::callbackWithArrayParam):
        (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam):
        (WebCore::JSTestCallbackInterface::callbackWithStringList):
        (WebCore::JSTestCallbackInterface::callbackWithBoolean):
        (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass):
        (WebCore::JSTestCallbackInterface::callbackWithAReturnValue):
        (WebCore::JSTestCallbackInterface::callbackThatRethrowsExceptions):
        (WebCore::JSTestCallbackInterface::callbackThatSkipsInvokeCheck):
        (WebCore::JSTestCallbackInterface::callbackWithThisObject):
        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
        (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::JSTestDOMJITConstructor::initializeProperties):
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
        * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
        (WebCore::JSTestEnabledBySettingConstructor::initializeProperties):
        (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
        (WebCore::setJSTestEnabledBySettingTestSubObjEnabledBySettingConstructorSetter):
        (WebCore::setJSTestEnabledBySettingEnabledBySettingAttributeSetter):
        * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
        (WebCore::JSTestEnabledForContextConstructor::initializeProperties):
        (WebCore::setJSTestEnabledForContextTestSubObjEnabledForContextConstructorSetter):
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::convertDictionary<TestEventConstructor::Init>):
        (WebCore::JSTestEventConstructorConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
        (WebCore::JSTestEventTargetConstructor::initializeProperties):
        (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
        (WebCore::JSTestEventTarget::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestException.cpp:
        (WebCore::JSTestExceptionConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
        (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
        (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
        (WebCore::JSTestGlobalObjectConstructor::initializeProperties):
        (WebCore::setJSTestGlobalObjectRegularAttributeSetter):
        (WebCore::setJSTestGlobalObjectPublicAndPrivateAttributeSetter):
        (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttributeSetter):
        (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttributeSetter):
        (WebCore::setJSTestGlobalObjectTestCEReactionsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCEReactionsStringifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCallTracerConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestCallbackInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestClassWithJSBuiltinConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestDOMJITConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestDomainSecurityConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEnabledBySettingConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEnabledForContextConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEventConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestEventTargetConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestGenerateIsReachableConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestGlobalObjectConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIndexedSetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestInterfaceLeadingUnderscoreConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestIterableConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestJSBuiltinConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestMapLikeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestMediaQueryListListenerConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedAndIndexedSetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedConstructorConstructorSetter):
        (WebCore::setJSTestGlobalObjectAudioConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedDeleterWithIndexedGetterConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedGetterCallWithConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedGetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedGetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterNoIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterThrowingExceptionConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIdentifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithIndexedGetterAndSetterConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithOverrideBuiltinsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestOverloadedConstructorsWithSequenceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestOverrideBuiltinsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestPluginInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestReadOnlyMapLikeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestReportExtraMemoryCostConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationIndirectInheritanceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationInheritConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializationInheritFinalConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestSerializedScriptValueInterfaceConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierAnonymousOperationConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierNamedOperationConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierOperationImplementedAsConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierOperationNamedToStringConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierReadOnlyAttributeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestStringifierReadWriteAttributeConstructorSetter):
        (WebCore::setJSTestGlobalObjectTestTypedefsConstructorSetter):
        * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestIndexedSetterNoIdentifierConstructor::initializeProperties):
        (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
        (WebCore::JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties):
        (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestIndexedSetterWithIdentifierConstructor::initializeProperties):
        (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestInterface.cpp:
        (WebCore::JSTestInterfaceConstructor::initializeProperties):
        (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter):
        (WebCore::setJSTestInterfaceImplementsStr2Setter):
        (WebCore::setJSTestInterfaceImplementsStr3Setter):
        (WebCore::setJSTestInterfaceImplementsNodeSetter):
        (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttrSetter):
        (WebCore::setJSTestInterfaceSupplementalStr2Setter):
        (WebCore::setJSTestInterfaceSupplementalStr3Setter):
        (WebCore::setJSTestInterfaceSupplementalNodeSetter):
        (WebCore::setJSTestInterfaceReflectAttributeSetter):
        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
        (WebCore::JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestIterable.cpp:
        (WebCore::JSTestIterableConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
        (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
        (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustomSetter):
        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
        (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
        (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
        (WebCore::JSTestNamedConstructorConstructor::initializeProperties):
        (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
        (WebCore::JSTestNamedDeleterNoIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterNoIdentifier::deletePropertyByIndex):
        * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
        (WebCore::JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties):
        (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterThrowingException::deletePropertyByIndex):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
        (WebCore::JSTestNamedDeleterWithIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedDeleterWithIdentifier::deletePropertyByIndex):
        * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties):
        (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
        (WebCore::JSTestNamedGetterCallWithConstructor::initializeProperties):
        (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedGetterCallWith::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
        (WebCore::JSTestNamedGetterNoIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
        (WebCore::JSTestNamedGetterWithIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
        (WebCore::JSTestNamedSetterNoIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterNoIdentifier::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
        (WebCore::JSTestNamedSetterThrowingExceptionConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterThrowingException::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterThrowingException::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
        (WebCore::JSTestNamedSetterWithIdentifierConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithIdentifier::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithOverrideBuiltins::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithUnforgableProperties::putByIndex):
        * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertyNames):
        (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::putByIndex):
        * bindings/scripts/test/JS/JSTestNode.cpp:
        (WebCore::JSTestNodeConstructor::initializeProperties):
        (WebCore::JSTestNodePrototype::finishCreation):
        (WebCore::setJSTestNodeNameSetter):
        (WebCore::JSTestNode::serialize):
        * bindings/scripts/test/JS/JSTestObj.cpp:
        (WebCore::convertDictionary<TestObj::Dictionary>):
        (WebCore::convertDictionaryToJS):
        (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
        (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
        (WebCore::convertDictionary<AlternateDictionaryName>):
        (WebCore::convertDictionary<TestObj::ParentDictionary>):
        (WebCore::convertDictionary<TestObj::ChildDictionary>):
        (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
        (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
        (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
        (WebCore::JSTestObjConstructor::initializeProperties):
        (WebCore::JSTestObjPrototype::finishCreation):
        (WebCore::JSTestObj::getOwnPropertyNames):
        (WebCore::setJSTestObjConstructorStaticStringAttrSetter):
        (WebCore::setJSTestObjEnumAttrSetter):
        (WebCore::setJSTestObjByteAttrSetter):
        (WebCore::setJSTestObjOctetAttrSetter):
        (WebCore::setJSTestObjShortAttrSetter):
        (WebCore::setJSTestObjClampedShortAttrSetter):
        (WebCore::setJSTestObjEnforceRangeShortAttrSetter):
        (WebCore::setJSTestObjUnsignedShortAttrSetter):
        (WebCore::setJSTestObjLongAttrSetter):
        (WebCore::setJSTestObjLongLongAttrSetter):
        (WebCore::setJSTestObjUnsignedLongLongAttrSetter):
        (WebCore::setJSTestObjStringAttrSetter):
        (WebCore::setJSTestObjUsvstringAttrSetter):
        (WebCore::setJSTestObjTestObjAttrSetter):
        (WebCore::setJSTestObjTestNullableObjAttrSetter):
        (WebCore::setJSTestObjLenientTestObjAttrSetter):
        (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyStringSetter):
        (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyStringSetter):
        (WebCore::setJSTestObjByteStringAttrTreatingNullAsEmptyStringSetter):
        (WebCore::setJSTestObjStringLongRecordAttrSetter):
        (WebCore::setJSTestObjUsvstringLongRecordAttrSetter):
        (WebCore::setJSTestObjStringObjRecordAttrSetter):
        (WebCore::setJSTestObjStringNullableObjRecordAttrSetter):
        (WebCore::setJSTestObjDictionaryAttrSetter):
        (WebCore::setJSTestObjNullableDictionaryAttrSetter):
        (WebCore::setJSTestObjAnnotatedTypeInUnionAttrSetter):
        (WebCore::setJSTestObjAnnotatedTypeInSequenceAttrSetter):
        (WebCore::setJSTestObjImplementationEnumAttrSetter):
        (WebCore::setJSTestObjXMLObjAttrSetter):
        (WebCore::setJSTestObjCreateSetter):
        (WebCore::setJSTestObjReflectedStringAttrSetter):
        (WebCore::setJSTestObjReflectedUSVStringAttrSetter):
        (WebCore::setJSTestObjReflectedIntegralAttrSetter):
        (WebCore::setJSTestObjReflectedUnsignedIntegralAttrSetter):
        (WebCore::setJSTestObjReflectedBooleanAttrSetter):
        (WebCore::setJSTestObjReflectedURLAttrSetter):
        (WebCore::setJSTestObjReflectedUSVURLAttrSetter):
        (WebCore::setJSTestObjReflectedCustomIntegralAttrSetter):
        (WebCore::setJSTestObjReflectedCustomBooleanAttrSetter):
        (WebCore::setJSTestObjReflectedCustomURLAttrSetter):
        (WebCore::setJSTestObjEnabledAtRuntimeAttributeSetter):
        (WebCore::setJSTestObjConstructorEnabledAtRuntimeAttributeStaticSetter):
        (WebCore::setJSTestObjTypedArrayAttrSetter):
        (WebCore::setJSTestObjCustomAttrSetter):
        (WebCore::setJSTestObjOnfooSetter):
        (WebCore::setJSTestObjOnwebkitfooSetter):
        (WebCore::setJSTestObjWithExecStateAttributeSetter):
        (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttributeSetter):
        (WebCore::setJSTestObjWithScriptExecutionContextAttributeSetter):
        (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttributeSetter):
        (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeSetter):
        (WebCore::setJSTestObjConditionalAttr1Setter):
        (WebCore::setJSTestObjConditionalAttr2Setter):
        (WebCore::setJSTestObjConditionalAttr3Setter):
        (WebCore::setJSTestObjConditionalAttr4ConstructorSetter):
        (WebCore::setJSTestObjConditionalAttr5ConstructorSetter):
        (WebCore::setJSTestObjConditionalAttr6ConstructorSetter):
        (WebCore::setJSTestObjAnyAttributeSetter):
        (WebCore::setJSTestObjObjectAttributeSetter):
        (WebCore::setJSTestObjMutablePointSetter):
        (WebCore::setJSTestObjStrawberrySetter):
        (WebCore::setJSTestObjIdSetter):
        (WebCore::setJSTestObjReplaceableAttributeSetter):
        (WebCore::setJSTestObjNullableLongSettableAttributeSetter):
        (WebCore::setJSTestObjNullableStringSettableAttributeSetter):
        (WebCore::setJSTestObjNullableUSVStringSettableAttributeSetter):
        (WebCore::setJSTestObjNullableByteStringSettableAttributeSetter):
        (WebCore::setJSTestObjAttributeWithReservedEnumTypeSetter):
        (WebCore::setJSTestObjPutForwardsAttributeSetter):
        (WebCore::setJSTestObjPutForwardsNullableAttributeSetter):
        (WebCore::setJSTestObjStringifierAttributeSetter):
        (WebCore::setJSTestObjConditionallyReadWriteAttributeSetter):
        (WebCore::setJSTestObjConditionalAndConditionallyReadWriteAttributeSetter):
        (WebCore::setJSTestObjConditionallyExposedToWindowAttributeSetter):
        (WebCore::setJSTestObjConditionallyExposedToWorkerAttributeSetter):
        (WebCore::setJSTestObjConditionallyExposedToWindowAndWorkerAttributeSetter):
        (WebCore::JSTestObj::serialize):
        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
        (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
        (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
        (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
        (WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
        (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
        * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
        (WebCore::JSTestPluginInterfaceConstructor::initializeProperties):
        (WebCore::JSTestPluginInterface::getOwnPropertySlotByIndex):
        (WebCore::JSTestPluginInterface::putByIndex):
        * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
        (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
        (WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestSerialization.cpp:
        (WebCore::JSTestSerializationConstructor::initializeProperties):
        (WebCore::setJSTestSerializationFirstStringAttributeSetter):
        (WebCore::setJSTestSerializationSecondLongAttributeSetter):
        (WebCore::setJSTestSerializationThirdUnserializableAttributeSetter):
        (WebCore::setJSTestSerializationFourthUnrestrictedDoubleAttributeSetter):
        (WebCore::setJSTestSerializationFifthLongAttributeSetter):
        (WebCore::setJSTestSerializationSixthTypedefAttributeSetter):
        (WebCore::setJSTestSerializationSeventhDirectlySerializableAttributeSetter):
        (WebCore::setJSTestSerializationEighthIndirectlyAttributeSetter):
        (WebCore::setJSTestSerializationNinthOptionalDirectlySerializableAttributeSetter):
        (WebCore::setJSTestSerializationTenthFrozenArrayAttributeSetter):
        (WebCore::setJSTestSerializationEleventhSequenceAttributeSetter):
        (WebCore::setJSTestSerializationTwelfthInterfaceSequenceAttributeSetter):
        (WebCore::JSTestSerialization::serialize):
        * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
        (WebCore::JSTestSerializationIndirectInheritanceConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
        (WebCore::JSTestSerializationInheritConstructor::initializeProperties):
        (WebCore::setJSTestSerializationInheritInheritLongAttributeSetter):
        (WebCore::JSTestSerializationInherit::serialize):
        * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
        (WebCore::JSTestSerializationInheritFinalConstructor::initializeProperties):
        (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeFooSetter):
        (WebCore::setJSTestSerializationInheritFinalFinalLongAttributeBarSetter):
        (WebCore::JSTestSerializationInheritFinal::serialize):
        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
        (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
        (WebCore::setJSTestSerializedScriptValueInterfaceValueSetter):
        (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueSetter):
        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
        (WebCore::convertDictionary<DictionaryImplName>):
        (WebCore::convertDictionaryToJS):
        * bindings/scripts/test/JS/JSTestStringifier.cpp:
        (WebCore::JSTestStringifierConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
        (WebCore::JSTestStringifierAnonymousOperationConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
        (WebCore::JSTestStringifierNamedOperationConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
        (WebCore::JSTestStringifierOperationImplementedAsConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
        (WebCore::JSTestStringifierOperationNamedToStringConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
        (WebCore::JSTestStringifierReadOnlyAttributeConstructor::initializeProperties):
        * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
        (WebCore::JSTestStringifierReadWriteAttributeConstructor::initializeProperties):
        (WebCore::setJSTestStringifierReadWriteAttributeIdentifierSetter):
        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
        (WebCore::JSTestTypedefsConstructor::initializeProperties):
        (WebCore::setJSTestTypedefsUnsignedLongLongAttrSetter):
        (WebCore::setJSTestTypedefsSerializedScriptValueSetter):
        (WebCore::setJSTestTypedefsAttributeWithClampSetter):
        (WebCore::setJSTestTypedefsAttributeWithClampInTypedefSetter):
        (WebCore::setJSTestTypedefsBufferSourceAttrSetter):
        (WebCore::setJSTestTypedefsDomTimeStampAttrSetter):
        * bridge/NP_jsobject.cpp:
        * bridge/c/c_instance.cpp:
        (JSC::Bindings::CInstance::stringValue const):
        (JSC::Bindings::CInstance::getPropertyNames):
        * bridge/c/c_utility.cpp:
        (JSC::Bindings::identifierFromNPIdentifier):
        * bridge/objc/WebScriptObject.mm:
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject setValue:forKey:]):
        (-[WebScriptObject valueForKey:]):
        (-[WebScriptObject removeWebScriptKey:]):
        (-[WebScriptObject hasWebScriptKey:]):
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
        * bridge/objc/objc_utility.mm:
        (JSC::Bindings::convertNSStringToString):
        * bridge/runtime_array.cpp:
        (JSC::RuntimeArray::getOwnPropertyNames):
        * contentextensions/ContentExtensionParser.cpp:
        (WebCore::ContentExtensions::loadTrigger):
        (WebCore::ContentExtensions::loadAction):
        * crypto/SubtleCrypto.cpp:
        (WebCore::normalizeCryptoAlgorithmParameters):
        * domjit/DOMJITHelpers.h:
        (WebCore::DOMJIT::toWrapperSlow):
        * html/HTMLMediaElement.cpp:
        (WebCore::controllerJSValue):
        (WebCore::HTMLMediaElement::updateCaptionContainer):
        (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
        (WebCore::HTMLMediaElement::setControllerJSProperty):
        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
        (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
        (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
        (WebCore::InspectorFrontendHost::showContextMenu):
        * inspector/WebInjectedScriptHost.cpp:
        (WebCore::WebInjectedScriptHost::subtype):
        (WebCore::constructInternalProperty):
        (WebCore::objectForPaymentOptions):
        (WebCore::objectForPaymentCurrencyAmount):
        (WebCore::objectForPaymentItem):
        (WebCore::objectForPaymentShippingOption):
        (WebCore::objectForPaymentDetailsModifier):
        (WebCore::objectForPaymentDetails):
        (WebCore::jsStringForPaymentRequestState):
        (WebCore::WebInjectedScriptHost::getInternalProperties):
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
        (WebCore::InspectorDOMAgent::scriptValueAsNode):
        * inspector/agents/page/PageAuditAgent.cpp:
        (WebCore::PageAuditAgent::populateAuditObject):
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):
        * platform/graphics/CustomPaintImage.cpp:
        (WebCore::CustomPaintImage::doCustomPaint):
        * testing/js/WebCoreTestSupport.cpp:
        (WebCoreTestSupport::injectInternalsObject):
        (WebCoreTestSupport::setupNewlyCreatedServiceWorker):
        * worklets/PaintWorkletGlobalScope.cpp:
        (WebCore::PaintWorkletGlobalScope::registerPaint):

2019-08-27  Devin Rousso  <drousso@apple.com>

        Web Inspector: don't attach properties to `injectedScript` for the CommandLineAPI
        https://bugs.webkit.org/show_bug.cgi?id=201193

        Reviewed by Joseph Pecoraro.

        For some reason, adding `injectedScript._inspectObject` inside CommandLineAPIModuleSource.js
        causes inspector/debugger/tail-deleted-frames-this-value.html to fail.

        We should have a similar approach to adding command line api getters and functions, in that
        the CommandLineAPIModuleSource.js calls a function with a callback.

        * inspector/CommandLineAPIModuleSource.js:
        (injectedScript._inspectObject): Deleted.

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

        [LFC][TFC] Align table formatting context code with the existing layout logic.
        https://bugs.webkit.org/show_bug.cgi?id=201168
        <rdar://problem/54732633>

        Reviewed by Antti Koivisto.

        Let's make the TFC go through the exisint shrink-to-fit computation. Tables behave slightly different from
        other shrink-to-fit boxes as they are streched to their minimum width(MIN) even when 'width' is non-auto and computed to less than MIN. 

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::contentHeightForFormattingContextRoot):
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout const):
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const):
        (WebCore::Layout::TableFormattingContext::computedTableWidth const):
        (WebCore::Layout::TableFormattingContext::computeTableWidth const): Deleted.
        (WebCore::Layout::TableFormattingContext::computeTableHeight const): Deleted.
        (WebCore::Layout::TableFormattingContext::distributeAvailableHeight const): Deleted.
        * layout/tableformatting/TableFormattingContext.h:
        * layout/tableformatting/TableGrid.h:

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

        Minor optimization in InlineFlowBox::paintBoxDecorations()
        https://bugs.webkit.org/show_bug.cgi?id=201199

        Reviewed by Zalan Bujtas.

        This function can early return before computing localRect, which takes a bit of time (seen
        on profiles).

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintBoxDecorations):

2019-08-27  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        Drawing an animated image to a canvas via drawImage should draw the first frame
        https://bugs.webkit.org/show_bug.cgi?id=74779
        <rdar://problem/42282454>

        Reviewed by Said Abou-Hallawa.

        After this patch, when an animated image is drawn into a canvas via
        drawImage, the actual image that the canvas will receive will be
        a new Image object with the contents of the first frame of the animation.

        It also adds an internal setting to keep the previous behaviour
        (draw the current frame playing) because there are several layout
        tests that rely on canvas.drawImage() to check that animated images
        play properly.

        Test: fast/canvas/drawImage-animated-gif-draws-first-frame-and-no-reset-image.html

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::drawImage):
        * page/Settings.yaml:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setAnimatedImageDebugCanvasDrawingEnabled):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-08-27  Antti Koivisto  <antti@apple.com>

        InlineTextBox::end() should return first-past-end offset
        https://bugs.webkit.org/show_bug.cgi?id=201181

        Reviewed by Zalan Bujtas.

        It currently points to the last character, except for empty text boxes.
        This is awkward in itself and also inconsistent, as we use first-past-end offset everywhere else.

        * dom/Position.cpp:
        (WebCore::Position::downstream const):

        Add a check for zero length case to avoid changing behavior.

        * layout/Verification.cpp:
        (WebCore::Layout::checkForMatchingTextRuns):
        (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::calculateDocumentMarkerBounds const):
        (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers const):
        (WebCore::InlineTextBox::paintCompositionUnderlines const):
        (WebCore::InlineTextBox::paintCompositionUnderline const):
        * rendering/InlineTextBox.h:
        (WebCore::InlineTextBox::end const):

        end = start + len

        * rendering/RenderText.cpp:
        (WebCore::RenderText::setTextWithOffset):
        * rendering/RenderTextLineBoxes.cpp:
        (WebCore::localQuadForTextBox):
        (WebCore::RenderTextLineBoxes::absoluteRectsForRange const):
        (WebCore::RenderTextLineBoxes::absoluteQuadsForRange const):
        (WebCore::RenderTextLineBoxes::dirtyRange):

        Here the incoming 'end' used linebox style too, move that to the new definition too.

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

        Crash under WebCore::jsNotificationConstructorPermission
        https://bugs.webkit.org/show_bug.cgi?id=201186
        <rdar://problem/53962833>

        Reviewed by Youenn Fablet.

        Update the Notification API implementation to null-check the page before using. The page becomes null
        when using the API in a frame that gets detached from its parent while in the middle of running
        script.

        Test: http/tests/notifications/request-in-detached-frame.html

        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::permission):
        (WebCore::Notification::requestPermission):

2019-08-27  Youenn Fablet  <youenn@apple.com>

        Disabled devices should not be taken into account when searching for a capture device
        https://bugs.webkit.org/show_bug.cgi?id=201183
        <rdar://problem/54353440>

        Reviewed by Jer Noble.

        Manually tested.

        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
        (WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
        We currently keep a list of devices, some of which might be disabled.
        We should not take into account disabled devices, only enabled devices
        when doing this search.
        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::setupAudioUnit):
        Improve logging.

2019-08-26  Jer Noble  <jer.noble@apple.com>

        Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
        https://bugs.webkit.org/show_bug.cgi?id=201101
        <rdar://problem/54164587>

        Reviewed by Eric Carlson.

        Test: fullscreen/full-screen-request-removed-with-raf.html

        Add a new state variable, m_pendingFullscreenElement, to track which element is about to
        become the fullscreen element, so that when elements are removed or cancelFullscreen() is
        called, the state machine inside the fullscreen algorithm can cancel effectively.

        * dom/FullscreenManager.cpp:
        (WebCore::FullscreenManager::requestFullscreenForElement):
        (WebCore::FullscreenManager::cancelFullscreen):
        (WebCore::FullscreenManager::exitFullscreen):
        (WebCore::FullscreenManager::willEnterFullscreen):
        (WebCore::FullscreenManager::willExitFullscreen):
        (WebCore::FullscreenManager::didExitFullscreen):
        (WebCore::FullscreenManager::adjustFullscreenElementOnNodeRemoval):
        (WebCore::FullscreenManager::clear):
        (WebCore::FullscreenManager::fullscreenElementRemoved): Deleted.
        * dom/FullscreenManager.h:

2019-08-27  Peng Liu  <peng.liu6@apple.com>

        webkitpresentationmodechanged is fired twice when exiting picture in picture
        https://bugs.webkit.org/show_bug.cgi?id=193765

        Reviewed by Jer Noble.

        This patch removes the extra "webkitpresentationmodechanged" event when the browser switches from
        picture-in-picture or fullscreen to inline.

        The bug was introduced by the fix for bug
        https://bugs.webkit.org/show_bug.cgi?id=181095
        But now we are using modern media controls and the fix is not necessary.
        Reverting that fix can fix the issue.

        Also, this patch gets rid of the unnecessary try to call a JavaScript function which is not available
        in the modern media controls.

        Test: media/presentationmodechanged-fired-once.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::exitFullscreen):
        (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):

2019-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>

        Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio
        https://bugs.webkit.org/show_bug.cgi?id=201171
        <rdar://problem/54671275>

        Reviewed by Tim Horton.

        Augments an existing app-specific hack to include the Mail composition service, in addition to Mail.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isMailCompositionService):

        Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService).

        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::PlatformPasteboard::informationForItemAtIndex):

        Only plumb the preferred presentation height through to the web process if the application is neither Mail nor
        the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only
        expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail-
        compose-like" web app has `img { max-width: 100%; }` in their stylesheet).

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

        Origin header not included in WebSocket handshake request when using platform WebSocket API
        https://bugs.webkit.org/show_bug.cgi?id=200535

        Reviewed by Youenn Fablet.

        Add Origin HTTP header to the WebSocket handshake request.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):

2019-08-27  Youenn Fablet  <youenn@apple.com>

        Make MediaStreamTrackPrivate RefCounted
        https://bugs.webkit.org/show_bug.cgi?id=201040

        Reviewed by Darin Adler.

        MediaStreamTrackPrivate should not be ref/deref except from the main thread.
        The only method called from a background thread is audioSamplesAvailable in which
        it is unsafe to ref a MediaStreamTrackPrivate.
        Make the track RefCounted will ensure that no ref/deref is made in background threads.
        No observable change of behavior.

        * platform/mediastream/MediaStreamTrackPrivate.h:

2019-08-26  Yusuke Suzuki  <ysuzuki@apple.com>

        [WebCore] DataCue should not use gcProtect / gcUnprotect
        https://bugs.webkit.org/show_bug.cgi?id=201170

        Reviewed by Mark Lam.

        JSC::gcProtect and JSC::gcUnprotect are designed for JavaScriptCore.framework and we should not use them in WebCore. It is
        checking whether we are holding a JS API lock. But the caller of these API would be the C++ holder's destructor, and this should be
        allowed since this destruction must happen in main thread or web thread, and this should not happen while other thread is taking JS API lock.
        For example, we are destroying JSC::Strong<>, JSC::Weak<> without taking JS API lock. But since JSC::gcProtect and JSC::gcUnprotect are designed
        for JavaScriptCore.framework, they are not accounting this condition, and we are hitting debug assertion in GC stress bot.

        Ideally, we should convert this JSValue field to JSValueInWrappedObject. But JSValueInWrappedObject needs extra care. We should
        know how the owner and JS wrapper are kept and used to use JSValueInWrappedObject correctly.

        As a first step, this patch just replaces raw JSValue + gcProtect/gcUnprotect with JSC::Strong<>.

        This change fixes LayoutTests/media/track/track-in-band-metadata-display-order.html crash in GC stress bot. The crash trace is the following.

            Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
            0   com.apple.JavaScriptCore          0x000000010ee3d980 WTFCrash + 16
            1   com.apple.JavaScriptCore          0x000000010ee408ab WTFCrashWithInfo(int, char const*, char const*, int) + 27
            2   com.apple.JavaScriptCore          0x000000010feb5327 JSC::Heap::unprotect(JSC::JSValue) + 215
            3   com.apple.WebCore                 0x0000000120f33b53 JSC::gcUnprotect(JSC::JSCell*) + 51
            4   com.apple.WebCore                 0x0000000120f329fc JSC::gcUnprotect(JSC::JSValue) + 76
            5   com.apple.WebCore                 0x0000000120f32968 WebCore::DataCue::~DataCue() + 88
            6   com.apple.WebCore                 0x0000000120f32ac5 WebCore::DataCue::~DataCue() + 21
            7   com.apple.WebCore                 0x0000000120f32ae9 WebCore::DataCue::~DataCue() + 25
            8   com.apple.WebCore                 0x0000000120f37ebf WTF::RefCounted<WebCore::TextTrackCue, std::__1::default_delete<WebCore::TextTrackCue> >::deref() const + 95
            9   com.apple.WebCore                 0x000000012103a345 void WTF::derefIfNotNull<WebCore::TextTrackCue>(WebCore::TextTrackCue*) + 53
            10  com.apple.WebCore                 0x000000012103a309 WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >::~RefPtr() + 41
            11  com.apple.WebCore                 0x000000012102bfc5 WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >::~RefPtr() + 21
            12  com.apple.WebCore                 0x00000001210e91df WTF::VectorDestructor<true, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> > >::destruct(WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*) + 47
            13  com.apple.WebCore                 0x00000001210e913d WTF::VectorTypeOperations<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> > >::destruct(WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*, WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >*) + 29
            14  com.apple.WebCore                 0x00000001210e9100 WTF::Vector<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 64
            15  com.apple.WebCore                 0x00000001210e7a25 WTF::Vector<WTF::RefPtr<WebCore::TextTrackCue, WTF::DumbPtrTraits<WebCore::TextTrackCue> >, 0ul, WTF::CrashOnOverflow, 16ul>::~Vector() + 21
            16  com.apple.WebCore                 0x00000001210e93d3 WebCore::TextTrackCueList::~TextTrackCueList() + 51

        * html/track/DataCue.cpp:
        (WebCore::DataCue::DataCue):
        (WebCore::DataCue::~DataCue):
        (WebCore::DataCue::setData):
        (WebCore::DataCue::value const):
        (WebCore::DataCue::setValue):
        (WebCore::DataCue::valueOrNull const):
        * html/track/DataCue.h:

2019-08-26  Devin Rousso  <drousso@apple.com>

        Web Inspector: use more C++ keywords for defining agents
        https://bugs.webkit.org/show_bug.cgi?id=200959

        Reviewed by Joseph Pecoraro.

         - make constructors `protected` when the agent isn't meant to be constructed directly
         - add `virtual` destructors that are defined in the *.cpp so forward-declarations work
         - use `final` wherever possible
         - add comments to indicate where any virtual functions come from

        * inspector/agents/InspectorApplicationCacheAgent.h:
        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        * inspector/agents/InspectorCPUProfilerAgent.h:
        * inspector/agents/InspectorCPUProfilerAgent.cpp:
        * inspector/agents/InspectorCSSAgent.h:
        * inspector/agents/InspectorCSSAgent.cpp:
        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        * inspector/agents/InspectorDOMAgent.h:
        * inspector/agents/InspectorDOMAgent.cpp:
        * inspector/agents/InspectorDOMDebuggerAgent.h:
        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
        * inspector/agents/InspectorDOMStorageAgent.h:
        * inspector/agents/InspectorDOMStorageAgent.cpp:
        * inspector/agents/InspectorDatabaseAgent.h:
        * inspector/agents/InspectorDatabaseAgent.cpp:
        * inspector/agents/InspectorIndexedDBAgent.h:
        * inspector/agents/InspectorIndexedDBAgent.cpp:
        * inspector/agents/InspectorLayerTreeAgent.h:
        * inspector/agents/InspectorLayerTreeAgent.cpp:
        * inspector/agents/InspectorMemoryAgent.h:
        * inspector/agents/InspectorMemoryAgent.cpp:
        * inspector/agents/InspectorNetworkAgent.h:
        * inspector/agents/InspectorNetworkAgent.cpp:
        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/InspectorTimelineAgent.cpp:
        * inspector/agents/InspectorWorkerAgent.h:
        * inspector/agents/InspectorWorkerAgent.cpp:
        * inspector/agents/WebConsoleAgent.h:
        * inspector/agents/WebConsoleAgent.cpp:
        * inspector/agents/WebDebuggerAgent.h:
        * inspector/agents/WebDebuggerAgent.cpp:
        * inspector/agents/WebHeapAgent.h:
        * inspector/agents/WebHeapAgent.cpp:
        * inspector/agents/page/PageAuditAgent.h:
        * inspector/agents/page/PageAuditAgent.cpp:
        * inspector/agents/page/PageConsoleAgent.h:
        * inspector/agents/page/PageConsoleAgent.cpp:
        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        * inspector/agents/page/PageHeapAgent.h:
        * inspector/agents/page/PageHeapAgent.cpp:
        * inspector/agents/page/PageNetworkAgent.h:
        * inspector/agents/page/PageNetworkAgent.cpp:
        * inspector/agents/page/PageRuntimeAgent.h:
        * inspector/agents/page/PageRuntimeAgent.cpp:
        * inspector/agents/worker/ServiceWorkerAgent.h:
        * inspector/agents/worker/ServiceWorkerAgent.cpp:
        * inspector/agents/worker/WorkerAuditAgent.h:
        * inspector/agents/worker/WorkerAuditAgent.cpp:
        * inspector/agents/worker/WorkerConsoleAgent.h:
        * inspector/agents/worker/WorkerConsoleAgent.cpp:
        * inspector/agents/worker/WorkerDebuggerAgent.h:
        * inspector/agents/worker/WorkerNetworkAgent.h:
        * inspector/agents/worker/WorkerNetworkAgent.cpp:
        * inspector/agents/worker/WorkerRuntimeAgent.h:
        * inspector/agents/worker/WorkerRuntimeAgent.cpp:

2019-08-26  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Rewrite all tests to use WHLSL and delete the isWHLSL flag
        https://bugs.webkit.org/show_bug.cgi?id=201162

        Reviewed by Saam Barati.

        We want to keep the MSL codepath for debugging, so the codepath isn't deleted entirely, but it is no longer web exposed.

        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createShaderModule const):
        * Modules/webgpu/WebGPUShaderModuleDescriptor.h:
        * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUShaderModuleDescriptor.h:
        * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
        (WebCore::GPUShaderModule::tryCreate):

2019-08-26  Chris Dumez  <cdumez@apple.com>

        Change default value of window.open()'s url argument
        https://bugs.webkit.org/show_bug.cgi?id=200882

        Reviewed by Ryosuke Niwa.

        Update default URL parameter value for window.open() to be "" instead of "about:blank", as per:
        - https://github.com/whatwg/html/issues/4762

        This aligns our behavior with other Web browser engines.

        No new tests, rebaselined existing test.

        * page/DOMWindow.idl:

2019-08-26  Devin Rousso  <drousso@apple.com>

        Web Inspector: unify agent command error messages
        https://bugs.webkit.org/show_bug.cgi?id=200950

        Reviewed by Joseph Pecoraro.

        Different agents can sometimes have different error messages for commands that have a
        similar intended effect.  We should make our error messages more similar.

        * inspector/CommandLineAPIHost.cpp:
        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        * inspector/agents/InspectorCSSAgent.cpp:
        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        * inspector/agents/InspectorDOMAgent.cpp:
        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
        * inspector/agents/InspectorDOMStorageAgent.cpp:
        * inspector/agents/InspectorIndexedDBAgent.cpp:
        * inspector/agents/InspectorLayerTreeAgent.cpp:
        * inspector/agents/InspectorMemoryAgent.cpp:
        * inspector/agents/InspectorNetworkAgent.cpp:
        * inspector/agents/InspectorPageAgent.cpp:
        * inspector/agents/InspectorTimelineAgent.cpp:
        * inspector/agents/InspectorWorkerAgent.cpp:
        * inspector/agents/page/PageAuditAgent.cpp:
        * inspector/agents/page/PageConsoleAgent.cpp:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        * inspector/agents/page/PageNetworkAgent.cpp:
        * inspector/agents/page/PageRuntimeAgent.cpp:
        * inspector/agents/worker/WorkerAuditAgent.cpp:
        * inspector/agents/worker/WorkerDebuggerAgent.cpp:
        * inspector/agents/worker/WorkerRuntimeAgent.cpp:
        Elide function lists to avoid an extremely large ChangeLog entry.

2019-08-26  Chris Dumez  <cdumez@apple.com>

        Regression: ITP started doing a lot more IPC after its logic was moved to the network process
        https://bugs.webkit.org/show_bug.cgi?id=201155

        Reviewed by John Wilander.

        ITP started doing a lot more IPC after its logic was moved to the network process. Web processes used to
        send their statistics to the UIProcess at most every 5 seconds. However, when the logic got moved to the network
        process, we started notifying the network process via IPC after every sub resource load. This is bad for performance
        and battery life. This patch restores the 5 second delay to address the issue.

        * loader/ResourceLoadObserver.cpp:
        (WebCore::ResourceLoadObserver::ResourceLoadObserver):
        (WebCore::ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback):
        (WebCore::ResourceLoadObserver::logSubresourceLoading):
        (WebCore::ResourceLoadObserver::logWebSocketLoading):
        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
        (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
        (WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
        (WebCore::ResourceLoadObserver::clearState):
        * loader/ResourceLoadObserver.h:

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

        Optimize computation of AbsoluteClipRects clip rects
        https://bugs.webkit.org/show_bug.cgi?id=201148

        Reviewed by Zalan Bujtas.

        When adding layers to the compositing overlap map, we compute AbsoluteClipRects for every
        layer which is expensive. This was more expensive than necessary because we converted them
        to TemporaryClipRects when crossing painting boundaries, but AbsoluteClipRects don't
        care about painting boundaries, so don't do this.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):

2019-08-26  Chris Dumez  <cdumez@apple.com>

        Drop WEBCORE_EXPORT from ChromeClient class
        https://bugs.webkit.org/show_bug.cgi?id=201146

        Reviewed by Alex Christensen.

        Drop WEBCORE_EXPORT from ChromeClient class. All its methods and either pure virtual or inlined in the header.

        * page/ChromeClient.h:

2019-08-26  David Kilzer  <ddkilzer@apple.com>

        Don't compute upconverted characters twice in buildQuery() in DataDetection.mm
        <https://webkit.org/b/201144>
        <rdar://problem/54689399>

        Reviewed by Brent Fulgham.

        * editing/cocoa/DataDetection.mm:
        (WebCore::buildQuery): Extract common variables to prevent double
        conversion for 8-bit strings.

2019-08-26  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Go back to ID2D1Bitmap as our NativeImage type
        https://bugs.webkit.org/show_bug.cgi?id=201122

        Reviewed by Alex Christensen.

        In Bug 200093 I switched the OS type of NativeImagePtr from ID2D1Bitmap to IWICBitmap.
        However, this was an ill-advised approach, because it dramatically harmed performance due
        to the heavy use of software rendering.

        I originally made this change because I thought this was the only way to get to the backing
        bits of the bitmaps, but it turns out that a more recent Direct2D data type (ID2D1Bitmap1)
        has the ability to map its memory to CPU-accessible memory, allowing software filter effects.

        This patch switches back to the ID2D1Bitap data type, and hooks up the ID2D1Bitmap1 data type
        to access the underlying memory of the bitmaps when software filter effects are used.

        * platform/graphics/ImageBuffer.h:
        * platform/graphics/NativeImage.h:
        * platform/graphics/texmap/BitmapTextureGL.cpp:
        * platform/graphics/win/Direct2DOperations.cpp:
        * platform/graphics/win/Direct2DOperations.h:
        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::writeDiagnosticPNGToPath):
        (WebCore::Direct2D::writeImageToDiskAsPNG): Deleted.
        * platform/graphics/win/Direct2DUtilities.h:
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        * platform/graphics/win/ImageBufferDataDirect2D.h:
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        * platform/graphics/win/ImageDecoderDirect2D.cpp:
        * platform/graphics/win/NativeImageDirect2D.cpp:
        * platform/graphics/win/PatternDirect2D.cpp:
        * svg/graphics/SVGImage.cpp:

2019-08-26  Sam Weinig  <weinig@apple.com>

        [WHLSL] TypeNamer can be simplified by replacing BaseTypeNameNode with uniqued AST::UnnamedTypes
        https://bugs.webkit.org/show_bug.cgi?id=200632

        Reviewed by Saam Barati.

        There is no longer a reason to keep a parallel tree of the UnnamedType-like objects
        BaseTypeNameNodes. Instead, we can store a single HashMap mapping from UnnamedTypeKeys
        to MangledTypeName, and use the the UnnamedType stored in the UnnamedTypeKey while 
        emitting the metal code. This removes the parallel BaseTypeNameNode type hierarchy
        and removes an extra allocation for each UnnamedType. 

        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h:
        Define HashTraits and DefaultHash specializations for UnnamedTypeKey to simplify
        uses of UnnamedTypeKey as a key in HashMap/HashSet.

        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::insert): Deleted.
        (WebCore::WHLSL::Metal::TypeNamer::generateUniquedTypeName):
        Replace old insert function with generateUniquedTypeName, which uniques and generates
        names for the UnnamedType and any 'parent' UnnamedTypes.

        (WebCore::WHLSL::Metal::BaseTypeNameNode): Deleted.
        Remove BaseTypeNameNode and subclasses.

        (WebCore::WHLSL::Metal::TypeNamer::find): Deleted.
        (WebCore::WHLSL::Metal::TypeNamer::createNameNode): Deleted.
        We no longer need the find or createNameNode functions, as the UnnamedTypes can be now be
        used directly everywhere.

        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        Switch to directly using the UnnamedType and always have the caller pass in the mangled
        name, since in the main emit loop, we always have access to the them. Also, inline the
        the recursive calls to emitNamedTypeDefinition for 'parent' types to avoid unnecessary
        extra switch over the kind getting the parent, and avoid it entirely for TypeReference
        which never has a parent.
        
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        Switches to now passing in the neighbors, since they are always available in the main 
        emit loop. Also move to a switch statement rather than ifs for consistency. 
        
        (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
        Pass keys and values into the emit functions to avoid double lookups.

        (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
        Update to hash lookup.

        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        Take advantage of default HashTraits and DefaultHash for UnnamedTypeKey.

2019-08-26  Peng Liu  <peng.liu6@apple.com>

        REGRESSION (18E140): “return streaming movie to real time” suggesting “resume real time streaming”
        https://bugs.webkit.org/show_bug.cgi?id=201108
        <rdar://problem/46372525>

        Reviewed by Eric Carlson.

        Update Localizable.strings.

        No new test.

        * en.lproj/Localizable.strings:
        * platform/LocalizedStrings.cpp:
        (WebCore::localizedMediaControlElementHelpText):

2019-08-26  Youenn Fablet  <youenn@apple.com>

        CacheStorageConnection::computeRealBodySize is not thread-safe
        https://bugs.webkit.org/show_bug.cgi?id=201074

        Reviewed by Chris Dumez.

        In case of a form data, the size computation might require sync IPC to the network process which is not thread-safe
        In that case, hop to the main thread to compute the size of the body.
        Covered by existing service worker tests in Debug mode.

        * Modules/cache/CacheStorageConnection.cpp:
        (WebCore::formDataSize):
        (WebCore::CacheStorageConnection::computeRealBodySize):

2019-08-26  Youenn Fablet  <youenn@apple.com>

        MessagePort should be WeakPtrFactoryInitialization::Eager
        https://bugs.webkit.org/show_bug.cgi?id=201073

        Reviewed by Chris Dumez.

        Covered by existing layout tests.

        * dom/MessagePort.h:

2019-08-24  Simon Fraser  <simon.fraser@apple.com>

        Have RenderLayer::calculateClipRects() use offsetFromAncestor() when possible
        https://bugs.webkit.org/show_bug.cgi?id=201066

        Reviewed by Dean Jackson.

        offsetFromAncestor() is a layer tree walk, so faster than localToContainerPoint(),
        but we can't use it when there are transforms on the layer and intermediates up
        to the ancestor.
        
        canUseConvertToLayerCoords() was trying to answer the question about whether it's
        OK to use offsetFromAncestor() (which calls convertToLayerCoords() internally), but
        it has insufficient information to make a determination. Leave this issue alone, but
        at least rename canUseConvertToLayerCoords().

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayer.h:

2019-08-24  Simon Fraser  <simon.fraser@apple.com>

        Page crashes under CGPathAddUnevenCornersRoundedRect
        https://bugs.webkit.org/show_bug.cgi?id=201117

        Reviewed by Dean Jackson.
        
        Fix crash on https://onehtmlpagechallenge.com/entries/pure-css-still-life-water-lemon.html
        We were passing CG radius values where the sum of two radii was greater than the height or
        width, caused by rounding when converting from floats to doubles.

        Test: fast/borders/renderable-uneven-rounded-rects.html

        * platform/graphics/cg/PathCG.cpp:
        (WebCore::Path::platformAddPathForRoundedRect):

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

        RenderLayer::updateLayerPositions() doesn't propagate the ancestor flags correctly
        https://bugs.webkit.org/show_bug.cgi?id=201115

        Reviewed by Zalan Bujtas.

        When an updateLayerPositions() traversal starts at a non-root layer, we failed to populate
        the ancestor-related UpdateLayerPositionsFlag flags, leaving layers with missing flags
        (e.g. the m_hasTransformedAncestor flag). This is detected by the patch in bug 201066.

        Fix by having updateLayerPositionsAfterStyleChange() and updateLayerPositionsAfterLayout()
        initialize the flags from the parent layer.

        This is a behavior change not detected by any existing test, but will be exercised once
        the patch from bug 201066 lands.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::flagsForUpdateLayerPositions):
        (WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
        (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive): Log hasTransformedAncestor().
        * rendering/RenderLayer.h:

2019-08-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Add section renderers to the layout tree (THEAD/TBODY/TFOOT)
        https://bugs.webkit.org/show_bug.cgi?id=201114
        <rdar://problem/54664992>

        Reviewed by Antti Koivisto.

        Section renderers (THEAD/TBODY/TFOOT) are direct children of the RenderTable. Let's include them in the layout tree as well.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createTableStructure):
        (WebCore::Layout::outputInlineRuns):

2019-08-24  Zalan Bujtas  <zalan@apple.com>

        [LFC] Box::isAnonymous() can not rely on the lack of ElementType.
        https://bugs.webkit.org/show_bug.cgi?id=201106
        <rdar://problem/54660287>

        Reviewed by Antti Koivisto.

        Add bool m_isAnonymous member to mark anonymous layout boxes. Anonymous boxes are not rare enough to include this variable in RareData.

        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::setIsAnonymous):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

2019-08-24  Antti Koivisto  <antti@apple.com>

        Implement layout system independent text box iterator
        https://bugs.webkit.org/show_bug.cgi?id=201076

        Reviewed by Zalan Bujtas.

        Add a generic way to traverse line layout without caring about the details of the underlying layout system.

        This patch adds basic support for traversing text boxes and uses it to remove layout path specific branches in RenderTreeAsText.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::RenderTreeAsText::writeRenderObject):
        (WebCore::writeTextBox):
        (WebCore::write):
        (WebCore::writeTextRun): Deleted.
        (WebCore::writeSimpleLine): Deleted.
        * rendering/line/LineLayoutInterfaceTextBoxes.cpp: Added.
        (WebCore::LineLayoutInterface::TextBox::rect const):
        (WebCore::LineLayoutInterface::TextBox::logicalRect const):
        (WebCore::LineLayoutInterface::TextBox::hasHyphen const):
        (WebCore::LineLayoutInterface::TextBox::isLeftToRightDirection const):
        (WebCore::LineLayoutInterface::TextBox::dirOverride const):
        (WebCore::LineLayoutInterface::TextBox::text const):
        (WebCore::LineLayoutInterface::TextBoxIterator::TextBoxIterator):
        (WebCore::LineLayoutInterface::TextBoxIterator::traverseNext):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator== const):
        (WebCore::LineLayoutInterface::simpleLineRunResolverForText):
        (WebCore::LineLayoutInterface::rangeForText):
        (WebCore::LineLayoutInterface::TextBoxRange::TextBoxRange):
        (WebCore::LineLayoutInterface::textBoxes):
        * rendering/line/LineLayoutInterfaceTextBoxes.h: Added.
        (WebCore::LineLayoutInterface::TextBox::TextBox):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator++):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator!= const):
        (WebCore::LineLayoutInterface::TextBoxIterator::operator* const):
        (WebCore::LineLayoutInterface::TextBoxRange::begin const):
        (WebCore::LineLayoutInterface::TextBoxRange::end const):

2019-08-24  Zalan Bujtas  <zalan@apple.com>

        [LFC][BFC] Non-inline formatting context(table, grid etc) root container should not collapse through.
        https://bugs.webkit.org/show_bug.cgi?id=201099
        <rdar://problem/54658946>

        Reviewed by Antti Koivisto.

        I didn't manage to find it in the spec, but surely formatting contexts like table, grid and flex should behave like
        block so that their vertical margins are not adjoining, when they have at least one inflow child.

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):

2019-08-24  Zalan Bujtas  <zalan@apple.com>

        [LFC] Add THEAD/TBODY/TFOOT output to Layout::showLayoutTree
        https://bugs.webkit.org/show_bug.cgi?id=201113
        <rdar://problem/54664134>

        Reviewed by Antti Koivisto.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::outputLayoutBox):

2019-08-24  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove redundant Layout::Box::ElementType::TableRowGroup
        https://bugs.webkit.org/show_bug.cgi?id=201112
        <rdar://problem/54663833>

        Reviewed by Antti Koivisto.

        Use Layout::Box::ElementType::TableBodyGroup instead.

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isPaddingApplicable const):
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

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

        RenderLayerModelObject should not call private RenderLayer functions
        https://bugs.webkit.org/show_bug.cgi?id=201111

        Reviewed by Zalan Bujtas.

        Make RenderLayerModelObject no longer a friend class of RenderLayer, giving it a public
        willRemoveChildWithBlendMode() function to call. Also make the UpdateLayerPositionsFlag
        enum private, providing a updateLayerPositionsAfterStyleChange() for RenderLayerModelObject,
        and changing the arguments of updateLayerPositionsAfterLayout() for FrameView.

        No behavior change.

        * page/FrameView.cpp:
        (WebCore::FrameView::didLayout):
        (WebCore::updateLayerPositionFlags): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
        (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
        (WebCore::RenderLayer::willRemoveChildWithBlendMode):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::styleDidChange):

2019-08-22  Ryosuke Niwa  <rniwa@webkit.org>

        Implement StaticRange constructor
        https://bugs.webkit.org/show_bug.cgi?id=201055

        Reviewed by Wenson Hsieh.

        Added the constructor to StaticRange per https://github.com/whatwg/dom/pull/778.

        Test: imported/w3c/web-platform-tests/dom/ranges/StaticRange-constructor.html

        * dom/StaticRange.cpp:
        (WebCore::isDocumentTypeOrAttr):
        (WebCore::StaticRange::create):
        * dom/StaticRange.h:
        * dom/StaticRange.idl:

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

        Web Inspector: create additional command line api functions for other console methods
        https://bugs.webkit.org/show_bug.cgi?id=200971

        Reviewed by Joseph Pecoraro.

        Expose all `console.*` functions in the command line API, since they're all already able to
        be referenced via the `console` object.

        Provide a simpler interface for other injected scripts to modify the command line API.

        * inspector/CommandLineAPIModuleSource.js:
        (injectedScript._inspectObject): Added.
        (normalizeEventTypes): Added.
        (logEvent): Added.
        (canQuerySelectorOnNode): Added.
        (bind): Deleted.
        (value): Deleted.
        (this.method.toString): Deleted.
        (CommandLineAPI): Deleted.
        (CommandLineAPIImpl): Deleted.
        (CommandLineAPIImpl.prototype): Deleted.
        (CommandLineAPIImpl.prototype._canQuerySelectorOnNode): Deleted.
        (CommandLineAPIImpl.prototype.x): Deleted.
        (CommandLineAPIImpl.prototype.dir): Deleted.
        (CommandLineAPIImpl.prototype.dirxml): Deleted.
        (CommandLineAPIImpl.prototype.keys): Deleted.
        (CommandLineAPIImpl.prototype.values): Deleted.
        (CommandLineAPIImpl.prototype.profile): Deleted.
        (CommandLineAPIImpl.prototype.profileEnd): Deleted.
        (CommandLineAPIImpl.prototype.table): Deleted.
        (CommandLineAPIImpl.prototype.screenshot): Deleted.
        (CommandLineAPIImpl.prototype.monitorEvents): Deleted.
        (CommandLineAPIImpl.prototype.unmonitorEvents): Deleted.
        (CommandLineAPIImpl.prototype.inspect): Deleted.
        (CommandLineAPIImpl.prototype.queryInstances): Deleted.
        (CommandLineAPIImpl.prototype.queryObjects): Deleted.
        (CommandLineAPIImpl.prototype.queryHolders): Deleted.
        (CommandLineAPIImpl.prototype.copy): Deleted.
        (CommandLineAPIImpl.prototype.clear): Deleted.
        (CommandLineAPIImpl.prototype.getEventListeners): Deleted.
        (CommandLineAPIImpl.prototype._inspectedObject): Deleted.
        (CommandLineAPIImpl.prototype._normalizeEventTypes): Deleted.
        (CommandLineAPIImpl.prototype._logEvent): Deleted.
        (CommandLineAPIImpl.prototype._inspect): Deleted.

2019-08-23  Chris Dumez  <cdumez@apple.com>

        Crash under TimerBase::setNextFireTime() in the NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=201097
        <rdar://problem/54658339>

        Reviewed by Ryosuke Niwa.

        NetworkStateNotifier is a WebCore/platform class used by both WebKitLegacy and WebKit2 in the NetworkProcess.
        On iOS, the lambda in the implementation of NetworkStateNotifier::startObserving() may get called by the
        underlying framework on a non-main thread and we therefore want to go back to the main thread before calling
        NetworkStateNotifier::singleton().updateStateSoon(). This is important because updateStateSoon() will schedule
        a WebCore::Timer. The issue is that the code was using WebThreadRun() to go back the the main thread. While
        this works fine in iOS WK1, it does not do what we want in WebKit2 in the network process. Indeed, before there
        is no WebThread in the network process, WebThreadRun() will simply run the block on whatever thread we're one.
        This would lead to crashes when trying to schedule the Timer in updateStateSoon(). To address the issue, we now
        use callOnMainThread().

        * platform/network/ios/NetworkStateNotifierIOS.mm:
        (WebCore::NetworkStateNotifier::startObserving):

2019-08-23  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (r248807): Objects stored in ElementRareData are leaked
        https://bugs.webkit.org/show_bug.cgi?id=200954

        Reviewed by David Kilzer.

        NodeRareData didn't have a virtual destructor. As a result, member variables
        of ElementRareData did not get destructed properly.

        * dom/NodeRareData.cpp:
        * dom/NodeRareData.h:
        (WebCore::NodeRareData::~NodeRareData):

2019-08-23  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] [WebKit2] Tapping on the “I’m” text suggestion after typing “i’” does nothing
        https://bugs.webkit.org/show_bug.cgi?id=201085
        <rdar://problem/53056118>

        Reviewed by Tim Horton.

        Exposes an existing quote folding function as a helper on TextIterator, and also adjusts foldQuoteMarks to take
        a const String& rather than a String. See WebKit ChangeLog for more details.

        * editing/TextIterator.cpp:
        (WebCore::foldQuoteMarks):
        (WebCore::SearchBuffer::SearchBuffer):
        * editing/TextIterator.h:

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

        Remove IDBDatabaseIdentifier::m_mainFrameOrigin
        https://bugs.webkit.org/show_bug.cgi?id=201078

        Reviewed by Darin Adler.

        No change of behavior.

        * Modules/indexeddb/IDBDatabaseIdentifier.h:

2019-08-23  Chris Dumez  <cdumez@apple.com>

        [geolocation] Rename interfaces and remove [NoInterfaceObject]
        https://bugs.webkit.org/show_bug.cgi?id=200885

        Reviewed by Alex Christensen.

        Rename Geolocation interfaces and expose them on the global Window object to match the
        latest specification:
        - https://w3c.github.io/geolocation-api/#api_description

        Test: fast/dom/Geolocation/exposed-geolocation-interfaces.html

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Headers.cmake:
        * Modules/geolocation/GeoNotifier.cpp:
        (WebCore::GeoNotifier::setFatalError):
        (WebCore::GeoNotifier::runSuccessCallback):
        (WebCore::GeoNotifier::runErrorCallback):
        (WebCore::GeoNotifier::timerFired):
        * Modules/geolocation/GeoNotifier.h:
        * Modules/geolocation/Geolocation.cpp:
        (WebCore::createGeolocationPosition):
        (WebCore::createGeolocationPositionError):
        (WebCore::Geolocation::lastPosition):
        (WebCore::Geolocation::startRequest):
        (WebCore::Geolocation::requestUsesCachedPosition):
        (WebCore::Geolocation::makeCachedPositionCallbacks):
        (WebCore::Geolocation::haveSuitableCachedPosition):
        (WebCore::Geolocation::setIsAllowed):
        (WebCore::Geolocation::sendError):
        (WebCore::Geolocation::sendPosition):
        (WebCore::Geolocation::cancelRequests):
        (WebCore::Geolocation::handleError):
        (WebCore::Geolocation::makeSuccessCallbacks):
        (WebCore::Geolocation::positionChanged):
        (WebCore::Geolocation::setError):
        (WebCore::Geolocation::handlePendingPermissionNotifiers):
        * Modules/geolocation/Geolocation.h:
        * Modules/geolocation/Geolocation.idl:
        * Modules/geolocation/GeolocationClient.h:
        * Modules/geolocation/GeolocationController.cpp:
        (WebCore::GeolocationController::positionChanged):
        (WebCore::GeolocationController::lastPosition):
        * Modules/geolocation/GeolocationController.h:
        * Modules/geolocation/GeolocationCoordinates.cpp: Renamed from Source/WebCore/Modules/geolocation/Coordinates.cpp.
        (WebCore::GeolocationCoordinates::GeolocationCoordinates):
        * Modules/geolocation/GeolocationCoordinates.h: Renamed from Source/WebCore/Modules/geolocation/Coordinates.h.
        (WebCore::GeolocationCoordinates::create):
        (WebCore::GeolocationCoordinates::isolatedCopy const):
        * Modules/geolocation/GeolocationCoordinates.idl: Renamed from Source/WebCore/Modules/geolocation/Coordinates.idl.
        * Modules/geolocation/GeolocationPosition.h:
        (WebCore::GeolocationPosition::create):
        (WebCore::GeolocationPosition::isolatedCopy const):
        (WebCore::GeolocationPosition::timestamp const):
        (WebCore::GeolocationPosition::coords const):
        (WebCore::GeolocationPosition::GeolocationPosition):
        * Modules/geolocation/GeolocationPosition.idl: Renamed from Source/WebCore/Modules/geolocation/Geoposition.idl.
        * Modules/geolocation/GeolocationPositionData.h: Copied from Source/WebCore/Modules/geolocation/GeolocationPosition.h.
        (WebCore::GeolocationPositionData::GeolocationPositionData):
        (WebCore::GeolocationPositionData::encode const):
        (WebCore::GeolocationPositionData::decode):
        (WebCore::GeolocationPositionData::isValid const):
        * Modules/geolocation/GeolocationPositionError.h: Renamed from Source/WebCore/Modules/geolocation/PositionError.h.
        (WebCore::GeolocationPositionError::create):
        (WebCore::GeolocationPositionError::GeolocationPositionError):
        * Modules/geolocation/GeolocationPositionError.idl: Renamed from Source/WebCore/Modules/geolocation/PositionError.idl.
        * Modules/geolocation/Geoposition.h: Removed.
        * Modules/geolocation/PositionCallback.h:
        * Modules/geolocation/PositionCallback.idl:
        * Modules/geolocation/PositionErrorCallback.h:
        * Modules/geolocation/PositionErrorCallback.idl:
        * Modules/geolocation/ios/GeolocationPositionDataIOS.mm: Renamed from Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm.
        (WebCore::GeolocationPositionData::GeolocationPositionData):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mock/GeolocationClientMock.cpp:
        (WebCore::GeolocationClientMock::setPosition):
        (WebCore::GeolocationClientMock::lastPosition):
        * platform/mock/GeolocationClientMock.h:

2019-08-20  Jiewen Tan  <jiewen_tan@apple.com>

        [WebAuthn] Support NFC authenticators for iOS
        https://bugs.webkit.org/show_bug.cgi?id=188624
        <rdar://problem/43354214>

        Reviewed by Chris Dumez.

        Tests: http/wpt/webauthn/ctap-nfc-failure.https.html
               http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html
               http/wpt/webauthn/public-key-credential-create-success-nfc.https.html
               http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html
               http/wpt/webauthn/public-key-credential-get-success-nfc.https.html

        * Modules/webauthn/apdu/ApduResponse.h:
        Adds a new method to support moving m_data.
        * Modules/webauthn/fido/FidoConstants.h:
        Adds constants for NFC applet selection.

2019-08-23  Ross Kirsling  <ross.kirsling@sony.com>

        JSC should have public API for unhandled promise rejections
        https://bugs.webkit.org/show_bug.cgi?id=197172

        Reviewed by Keith Miller.

        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::promiseRejectionTracker):
        Move JSInternalPromise early-out to JSC side.

2019-08-23  Kate Cheney  <katherine_cheney@apple.com>

        Support ITP on a per-session basis (198923)
        https://bugs.webkit.org/show_bug.cgi?id=198923

        Reviewed by Chris Dumez.

        This patch updated the data structure used to collect resource load
        statistics in order to support ITP data collection on a per session
        basis. Each sessionID is stored as a key-value pair with its own map
        of ResourceLoadStatistics.

        It also updated the statisticsForURL function call to perform lookups
        of URL data based on sessionID.

        * loader/ResourceLoadObserver.cpp:
        (WebCore::ResourceLoadObserver::setStatisticsUpdatedCallback):
        (WebCore::ResourceLoadObserver::shouldLog const):
        (WebCore::ResourceLoadObserver::logSubresourceLoading):
        (WebCore::ResourceLoadObserver::logWebSocketLoading):
        (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
        (WebCore::ResourceLoadObserver::logFontLoad):
        (WebCore::ResourceLoadObserver::logCanvasRead):
        (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
        (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
        (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
        (WebCore::ResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
        (WebCore::ResourceLoadObserver::statisticsForURL):
        (WebCore::ResourceLoadObserver::takeStatistics):
        (WebCore::ResourceLoadObserver::clearState):
        * loader/ResourceLoadObserver.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resourceLoadStatisticsForURL):

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

        Remove unnecessary call to enclosingClippingScopes()
        https://bugs.webkit.org/show_bug.cgi?id=201063

        Reviewed by Zalan Bujtas.

        This line of code did nothing, and was left in by mistake. Remove it.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateOverlapMap const):

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

        Cache hasCompositedScrollableOverflow as a bit on RenderLayer
        https://bugs.webkit.org/show_bug.cgi?id=201065

        Reviewed by Zalan Bujtas.

        hasCompositedScrollableOverflow() is pretty hot on some compositing-related code paths, and isn't
        super cheap, as it checks a Setting and calls into renderer code. Optimize by computing it in
        computeScrollDimensions().

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::hasCompositedScrollableOverflow const):
        (WebCore::RenderLayer::computeScrollDimensions):
        * rendering/RenderLayer.h:

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

        Don't call clipCrossesPaintingBoundary() when not necessary
        https://bugs.webkit.org/show_bug.cgi?id=201064

        Reviewed by Zalan Bujtas.

        clipCrossesPaintingBoundary() does some RenderLayer ancestor walks, so avoid
        calling it when we already know that the clip rects are TemporaryClipRects.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):

2019-08-23  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Hole-punch build is broken
        https://bugs.webkit.org/show_bug.cgi?id=200972

        Reviewed by Žan Doberšek.

        This patch fixes link issues when building with
        USE_GSTREAMER_HOLEPUNCH enabled, the hole punch client destructor
        was missing.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        Remove FAST_ALLOCATED annotation, because:
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
        it's now in the base class, along with a default destructor.

2019-08-22  Fujii Hironori  <Hironori.Fujii@sony.com>

        [SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
        https://bugs.webkit.org/show_bug.cgi?id=201030

        Reviewed by Ryosuke Niwa.

        Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg
               svg/clip-path/clip-path-invalid-reference-001.svg
               svg/clip-path/clip-path-invalid-reference-002-expected.svg
               svg/clip-path/clip-path-invalid-reference-002.svg

        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertClipPath): Use
        SVGURIReference::fragmentIdentifierFromIRIString to get fragment
        identifier from -webkit-clip-path.

2019-08-22  Andy Estes  <aestes@apple.com>

        [watchOS] Disable Content Filtering in the simulator build
        https://bugs.webkit.org/show_bug.cgi?id=201047

        Reviewed by Tim Horton.

        * Configurations/FeatureDefines.xcconfig:

2019-08-22  Chris Dumez  <cdumez@apple.com>

        Try to recover nicely when getting an unexpected schema in the service workers database
        https://bugs.webkit.org/show_bug.cgi?id=201002
        <rdar://problem/54574991>

        Reviewed by Youenn Fablet.

        Try to recover nicely when getting an unexpected schema in the service workers database instead
        of crashing the network process. To recover, we delete the database file and re-create it.

        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::openSQLiteDatabase):
        (WebCore::RegistrationDatabase::ensureValidRecordsTable):

2019-08-22  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Crash may happen when an SVG <feImage> element references the root <svg> element
        https://bugs.webkit.org/show_bug.cgi?id=201014

        Reviewed by Ryosuke Niwa.

        When an <feImage> references an <svg> element as its target image but
        this <svg> element is also one of the ancestors of the <feImage>, the
        parent <filter> should not be applied.

        Test: svg/filters/filter-image-ref-root.html

        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::build const):

2019-08-22  Ryosuke Niwa  <rniwa@webkit.org>

        Make ImageBuffer and SVG's FilterData isoheap'ed
        https://bugs.webkit.org/show_bug.cgi?id=201029

        Reviewed by Simon Fraser.

        Made ImageBuffer and RenderSVGResourceFilter use IsoHeap.

        * platform/graphics/ImageBuffer.cpp:
        * platform/graphics/ImageBuffer.h:
        * rendering/svg/RenderSVGResourceFilter.cpp:
        * rendering/svg/RenderSVGResourceFilter.h:

2019-08-22  Adrian Perez de Castro  <aperez@igalia.com>

        [GTK][WPE] Fixes for non-unified builds after r248547
        https://bugs.webkit.org/show_bug.cgi?id=201044

        Reviewed by Philippe Normand.

        * platform/audio/AudioResamplerKernel.h: Add missing inclusion of wtf/Noncopyable.h

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

        Make MediaStreamTrackPrivate WeakPtrFactoryInitialization::Eager
        https://bugs.webkit.org/show_bug.cgi?id=201037

        Reviewed by Darin Adler.

        No change of behavior, replacing m_weakThis by the more convenient Eager.

        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
        (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Deleted.
        * platform/mediastream/MediaStreamTrackPrivate.h:

2019-08-17  Darin Adler  <darin@apple.com>

        Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends
        https://bugs.webkit.org/show_bug.cgi?id=200862

        Reviewed by Ryosuke Niwa.

        * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
        (WebCore::IDBDatabaseInfo::loggingString const): Use one append instead of multiple.
        * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
        (WebCore::IDBObjectStoreInfo::loggingString const): Ditto.
        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
        (WebCore::toRTCCodecParameters): Ditto.
        * Modules/plugins/YouTubePluginReplacement.cpp:
        (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Ditto.
        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::generateDatabaseFileName): Ditto.
        * Modules/websockets/WebSocketExtensionDispatcher.cpp:
        (WebCore::WebSocketExtensionDispatcher::createHeaderValue const): Ditto.
        (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension): Ditto.

        * Modules/websockets/WebSocketHandshake.cpp:
        (WebCore::WebSocketHandshake::clientLocation const): Use makeString instead of
        StringBuilder.

        * bindings/js/JSDOMExceptionHandling.cpp:
        (WebCore::appendArgumentMustBe): Use one append instead of multiple.
        (WebCore::throwArgumentMustBeEnumError): Ditto.
        (WebCore::throwArgumentTypeError): Ditto.
        * contentextensions/CombinedURLFilters.cpp:
        (WebCore::ContentExtensions::recursivePrint): Ditto.
        * css/CSSBasicShapes.cpp:
        (WebCore::buildCircleString): Ditto.
        (WebCore::buildEllipseString): Ditto.
        (WebCore::buildPolygonString): Ditto.
        (WebCore::buildInsetString): Ditto.

        * css/CSSCalculationValue.cpp:
        (WebCore::buildCssText): Deleted.
        (WebCore::CSSCalcValue::customCSSText const): Use makeString.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::cssText const): Use one append instead of multiple.

        * css/CSSCrossfadeValue.cpp:
        (WebCore::CSSCrossfadeValue::customCSSText const): Use makeString.
        * css/CSSFilterImageValue.cpp:
        (WebCore::CSSFilterImageValue::customCSSText const): Ditto.
        * css/CSSFontFaceRule.cpp:
        (WebCore::CSSFontFaceRule::cssText const): Ditto.
        * css/CSSFontFaceSrcValue.cpp:
        (WebCore::CSSFontFaceSrcValue::customCSSText const): Ditto.

        * css/CSSGradientValue.cpp:
        (WebCore::appendGradientStops): Moved code here from CSSLinearGradientValue::customCSSText
        so it can be shared with CSSRadialGradientValue::customCSSText. Use one append per stop.
        (WebCore::CSSLinearGradientValue::customCSSText const): Use one append instead of multiple.
        (WebCore::CSSRadialGradientValue::customCSSText const): Ditto.
        (WebCore::CSSConicGradientValue::customCSSText const): Ditto.
        * css/CSSMediaRule.cpp:
        (WebCore::CSSMediaRule::cssText const): Ditto.
        * css/CSSNamespaceRule.cpp:
        (WebCore::CSSNamespaceRule::cssText const): Ditto.

        * css/CSSPageRule.cpp:
        (WebCore::CSSPageRule::selectorText const): Use makeString.

        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
        Use one append instead of multiple.

        * css/CSSPropertySourceData.cpp:
        (WebCore::CSSPropertySourceData::CSSPropertySourceData): Initialize in the
        structure definition instead of the constructor.
        (WebCore::CSSPropertySourceData::toString const): Use makeString.
        * css/CSSPropertySourceData.h: Initialize in the structure definition.

        * css/CSSStyleRule.cpp:
        (WebCore::CSSStyleRule::cssText const): Use makeString.

        * css/parser/CSSParser.cpp:
        (WebCore::CSSParser::parseFontFaceDescriptor): Use makeString.

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::font const): Use one append instead of multiple.

2019-08-22  Kai Ninomiya  <kainino@chromium.org>

        Pass conformance/attribs WebGL conformance tests
        https://bugs.webkit.org/show_bug.cgi?id=200901

        Reviewed by Alex Christensen.

        Tested by
        LayoutTests/webgl/*/conformance/attribs/gl-vertexattribpointer.html,
        LayoutTests/webgl/2.0.0/conformance/more/functions/vertexAttribPointerBadArgs.html,
        and other conformance/attribs/* tests not included in LayoutTests.
        LayoutTests/webgl/1.0.2/conformance/more/functions/vertexAttribPointerBadArgs.html
        fails as expected because it is an old snapshot of an incorrect test.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
        (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
        * html/canvas/WebGLVertexArrayObjectBase.cpp:
        (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
        * html/canvas/WebGLVertexArrayObjectBase.h:

2019-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>

        Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com
        https://bugs.webkit.org/show_bug.cgi?id=201023
        <rdar://problem/54294794>

        Reviewed by Ryosuke Niwa.

        Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places
        focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the
        WebKit ChangeLog for more details.

        Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):

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

        CaptureDeviceManager does not need to be CanMakeWeakPtr
        https://bugs.webkit.org/show_bug.cgi?id=200936

        Reviewed by Alex Christensen.

        CaptureDeviceManager does not need to create a weak pointer in deviceChanged
        since it directly calls RealtimeMediaSourceCenter singleton.

        CoreAudioCaptureDeviceManager does not need to create a weak pointer since its only
        instance is NeverDestroyed.
        No change of behavior.

        * platform/mediastream/CaptureDeviceManager.cpp:
        (WebCore::CaptureDeviceManager::deviceChanged):
        * platform/mediastream/CaptureDeviceManager.h:
        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
        (WebCore::createAudioObjectPropertyListenerBlock):
        (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
        (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:

2019-08-22  Chris Dumez  <cdumez@apple.com>

        Fix unsafe usage of MediaStreamTrackPrivate from background thread in MediaStreamTrackPrivate::audioSamplesAvailable()
        https://bugs.webkit.org/show_bug.cgi?id=200924

        Reviewed by Youenn Fablet.

        MediaStreamTrackPrivate is constructed / destructed on the main thread but its MediaStreamTrackPrivate::audioSamplesAvailable()
        gets called on a background thread. The audioSamplesAvailable() method may get called until the MediaStreamTrackPrivate
        destructor unregisters |this| as an observer from m_source. Event though MediaStreamTrackPrivate subclasses ThreadSafeRefCounted,
        ref'ing |this| on the background thread inside audioSamplesAvailable() is still unsafe as the destructor may already be running
        on the main thread.

        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
        (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
        (WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
        * platform/mediastream/MediaStreamTrackPrivate.h:

2019-08-22  Fujii Hironori  <Hironori.Fujii@sony.com>

        Remove the dead code of ScalableImageDecoder for scaling
        https://bugs.webkit.org/show_bug.cgi?id=200498

        Reviewed by Daniel Bates.

        No ports are using the down scaling feature of
        ScalableImageDecoder now. Removed it.

        No behavior change.

        * platform/image-decoders/ScalableImageDecoder.cpp:
        (WebCore::ScalableImageDecoder::prepareScaleDataIfNecessary): Deleted.
        (WebCore::ScalableImageDecoder::upperBoundScaledX): Deleted.
        (WebCore::ScalableImageDecoder::lowerBoundScaledX): Deleted.
        (WebCore::ScalableImageDecoder::upperBoundScaledY): Deleted.
        (WebCore::ScalableImageDecoder::lowerBoundScaledY): Deleted.
        (WebCore::ScalableImageDecoder::scaledY): Deleted.
        * platform/image-decoders/ScalableImageDecoder.h:
        (WebCore::ScalableImageDecoder::scaledSize): Deleted.
        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        (WebCore::GIFImageDecoder::setSize):
        (WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
        (WebCore::GIFImageDecoder::haveDecodedRow):
        (WebCore::GIFImageDecoder::frameComplete):
        (WebCore::GIFImageDecoder::initFrameBuffer):
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::JPEGImageDecoder::outputScanlines):
        (WebCore::JPEGImageDecoder::setSize): Deleted.
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:
        (WebCore::JPEG2000ImageDecoder::decode):
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::rowAvailable):
        (WebCore::PNGImageDecoder::initFrameBuffer):
        (WebCore::PNGImageDecoder::frameComplete):
        (WebCore::PNGImageDecoder::setSize): Deleted.
        * platform/image-decoders/png/PNGImageDecoder.h:

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

        Unreviewed build fix; add a 'final' declaration on shouldOverridePauseDuringRouteChange().

        * Modules/mediastream/MediaStream.h:

2019-08-21  Saam Barati  <sbarati@apple.com>

        [WHLSL] Improve default constructor and emit fewer pointers in metal codegen
        https://bugs.webkit.org/show_bug.cgi?id=200995

        Reviewed by Myles C. Maxfield.

        This patch makes it so that we:
        1. Emit less code for copy constructors by omitting an unused variable.
        2. Emit ternary expressions instead of if statements for conditional assignments.
        3. Don't copy pointers for producing an lvalue from DereferenceExpression.
        4. Lazily produce lvalues for GlobalVariableReference.

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

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

        [WHLSL] Vertex shader and fragment shader need to be able to come from two different programs
        https://bugs.webkit.org/show_bug.cgi?id=195446

        Reviewed by Saam Barati.

        When an author configures WebGPU to render things, the author provides a vertex shader and a fragment
        shader, and they both execute within the same draw call. It's common for authors coming from WebGL to
        put the two shaders in distinct files. Until this patch, WHLSL was unable to process two shaders from
        different sources which were meant to be hooked together.

        The first thing this patch does is add the notion of a "shader module" to the WHLSL compiler. This
        represents the source code containing one or more shaders. When the author wants to actually compile
        their source, they supply one or more shader modules to the compiler. The compiler then looks in the
        first module for the vertex shader and the second module for the fragment shader. The two modules are
        passed by reference, so they may refer to the same underlying object, which is supported.

        Shader modules have this interesting behavior where, within a shader module, funtion / type names may
        refer to each other, but may not refer to any other name within any other shader module. They behave
        as if all the names inside the module are not exported. So, it would seem that the most natural way to
        support this would be to run the WHLSL compiler and the MSL compiler twice independently, once for each
        module. However, this means that our compile times would double, which would be unfortunate. Instead,
        a more performant option would be to make the WHLSL compiler smart enough to handle multiple shader
        modules at once, and to produce a single merged output program that contains everything. It does this
        by parsing all the shader modules into a single Program object, but remembering which items in the 
        Program came from which places.

        This is implemented by teaching the WHLSL compiler about "namespaces." There are three namespaces: one
        for each shader module, and an additional one for the standard library. Every global object (e.g.
        named types and functions) knows which namespace it lives inside. The NameResolver has been educated
        to understand namespaces, so when you ask it for a name in a particular namespace, it will look up
        all the names both in that namespace and in the standard library's namespace, and it will union the
        results together.

        Function overload resolution doesn't actually go through the name resolver; instead, it's handled by
        sorting all functions into buckets such that any CallExpression only has to look in a single bucket
        to find all its potential overloads. These buckets can't be educated about namespaces (consider a
        function which has overloads in all 3 namespaces that is called from both shader modules - all the
        overloads must end up in the same bucket). Therefore, this logic is moved into
        resolveFunctionOverload(), which will now disregard candidate functions if they are in an inaccessible 
        namespace.

        Tests: webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html
               webgpu/whlsl/separate-shader-modules/separate-shader-modules.html

        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::nameSpace const):
        (WebCore::WHLSL::AST::FunctionDeclaration::setNameSpace):
        * Modules/webgpu/WHLSL/AST/WHLSLNameSpace.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h.
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        (WebCore::WHLSL::AST::NamedType::nameSpace const):
        (WebCore::WHLSL::AST::NamedType::setNameSpace):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::emitMetalFunctions):
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::DuplicateFunctionKey::operator== const):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::FunctionKey::operator== const):
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::checkShaderType):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::Checker::resolveFunction):
        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        * Modules/webgpu/WHLSL/WHLSLNameContext.cpp:
        (WebCore::WHLSL::NameContext::add):
        (WebCore::WHLSL::NameContext::getTypes):
        (WebCore::WHLSL::NameContext::getFunctions):
        (WebCore::WHLSL::NameContext::searchTypes const):
        (WebCore::WHLSL::NameContext::searchFunctions const):
        (WebCore::WHLSL::NameContext::globalExists const):
        (WebCore::WHLSL::NameContext::localExists const):
        (WebCore::WHLSL::NameContext::exists): Deleted.
        * Modules/webgpu/WHLSL/WHLSLNameContext.h:
        (WebCore::WHLSL::NameContext::setCurrentNameSpace):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::NameResolver):
        (WebCore::WHLSL::NameResolver::visit):
        (WebCore::WHLSL::resolveNamesInTypes):
        (WebCore::WHLSL::resolveTypeNamesInFunctions):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        (WebCore::WHLSL::NameResolver::setCurrentNameSpace):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::fail):
        (WebCore::WHLSL::Parser::consumeIntegralLiteral):
        (WebCore::WHLSL::Parser::consumeNonNegativeIntegralLiteral):
        (WebCore::WHLSL::Parser::parseConstantExpression):
        (WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
        (WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
        (WebCore::WHLSL::Parser::parseBuiltInSemantic):
        (WebCore::WHLSL::Parser::parseResourceSemantic):
        (WebCore::WHLSL::Parser::parseStageInOutSemantic):
        (WebCore::WHLSL::Parser::parseEnumerationDefinition):
        (WebCore::WHLSL::Parser::parseEnumerationMember):
        (WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
        (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseSwitchCase):
        (WebCore::WHLSL::Parser::parseForLoop):
        (WebCore::WHLSL::Parser::parseVariableDeclarations):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        (WebCore::WHLSL::Parser::parseTerm):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::ShaderModule::ShaderModule):
        (WebCore::WHLSL::createShaderModule):
        (WebCore::WHLSL::ShaderModuleDeleter::operator()):
        (WebCore::WHLSL::prepareShared):
        (WebCore::WHLSL::prepare):
        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        * Modules/webgpu/WHLSL/WHLSLProgram.h:
        (WebCore::WHLSL::Program::append):
        * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
        (WebCore::WHLSL::resolveFunctionOverloadImpl):
        (WebCore::WHLSL::resolveFunctionOverload):
        * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
        (WebCore::WHLSL::matchSemantics):
        (WebCore::WHLSL::findEntryPoint): Deleted.
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.h:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        (WebCore::WHLSL::includeStandardLibrary):
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUShaderModule.h:
        (WebCore::GPUShaderModule::platformShaderModule const):
        (WebCore::GPUShaderModule::whlslModule const):
        (WebCore::GPUShaderModule::whlslSource const): Deleted.
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):
        (WebCore::convertComputePipelineDescriptor):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):
        (WebCore::convertRenderPipelineDescriptor):
        * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:
        (WebCore::GPUShaderModule::tryCreate):
        (WebCore::GPUShaderModule::GPUShaderModule):

2019-08-21  Ryosuke Niwa  <rniwa@webkit.org>

        SVG element should become focusable when focus and key event listeners are added
        https://bugs.webkit.org/show_bug.cgi?id=200997

        Reviewed by Said Abou-Hallawa.

        This patch removes the odd behavior WebKit (and Blink) browsers had to make SVG elements
        with key or focus event listeners focusable. New behavior matches the behavior of Firefox
        as well as the SVG 2.0 specification: https://www.w3.org/TR/SVG2/interact.html#Focus

        Test: svg/custom/tabindex-order.html

        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::supportsFocus const):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::hasFocusEventListeners const): Deleted.
        (WebCore::SVGElement::isMouseFocusable const): Deleted.
        * svg/SVGElement.h:
        * svg/SVGGraphicsElement.h:

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

        Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
        https://bugs.webkit.org/show_bug.cgi?id=200992
        <rdar://problem/54408993>

        Reviewed by Eric Carlson.

        Follow-up to r248962: When the active audio route changes, and the
        system instructs us to pause, only pause the currently audible sessions.

        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
        (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
        (WebCore::MediaSessionManageriOS::activeRouteDidChange): Deleted.

2019-08-21  Megan Gardner  <megan_gardner@apple.com>

        Do not adjust viewport if editing selection is already visible
        https://bugs.webkit.org/show_bug.cgi?id=200907
        <rdar://problem/53903417>

        Reviewed by Simon Fraser.

        Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html

        Currently due to scrolling being mostly handled by integers, we are getting
        issues with rounding errors when trying to adjust the viewport while
        editing text when we are significantly zoomed in. The real fix would be to 
        start dealing with scrolling with floats/doubles, but until such time,
        we should early out of adjusting selections that we are certain are currently
        visible.

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

2019-08-21  Tim Horton  <timothy_horton@apple.com>

        [Mail] Tapping top of message scrolls back to copied text instead of top of the message
        https://bugs.webkit.org/show_bug.cgi?id=200999
        <rdar://problem/54564878>

        Reviewed by Wenson Hsieh.

        Test: editing/selection/ios/change-selection-by-tapping-with-existing-selection.html

        * page/EditorClient.h:
        (WebCore::EditorClient::shouldAllowSingleClickToChangeSelection const):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEventSingleClick):
        Instead of encoding platform behaviors in EventHandler, defer to EditorClient.

2019-08-21  Chris Dumez  <cdumez@apple.com>

        Crash under StringImpl::endsWith() in SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade()
        https://bugs.webkit.org/show_bug.cgi?id=200990
        <rdar://problem/54566439>

        Reviewed by Alex Christensen.

        Make sure we call isolatedCopy() on SQLiteIDBBackingStore::m_databaseRootDirectory before using
        it from background threads.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
        (WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForOrigin const):
        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        (WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectory const):

2019-08-21  Chris Dumez  <cdumez@apple.com>

        Crash under StringImpl::~StringImpl() in IDBServer::computeSpaceUsedForOrigin()
        https://bugs.webkit.org/show_bug.cgi?id=200989
        <rdar://problem/54565546>

        Reviewed by Alex Christensen.

        Make sure we call isolatedCopy() on IDBServer::m_databaseDirectoryPath before using it from
        background threads.

        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore):
        (WebCore::IDBServer::IDBServer::performGetAllDatabaseNames):
        (WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
        (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
        (WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
        (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
        (WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin):
        (WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::databaseDirectoryPath const):

2019-08-21  Chris Dumez  <cdumez@apple.com>

        Crash under StringImpl::endsWith() in RegistrationDatabase::openSQLiteDatabase()
        https://bugs.webkit.org/show_bug.cgi?id=200991
        <rdar://problem/54566689>

        Reviewed by Geoffrey Garen.

        Make sure we call isolatedCopy() on RegistrationDatabase::m_databaseDirectory before using
        it from background threads.

        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::openSQLiteDatabase):
        (WebCore::RegistrationDatabase::clearAll):
        * workers/service/server/RegistrationDatabase.h:
        (WebCore::RegistrationDatabase::databaseDirectory const):

2019-08-21  Alex Christensen  <achristensen@webkit.org>

        Disabling text autosizing should prevent text autosizing
        https://bugs.webkit.org/show_bug.cgi?id=200955
        <rdar://problem/48095374>

        Reviewed by Simon Fraser.

        Before this change there was no way to reliably change the text size on iOS when a -webkit-text-size-adjust:none style was applied
        because it would ignore the WKPreferences value for _textAutosizingEnabled.  Now that value has the desired effect when laying out.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::checkForTextSizeAdjust):

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

        Adopt AVSystemController_ActiveAudioRouteDidChangeNotification
        https://bugs.webkit.org/show_bug.cgi?id=200992
        <rdar://problem/54408993>

        Reviewed by Eric Carlson.

        When the system notifies us that the active audio route has changed in such a way
        that necessitates pausing, pause all media sessions, exempting those that are
        associated with WebRTC, since "pausing" an active audio conference isn't really
        possible.

        * Modules/mediastream/MediaStream.h:
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const):
        * platform/audio/PlatformMediaSession.h:
        (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const):
        * platform/audio/ios/MediaSessionManagerIOS.h:
        * platform/audio/ios/MediaSessionManagerIOS.mm:
        (WebCore::MediaSessionManageriOS::activeRouteDidChange):
        (-[WebMediaSessionHelper initWithCallback:]):
        (-[WebMediaSessionHelper activeAudioRouteDidChange:]):

2019-08-21  Ryosuke Niwa  <rniwa@webkit.org>

        Put keygen element behind a runtime flag and disable it by default
        https://bugs.webkit.org/show_bug.cgi?id=200850

        Reviewed by Antti Koivisto.

        The HTML keygen element has been removed from Chrome, Firefox, and the HTML specification in 2017.
        This patch disables the keygen element by default by adding a runtime enabled flag which is disabled by default.

        * bindings/js/WebCoreBuiltinNames.h:
        * html/HTMLKeygenElement.idl:
        * html/HTMLTagNames.in:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setKeygenElementEnabled):
        (WebCore::RuntimeEnabledFeatures::keygenElementEnabled const):

2019-08-21  Chris Dumez  <cdumez@apple.com>

        Get rid of m_weakThis data members now that we have a safe way to call makeWeakPtr() from various threads
        https://bugs.webkit.org/show_bug.cgi?id=200981

        Reviewed by Alex Christensen.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
        (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
        (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp:
        (WebCore::LibWebRTCDTMFSenderBackend::LibWebRTCDTMFSenderBackend):
        (WebCore::LibWebRTCDTMFSenderBackend::OnToneChange):
        * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
        * platform/network/cocoa/CookieStorageObserver.h:
        * platform/network/cocoa/CookieStorageObserver.mm:
        (WebCore::CookieStorageObserver::CookieStorageObserver):
        (WebCore::CookieStorageObserver::cookiesDidChange):

2019-08-21  Chris Dumez  <cdumez@apple.com>

        Add internal setting to disable SecureContext checks
        https://bugs.webkit.org/show_bug.cgi?id=200980
        <rdar://problem/54438512>

        Reviewed by Alex Christensen.

        Add internal setting to disable SecureContext checks, in order to facilitate development
        for features like Service workers or device orientation / motion.

        * dom/Document.cpp:
        (WebCore::Document::isSecureContext const):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::secureContextChecksEnabled const):
        (WebCore::RuntimeEnabledFeatures::setSecureContextChecksEnabled):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::isSecureContext const):

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

        [iOS] HLS streams disappear from Now Playing when paused on the lock screen
        https://bugs.webkit.org/show_bug.cgi?id=200951
        <rdar://problem/54534301>

        Reviewed by Eric Carlson.

        The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
        changing buffering policy) which can result in a player which no longer reports
        that it has audio, which in turn results in Now Playing no longer considering
        the web page to be an eligable now playing application. Bridge this gap by also
        taking AVPlayerItem.hasEnabledAudio into account when determining whether the 
        player has audio.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):

2019-08-21  Adrian Perez de Castro  <aperez@igalia.com>

        [GStreamer] Clang warns about mismatched type tag in declarations for ImageOrientation
        https://bugs.webkit.org/show_bug.cgi?id=200982

        Reviewed by Carlos Alberto Lopez Perez.

        No new tests needed.

        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Change
        type tag in the forward declaration to "struct", hence matching the
        actual type definition.

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

        ASSERTION FAILED: !s_isInvalidatingStyleWithRuleSets in com.apple.WebCore: WebCore::DocumentRuleSets::collectFeatures const
        https://bugs.webkit.org/show_bug.cgi?id=200919
        <rdar://problem/53413013>

        Reviewed by Zalan Bujtas.

        Bots show that in some timing-dependent cases we may end up constructing a style resolver in the middle the class change invalidation.

        This happens flakily on Pad bots in

        media/track/track-node-add-remove.html
        media/W3C/video/events/event_loadstart_manual.html
        media/W3C/video/readyState/readyState_initial.html

        and also reproes locally with lots of runs over these tests.

        * style/StyleInvalidationFunctions.h:
        (WebCore::Style::traverseRuleFeatures):

        Ensure that for elements in shadow tree the host resolver is also always constructed before starting rule-based invalidation.

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

        REGRESSION: naver.com - Multiple taps are required to open email
        https://bugs.webkit.org/show_bug.cgi?id=200979
        <rdar://problem/54295239>

        Reviewed by Dean Jackson.

        The "click" events on subjects in the message list are prevented by preventDefault() being called from a "mouseup" event listener.
        This shouldn't actually happen, but due to how simulated mouse events are implemented, there is no current distinction between
        "touchend" and "mouseup" events. It is safe however to opt mail.naver.com out of simulated mouse events altogether.

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

2019-08-21  Devin Rousso  <drousso@apple.com>

        Web Inspector: Page: re-add enable/disable after r248454
        https://bugs.webkit.org/show_bug.cgi?id=200947

        Reviewed by Joseph Pecoraro.

        We shouldn't design the agent system with only Web Inspector in mind. Other clients may want
        to have different functionality, not being told about frames creation/updates/destruction.
        In these cases, we should have graceful error message failures for other agents that rely on
        the Page agent.

        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorPageAgent::enable): Added.
        (WebCore::InspectorPageAgent::disable): Added.

        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
        (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
        (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::createStyleSheet):
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::highlightSelector):
        (WebCore::InspectorDOMAgent::highlightFrame):
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::setFrameIdentifier):
        * inspector/agents/page/PageNetworkAgent.cpp:
        (WebCore::PageNetworkAgent::loaderIdentifier):
        (WebCore::PageNetworkAgent::frameIdentifier):
        (WebCore::PageNetworkAgent::scriptExecutionContext):
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
        (WebCore::PageRuntimeAgent::reportExecutionContextCreation):

2019-08-20  Ryosuke Niwa  <rniwa@webkit.org>

        nextElementWithGreaterTabIndex should use shadowAdjustedTabIndex
        https://bugs.webkit.org/show_bug.cgi?id=200943

        Reviewed by Wenson Hsieh.

        Use shadowAdjustedTabIndex instead of tabIndexForElement in nextElementWithGreaterTabIndex.

        Because nextElementWithGreaterTabIndex is only called to find an element with a tab index
        set to a greater value than the argument tabIndex, which is always a positive integer,
        whether we call shadowAdjustedTabIndex or tabIndexForElement has no effect on an element
        with a shadow root or on a slot element. Furthermore, none of the elements with
        an isKeyboardFocusable override can have a author defined shadow root attached either.

        As a result, this refactoring will have no observable behavioral change.

        No new tests since there should be no observable behavior change.

        * page/FocusController.cpp:
        (WebCore::tabIndexForElement): Merged into shadowAdjustedTabIndex.
        (WebCore::shadowAdjustedTabIndex):
        (WebCore::nextElementWithGreaterTabIndex):

2019-08-20  Ryosuke Niwa  <rniwa@webkit.org>

        Remove MathMLElement::defaultTabIndex()
        https://bugs.webkit.org/show_bug.cgi?id=200944

        Reviewed by Frédéric Wang.

        Removed MathMLElement::defaultTabIndex since it doesn't have any observable effect since
        MathMLElement doesn't expose tabIndex IDL attribute, and sequential (tab key) focus navigation
        checks MathMLElement::isKeyboardFocusable, which doesn't rely on defaultTabIndex, anyway.

        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::defaultTabIndex const): Deleted.
        * mathml/MathMLElement.h:

2019-08-20  Devin Rousso  <drousso@apple.com>

        Web Inspector: Implement `queryHolders` Command Line API
        https://bugs.webkit.org/show_bug.cgi?id=200458

        Reviewed by Joseph Pecoraro.

        Call `queryHolders(object)` from the Console to return an array of objects that strongly
        reference the given `object`. This could be very useful for finding JavaScript "leaks".

        Test: inspector/console/queryHolders.html

        * inspector/CommandLineAPIModuleSource.js:
        (CommandLineAPIImpl.prototype.queryHolders): Added.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        (GenerateImplementation):
        * bindings/js/DOMGCOutputConstraint.cpp:
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::analyzeHeap): Added.
        (WebCore::JSDOMWindow::heapSnapshot): Deleted.
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::analyzeHeap): Added.
        (WebCore::JSDocument::heapSnapshot): Deleted.
        * bindings/scripts/test/JS/*:
        Rename `heapSnapshot` to `analyzeHeap` to match JavaScriptCore changes.

2019-08-20  Saam Barati  <sbarati@apple.com>

        [WHLSL] We need to null check when emitting native code for operator&.<field-name>
        https://bugs.webkit.org/show_bug.cgi?id=200846

        Reviewed by Myles C. Maxfield.

        Test: webgpu/whlsl/structure-field-access-on-null.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):

2019-08-20  Justin Fan  <justin_fan@apple.com>

        Unreviewed comment follow-up for https://bugs.webkit.org/show_bug.cgi?id=200752.

        * html/canvas/GPUBasedCanvasRenderingContext.h:

2019-08-16  Ryosuke Niwa  <rniwa@webkit.org>

        The default tab index of output and fieldset should be -1
        https://bugs.webkit.org/show_bug.cgi?id=200834

        Reviewed by Alex Christensen.

        This patch updates the default tab index of output and fieldset to -1 to match the behavior of
        Chrome and Firefox as well as the latest HTML specification:
        https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute

        To do that, this patch replaces HTMLFormControlElement::defaultTabIndex with defaultTabIndex
        implementation in each one of its concrete subclass such as HTMLButtonElement to mirror
        the language of the specification as follows:

        HTMLFormControlElement
            HTMLButtonElement -> 0
            HTMLFieldSetElement -> -1
            HTMLFormControlElementWithState
                HTMLKeygenElement -> 0 - Not specified anywhere but preserving the existing behavior.
                HTMLSelectElement -> 0
                HTMLTextFormControlElement
                    HTMLInputElement -> 0
                    HTMLTextAreaElement -> 0
            HTMLOutputElement -> -1 

        Even though Element::shouldBeIgnoredInSequentialFocusNavigation() checks the value of
        defaultTabIndex, this patch does not affect the actual sequential (tab) focus navigation:
        Beacuse HTMLOutputElement and HTMLFieldSetElement have supportsFocus overrides to call
        HTMLElement::supportsFocus instead of HTMLFormControlElement::supportsFocus, these two
        elements are focusable only when tabindex is set or it's a root content editable element.
        But all root editable elements are focusable anyway and the default tab index does not
        matter when tabindex is set.

        Test: fast/dom/tabindex-defaults.html

        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::defaultTabIndex const): Added.
        * html/HTMLButtonElement.h:
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::defaultTabIndex const): Deleted.
        * html/HTMLFormControlElement.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::defaultTabIndex const): Added.
        * html/HTMLKeygenElement.h:
        * html/HTMLKeygenElement.cpp:
        (WebCore::HTMLKeygenElement::defaultTabIndex const): Added.
        * html/HTMLKeygenElement.h:
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::defaultTabIndex const): Added.
        * html/HTMLSelectElement.h:
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::defaultTabIndex const): Added.
        * html/HTMLTextAreaElement.h:

2019-08-20  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] isConsideredClickable should be able to process elements with no renderers
        https://bugs.webkit.org/show_bug.cgi?id=200926
        <rdar://problem/54519579>

        Reviewed by Simon Fraser.

        This patch fixes the crash when the visible->hidden change triggers an isConsideredClickable() call with a 'display: none' element.

        Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden-crash.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::isConsideredClickable):

2019-08-20  Wenson Hsieh  <wenson_hsieh@apple.com>

        Clicking the search icon on ae.com hangs the web content process
        https://bugs.webkit.org/show_bug.cgi?id=200889
        <rdar://problem/54359330>

        Reviewed by Ryosuke Niwa.

        The hang occurs under FrameSelection::selectionAtSentenceStart, while computing an EditorState to send to the UI
        process. This act of determining whether the given positon is at the start of sentence entails moving backwards
        from the start of the current visible selection until the start of a paragraph or sentence is found, using
        VisiblePosition::previous to iterate backwards through VisiblePositions.

        However, on this website, VisiblePosition::previous ends up just returning the current position, and we loop
        infinitely as a result because we never actually move backwards. This happens because VisiblePosition::previous
        first uses previousVisuallyDistinctCandidate to find a candidate Position before the current position, but when
        the position is canonicalized to create a VisiblePosition, it is moved back to its original Position as the deep
        equivalent.

        In the attached test case (which is representative of the relevant part of the DOM on ae.com), we try to find
        the previous VisiblePosition from (#c, 0). The previous visually distinct candidate we initially find is
        (#b, 0), since:

        1. The enclosing renderer is a RenderBlock with a non-zero height.
        2. The enclosing renderer has no rendered children.
        3. The position is at the first editing position in the node (i.e. the span element).

        However, when canonicalizing the position, we find that neither the upstream nor the downstream position is a
        candidate because both the upstream and downstream nodes end up well outside of the span (the upstream node ends
        up being at the start of the body element, and the downstream position ends up right before the start of #c's
        container). The downstream position is at the end of a text node with a leading newline, it's not a candidate
        because its last caret offset is less than the length of the text node.

        As a result, even though the given position (#b, 0) is a candidate itself, its downstream and upstream positions
        are not. Thus, VisiblePosition::canonicalPosition expands the scope of its candidate positions to the next
        closest candidate positions; the next candidate position is (#c, 0). Both of these candidates are outside of the
        containing block, so we (somewhat arbitrarily) break the tie by choosing the next visible position, bringing us
        back to (#c, 0).

        There are several ways to fix this, one of which involves fixing the downstream/upstream positions of (#b, 0) so
        that they no longer jump out of the containing block of #b and cause (#b, 0) to be an invalid visible position
        despite being a candidate position. This can be achieved by adjusting the heuristic in
        endsOfNodeAreVisuallyDistinctPositions (used when moving upstream or downstream). Currently, this helper
        function returns false for #b because they contain a single (non-rendered) whitespace character. Removing this
        extraneous whitespace character actually causes the problem to stop reproducing, since #b and #c no longer
        contain any child nodes. This is important because the heuristic in Position::downstream attempts to keep the
        downstream position within the confines of the enclosing visual boundary, which (currently) ends up being the
        entire body element because endsOfNodeAreVisuallyDistinctPositions returns false for #b.

        To avoid this scenario, we teach endsOfNodeAreVisuallyDistinctPositions to treat inline-block containers that
        are empty (that is, contain no rendered content) but may have children for editing in the same way as inline-
        block containers that don't have any children; in both scenarios, they may contain a candidate position, so we
        should treat the ends of the container node as being visually distinct.

        Doing so causes the downstream position of (#b, 0) to be kept within the immediate containing span element,
        which then allows (#b, 0) to be a canonical VisiblePosition.

        Tests:  fast/events/focus-anchor-with-tabindex-hang.html
                editing/selection/modify-backward-inline-block-containers.html

        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::previous const):

2019-08-20  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Fix scrolling in modern WebKit views
        https://bugs.webkit.org/show_bug.cgi?id=200923

        Reviewed by Don Olmstead.

        The initial implementation of scrolling in Direct2D had errors that
        caused hilarious rendering glitches. This patch corrects the logic
        so that page scroll is correct.
 
        * platform/graphics/win/BackingStoreBackendDirect2D.h:
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
        (WebCore::BackingStoreBackendDirect2DImpl::scroll):
        (WebCore::BackingStoreBackendDirect2DImpl::bitmapBrush):
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::drawNativeImage):
        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::copyRectFromOneSurfaceToAnother):
        (WebCore::Direct2D::writeImageToDiskAsPNG): Added diagnostic utility to
        dump textures to disk for review.
        * platform/graphics/win/Direct2DUtilities.h:
        * platform/graphics/win/ImageDecoderDirect2D.cpp:
        (WebCore::ImageDecoderDirect2D::systemImagingFactory): Switch to more
        recent factory with additional features.
        * platform/graphics/win/ImageDecoderDirect2D.h:

2019-08-20  Saam Barati  <sbarati@apple.com>

        [WHLSL] Only take the pointer of a variable or global variable reference if it is used
        https://bugs.webkit.org/show_bug.cgi?id=200908

        Reviewed by Dean Jackson.

        Previously, we would always emit Metal code to produce an lvalue pointer
        even when it wasn't used. This patch adds a mechanism to lazily generate
        such pointers when they're actually needed, since we often don't use them.
        This is a 7% Metal compile time speedup on compute_boids with a p value of
        0.0001.

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h:
        (WebCore::WHLSL::Metal::MangledVariableName::operator bool const):

2019-08-20  Chris Dumez  <cdumez@apple.com>

        Unsafe usage of CookieStorageObserver from a background thread
        https://bugs.webkit.org/show_bug.cgi?id=200920

        Reviewed by Alex Christensen.

        Unsafe usage of CookieStorageObserver from a background thread. CookieStorageObserver gets
        constructed / destructed on the main thread. However, CookieStorageObserver::cookiesDidChange()
        gets called on a background thread and tries to ref |this|. Even though CookieStorageObserver
        is ThreadSafeRefCounted, this is still unsafe because the CookieStorageObserver destructor may
        already be running on the main thread when CookieStorageObserver::cookiesDidChange() gets called
        on the background thread.

        * platform/network/NetworkStorageSession.h:
        * platform/network/cocoa/CookieStorageObserver.h:
        * platform/network/cocoa/CookieStorageObserver.mm:
        (WebCore::CookieStorageObserver::CookieStorageObserver):
        (WebCore::CookieStorageObserver::cookiesDidChange):
        (WebCore::CookieStorageObserver::create): Deleted.
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::cookieStorageObserver const):

2019-08-20  Chris Dumez  <cdumez@apple.com>

        Use a strongly typed identifier for StorageNamespace's identifier
        https://bugs.webkit.org/show_bug.cgi?id=200895

        Reviewed by Alex Christensen and Youenn Fablet.

        * storage/StorageNamespace.h:

2019-08-20  Youenn Fablet  <youenn@apple.com>

        Make IDB quota check lambdas take a weak of UniqueIDBDatabaseTransaction instead of a ref
        https://bugs.webkit.org/show_bug.cgi?id=196696

        Reviewed by Alex Christensen.

        Refing the transaction in the lambdas extend their lifetime.
        Taking a weak pointer of them is better as this will not extend their lifetime.
        In particular, if the database is deleted, the corresponding transactions might be deleted.
        This makes quota checks less intrusive in IDB lifetime management.
        Covered by existing tests.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
        (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
        (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

2019-08-20  Youenn Fablet  <youenn@apple.com>

        Remove DeferredPromise::sessionID()
        https://bugs.webkit.org/show_bug.cgi?id=200616

        Reviewed by Alex Christensen.

        Calling sessionID() on DeferredPromise is valid if the DeferredPromise is not suspended.
        Since this might not always be true in call sites, add a resolve promise that is passed a function that returns
        the value to resolve.
        This function is taking a ScriptExecutionContext from which the session ID can be retrieved.
        This is safe since the function will only be called if the DeferredPromise is not suspended.
        Update call sites accordingly.
        No change of behavior.

        * Modules/fetch/FetchBodyConsumer.cpp:
        (WebCore::resolveWithTypeAndData):
        (WebCore::FetchBodyConsumer::resolve):
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::blob):
        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DeferredPromise::resolveCallbackValueWithNewlyCreated):
        (WebCore::DeferredPromise::sessionID const): Deleted.

2019-08-20  Youenn Fablet  <youenn@apple.com>

        PendingActivationMediaStream does not need to be refcounted
        https://bugs.webkit.org/show_bug.cgi?id=200879

        Reviewed by Alex Christensen.

        No observable change of behavior.

        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        (WebCore::UserMediaRequest::mediaStreamDidFail):
        No need to asynchronously remove the observer since MediaStreamPrivate handles that properply now.
        * Modules/mediastream/UserMediaRequest.h:

2019-08-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: Debugger: add a global breakpoint for pausing in the next microtask
        https://bugs.webkit.org/show_bug.cgi?id=200652

        Reviewed by Joseph Pecoraro.

        Test: inspector/debugger/setPauseOnMicrotasks.html

        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/worker/WorkerDebuggerAgent.h:

        * inspector/agents/InspectorTimelineAgent.h:
        (WebCore::InspectorTimelineAgent::willRunMicrotask): Added.
        (WebCore::InspectorTimelineAgent::didRunMicrotask): Added.

2019-08-19  Sam Weinig  <weinig@apple.com>

        [WHLSL] Make generated Metal code should be indented properly to ease reading while debugging
        https://bugs.webkit.org/show_bug.cgi?id=200870

        Reviewed by Saam Barati.

        Adds indentation of generated Metal code using the new WTF::Indentation and WTF::IndentationScope
        classes. This makes reading the generated Metal code much easier while debugging it, and does not
        seem to introduce any performance regression (I measured no difference on compute_boids.html test).

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitPack):
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):

2019-08-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: have more aggressive checks for dataURLs provided to `console.screenshot`
        https://bugs.webkit.org/show_bug.cgi?id=200747

        Reviewed by Joseph Pecoraro.

        Always send any /data:*+/ strings to the frontend and have it render there. If that doesn't
        work, have the frontend "spoof" an error message look and feel.

        Test: inspector/console/console-screenshot.html

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):

2019-08-19  Jer Noble  <jer.noble@apple.com>

        [Cocoa] Fix misspelling of -preventsDisplaySleepForVideoPlayback
        https://bugs.webkit.org/show_bug.cgi?id=200774
        <rdar://problem/54321071>

        Reviewed by Eric Carlson.

        Only declare the API on platforms where that API is undefined, so as
        to catch this kind of misspelling at compile time.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):

2019-08-19  Justin Fan  <justin_fan@apple.com>

        WebGPU layers don't show up sometimes
        https://bugs.webkit.org/show_bug.cgi?id=200752

        Reviewed by Dean Jackson.

        Ensure HTML canvas is properly notified of WebGPU updates. Fixes alpha WebGPU MotionMark benchmark no-show issue.

        Normal WebGPU behavior unaffected and covered by existing tests.

        * Modules/webgpu/GPUCanvasContext.cpp:
        (WebCore::GPUCanvasContext::configureSwapChain):
        (WebCore::GPUCanvasContext::reshape):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/canvas/GPUBasedCanvasRenderingContext.cpp: Added.
        (WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext):
        (WebCore::GPUBasedCanvasRenderingContext::htmlCanvas const):
        (WebCore::GPUBasedCanvasRenderingContext::notifyCanvasContentChanged):
        * html/canvas/GPUBasedCanvasRenderingContext.h:
        (WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext): Deleted.
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::reshape):
        (WebCore::WebGLRenderingContextBase::htmlCanvas): Deleted.
        * html/canvas/WebGLRenderingContextBase.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::contentChanged):

2019-08-19  Sihui Liu  <sihui_liu@apple.com>

        Remove IDB-specific quota
        https://bugs.webkit.org/show_bug.cgi?id=196545
        <rdar://problem/54201783>

        Reviewed by Youenn Fablet.

        Re-land r248526 with fix for performance tests.

        No change of behavior as IDB specific quota is no longer used.
        Instead a global quota is used. This quota currently handles IDB and Cache API.

        * Modules/indexeddb/server/IDBBackingStore.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore):
        (WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted.
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
        (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted.
        (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-08-19  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Removing the capture element prevents future pointer events from being dispatched on macOS
        https://bugs.webkit.org/show_bug.cgi?id=200887
        <rdar://problem/54104147>

        Reviewed by Dean Jackson.

        Test: pointerevents/mouse/pointer-capture-element-removal.html

        While we should only dispatch a lostpointercapture event to a connected element, clearing the capture element set on the frame's EventHandler
        should always happen, regardless of the connected status of the previous capture element, since otherwise all future mouse and pointer events
        would be targeted at the now-disconnected, former capture element.

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

2019-08-19  Youenn Fablet  <youenn@apple.com>

        Remove SessionID::emptySessionID()
        https://bugs.webkit.org/show_bug.cgi?id=200811

        Reviewed by Alex Christensen.

        No change of behavior, update SessionID call sites.

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        * dom/Document.cpp:
        (WebCore::Document::sessionID const):
        (WebCore::Document::privateBrowsingStateDidChange):
        * workers/service/ServiceWorkerProvider.cpp:
        (WebCore::ServiceWorkerProvider::registerServiceWorkerClients):

2019-08-19  Youenn Fablet  <youenn@apple.com>

        Stop MediaDevices timer when stopping MediaDevices
        https://bugs.webkit.org/show_bug.cgi?id=200880

        Reviewed by Eric Carlson.

        No change of behavior.
        Stop timer when stopping MediaDevices and check for MediaDevices being stopped before scheduling the timer.

        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::stop):
        Remove document/controller check since at that point,
        the document should not be null and the controller should be there.
        (WebCore::MediaDevices::scheduledEventTimerFired):
        (WebCore::MediaDevices::listenForDeviceChanges):

2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, speculative build fix for GTK and WinCairo
        https://bugs.webkit.org/show_bug.cgi?id=200620

        It seems that these files have different flags that is not tested in EWS.

        * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
        * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:

2019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF] Add makeUnique<T>, which ensures T is fast-allocated, actual static_assert part
        https://bugs.webkit.org/show_bug.cgi?id=200620

        Reviewed by Geoff Garen.

        * platform/network/curl/CookieJarCurl.h:

2019-08-19  Youenn Fablet  <youenn@apple.com>

        enumerateDevices should return the same JS objects if called twice
        https://bugs.webkit.org/show_bug.cgi?id=200767

        Reviewed by Eric Carlson.

        Make MediaDevices store the last list of enumerated MediaDeviceInfo objects.
        Reuse them for the next enumerateDevices call if needed.
        In case of a device change event, make sure the next enumerateDevices call will fetch the new list of devices.
        When constructing the new list of devices, reuse any preexisting device in the old list as specified by
        https://w3c.github.io/mediacapture-main/#dom-mediadevices-enumeratedevices.

        Update enumerateDevices to use a completion handler.
        Remove MediaDevicesRequest and MediaDevicesEnumerationRequest.
        Covered by updated test and existing tests.

        * Modules/mediastream/MediaDeviceInfo.cpp:
        (WebCore::MediaDeviceInfo::MediaDeviceInfo):
        (WebCore::MediaDeviceInfo::create):
        * Modules/mediastream/MediaDeviceInfo.h:
        * Modules/mediastream/MediaDeviceInfo.idl:
        * Modules/mediastream/MediaDevices.cpp:
        (WebCore::MediaDevices::MediaDevices):
        (WebCore::MediaDevices::stop):
        (WebCore::MediaDevices::refreshDevices):
        (WebCore::MediaDevices::enumerateDevices):
        (WebCore::MediaDevices::scheduledEventTimerFired):
        (WebCore::MediaDevices::listenForDeviceChanges):
        (WebCore::MediaDevices::addEventListener):
        * Modules/mediastream/MediaDevices.h:
        * Modules/mediastream/MediaDevices.idl:
        * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Removed.
        * Modules/mediastream/MediaDevicesEnumerationRequest.h: Removed.
        * Modules/mediastream/MediaDevicesRequest.cpp: Removed.
        * Modules/mediastream/MediaDevicesRequest.h: Removed.
        * Modules/mediastream/RTCRtpSender.cpp:
        * Modules/mediastream/UserMediaClient.h:
        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::isAllowedToUse):
        (WebCore::UserMediaController::canCallGetUserMedia const):
        * Modules/mediastream/UserMediaController.h:
        (WebCore::UserMediaController::enumerateMediaDevices):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-08-18  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF] Add makeUnique<T>, which ensures T is fast-allocated, makeUnique / makeUniqueWithoutFastMallocCheck part
        https://bugs.webkit.org/show_bug.cgi?id=200620

        Reviewed by Geoff Garen.

        * Modules/applicationmanifest/ApplicationManifestParser.cpp:
        (WebCore::ApplicationManifestParser::logDeveloperWarning):
        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::from):
        * Modules/cache/DOMWindowCaches.cpp:
        (WebCore::DOMWindowCaches::from):
        * Modules/cache/WorkerGlobalScopeCaches.cpp:
        (WebCore::WorkerGlobalScopeCaches::from):
        * Modules/credentialmanagement/NavigatorCredentials.cpp:
        (WebCore::NavigatorCredentials::from):
        * Modules/encryptedmedia/InitDataRegistry.cpp:
        (WebCore::InitDataRegistry::extractPsshBoxesFromCenc):
        * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
        (WebCore::LegacyCDM::create):
        * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp:
        (WebCore::LegacyCDMPrivateClearKey::createSession):
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::loadBlob):
        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::fetch):
        (WebCore::FetchResponse::BodyLoader::start):
        * Modules/gamepad/NavigatorGamepad.cpp:
        (WebCore::NavigatorGamepad::from):
        * Modules/geolocation/GeolocationController.cpp:
        (WebCore::provideGeolocationTo):
        * Modules/geolocation/NavigatorGeolocation.cpp:
        (WebCore::NavigatorGeolocation::from):
        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
        (WebCore::DOMWindowIndexedDatabase::from):
        * Modules/indexeddb/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::index):
        * Modules/indexeddb/IDBTransaction.cpp:
        (WebCore::IDBTransaction::objectStore):
        (WebCore::IDBTransaction::createObjectStore):
        (WebCore::IDBTransaction::createIndex):
        * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
        (WebCore::WorkerGlobalScopeIndexedDatabase::from):
        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
        (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):
        * Modules/indexeddb/client/TransactionOperation.cpp:
        (WebCore::IDBClient::TransactionOperation::TransactionOperation):
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
        (WebCore::IDBServer::IDBServer::createBackingStore):
        (WebCore::IDBServer::IDBServer::ensureQuotaUser):
        * Modules/indexeddb/server/IndexValueStore.cpp:
        (WebCore::IDBServer::IndexValueStore::addRecord):
        * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
        (WebCore::IDBServer::MemoryBackingStoreTransaction::create):
        (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):
        (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::create):
        (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo):
        * Modules/indexeddb/server/MemoryIndex.cpp:
        (WebCore::IDBServer::MemoryIndex::putIndexKey):
        (WebCore::IDBServer::MemoryIndex::maybeOpenCursor):
        * Modules/indexeddb/server/MemoryObjectStore.cpp:
        (WebCore::IDBServer::MemoryObjectStore::addRecord):
        (WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
        (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement):
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::maybeCreate):
        (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
        (WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement):
        (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
        * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
        (WebCore::IDBServer::SQLiteIDBTransaction::begin):
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
        * Modules/indexeddb/shared/IDBRequestData.cpp:
        (WebCore::IDBRequestData::IDBRequestData):
        (WebCore::IDBRequestData::isolatedCopy):
        * Modules/indexeddb/shared/IDBRequestData.h:
        (WebCore::IDBRequestData::decode):
        * Modules/indexeddb/shared/IDBResultData.cpp:
        (WebCore::IDBResultData::IDBResultData):
        (WebCore::IDBResultData::isolatedCopy):
        (WebCore::IDBResultData::openDatabaseSuccess):
        (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
        (WebCore::IDBResultData::deleteDatabaseSuccess):
        (WebCore::IDBResultData::putOrAddSuccess):
        (WebCore::IDBResultData::getRecordSuccess):
        (WebCore::IDBResultData::getAllRecordsSuccess):
        (WebCore::IDBResultData::openCursorSuccess):
        (WebCore::IDBResultData::iterateCursorSuccess):
        * Modules/indexeddb/shared/IDBResultData.h:
        (WebCore::IDBResultData::decode):
        * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
        (WebCore::IDBTransactionInfo::versionChange):
        (WebCore::IDBTransactionInfo::IDBTransactionInfo):
        (WebCore::IDBTransactionInfo::isolatedCopy):
        * Modules/indexeddb/shared/IDBTransactionInfo.h:
        (WebCore::IDBTransactionInfo::decode):
        * Modules/indexeddb/shared/InProcessIDBServer.cpp:
        (WebCore::InProcessIDBServer::quotaManager):
        * Modules/mediacapabilities/NavigatorMediaCapabilities.cpp:
        (WebCore::NavigatorMediaCapabilities::from):
        * Modules/mediasession/WebMediaSessionManager.cpp:
        (WebCore::WebMediaSessionManager::mockPicker):
        (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient):
        * Modules/mediasource/MediaSource.cpp:
        (WebCore::MediaSource::buffered const):
        (WebCore::MediaSource::setLiveSeekableRange):
        * Modules/mediastream/NavigatorMediaDevices.cpp:
        (WebCore::NavigatorMediaDevices::from):
        * Modules/mediastream/UserMediaController.cpp:
        (WebCore::provideUserMediaTo):
        * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
        (WebCore::LibWebRTCDataChannelHandler::channelEvent):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::addRemoteTrack):
        (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
        (WebCore::LibWebRTCMediaEndpoint::newTransceiver):
        (WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends):
        (WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender):
        (WebCore::LibWebRTCMediaEndpoint::createDataChannel):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::createLibWebRTCPeerConnectionBackend):
        (WebCore::LibWebRTCPeerConnectionBackend::videoReceiver):
        (WebCore::LibWebRTCPeerConnectionBackend::audioReceiver):
        (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
        (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp:
        (WebCore::LibWebRTCRtpTransceiverBackend::createReceiverBackend):
        (WebCore::LibWebRTCRtpTransceiverBackend::createSenderBackend):
        * Modules/notifications/Notification.cpp:
        (WebCore::Notification::Notification):
        * Modules/notifications/NotificationController.cpp:
        (WebCore::provideNotification):
        * Modules/quota/DOMWindowQuota.cpp:
        (WebCore::DOMWindowQuota::from):
        * Modules/quota/NavigatorStorageQuota.cpp:
        (WebCore::NavigatorStorageQuota::from):
        * Modules/quota/WorkerNavigatorStorageQuota.cpp:
        (WebCore::WorkerNavigatorStorageQuota::from):
        * Modules/speech/DOMWindowSpeechSynthesis.cpp:
        (WebCore::DOMWindowSpeechSynthesis::from):
        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::ensurePlatformSpeechSynthesizer):
        * Modules/webaudio/AsyncAudioDecoder.cpp:
        (WebCore::AsyncAudioDecoder::decodeAsync):
        * Modules/webaudio/AudioBasicInspectorNode.cpp:
        (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
        * Modules/webaudio/AudioBasicProcessorNode.cpp:
        (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
        * Modules/webaudio/AudioBufferSourceNode.cpp:
        (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        (WebCore::AudioContext::decodeAudioData):
        * Modules/webaudio/AudioDestinationNode.cpp:
        (WebCore::AudioDestinationNode::AudioDestinationNode):
        * Modules/webaudio/BiquadFilterNode.cpp:
        (WebCore::BiquadFilterNode::BiquadFilterNode):
        * Modules/webaudio/BiquadProcessor.cpp:
        (WebCore::BiquadProcessor::createKernel):
        (WebCore::BiquadProcessor::getFrequencyResponse):
        * Modules/webaudio/ChannelMergerNode.cpp:
        (WebCore::ChannelMergerNode::ChannelMergerNode):
        * Modules/webaudio/ChannelSplitterNode.cpp:
        (WebCore::ChannelSplitterNode::ChannelSplitterNode):
        * Modules/webaudio/ConvolverNode.cpp:
        (WebCore::ConvolverNode::ConvolverNode):
        (WebCore::ConvolverNode::setBuffer):
        * Modules/webaudio/DelayNode.cpp:
        (WebCore::DelayNode::DelayNode):
        * Modules/webaudio/DelayProcessor.cpp:
        (WebCore::DelayProcessor::createKernel):
        * Modules/webaudio/DynamicsCompressorNode.cpp:
        (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
        (WebCore::DynamicsCompressorNode::initialize):
        * Modules/webaudio/GainNode.cpp:
        (WebCore::GainNode::GainNode):
        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
        (WebCore::MediaElementAudioSourceNode::setFormat):
        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
        (WebCore::MediaStreamAudioSourceNode::setFormat):
        * Modules/webaudio/OscillatorNode.cpp:
        (WebCore::OscillatorNode::OscillatorNode):
        * Modules/webaudio/PannerNode.cpp:
        (WebCore::PannerNode::PannerNode):
        * Modules/webaudio/PeriodicWave.cpp:
        (WebCore::PeriodicWave::createBandLimitedTables):
        * Modules/webaudio/RealtimeAnalyser.cpp:
        (WebCore::RealtimeAnalyser::RealtimeAnalyser):
        (WebCore::RealtimeAnalyser::setFftSize):
        * Modules/webaudio/ScriptProcessorNode.cpp:
        (WebCore::ScriptProcessorNode::ScriptProcessorNode):
        * Modules/webaudio/WaveShaperDSPKernel.cpp:
        (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
        * Modules/webaudio/WaveShaperNode.cpp:
        (WebCore::WaveShaperNode::WaveShaperNode):
        * Modules/webaudio/WaveShaperProcessor.cpp:
        (WebCore::WaveShaperProcessor::createKernel):
        * Modules/webauthn/fido/FidoHidMessage.cpp:
        (fido::FidoHidMessage::FidoHidMessage):
        * Modules/webauthn/fido/FidoHidPacket.cpp:
        (fido::FidoHidInitPacket::createFromSerializedData):
        (fido::FidoHidContinuationPacket::createFromSerializedData):
        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::openAndVerifyVersion):
        (WebCore::Database::close):
        (WebCore::Database::scheduleTransaction):
        (WebCore::Database::scheduleTransactionStep):
        (WebCore::Database::tableNames):
        * Modules/webdatabase/DatabaseThread.cpp:
        (WebCore::DatabaseThread::DatabaseThread):
        * Modules/webdatabase/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::addOpenDatabase):
        (WebCore::DatabaseTracker::recordCreatingDatabase):
        (WebCore::DatabaseTracker::recordDeletingDatabase):
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::executeSql):
        (WebCore::SQLTransaction::openTransactionAndPreflight):
        * Modules/webdriver/NavigatorWebDriver.cpp:
        (WebCore::NavigatorWebDriver::from):
        * Modules/webgpu/NavigatorGPU.cpp:
        (WebCore::NavigatorGPU::from):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding):
        (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::assignConcreteType):
        (WebCore::WHLSL::Checker::assignType):
        (WebCore::WHLSL::Checker::forwardType):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseSemantic):
        * Modules/webgpu/WorkerNavigatorGPU.cpp:
        (WebCore::WorkerNavigatorGPU::from):
        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
        (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
        (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL):
        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::connect):
        (WebCore::WebSocketChannel::enqueueTextFrame):
        (WebCore::WebSocketChannel::enqueueRawFrame):
        (WebCore::WebSocketChannel::enqueueBlobFrame):
        (WebCore::WebSocketChannel::processOutgoingFrameQueue):
        * Modules/websockets/WebSocketDeflateFramer.cpp:
        (WebCore::WebSocketDeflateFramer::createExtensionProcessor):
        (WebCore::WebSocketDeflateFramer::enableDeflate):
        (WebCore::WebSocketDeflateFramer::deflate):
        (WebCore::WebSocketDeflateFramer::inflate):
        * Modules/websockets/WebSocketDeflater.cpp:
        (WebCore::WebSocketDeflater::WebSocketDeflater):
        (WebCore::WebSocketInflater::WebSocketInflater):
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
        * Modules/webvr/NavigatorWebVR.cpp:
        (WebCore::NavigatorWebVR::from):
        * accessibility/AXObjectCache.cpp:
        (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
        * animation/WebAnimation.cpp:
        (WebCore::WebAnimation::updateFinishedState):
        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
        * bindings/js/JSEventTargetCustom.cpp:
        (WebCore::jsEventTargetCast):
        * bindings/js/JSWorkerGlobalScopeBase.cpp:
        (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::transferArrayBuffers):
        (WebCore::SerializedScriptValue::create):
        * bindings/js/SerializedScriptValue.h:
        (WebCore::SerializedScriptValue::decode):
        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::initNormalWorld):
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::initScript):
        * bridge/c/c_class.cpp:
        (JSC::Bindings::CClass::methodNamed const):
        (JSC::Bindings::CClass::fieldNamed const):
        * bridge/objc/objc_class.mm:
        (JSC::Bindings::ObjcClass::methodNamed const):
        (JSC::Bindings::ObjcClass::fieldNamed const):
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::callObjCFallbackObject):
        * contentextensions/CombinedURLFilters.cpp:
        (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters):
        (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
        * crypto/SubtleCrypto.cpp:
        (WebCore::normalizeCryptoAlgorithmParameters):
        (WebCore::crossThreadCopyImportParams):
        * css/CSSCalculationValue.cpp:
        (WebCore::determineCategory):
        * css/CSSDefaultStyleSheets.cpp:
        (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
        (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::appendSources):
        * css/CSSFontFaceSet.cpp:
        (WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
        * css/CSSGroupingRule.cpp:
        (WebCore::CSSGroupingRule::cssRules const):
        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
        * css/CSSKeyframesRule.cpp:
        (WebCore::CSSKeyframesRule::cssRules):
        * css/CSSStyleSheet.cpp:
        (WebCore::CSSStyleSheet::cssRules):
        * css/DOMCSSPaintWorklet.cpp:
        (WebCore::DOMCSSPaintWorklet::from):
        * css/DOMCSSRegisterCustomProperty.cpp:
        (WebCore::DOMCSSRegisterCustomProperty::from):
        * css/DocumentRuleSets.cpp:
        (WebCore::DocumentRuleSets::DocumentRuleSets):
        (WebCore::DocumentRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
        (WebCore::DocumentRuleSets::initializeUserStyle):
        (WebCore::makeRuleSet):
        (WebCore::DocumentRuleSets::resetAuthorStyle):
        (WebCore::ensureInvalidationRuleSets):
        * css/ElementRuleCollector.cpp:
        (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
        * css/FontFace.cpp:
        (WebCore::populateFontFaceWithArrayBuffer):
        * css/PropertySetCSSStyleDeclaration.cpp:
        (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):
        * css/RuleFeature.cpp:
        (WebCore::RuleFeatureSet::collectFeatures):
        (WebCore::RuleFeatureSet::add):
        * css/RuleSet.cpp:
        (WebCore::RuleSet::addToRuleSet):
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength):
        * css/StyleBuilderCustom.h:
        (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
        (WebCore::StyleBuilderCustom::applyInheritTextShadow):
        (WebCore::StyleBuilderCustom::applyInheritBoxShadow):
        (WebCore::StyleBuilderCustom::applyValueContent):
        * css/StyleProperties.cpp:
        (WebCore::MutableStyleProperties::ensureCSSStyleDeclaration):
        (WebCore::MutableStyleProperties::ensureInlineCSSStyleDeclaration):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::cascadedPropertiesForRollback):
        * css/makeprop.pl:
        (generateFillLayerPropertyInheritValueSetter):
        (generateFillLayerPropertyValueSetter):
        * css/parser/CSSParserImpl.cpp:
        (WebCore::CSSParserImpl::CSSParserImpl):
        (WebCore::CSSParserImpl::parsePageSelector):
        (WebCore::CSSParserImpl::consumeMediaRule):
        (WebCore::CSSParserImpl::consumeSupportsRule):
        (WebCore::CSSParserImpl::consumeKeyframesRule):
        * css/parser/CSSParserSelector.cpp:
        (WebCore::CSSParserSelector::parsePagePseudoSelector):
        (WebCore::CSSParserSelector::parsePseudoElementSelector):
        (WebCore::CSSParserSelector::parsePseudoClassSelector):
        (WebCore::CSSParserSelector::CSSParserSelector):
        (WebCore::CSSParserSelector::adoptSelectorVector):
        (WebCore::CSSParserSelector::prependTagSelector):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeBasicShapePath):
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumePseudo):
        * dom/CustomElementReactionQueue.cpp:
        (WebCore::CustomElementReactionQueue::ensureBackupQueue):
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::items):
        (WebCore::DataTransfer::createForInputEvent):
        (WebCore::DataTransfer::createForDragStartEvent):
        (WebCore::DataTransfer::setDragImage):
        * dom/DeviceOrientationController.cpp:
        (WebCore::provideDeviceOrientationTo):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::buildAccessKeyCache):
        (WebCore::Document::implementation):
        (WebCore::Document::formController):
        (WebCore::Document::updateTextRenderer):
        (WebCore::Document::userAgentShadowTreeStyleResolver):
        (WebCore::Document::axObjectCache const):
        (WebCore::Document::setParsing):
        (WebCore::Document::accessSVGExtensions):
        (WebCore::Document::initSecurityContext):
        (WebCore::Document::textAutoSizing):
        (WebCore::Document::didAddWheelEventHandler):
        (WebCore::Document::didAddTouchEventHandler):
        (WebCore::Document::didLogMessage):
        (WebCore::Document::registerCSSProperty):
        (WebCore::Document::deviceOrientationAndMotionAccessController):
        (WebCore::Document::contentChangeObserver):
        (WebCore::Document::domTimerHoldingTank):
        * dom/Document.h:
        (WebCore::Document::createParserYieldToken):
        * dom/DocumentEventQueue.cpp:
        (WebCore::DocumentEventQueue::DocumentEventQueue):
        * dom/DocumentMarkerController.cpp:
        (WebCore::DocumentMarkerController::addMarker):
        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::from):
        (WebCore::DocumentStorageAccess::requestStorageAccess):
        (WebCore::DocumentStorageAccess::enableTemporaryTimeUserGesture):
        * dom/Element.cpp:
        (WebCore::Element::attributes const):
        (WebCore::Element::setIsDefinedCustomElement):
        (WebCore::Element::enqueueToUpgrade):
        (WebCore::Element::classList):
        (WebCore::Element::dataset):
        (WebCore::Element::ensureIntersectionObserverData):
        (WebCore::Element::ensureResizeObserverData):
        * dom/EventListenerMap.cpp:
        (WebCore::EventListenerMap::add):
        * dom/EventNames.h:
        * dom/EventPath.cpp:
        (WebCore::EventPath::buildPath):
        (WebCore::EventPath::EventPath):
        * dom/IdTargetObserverRegistry.cpp:
        (WebCore::IdTargetObserverRegistry::addObserver):
        * dom/KeyboardEvent.cpp:
        (WebCore::KeyboardEvent::KeyboardEvent):
        * dom/MutationObserver.cpp:
        (WebCore::queueMutationObserverCompoundMicrotask):
        * dom/MutationObserverInterestGroup.cpp:
        (WebCore::MutationObserverInterestGroup::createIfNeeded):
        * dom/MutationObserverRegistration.cpp:
        (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
        * dom/Node.cpp:
        (WebCore::Node::materializeRareData):
        (WebCore::Node::ensureEventTargetData):
        (WebCore::Node::registerMutationObserver):
        * dom/NodeRareData.h:
        (WebCore::NodeRareData::ensureNodeLists):
        (WebCore::NodeRareData::ensureMutationObserverData):
        * dom/RadioButtonGroups.cpp:
        (WebCore::RadioButtonGroups::addButton):
        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::reportException):
        (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection):
        (WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow):
        * dom/SelectorQuery.cpp:
        * dom/ShadowRoot.cpp:
        (WebCore::ShadowRoot::ShadowRoot):
        (WebCore::ShadowRoot::moveShadowRootToNewDocument):
        (WebCore::ShadowRoot::addSlotElementByName):
        * dom/SlotAssignment.cpp:
        (WebCore::SlotAssignment::addSlotElementByName):
        (WebCore::SlotAssignment::assignToSlot):
        * dom/TreeScope.cpp:
        (WebCore::TreeScope::TreeScope):
        (WebCore::TreeScope::addElementById):
        (WebCore::TreeScope::addElementByName):
        (WebCore::TreeScope::addImageMap):
        (WebCore::TreeScope::addImageElementByUsemap):
        (WebCore::TreeScope::labelElementForId):
        * editing/Editor.cpp:
        (WebCore::createDataTransferForClipboardEvent):
        (WebCore::Editor::Editor):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::ensureReplacementFragment):
        * editing/SelectionRectGatherer.cpp:
        (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        * editing/cocoa/HTMLConverter.mm:
        (HTMLConverter::HTMLConverter):
        (HTMLConverterCaches::computedStylePropertyForElement):
        * editing/markup.cpp:
        (WebCore::createPageForSanitizingWebContent):
        * fileapi/AsyncFileStream.cpp:
        (WebCore::callOnFileThread):
        (WebCore::AsyncFileStream::AsyncFileStream):
        * fileapi/FileReader.cpp:
        (WebCore::FileReader::readInternal):
        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::CachedFrame):
        * history/CachedPage.cpp:
        (WebCore::CachedPage::CachedPage):
        * history/PageCache.cpp:
        (WebCore::PageCache::addIfCacheable):
        * html/FileInputType.cpp:
        (WebCore::FileInputType::requestIcon):
        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
        * html/FormController.cpp:
        (WebCore::SavedFormState::deserialize):
        (WebCore::FormController::createSavedFormStateMap):
        (WebCore::FormController::takeStateForFormElement):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::relList const):
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::mapMouseEvent):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::setImageBuffer const):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::updateNamedElementCache const):
        * html/HTMLDetailsElement.cpp:
        (WebCore::HTMLDetailsElement::create):
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
        * html/HTMLFormControlsCollection.cpp:
        (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::addToPastNamesMap):
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::sandbox):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::ensureImageLoader):
        (WebCore::HTMLInputElement::resetListAttributeTargetObserver):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::sizes):
        (WebCore::HTMLLinkElement::relList):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::finishInitialization):
        (WebCore::HTMLMediaElement::seekWithTolerance):
        * html/HTMLOutputElement.cpp:
        (WebCore::HTMLOutputElement::htmlFor):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution):
        * html/HTMLSummaryElement.cpp:
        (WebCore::HTMLSummaryElement::create):
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::didAttachRenderers):
        (WebCore::HTMLVideoElement::parseAttribute):
        * html/PublicURLManager.cpp:
        (WebCore::PublicURLManager::create):
        * html/ValidationMessage.cpp:
        (WebCore::ValidationMessage::setMessage):
        (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
        (WebCore::ValidationMessage::requestToHideMessage):
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
        (WebCore::CanvasRenderingContext2DBase::drawingContext const):
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGL2RenderingContext::getExtension):
        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getExtension):
        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::initializeNewContext):
        (WebCore::WebGLRenderingContextBase::compileShader):
        (WebCore::WebGLRenderingContextBase::printToConsole):
        * html/parser/CSSPreloadScanner.cpp:
        (WebCore::CSSPreloadScanner::emitRule):
        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface):
        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::HTMLDocumentParser):
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        (WebCore::HTMLDocumentParser::insert):
        * html/parser/HTMLElementStack.cpp:
        (WebCore::HTMLElementStack::insertAbove):
        (WebCore::HTMLElementStack::pushCommon):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
        * html/parser/HTMLToken.h:
        (WebCore::HTMLToken::beginDOCTYPE):
        * html/parser/XSSAuditor.cpp:
        (WebCore::XSSAuditor::filterToken):
        (WebCore::XSSAuditor::decodedHTTPBodySuffixTree):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::TextControlInnerTextElement::resolveCustomStyle):
        * html/track/InbandGenericTextTrack.cpp:
        (WebCore::InbandGenericTextTrack::parser):
        * html/track/InbandWebVTTTextTrack.cpp:
        (WebCore::InbandWebVTTTextTrack::parser):
        * html/track/LoadableTextTrack.cpp:
        (WebCore::LoadableTextTrack::loadTimerFired):
        * inspector/CommandLineAPIHost.cpp:
        (WebCore::CommandLineAPIHost::CommandLineAPIHost):
        (WebCore::CommandLineAPIHost::clearAllWrappers):
        * inspector/DOMEditor.cpp:
        (WebCore::DOMEditor::insertBefore):
        (WebCore::DOMEditor::removeChild):
        (WebCore::DOMEditor::setAttribute):
        (WebCore::DOMEditor::removeAttribute):
        (WebCore::DOMEditor::setOuterHTML):
        (WebCore::DOMEditor::insertAdjacentHTML):
        (WebCore::DOMEditor::replaceWholeText):
        (WebCore::DOMEditor::replaceChild):
        (WebCore::DOMEditor::setNodeValue):
        * inspector/DOMPatchSupport.cpp:
        (WebCore::DOMPatchSupport::createDigest):
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::createLazyAgents):
        (WebCore::InspectorController::ensureInspectorAgent):
        (WebCore::InspectorController::ensureDOMAgent):
        (WebCore::InspectorController::ensurePageAgent):
        * inspector/InspectorHistory.cpp:
        (WebCore::InspectorHistory::markUndoableState):
        * inspector/InspectorStyleSheet.cpp:
        (ParsedStyleSheet::setSourceData):
        (WebCore::InspectorStyleSheet::ensureSourceData):
        * inspector/NetworkResourcesData.cpp:
        (WebCore::NetworkResourcesData::resourceCreated):
        * inspector/WorkerInspectorController.cpp:
        (WebCore::WorkerInspectorController::WorkerInspectorController):
        (WebCore::WorkerInspectorController::connectFrontend):
        (WebCore::WorkerInspectorController::createLazyAgents):
        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
        * inspector/agents/InspectorCPUProfilerAgent.cpp:
        (WebCore::InspectorCPUProfilerAgent::InspectorCPUProfilerAgent):
        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::InspectorCSSAgent):
        (WebCore::InspectorCSSAgent::setStyleSheetText):
        (WebCore::InspectorCSSAgent::setStyleText):
        (WebCore::InspectorCSSAgent::setRuleSelector):
        (WebCore::InspectorCSSAgent::addRule):
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
        (WebCore::InspectorCanvasAgent::recordCanvasAction):
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::InspectorDOMAgent):
        (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
        (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
        (WebCore::InspectorDOMAgent::highlightRect):
        (WebCore::InspectorDOMAgent::highlightQuad):
        (WebCore::InspectorDOMAgent::innerHighlightQuad):
        (WebCore::InspectorDOMAgent::highlightFrame):
        (WebCore::InspectorDOMAgent::setInspectedNode):
        (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
        * inspector/agents/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
        * inspector/agents/InspectorDatabaseAgent.cpp:
        (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
        * inspector/agents/InspectorLayerTreeAgent.cpp:
        (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
        * inspector/agents/InspectorMemoryAgent.cpp:
        (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::InspectorPageAgent):
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
        (WebCore::InspectorTimelineAgent::internalStart):
        (WebCore::InspectorTimelineAgent::startFromConsole):
        (WebCore::InspectorTimelineAgent::stopFromConsole):
        * inspector/agents/InspectorWorkerAgent.cpp:
        (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
        * inspector/agents/WebConsoleAgent.cpp:
        (WebCore::WebConsoleAgent::didReceiveResponse):
        (WebCore::WebConsoleAgent::didFailLoading):
        * inspector/agents/WebHeapAgent.cpp:
        (WebCore::WebHeapAgent::WebHeapAgent):
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::PageRuntimeAgent):
        * inspector/agents/worker/WorkerDebuggerAgent.cpp:
        (WebCore::WorkerDebuggerAgent::breakpointActionLog):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::displayBoxForLayoutBox const):
        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
        (WebCore::Layout::LayoutState::createFormattingContext):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::split const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::Box):
        (WebCore::Layout::Box::ensureRareData):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::TreeBuilder::createTableStructure):
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::appendCell):
        * loader/ContentFilter.cpp:
        (WebCore::ContentFilter::create):
        * loader/CrossOriginAccessControl.cpp:
        (WebCore::validatePreflightResponse):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        (WebCore::DocumentLoader::loadApplicationManifest):
        (WebCore::DocumentLoader::addAllArchiveResources):
        (WebCore::DocumentLoader::addArchiveResource):
        (WebCore::DocumentLoader::loadMainResource):
        (WebCore::DocumentLoader::didGetLoadDecisionForIcon):
        * loader/EmptyClients.cpp:
        (WebCore::pageConfigurationWithEmptyClients):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::init):
        (WebCore::FrameLoader::initForSynthesizedDocument):
        (WebCore::FrameLoader::detachChildren):
        * loader/LinkLoader.cpp:
        (WebCore::createLinkPreloadResourceClient):
        * loader/NavigationScheduler.cpp:
        (WebCore::NavigationScheduler::scheduleRedirect):
        (WebCore::NavigationScheduler::scheduleLocationChange):
        (WebCore::NavigationScheduler::scheduleFormSubmission):
        (WebCore::NavigationScheduler::scheduleRefresh):
        (WebCore::NavigationScheduler::scheduleHistoryNavigation):
        (WebCore::NavigationScheduler::schedulePageBlock):
        * loader/ProgressTracker.cpp:
        (WebCore::ProgressTracker::incrementProgress):
        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset):
        * loader/TextTrackLoader.cpp:
        (WebCore::TextTrackLoader::processNewCueData):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::create):
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::setBodyDataFrom):
        (WebCore::CachedImage::createImage):
        * loader/cache/CachedRawResource.cpp:
        (WebCore::CachedRawResource::redirectReceived):
        * loader/cache/CachedResource.cpp:
        (WebCore::CachedResource::addClientToSet):
        * loader/cache/CachedResourceLoader.cpp:
        (WebCore::CachedResourceLoader::requestResource):
        (WebCore::CachedResourceLoader::preload):
        (WebCore::CachedResourceLoader::clearPreloads):
        * loader/cache/MemoryCache.cpp:
        (WebCore::MemoryCache::ensureSessionResourceMap):
        (WebCore::MemoryCache::addImageToCache):
        (WebCore::MemoryCache::lruListFor):
        * loader/ios/PreviewLoader.mm:
        (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
        (-[WebPreviewLoader connection:didFailWithError:]):
        (WebCore::PreviewLoader::create):
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::maybeCreateContextMenu):
        * page/DebugPageOverlays.cpp:
        (WebCore::MouseWheelRegionOverlay::updateRegion):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::EventHandler):
        * page/FrameView.cpp:
        (WebCore::FrameView::addEmbeddedObjectToUpdate):
        (WebCore::FrameView::addSlowRepaintObject):
        (WebCore::FrameView::addViewportConstrainedObject):
        (WebCore::FrameView::addScrollableArea):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::pushLayoutState):
        (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
        * page/NavigatorBase.cpp:
        (WebCore::NavigatorBase::serviceWorker):
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::initGroup):
        (WebCore::Page::setResourceUsageOverlayVisible):
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::addMessage):
        (WebCore::PageConsoleClient::messageWithTypeAndLevel):
        (WebCore::PageConsoleClient::screenshot):
        * page/PageGroup.cpp:
        (WebCore::PageGroup::captionPreferences):
        * page/Performance.cpp:
        (WebCore::Performance::mark):
        (WebCore::Performance::clearMarks):
        (WebCore::Performance::measure):
        (WebCore::Performance::clearMeasures):
        * page/PrintContext.cpp:
        (WebCore::PrintContext::outputLinkedDestinations):
        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::startTimer):
        * page/RenderingUpdateScheduler.h:
        (WebCore::RenderingUpdateScheduler::create):
        * page/SecurityPolicy.cpp:
        (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::SettingsBase):
        * page/UserContentController.cpp:
        (WebCore::UserContentController::addUserScript):
        (WebCore::UserContentController::addUserStyleSheet):
        * page/WheelEventDeltaFilter.cpp:
        (WebCore::WheelEventDeltaFilter::create):
        * page/animation/CSSAnimationController.cpp:
        (WebCore::CSSAnimationController::CSSAnimationController):
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc):
        (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
        (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::updateSourceSelf):
        * page/csp/ContentSecurityPolicyDirectiveList.cpp:
        (WebCore::ContentSecurityPolicyDirectiveList::create):
        (WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective):
        * page/linux/ResourceUsageOverlayLinux.cpp:
        (WebCore::ResourceUsageOverlay::platformInitialize):
        * page/mac/PageMac.mm:
        (WebCore::Page::addSchedulePair):
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
        * page/scrolling/ScrollingMomentumCalculator.cpp:
        (WebCore::ScrollingMomentumCalculator::create):
        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::appendChild):
        (WebCore::ScrollingStateNode::insertChild):
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::commit):
        * page/scrolling/ScrollingTreeNode.cpp:
        (WebCore::ScrollingTreeNode::appendChild):
        * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
        (WebCore::ScrollingMomentumCalculator::create):
        * platform/Length.cpp:
        (WebCore::convertTo100PercentMinusLength):
        (WebCore::blendMixedTypes):
        * platform/RemoteCommandListener.cpp:
        (WebCore::RemoteCommandListener::create):
        * platform/ScrollAnimator.cpp:
        (WebCore::ScrollAnimator::create):
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::scrollAnimator const):
        (WebCore::ScrollableArea::ensureSnapOffsetsInfo):
        * platform/ThreadGlobalData.cpp:
        (WebCore::ThreadGlobalData::ThreadGlobalData):
        * platform/audio/AudioBus.cpp:
        (WebCore::AudioBus::AudioBus):
        (WebCore::AudioBus::copyWithGainFrom):
        * platform/audio/AudioChannel.h:
        * platform/audio/AudioResampler.cpp:
        (WebCore::AudioResampler::AudioResampler):
        (WebCore::AudioResampler::configureChannels):
        * platform/audio/DynamicsCompressor.cpp:
        (WebCore::DynamicsCompressor::setNumberOfChannels):
        * platform/audio/DynamicsCompressorKernel.cpp:
        (WebCore::DynamicsCompressorKernel::setNumberOfChannels):
        * platform/audio/FFTFrame.cpp:
        (WebCore::FFTFrame::createInterpolatedFrame):
        * platform/audio/HRTFDatabaseLoader.cpp:
        (WebCore::HRTFDatabaseLoader::load):
        * platform/audio/HRTFElevation.cpp:
        (WebCore::HRTFElevation::createForSubject):
        (WebCore::HRTFElevation::createByInterpolatingSlices):
        * platform/audio/HRTFKernel.cpp:
        (WebCore::HRTFKernel::HRTFKernel):
        (WebCore::HRTFKernel::createImpulseResponse):
        * platform/audio/MultiChannelResampler.cpp:
        (WebCore::MultiChannelResampler::MultiChannelResampler):
        * platform/audio/Panner.cpp:
        (WebCore::Panner::create):
        * platform/audio/PlatformMediaSession.cpp:
        (WebCore::PlatformMediaSession::create):
        * platform/audio/Reverb.cpp:
        (WebCore::Reverb::initialize):
        * platform/audio/ReverbConvolver.cpp:
        (WebCore::ReverbConvolver::ReverbConvolver):
        * platform/audio/ReverbConvolverStage.cpp:
        (WebCore::ReverbConvolverStage::ReverbConvolverStage):
        * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
        (WebCore::AudioDestination::create):
        * platform/audio/ios/AudioDestinationIOS.cpp:
        (WebCore::AudioDestination::create):
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::AudioSession):
        * platform/audio/mac/AudioDestinationMac.cpp:
        (WebCore::AudioDestination::create):
        * platform/audio/mac/AudioSampleDataSource.mm:
        (WebCore::AudioSampleDataSource::setInputFormat):
        (WebCore::AudioSampleDataSource::setOutputFormat):
        * platform/audio/mac/AudioSessionMac.cpp:
        (WebCore::AudioSession::AudioSession):
        * platform/cf/KeyedDecoderCF.cpp:
        (WebCore::KeyedDecoder::decoder):
        * platform/cf/KeyedEncoderCF.cpp:
        (WebCore::KeyedEncoder::encoder):
        * platform/cf/MainThreadSharedTimerCF.cpp:
        (WebCore::setupPowerObserver):
        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::create):
        * platform/cocoa/ParentalControlsContentFilter.mm:
        (WebCore::ParentalControlsContentFilter::create):
        * platform/cocoa/ScrollController.mm:
        (WebCore::ScrollController::updateScrollSnapPoints):
        * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
        (WebCore::CDMFactoryClearKey::createCDM):
        * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
        (WebCore::GameControllerGamepadProvider::controllerDidConnect):
        * platform/gamepad/mac/HIDGamepadProvider.cpp:
        (WebCore::HIDGamepadProvider::deviceAdded):
        * platform/generic/KeyedDecoderGeneric.cpp:
        (WebCore::KeyedDecoderGeneric::Dictionary::add):
        (WebCore::KeyedDecoder::decoder):
        (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric):
        * platform/generic/KeyedEncoderGeneric.cpp:
        (WebCore::KeyedEncoder::encoder):
        * platform/generic/ScrollAnimatorGeneric.cpp:
        (WebCore::ScrollAnimator::create):
        (WebCore::ScrollAnimatorGeneric::ScrollAnimatorGeneric):
        (WebCore::ScrollAnimatorGeneric::ensureSmoothScrollingAnimation):
        * platform/glib/KeyedDecoderGlib.cpp:
        (WebCore::KeyedDecoder::decoder):
        * platform/glib/KeyedEncoderGlib.cpp:
        (WebCore::KeyedEncoder::encoder):
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::startTimer):
        (WebCore::BitmapImage::decode):
        * platform/graphics/ComplexTextController.cpp:
        (WebCore::TextLayout::TextLayout):
        * platform/graphics/Font.cpp:
        (WebCore::Font::ensureDerivedFontData const):
        * platform/graphics/Font.h:
        (WebCore::Font::boundsForGlyph const):
        * platform/graphics/FontCache.cpp:
        (WebCore::FontCache::getCachedFontPlatformData):
        * platform/graphics/FontCascade.cpp:
        (WebCore::retrieveOrAddCachedFonts):
        (WebCore::FontCascade::displayListForTextRun const):
        * platform/graphics/FontCascadeFonts.cpp:
        (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter):
        * platform/graphics/GlyphMetricsMap.h:
        (WebCore::GlyphMetricsMap<T>::locatePageSlowCase):
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::setTransform):
        (WebCore::GraphicsLayer::setChildrenTransform):
        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/Image.cpp:
        (WebCore::Image::startAnimationAsynchronously):
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::MediaPlayer):
        (WebCore::MediaPlayer::loadWithNextMediaEngine):
        * platform/graphics/MediaPlayerPrivate.h:
        (WebCore::MediaPlayerPrivateInterface::seekable const):
        * platform/graphics/PathUtilities.cpp:
        (WebCore::FloatPointGraph::findOrCreateNode):
        * platform/graphics/Region.cpp:
        (WebCore::Region::setShape):
        * platform/graphics/Region.h:
        (WebCore::Region::copyShape const):
        (WebCore::Region::decode):
        * platform/graphics/TextTrackRepresentation.cpp:
        (WebCore::TextTrackRepresentation::create):
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::getExtensions):
        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::prepare):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::CDMFactoryFairPlayStreaming::createCDM):
        * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
        (WebCore::CDMPrivateMediaSourceAVFObjC::createSession):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::buffered const):
        * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
        (WebCore::WebMediaSessionManagerMac::platformPicker):
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
        (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges const):
        (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
        (WebCore::AVFWrapper::notificationCallback):
        (WebCore::AVFWrapper::legibleOutputCallback):
        (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
        (WebCore::AVFWrapper::platformLayer):
        * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
        (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
        (WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):
        (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack):
        (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption):
        * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp:
        (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
        (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack):
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable const):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered const):
        (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):
        * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
        (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
        (WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):
        (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack):
        (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption):
        * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
        (WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
        (WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack):
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
        (WebCore::GraphicsLayerCA::ensureLayerAnimations):
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::TileController):
        (WebCore::TileController::setContentsScale):
        (WebCore::TileController::adjustTileCoverageRectForScrolling):
        (WebCore::TileController::tiledScrollingIndicatorLayer):
        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
        (WebCore::PlatformCALayerCocoa::commonInit):
        (WebCore::PlatformCALayerCocoa::setShapeRoundedRect):
        * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
        (-[WebTiledBackingLayer createTileController:]):
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
        (PlatformCALayerWin::PlatformCALayerWin):
        * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
        (WebTiledBackingLayerWin::createTileController):
        * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
        (WebCore::GraphicsContextImplCairo::createFactory):
        (WebCore::m_private):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBufferData::swapBuffersIfNeeded):
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontCache::createFontPlatformData):
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        * platform/graphics/cocoa/IOSurface.mm:
        (WebCore::IOSurface::ensureGraphicsContext):
        * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
        (TextTrackRepresentation::create):
        * platform/graphics/cv/TextureCacheCV.mm:
        (WebCore::TextureCacheCV::create):
        * platform/graphics/displaylists/DisplayListReplayer.cpp:
        (WebCore::DisplayList::Replayer::replay):
        * platform/graphics/filters/FilterOperation.cpp:
        (WebCore::ReferenceFilterOperation::loadExternalDocumentIfNeeded):
        * platform/graphics/freetype/FontCacheFreeType.cpp:
        (WebCore::FontCache::createFontPlatformData):
        * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
        (WebCore::createFontCustomPlatformData):
        * platform/graphics/gpu/Texture.cpp:
        (WebCore::Texture::create):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
        (WebCore::MediaPlayerPrivateGStreamer::buffered const):
        (WebCore::MediaPlayerPrivateGStreamer::ensureAudioSourceProvider):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
        (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
        (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
        (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer):
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcMakeRequest):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine):
        (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const):
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp:
        (WebCore::MediaPlayerPrivateHolePunch::pushNextHolePunchBuffer):
        (WebCore::MediaPlayerPrivateHolePunch::registerMediaEngine):
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
        * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp:
        (WebCore::ISOProtectionSchemeInfoBox::parse):
        * platform/graphics/iso/ISOSchemeInformationBox.cpp:
        (WebCore::ISOSchemeInformationBox::parse):
        * platform/graphics/mac/FontCustomPlatformData.cpp:
        (WebCore::createFontCustomPlatformData):
        * platform/graphics/nicosia/NicosiaSceneIntegration.cpp:
        (Nicosia::SceneIntegration::createUpdateScope):
        * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
        (Nicosia::createCommand):
        * platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp:
        (Nicosia::PaintingContextCairo::ForPainting::ForPainting):
        (Nicosia::PaintingContextCairo::ForRecording::ForRecording):
        * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp:
        (Nicosia::BackingStoreTextureMapperImpl::createFactory):
        * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp:
        (Nicosia::CompositionLayerTextureMapperImpl::createFactory):
        * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp:
        (Nicosia::ContentLayerTextureMapperImpl::createFactory):
        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
        (Nicosia::GC3DLayer::swapBuffersIfNeeded):
        * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp:
        (Nicosia::ImageBackingTextureMapperImpl::createFactory):
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        (WebCore::GraphicsContext3D::getExtensions):
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::compileShader):
        (WebCore::GraphicsContext3D::mappedSymbolName):
        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
        (WebCore::GraphicsContext3D::getExtensions):
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::getExtensions):
        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
        (WebCore::TextureMapperGC3DPlatformLayer::swapBuffersIfNeeded):
        * platform/graphics/texmap/TextureMapperGL.cpp:
        (WebCore::TextureMapperGL::TextureMapperGL):
        (WebCore::TextureMapper::platformCreateAccelerated):
        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
        (WebCore::TextureMapperPlatformLayerBuffer::clone):
        * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
        (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
        * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
        (WebCore::TiledBackingStore::createTiles):
        * platform/graphics/transforms/TransformState.cpp:
        (WebCore::TransformState::operator=):
        (WebCore::TransformState::applyTransform):
        (WebCore::TransformState::setLastPlanarSecondaryQuad):
        * platform/graphics/transforms/TransformState.h:
        (WebCore::TransformState::setSecondaryQuad):
        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::FontCache::createFontPlatformData):
        * platform/graphics/win/FontCustomPlatformData.cpp:
        (WebCore::createFontCustomPlatformData):
        * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
        (WebCore::createFontCustomPlatformData):
        * platform/graphics/win/FullScreenController.cpp:
        (WebCore::FullScreenController::FullScreenController):
        (WebCore::FullScreenController::enterFullScreen):
        * platform/graphics/win/GraphicsContextCairoWin.cpp:
        (WebCore::GraphicsContext::platformInit):
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContext::GraphicsContext):
        (WebCore::GraphicsContext::platformInit):
        * platform/graphics/win/GraphicsContextImplDirect2D.cpp:
        (WebCore::GraphicsContextImplDirect2D::createFactory):
        (WebCore::m_private):
        * platform/graphics/win/GraphicsContextWin.cpp:
        (WebCore::GraphicsContext::createWindowsBitmap):
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
        (WebCore::MediaPlayerPrivateMediaFoundation::buffered const):
        (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter):
        * platform/graphics/win/WKCAImageQueue.cpp:
        (WebCore::WKCAImageQueue::WKCAImageQueue):
        * platform/gtk/PasteboardGtk.cpp:
        (WebCore::Pasteboard::createForCopyAndPaste):
        (WebCore::Pasteboard::createForGlobalSelection):
        (WebCore::Pasteboard::createForDragAndDrop):
        * platform/gtk/PasteboardHelper.cpp:
        (WebCore::PasteboardHelper::writeClipboardContents):
        * platform/gtk/RenderThemeGadget.cpp:
        (WebCore::RenderThemeGadget::create):
        * platform/gtk/RenderThemeWidget.cpp:
        (WebCore::RenderThemeWidget::getOrCreate):
        (WebCore::RenderThemeScrollbar::RenderThemeScrollbar):
        (WebCore::RenderThemeComboBox::RenderThemeComboBox):
        * platform/image-decoders/bmp/BMPImageDecoder.cpp:
        (WebCore::BMPImageDecoder::decodeHelper):
        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        (WebCore::GIFImageDecoder::decode):
        * platform/image-decoders/gif/GIFImageReader.cpp:
        (GIFFrameContext::decode):
        (GIFImageReader::addFrameIfNecessary):
        * platform/image-decoders/ico/ICOImageDecoder.cpp:
        (WebCore::ICOImageDecoder::decodeAtIndex):
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::JPEGImageDecoder::decode):
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::decode):
        * platform/ios/LegacyTileCache.mm:
        (WebCore::LegacyTileCache::LegacyTileCache):
        (WebCore::LegacyTileCache::commitScaleChange):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::createForDragAndDrop):
        (WebCore::Pasteboard::createForCopyAndPaste):
        * platform/ios/QuickLook.mm:
        (WebCore::registerQLPreviewConverterIfNeeded):
        * platform/ios/RemoteCommandListenerIOS.mm:
        (WebCore::RemoteCommandListener::create):
        * platform/ios/ScrollAnimatorIOS.mm:
        (WebCore::ScrollAnimator::create):
        * platform/libwpe/PasteboardLibWPE.cpp:
        (WebCore::Pasteboard::createForCopyAndPaste):
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::createForCopyAndPaste):
        (WebCore::Pasteboard::createForDragAndDrop):
        * platform/mac/RemoteCommandListenerMac.mm:
        (WebCore::RemoteCommandListener::create):
        * platform/mac/ScrollAnimatorMac.mm:
        (WebCore::ScrollAnimator::create):
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
        (WebCore::MediaRecorderPrivateAVFImpl::create):
        * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
        (WebCore::m_capturer):
        (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource):
        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        (WebCore::webkit_media_stream_src_init):
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
        (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
        (WebCore::m_capturer):
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
        (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory):
        (WebCore::initializePeerConnectionFactoryAndThreads):
        (WebCore::LibWebRTCProvider::createPeerConnection):
        (WebCore::LibWebRTCProvider::certificateGenerator):
        * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp:
        (WebCore::LibWebRTCProviderGStreamer::createDecoderFactory):
        (WebCore::LibWebRTCProviderGStreamer::createEncoderFactory):
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
        (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
        * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
        (WebCore::MockRealtimeAudioSourceMac::reconfigure):
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
        (WebCore::RealtimeOutgoingVideoSourceCocoa::convertToYUV):
        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
        * platform/mock/RTCNotifiersMock.cpp:
        (WebCore::RemoteDataChannelNotifier::fire):
        * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
        (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
        (WebCore::MockMediaPlayerMediaSource::buffered const):
        * platform/network/BlobResourceHandle.cpp:
        * platform/network/DataURLDecoder.cpp:
        (WebCore::DataURLDecoder::createDecodeTask):
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::ResourceHandle):
        * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
        (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
        * platform/network/cocoa/WebCoreNSURLSession.mm:
        (-[WebCoreNSURLSessionDataTask _restart]):
        * platform/network/curl/CookieJarDB.cpp:
        (WebCore::CookieJarDB::searchCookies):
        (WebCore::CookieJarDB::createPrepareStatement):
        * platform/network/curl/CurlCacheManager.cpp:
        (WebCore::CurlCacheManager::loadIndex):
        (WebCore::CurlCacheManager::didReceiveResponse):
        * platform/network/curl/CurlContext.cpp:
        (WebCore::CurlContext::CurlContext):
        (WebCore::CurlHandle::willSetupSslCtx):
        * platform/network/curl/CurlFormDataStream.cpp:
        (WebCore::CurlFormDataStream::getPostData):
        * platform/network/curl/CurlMultipartHandle.cpp:
        (WebCore::CurlMultipartHandle::createIfNeeded):
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::runOnMainThread):
        (WebCore::CurlRequest::setupTransfer):
        * platform/network/curl/CurlRequestScheduler.cpp:
        (WebCore::CurlRequestScheduler::workerThread):
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::delegate):
        * platform/network/curl/SocketStreamHandleImplCurl.cpp:
        (WebCore::SocketStreamHandleImpl::callOnWorkerThread):
        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
        (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
        * platform/network/soup/DNSResolveQueueSoup.cpp:
        (WebCore::DNSResolveQueueSoup::resolve):
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage):
        * platform/text/BidiResolver.h:
        (WebCore::DerivedClass>::appendRunInternal):
        * platform/text/LocaleICU.cpp:
        (WebCore::Locale::create):
        (WebCore::LocaleICU::createLabelVector):
        (WebCore::createFallbackMonthLabels):
        (WebCore::createFallbackAMPMLabels):
        * platform/text/LocaleNone.cpp:
        (WebCore::Locale::create):
        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::registerCodecs):
        * platform/text/TextCodecLatin1.cpp:
        (WebCore::TextCodecLatin1::registerCodecs):
        * platform/text/TextCodecReplacement.cpp:
        (WebCore::TextCodecReplacement::registerCodecs):
        * platform/text/TextCodecUTF16.cpp:
        (WebCore::TextCodecUTF16::registerCodecs):
        * platform/text/TextCodecUTF8.cpp:
        (WebCore::TextCodecUTF8::registerCodecs):
        * platform/text/TextCodecUserDefined.cpp:
        (WebCore::TextCodecUserDefined::registerCodecs):
        * platform/text/mac/LocaleMac.mm:
        (WebCore::Locale::create):
        * platform/text/win/LocaleWin.cpp:
        (WebCore::Locale::create):
        * platform/text/win/TextCodecWin.cpp:
        (WebCore::newTextCodecWin):
        * platform/vr/openvr/VRPlatformManagerOpenVR.cpp:
        (WebCore::VRPlatformManagerOpenVR::create):
        (WebCore::VRPlatformManagerOpenVR::getVRDisplays):
        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::createForCopyAndPaste):
        (WebCore::Pasteboard::createForDragAndDrop):
        * platform/win/SearchPopupMenuDB.cpp:
        (WebCore::SearchPopupMenuDB::createPreparedStatement):
        * platform/win/WCDataObject.cpp:
        (WebCore::WCDataObject::SetData):
        * rendering/CSSFilter.cpp:
        (WebCore::CSSFilter::buildReferenceFilter):
        * rendering/ComplexLineLayout.cpp:
        (WebCore::createRun):
        (WebCore::ComplexLineLayout::createRootInlineBox):
        (WebCore::ComplexLineLayout::handleTrailingSpaces):
        (WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
        * rendering/FloatingObjects.cpp:
        (WebCore::FloatingObject::create):
        (WebCore::FloatingObject::copyToNewContainer const):
        (WebCore::FloatingObject::cloneForNewParent const):
        (WebCore::FloatingObjects::computePlacedFloatsTree):
        * rendering/Grid.cpp:
        (WebCore::GridIterator::nextEmptyGridArea):
        * rendering/GridBaselineAlignment.cpp:
        (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext):
        * rendering/GridTrackSizingAlgorithm.cpp:
        (WebCore::GridTrackSizingAlgorithm::computeFlexFactorUnitSize const):
        (WebCore::GridTrackSizingAlgorithm::setup):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::HitTestResult):
        (WebCore::HitTestResult::operator=):
        (WebCore::HitTestResult::listBasedTestResult const):
        (WebCore::HitTestResult::mutableListBasedTestResult):
        * rendering/InlineIterator.h:
        (WebCore::addPlaceholderRunForIsolatedInline):
        * rendering/LayerOverlapMap.cpp:
        (WebCore::LayerOverlapMap::pushCompositingContainer):
        * rendering/RenderBlock.cpp:
        (WebCore::insertIntoTrackedRendererMaps):
        (WebCore::PositionedDescendantsMap::addDescendant):
        (WebCore::RenderBlock::beginUpdateScrollInfoAfterLayoutTransaction):
        (WebCore::ensureBlockRareData):
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::layoutInlineChildren):
        (WebCore::RenderBlockFlow::layoutLineGridBox):
        (WebCore::RenderBlockFlow::createFloatingObjects):
        (WebCore::RenderBlockFlow::ensureLineBoxes):
        (WebCore::RenderBlockFlow::materializeRareBlockFlowData):
        * rendering/RenderBox.cpp:
        (WebCore::controlStatesForRenderer):
        (WebCore::RenderBox::createInlineBox):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::ensureContinuationChainNode):
        * rendering/RenderCounter.cpp:
        (WebCore::makeCounterNode):
        * rendering/RenderFragmentContainer.cpp:
        (WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo):
        * rendering/RenderFragmentedFlow.cpp:
        (WebCore::RenderFragmentedFlow::containingFragmentMap):
        * rendering/RenderGeometryMap.cpp:
        (WebCore::RenderGeometryMap::push):
        (WebCore::RenderGeometryMap::pushView):
        * rendering/RenderGrid.cpp:
        (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
        (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::RenderImage):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::createInlineFlowBox):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateNormalFlowList):
        (WebCore::RenderLayer::collectLayers):
        (WebCore::RenderLayer::updateTransform):
        (WebCore::RenderLayer::updateClipRects):
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateAncestorClippingStack):
        (WebCore::RenderLayerBacking::startAnimation):
        (WebCore::RenderLayerBacking::startTransition):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::RenderLayerCompositor):
        (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
        (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
        * rendering/RenderLayerModelObject.cpp:
        (WebCore::RenderLayerModelObject::createLayer):
        * rendering/RenderLineBreak.cpp:
        (WebCore::RenderLineBreak::createInlineBox):
        * rendering/RenderMultiColumnFlow.cpp:
        (WebCore::RenderMultiColumnFlow::RenderMultiColumnFlow):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::ensureRareData):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::styleDidChange):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::createTextBox):
        (WebCore::RenderText::momentarilyRevealLastTypedCharacter):
        * rendering/RenderView.cpp:
        (WebCore::RenderView::repaintViewRectangle const):
        (WebCore::RenderView::compositor):
        (WebCore::RenderView::imageQualityController):
        (WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::placeEllipsis):
        * rendering/RootInlineBox.h:
        (WebCore::RootInlineBox::appendFloat):
        * rendering/SelectionRangeData.cpp:
        (WebCore::collect):
        (WebCore::SelectionRangeData::collectBounds const):
        (WebCore::SelectionRangeData::apply):
        * rendering/SimpleLineLayout.cpp:
        (WebCore::SimpleLineLayout::Layout::runResolver const):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::paintFlow):
        (WebCore::SimpleLineLayout::generateLineBoxTree):
        * rendering/TextAutoSizing.cpp:
        (WebCore::TextAutoSizing::addTextNode):
        * rendering/line/LineBreaker.cpp:
        (WebCore::LineBreaker::skipLeadingWhitespace):
        * rendering/shapes/RasterShape.cpp:
        (WebCore::RasterShapeIntervals::computeShapeMarginIntervals const):
        * rendering/shapes/Shape.cpp:
        (WebCore::createInsetShape):
        (WebCore::createCircleShape):
        (WebCore::createEllipseShape):
        (WebCore::createPolygonShape):
        (WebCore::Shape::createShape):
        (WebCore::Shape::createRasterShape):
        (WebCore::Shape::createBoxShape):
        * rendering/shapes/ShapeOutsideInfo.h:
        * rendering/style/BasicShapes.cpp:
        (WebCore::BasicShapePath::blend const):
        * rendering/style/ContentData.h:
        * rendering/style/FillLayer.cpp:
        (WebCore::FillLayer::FillLayer):
        (WebCore::FillLayer::operator=):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::clonePtr):
        (WebCore::RenderStyle::addCachedPseudoStyle):
        (WebCore::RenderStyle::addCustomPaintWatchProperty):
        (WebCore::RenderStyle::setContent):
        (WebCore::RenderStyle::accessCounterDirectives):
        (WebCore::RenderStyle::ensureAnimations):
        (WebCore::RenderStyle::ensureTransitions):
        * rendering/style/SVGRenderStyleDefs.cpp:
        (WebCore::StyleShadowSVGData::StyleShadowSVGData):
        * rendering/style/ShadowData.cpp:
        (WebCore::ShadowData::ShadowData):
        * rendering/style/StyleRareInheritedData.cpp:
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::RenderSVGImage):
        * rendering/svg/RenderSVGInline.cpp:
        (WebCore::RenderSVGInline::createInlineFlowBox):
        * rendering/svg/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::createTextBox):
        * rendering/svg/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::buildPrimitives const):
        (WebCore::RenderSVGResourceFilter::applyResource):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::applyResource):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::buildPattern):
        * rendering/svg/RenderSVGShape.cpp:
        (WebCore::RenderSVGShape::updateShapeFromElement):
        * rendering/svg/SVGResources.cpp:
        (WebCore::SVGResources::setClipper):
        (WebCore::SVGResources::setFilter):
        (WebCore::SVGResources::setMarkerStart):
        (WebCore::SVGResources::setMarkerMid):
        (WebCore::SVGResources::setMarkerEnd):
        (WebCore::SVGResources::setMasker):
        (WebCore::SVGResources::setFill):
        (WebCore::SVGResources::setStroke):
        * rendering/svg/SVGResourcesCache.cpp:
        (WebCore::SVGResourcesCache::addResourcesFromRenderer):
        * rendering/svg/SVGTextMetricsBuilder.cpp:
        (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
        * rendering/updating/RenderTreeBuilder.cpp:
        (WebCore::RenderTreeBuilder::RenderTreeBuilder):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::RenderTreeUpdater):
        * style/StyleInvalidator.cpp:
        (WebCore::Style::Invalidator::Invalidator):
        * style/StyleRelations.cpp:
        (WebCore::Style::commitRelationsToRenderStyle):
        * style/StyleScope.cpp:
        (WebCore::Style::Scope::resolver):
        (WebCore::Style::Scope::activeStyleSheetsContains const):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolve):
        * svg/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::SVGDocumentExtensions):
        (WebCore::SVGDocumentExtensions::addPendingResource):
        (WebCore::SVGDocumentExtensions::addElementReferencingTarget):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::SVGElement):
        (WebCore::SVGElement::ensureSVGRareData):
        * svg/SVGGraphicsElement.cpp:
        (WebCore::SVGGraphicsElement::supplementalTransform):
        * svg/SVGPathByteStream.h:
        (WebCore::SVGPathByteStream::copy const):
        * svg/animation/SMILTimeContainer.cpp:
        (WebCore::SMILTimeContainer::schedule):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):
        * svg/properties/SVGAnimatedDecoratedProperty.h:
        (WebCore::SVGAnimatedDecoratedProperty::create):
        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
        * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
        * svg/properties/SVGDecoratedEnumeration.h:
        (WebCore::SVGDecoratedEnumeration::create):
        * svg/properties/SVGPrimitivePropertyAnimator.h:
        (WebCore::SVGPrimitivePropertyAnimator::create):
        * svg/properties/SVGValuePropertyAnimatorImpl.h:
        * svg/properties/SVGValuePropertyListAnimatorImpl.h:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::from):
        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::InspectorStubFrontend):
        (WebCore::Internals::Internals):
        (WebCore::Internals::enableMockSpeechSynthesizer):
        (WebCore::Internals::openDummyInspectorFrontend):
        (WebCore::Internals::setPrinting):
        (WebCore::Internals::initializeMockCDM):
        (WebCore::Internals::queueMicroTask):
        * testing/LegacyMockCDM.cpp:
        (WebCore::LegacyMockCDM::createSession):
        * testing/MockCDMFactory.cpp:
        (WebCore::MockCDMFactory::createCDM):
        * testing/MockContentFilter.cpp:
        (WebCore::MockContentFilter::create):
        * testing/MockGamepadProvider.cpp:
        (WebCore::MockGamepadProvider::setMockGamepadDetails):
        * workers/WorkerConsoleClient.cpp:
        (WebCore::WorkerConsoleClient::messageWithTypeAndLevel):
        * workers/WorkerEventQueue.cpp:
        (WebCore::WorkerEventQueue::enqueueEvent):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):
        (WebCore::WorkerGlobalScope::addMessage):
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
        * workers/WorkerRunLoop.cpp:
        (WebCore::WorkerRunLoop::WorkerRunLoop):
        (WebCore::WorkerRunLoop::postTaskAndTerminate):
        (WebCore::WorkerRunLoop::postTaskForMode):
        * workers/WorkerScriptLoader.cpp:
        (WebCore::WorkerScriptLoader::loadAsynchronously):
        (WebCore::WorkerScriptLoader::createResourceRequest):
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::WorkerThread):
        * workers/service/ServiceWorkerContainer.cpp:
        (WebCore::ServiceWorkerContainer::ready):
        (WebCore::ServiceWorkerContainer::addRegistration):
        (WebCore::ServiceWorkerContainer::removeRegistration):
        (WebCore::ServiceWorkerContainer::updateRegistration):
        (WebCore::ServiceWorkerContainer::getRegistration):
        (WebCore::ServiceWorkerContainer::getRegistrations):
        * workers/service/context/SWContextManager.cpp:
        (WebCore::SWContextManager::terminateWorker):
        * workers/service/context/ServiceWorkerThreadProxy.cpp:
        (WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
        (WebCore::ServiceWorkerThreadProxy::createBlobLoader):
        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::openSQLiteDatabase):
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::addRegistrationFromStore):
        (WebCore::SWServer::SWServer):
        (WebCore::SWServer::scheduleJob):
        (WebCore::SWServer::unregisterServiceWorkerClient):
        * workers/service/server/SWServerJobQueue.cpp:
        (WebCore::SWServerJobQueue::runRegisterJob):
        * worklets/PaintWorkletGlobalScope.cpp:
        (WebCore::PaintWorkletGlobalScope::registerPaint):
        * worklets/WorkletConsoleClient.cpp:
        (WebCore::WorkletConsoleClient::messageWithTypeAndLevel):
        * worklets/WorkletGlobalScope.cpp:
        (WebCore::WorkletGlobalScope::WorkletGlobalScope):
        (WebCore::WorkletGlobalScope::addConsoleMessage):
        * worklets/WorkletScriptController.cpp:
        (WebCore::WorkletScriptController::initScriptWithSubclass):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::upload):
        * xml/XPathFunctions.cpp:
        * xml/XPathPredicate.cpp:
        (WebCore::XPath::evaluatePredicate):
        * xml/XSLStyleSheetLibxslt.cpp:
        (WebCore::XSLStyleSheet::loadChildSheet):
        * xml/parser/XMLDocumentParser.cpp:
        (WebCore::XMLDocumentParser::handleError):
        * xml/parser/XMLDocumentParserLibxml2.cpp:
        (WebCore::PendingCallbacks::appendStartElementNSCallback):
        (WebCore::PendingCallbacks::appendEndElementNSCallback):
        (WebCore::PendingCallbacks::appendCharactersCallback):
        (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
        (WebCore::PendingCallbacks::appendCDATABlockCallback):
        (WebCore::PendingCallbacks::appendCommentCallback):
        (WebCore::PendingCallbacks::appendInternalSubsetCallback):
        (WebCore::PendingCallbacks::appendErrorCallback):
        (WebCore::XMLDocumentParser::XMLDocumentParser):
        (WebCore::XMLDocumentParser::doEnd):

2019-08-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Compute column min/max widths and table width.
        https://bugs.webkit.org/show_bug.cgi?id=200757
        <rdar://problem/54333148>

        Reviewed by Antti Koivisto.

        For each column, determine a maximum and minimum column width from the cells that span only that column.
        The minimum is that required by the cell with the largest minimum cell width (or the column 'width', whichever is larger).
        The maximum is that required by the cell with the largest maximum cell width (or the column 'width', whichever is larger).

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::appendCell):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::columns):
        (WebCore::Layout::TableGrid::rows):

2019-08-17  Darin Adler  <darin@apple.com>

        Tidy up checks to see if a character is in the Latin-1 range by using isLatin1 consistently
        https://bugs.webkit.org/show_bug.cgi?id=200861

        Reviewed by Ross Kirsling.

        * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Use isLatin1.
        * css/makeSelectorPseudoElementsMap.py: Ditto.
        * editing/TextIterator.cpp:
        (WebCore::isNonLatin1Separator): Ditto.
        (WebCore::isSeparator): Ditto.
        * platform/network/HTTPParsers.cpp:
        (WebCore::isValidReasonPhrase): Ditto.
        (WebCore::isValidHTTPHeaderValue): Ditto.
        (WebCore::isValidAcceptHeaderValue): Ditto.
        * platform/text/TextCodecLatin1.cpp:
        (WebCore::TextCodecLatin1::decode): Ditto.
        * platform/text/TextCodecUTF8.cpp:
        (WebCore::TextCodecUTF8::handlePartialSequence): Ditto.
        (WebCore::TextCodecUTF8::decode): Ditto.

2019-08-18  Cathie Chen  <cathiechen@igalia.com>

        Crash in Document::deliverResizeObservations
        https://bugs.webkit.org/show_bug.cgi?id=200635

        Reviewed by Simon Fraser.

        Document::deliverResizeObservations will crash if m_resizeObservers in Document
        is modified in JS callbacks when we are traversing observers in m_resizeObservers.
        This patch copy m_resizeObservers to a new vector, and check null for observers.

        Test: resize-observer/delete-observers-in-callbacks.html

        * dom/Document.cpp:
        (WebCore::Document::deliverResizeObservations):

2019-08-17  Sam Weinig  <weinig@apple.com>

        Rename StringBuilder::flexibleAppend(...) to StringBuilder::append(...)
        https://bugs.webkit.org/show_bug.cgi?id=200756

        Reviewed by Darin Adler.

        Update call sites for rename from StringBuilder::flexibleAppend(...) to 
        StringBuilder::append(...).

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitBuiltInsSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledInputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledOutputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::declareFunction):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Types::appendNameTo):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::logLayerInfo):
        * testing/Internals.cpp:
        (WebCore::Internals::ongoingLoadsDescriptions const):

2019-08-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r248772.
        https://bugs.webkit.org/show_bug.cgi?id=200853

        Causes timeouts in some WebGL tests (Requested by anttik on
        #webkit).

        Reverted changeset:

        "Content in <iframe> should override "touch-action" set in
        embedding document"
        https://bugs.webkit.org/show_bug.cgi?id=200204
        https://trac.webkit.org/changeset/248772

2019-08-16  Myles C. Maxfield  <mmaxfield@apple.com>

        [macOS] Emoji with variation selectors are rendered in text style, not emoji style
        https://bugs.webkit.org/show_bug.cgi?id=200830
        <rdar://problem/53076002>

        Reviewed by Simon Fraser.

        When mapping characters to glyphs, Core Text is giving us the deleted glyph ID, which is unexpected.
        We were treating it as a valid glyph ID, but it rather should be treated as an invalid glyph ID.

        Test: fast/text/emoji-variation-selector.html

        * platform/graphics/mac/GlyphPageMac.cpp:
        (WebCore::GlyphPage::fill):

2019-08-16  Saam Barati  <sbarati@apple.com>

        [WHLSL] Make "operator cast" constructors native
        https://bugs.webkit.org/show_bug.cgi?id=200748

        Reviewed by Myles C. Maxfield.

        Tests: webgpu/whlsl/matrix-constructors.html
               webgpu/whlsl/vector-constructors.html

        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-08-16  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Enums should be shadowed by local variables
        https://bugs.webkit.org/show_bug.cgi?id=200847

        Reviewed by Saam Barati.

        Only cause DotExpressions to become EnumerationMemberLiterals if they aren't valid variable names.

        Test: webgpu/whlsl/structure-field-enumeration-element-clash.html

        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):

2019-08-15  Ryosuke Niwa  <rniwa@webkit.org>

        Don't use union to store NodeRareData* and RenderObject*
        https://bugs.webkit.org/show_bug.cgi?id=200744

        Reviewed by Antti Koivisto.

        This patch undoes unioning of NodeRareData* and RenderObject* in Node introduced in r133372 in order
        to eliminate any possibility of type confusion bugs. Instead of re-introducing the global map, which
        is known to be slow, this patch simply adds an extra pointer for NodeRareData: Node::m_rareData.

        To compensate for the increased memory usage due to a new pointer type in Node, this patch also packs
        the style related flags in ElementRareData, which is the most common reason for which ElementRareData
        is created, into RenderObject* pointer using CompactPointerTuple as Node::m_rendererWithStyleFlags.

        Unfortunately, there are 9 style related flags and they won't all fit into the single byte provided
        by CompactPointerTuple. Luckily, this patch also eliminates the need for HasRareDataFlag as m_rareData
        knows whether a node has rare data or not so we re-use that bitflag space for the extra one flag.

        No new tests since there should be no observable behavioral change from this.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild): Check the nullity of
        m_rareData directly instead of checking HasRareDataFlag, which has been removed.
        * dom/Element.cpp:
        (WebCore::Element::setStyleAffectedByEmpty): Deleted.
        (WebCore::Element::setStyleAffectedByFocusWithin): Deleted.
        (WebCore::Element::setStyleAffectedByActive): Deleted.
        (WebCore::Element::setChildrenAffectedByDrag): Deleted.
        (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
        (WebCore::Element::setDescendantsAffectedByForwardPositionalRules): Deleted.
        (WebCore::Element::setChildrenAffectedByBackwardPositionalRules): Deleted.
        (WebCore::Element::setDescendantsAffectedByBackwardPositionalRules): Deleted.
        (WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules): Deleted.
        (WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
        (WebCore::Element::resetStyleRelations): Clear the flags in m_rendererWithStyleFlags and m_nodeFlags.
        (WebCore::Element::rareDataStyleAffectedByEmpty const): Deleted.
        (WebCore::Element::rareDataStyleAffectedByFocusWithin const): Deleted.
        (WebCore::Element::rareDataStyleAffectedByActive const): Deleted.
        (WebCore::Element::rareDataChildrenAffectedByDrag const): Deleted.
        (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules const): Deleted.
        (WebCore::Element::rareDataDescendantsAffectedByForwardPositionalRules const): Deleted.
        (WebCore::Element::rareDataChildrenAffectedByBackwardPositionalRules const): Deleted.
        (WebCore::Element::rareDataDescendantsAffectedByBackwardPositionalRules const): Deleted.
        (WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules const): Deleted.
        * dom/Element.h:
        (WebCore::Element::styleAffectedByActive const): Now uses m_rendererWithStyleFlags.
        (WebCore::Element::styleAffectedByEmpty const): Ditto.
        (WebCore::Element::styleAffectedByFocusWithin const): Now uses m_nodeFlags.
        (WebCore::Element::childrenAffectedByDrag const): Now uses m_rendererWithStyleFlags.
        (WebCore::Element::childrenAffectedByForwardPositionalRules const): Ditto.
        (WebCore::Element::descendantsAffectedByForwardPositionalRules const): Ditto.
        (WebCore::Element::childrenAffectedByBackwardPositionalRules const): Ditto.
        (WebCore::Element::descendantsAffectedByBackwardPositionalRules const): Ditto.
        (WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules const): Ditto.
        (WebCore::Element::setStyleAffectedByEmpty): Now stores into m_rendererWithStyleFlags.
        (WebCore::Element::setStyleAffectedByFocusWithin): Now uses m_nodeFlags.
        (WebCore::Element::setDescendantsAffectedByPreviousSibling): Removed const qualifier & useless return.
        (WebCore::Element::setStyleAffectedByActive): Now stores into m_rendererWithStyleFlags.
        (WebCore::Element::setChildrenAffectedByDrag): Ditto.
        (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Ditto.
        (WebCore::Element::setDescendantsAffectedByForwardPositionalRules): Ditto.
        (WebCore::Element::setChildrenAffectedByBackwardPositionalRules): Ditto.
        (WebCore::Element::setDescendantsAffectedByBackwardPositionalRules): Ditto.
        (WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules): Ditto.
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::styleAffectedByActive const): Deleted.
        (WebCore::ElementRareData::setStyleAffectedByActive): Deleted.
        (WebCore::ElementRareData::styleAffectedByEmpty const): Deleted.
        (WebCore::ElementRareData::setStyleAffectedByEmpty): Deleted.
        (WebCore::ElementRareData::styleAffectedByFocusWithin const): Deleted.
        (WebCore::ElementRareData::setStyleAffectedByFocusWithin): Deleted.
        (WebCore::ElementRareData::childrenAffectedByDrag const): Deleted.
        (WebCore::ElementRareData::setChildrenAffectedByDrag): Deleted.
        (WebCore::ElementRareData::childrenAffectedByLastChildRules const): Deleted.
        (WebCore::ElementRareData::setChildrenAffectedByLastChildRules): Deleted.
        (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules const): Deleted.
        (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules): Deleted.
        (WebCore::ElementRareData::descendantsAffectedByForwardPositionalRules const): Deleted.
        (WebCore::ElementRareData::setDescendantsAffectedByForwardPositionalRules): Deleted.
        (WebCore::ElementRareData::childrenAffectedByBackwardPositionalRules const): Deleted.
        (WebCore::ElementRareData::setChildrenAffectedByBackwardPositionalRules): Deleted.
        (WebCore::ElementRareData::descendantsAffectedByBackwardPositionalRules const): Deleted.
        (WebCore::ElementRareData::setDescendantsAffectedByBackwardPositionalRules): Deleted.
        (WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules const): Deleted.
        (WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules): Deleted.
        (WebCore::ElementRareData::useTypes const): Removed UseType::StyleFlags.
        (WebCore::ElementRareData::ElementRareData): No longer takes RenderElement*.
        (WebCore::ElementRareData::resetStyleRelations): Only re-sets child index now since that's all left.
        * dom/Node.cpp:
        (WebCore::stringForRareDataUseType): Removed UseType::StyleFlags since there is no style related
        flags in ElementRareData.
        (WebCore::Node::materializeRareData): Simplified now that m_rareData is not a union.
        (WebCore::Node::clearRareData): Ditto.
        * dom/Node.h:
        (WebCore::NodeRareDataBase): Deleted.
        (WebCore::Node::renderer const):
        (WebCore::Node::rareDataMemoryOffset):
        (WebCore::Node::flagHasRareData): Deleted.
        (WebCore::Node::NodeFlags): Replaced HasRareDataFlag with StyleAffectedByFocusWithinFlag.
        (WebCore::Node::ElementStyleFlag): Added.
        (WebCore::Node::hasStyleFlag const): Added. Checks a reprense of a flag in m_rendererWithStyleFlags.
        (WebCore::Node::setStyleFlag): Ditto for setting a flag.
        (WebCore::Node::clearStyleFlags): Ditto for clearing all flags.
        (WebCore::Node::hasRareData const): Now checks the nullity of m_rareData directly.
        (WebCore::Node::rareData const):
        * dom/NodeRareData.cpp: The size of NodeRareData is shrunk by one pointer.
        * dom/NodeRareData.h:
        (WebCore::NodeRareData::NodeRareData): No longer inherits from NodeRareDataBase which was needed to
        to store RenderObject*.
        (WebCore::Node::rareData const): Moved to Node.h.
        * rendering/RenderObject.h:
        (WebCore::Node::setRenderer): Moved from Node.h since CompactPointerTuple::setPointer has the
        aforementioned static_assert which requires the definition of RenderObject.

2019-08-16  Saam Barati  <sbarati@apple.com>

        [WHLSL] Add comparison operators for vectors and matrices
        https://bugs.webkit.org/show_bug.cgi?id=200823

        Reviewed by Myles C. Maxfield.

        Tests: webgpu/whlsl/matrix-compare.html
               webgpu/whlsl/vector-compare.html

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-08-16  Saam Barati  <sbarati@apple.com>

        Unreviewed. When I rebased to land r248795, I had a bad merge in 
        WHLSLStandardLibrary.txt where the bool matrix constructors ended
        up in the wrong section of the standard library.

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-08-16  Saam Barati  <sbarati@apple.com>

        [WHLSL] Make operator== native and add bool matrices
        https://bugs.webkit.org/show_bug.cgi?id=200749

        Reviewed by Myles C. Maxfield.

        This patch makes operator== native and implements them the right way
        for vectors and matrices. Previously, we would just return a single
        boolean indicating if all elements were equal. However, to be compatible
        with HLSL, we should return a boolean vector or matrix, indicating which
        elements are equal or not. This patch makes this change, and in the process,
        adds a bool matrix.

        This patch also:
        - Lifts the requirement that all comparison operators in user code must return bool.
        We no longer follow this in the standard library, and don't want to require user
        code to do so. It seems reasonable to have a custom comparison operator
        which returns an enum of the form { LessThan, Equal, GreaterThan, Incomparable }
        - Changes the native operator inliner to no longer assume that operations on
        matrices return the same type as the arguments. This was true for math, but
        is not true for comparison operators.

        Tests: webgpu/whlsl/bool-matrix.html
               webgpu/whlsl/operator-equal-equal.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::checkOperatorOverload):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
        (WebCore::WHLSL::Intrinsics::addMatrix):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
        (WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-08-16  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Add ContentChangeObserver::elementDidBecomeHidden
        https://bugs.webkit.org/show_bug.cgi?id=200819

        Reviewed by Simon Fraser.

        r248750 started tracking candidate elements that become hidden through renderer destruction. This patch expands the check for other visibility style changes.
        <rdar://problem/54400223>

        Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden3.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
        (WebCore::ContentChangeObserver::elementDidBecomeHidden):
        (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
        * page/ios/ContentChangeObserver.h:

2019-08-16  Ryosuke Niwa  <rniwa@webkit.org>

        Split tabIndex computation for DOM and the rest of WebCore
        https://bugs.webkit.org/show_bug.cgi?id=200806

        Reviewed by Chris Dumez.

        This patch renames Element::tabIndex to Element::tabIndexForBindings and migrates its usage in
        WebCore outside JS bindings code to: tabIndexSetExplicitly, which now returns Optional<int>,
        and shouldBeIgnoredInSequentialFocusNavigation which returns true whenever the old tabIndex
        function used to return -1.

        Instead of overriding Element::tabIndex, each subclass of element now overrides defaultTabIndex
        corresponding to the concept of the default value of tabIndex IDL attribute defined at:
        https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute

        No new tests since there should be no observable behavior change.

        * dom/Element.cpp:
        (WebCore::Element::tabIndexSetExplicitly const): Now returns Optional<int> instead of bool.
        (WebCore::Element::defaultTabIndex const): Added. Return -1 here. HTMLElement and SVGElement
        manually override tabIndex to implement this behavior. Now MathMLElement overrides this function
        to return 0 instead, which is arguably a bug.
        (WebCore::Element::supportsFocus const): Convert Optional<int> to bool.
        (WebCore::Element::tabIndexForBindings const): Renamed from tabIndex. Migrated the code in
        HTMLElement::tabIndex and SVGElement::tabIndex here. Note all overrides of HTMLElement::tabIndex
        and SVGElement::tabIndex below were skipping supportsFocus check and using 0 as the default value.
        This is now accomplished by having an explicit check defaultTabIndex returning 0. MathMLElement
        overrides defaultTabIndex so it continues to use the old logic. All this complexity should go away
        in webkit.org/b/199606.
        (WebCore::Element::setTabIndexForBindings): Renamed from setTabIndex.
        (WebCore::Element::isKeyboardFocusable const): Checks shouldBeIgnoredInSequentialFocusNavigation
        in lieu of calling Element::tabIndexForBindings.
        * dom/Element.h:
        (WebCore::Element::shouldBeIgnoredInSequentialFocusNavigation const): Added. Returns true if the
        old implementation of Element::tabIndex would have returned -1 due to supportsFocus returning false.
        * dom/ElementRareData.h:
        (WebCore::ElementRareData::tabIndex const): Made this function return Optional<int>. Note that
        ElementRareData continue to store a bit field and int for more efficient packing.
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultTabIndex const): Replaced tabIndex.
        * html/HTMLAnchorElement.h:
        * html/HTMLAreaElement.cpp:
        (WebCore::HTMLAreaElement::isFocusable const):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::tabIndex const): Deleted. The logic is now in Element::tabIndex itself.
        * html/HTMLElement.h:
        * html/HTMLElement.idl:
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::defaultTabIndex const): Replaced tabIndex.
        * html/HTMLFormControlElement.h:
        * mathml/MathMLElement.cpp:
        (WebCore::MathMLElement::defaultTabIndex const): Replaced tabIndex. This is probably a bug since
        this would put every MathML element in the sequential navigation order regardless of whether it
        has tabIndex set or not.
        * mathml/MathMLElement.h:
        * page/FocusController.cpp:
        (WebCore::tabIndexForElement): Added. Computes the "effective" tab index FocusController uses.
        (WebCore::shadowAdjustedTabIndex):
        (WebCore::nextElementWithGreaterTabIndex): This code should use shadowAdjustedTabIndex instead
        but keeping the old behavior for now.
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultTabIndex const): Replaced tabIndex.
        * svg/SVGAElement.h:
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::tabIndex const): Deleted. The logic is now in Element::tabIndex itself.
        * svg/SVGElement.h:
        (WebCore::SVGElement::hasTagName const):
        * svg/SVGElement.idl:

2019-08-16  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed restabilization of non-unified build.

        * Modules/indexeddb/server/IDBSerializationContext.cpp:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        * fileapi/ThreadableBlobRegistry.h:
        * loader/SinkDocument.cpp:

2019-08-16  Antti Koivisto  <antti@apple.com>

        Content in <iframe> should override "touch-action" set in embedding document
        https://bugs.webkit.org/show_bug.cgi?id=200204
        <rdar://problem/54355249>

        Reviewed by Antoine Quint.

        Test: pointerevents/ios/touch-action-region-frame.html

        Subframes where content doesn't use any touch-action properties won't generate event region for their main layer.
        As a result the touch-action property gets computed in UI process to the parent frames touch-action (instead of 'auto').

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

        Generate event region for the main layer of subframes.

2019-08-16  Miguel Gomez  <magomez@igalia.com>

        [GTK][WPE] Move TextureMapperAnimation to the nicosia namespace as Nicosia::Animation
        https://bugs.webkit.org/show_bug.cgi?id=200707

        Reviewed by Žan Doberšek.

        Move TextureMapperAnimation to Nicosia::Animation so it can be used by non TextureMapper
        code paths.

        * platform/TextureMapper.cmake:
        * platform/graphics/nicosia/NicosiaAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp.
        (Nicosia::shouldReverseAnimationValue):
        (Nicosia::normalizedAnimationValue):
        (Nicosia::normalizedAnimationValueForFillsForwards):
        (Nicosia::timingFunctionForAnimationValue):
        (Nicosia::Animation::Animation):
        (Nicosia::Animation::apply):
        (Nicosia::Animation::applyKeepingInternalState):
        (Nicosia::Animation::pause):
        (Nicosia::Animation::resume):
        (Nicosia::Animation::computeTotalRunningTime):
        (Nicosia::Animation::isActive const):
        (Nicosia::Animation::applyInternal):
        (Nicosia::Animations::add):
        (Nicosia::Animations::remove):
        (Nicosia::Animations::pause):
        (Nicosia::Animations::suspend):
        (Nicosia::Animations::resume):
        (Nicosia::Animations::apply):
        (Nicosia::Animations::applyKeepingInternalState):
        (Nicosia::Animations::hasActiveAnimationsOfType const):
        (Nicosia::Animations::hasRunningAnimations const):
        (Nicosia::Animations::getActiveAnimations const):
        * platform/graphics/nicosia/NicosiaAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h.
        (Nicosia::Animation::Animation):
        (Nicosia::Animation::keyframes const):
        (Nicosia::Animation::timingFunction const):
        (Nicosia::Animations::animations const):
        (Nicosia::Animations::animations):
        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
        (WebCore::GraphicsLayerTextureMapper::addAnimation):
        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
        * platform/graphics/texmap/TextureMapperLayer.cpp:
        (WebCore::TextureMapperLayer::setAnimations):
        (WebCore::TextureMapperLayer::syncAnimations):
        * platform/graphics/texmap/TextureMapperLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::addAnimation):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

2019-08-16  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, speculative build fix for WinCairo, part 2
        https://bugs.webkit.org/show_bug.cgi?id=200526

        * Modules/indexeddb/server/IDBSerializationContext.h:

2019-08-16  Yusuke Suzuki  <ysuzuki@apple.com>

        Unreviewed, speculative build fix for WinCairo
        https://bugs.webkit.org/show_bug.cgi?id=200526

        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

2019-08-15  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part
        https://bugs.webkit.org/show_bug.cgi?id=200620

        Reviewed by Geoffrey Garen.

        * Modules/encryptedmedia/legacy/LegacyCDM.h:
        (WebCore::LegacyCDM::keySystem const): Deleted.
        (WebCore::LegacyCDM::client const): Deleted.
        (WebCore::LegacyCDM::setClient): Deleted.
        * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
        * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
        * Modules/webaudio/AsyncAudioDecoder.h:
        (WebCore::AsyncAudioDecoder::DecodingTask::audioData): Deleted.
        (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate const): Deleted.
        (WebCore::AsyncAudioDecoder::DecodingTask::successCallback): Deleted.
        (WebCore::AsyncAudioDecoder::DecodingTask::errorCallback): Deleted.
        (WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer): Deleted.
        * Modules/webauthn/AuthenticatorCoordinator.h:
        * Modules/webdatabase/SQLStatement.h:
        (WebCore::SQLStatement::hasStatementCallback const): Deleted.
        (WebCore::SQLStatement::hasStatementErrorCallback const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/WHLSLResolvingType.h:
        * bindings/js/DOMPromiseProxy.h:
        * bindings/js/GCController.h:
        * bridge/jsc/BridgeJSC.h:
        * contentextensions/ContentExtensionsBackend.h:
        * dom/FullscreenManager.h:
        (WebCore::FullscreenManager::document): Deleted.
        (WebCore::FullscreenManager::document const): Deleted.
        (WebCore::FullscreenManager::topDocument const): Deleted.
        (WebCore::FullscreenManager::page const): Deleted.
        (WebCore::FullscreenManager::frame const): Deleted.
        (WebCore::FullscreenManager::documentElement const): Deleted.
        (WebCore::FullscreenManager::hasLivingRenderTree const): Deleted.
        (WebCore::FullscreenManager::pageCacheState const): Deleted.
        (WebCore::FullscreenManager::scheduleFullStyleRebuild): Deleted.
        (WebCore::FullscreenManager::fullscreenElement const): Deleted.
        (WebCore::FullscreenManager::isFullscreen const): Deleted.
        (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const): Deleted.
        (WebCore::FullscreenManager::currentFullscreenElement const): Deleted.
        * dom/Microtasks.h:
        (WebCore::MicrotaskQueue::vm const): Deleted.
        * editing/CompositeEditCommand.h:
        * editing/mac/AlternativeTextUIController.h:
        * html/HTMLMediaElement.h:
        * inspector/InspectorFrontendClientLocal.h:
        * inspector/agents/WebHeapAgent.cpp:
        * layout/displaytree/DisplayRun.h:
        * layout/inlineformatting/InlineItem.h:
        * layout/inlineformatting/InlineLine.h:
        * layout/tableformatting/TableGrid.h:
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::frame const): Deleted.
        (WebCore::FrameLoader::policyChecker const): Deleted.
        (WebCore::FrameLoader::history const): Deleted.
        (WebCore::FrameLoader::notifier const): Deleted.
        (WebCore::FrameLoader::subframeLoader const): Deleted.
        (WebCore::FrameLoader::mixedContentChecker const): Deleted.
        (WebCore::FrameLoader::urlSelected): Deleted.
        (WebCore::FrameLoader::reload): Deleted.
        (WebCore::FrameLoader::requestedHistoryItem const): Deleted.
        (WebCore::FrameLoader::documentLoader const): Deleted.
        (WebCore::FrameLoader::policyDocumentLoader const): Deleted.
        (WebCore::FrameLoader::provisionalDocumentLoader const): Deleted.
        (WebCore::FrameLoader::state const): Deleted.
        (WebCore::FrameLoader::shouldReportResourceTimingToParentFrame const): Deleted.
        (WebCore::FrameLoader::client const): Deleted.
        (WebCore::FrameLoader::forceSandboxFlags): Deleted.
        (WebCore::FrameLoader::hasOpenedFrames const): Deleted.
        (WebCore::FrameLoader::setLoadsSynchronously): Deleted.
        (WebCore::FrameLoader::loadsSynchronously const): Deleted.
        (WebCore::FrameLoader::stateMachine): Deleted.
        (WebCore::FrameLoader::quickRedirectComing const): Deleted.
        (WebCore::FrameLoader::pageDismissalEventBeingDispatched const): Deleted.
        (WebCore::FrameLoader::previousURL const): Deleted.
        (WebCore::FrameLoader::setOverrideCachePolicyForTesting): Deleted.
        (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting): Deleted.
        (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting): Deleted.
        (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting): Deleted.
        (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL const): Deleted.
        (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Deleted.
        (WebCore::FrameLoader::isReloadingFromOrigin const): Deleted.
        (WebCore::FrameLoader::setAlwaysAllowLocalWebarchive): Deleted.
        (WebCore::FrameLoader::alwaysAllowLocalWebarchive const): Deleted.
        (WebCore::FrameLoader::loadWithDocumentLoader): Deleted.
        (WebCore::FrameLoader::loadWithNavigationAction): Deleted.
        (WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const): Deleted.
        * loader/NavigationDisabler.h:
        * loader/NavigationScheduler.h:
        * loader/cache/CachedResource.h:
        * loader/cache/CachedSVGDocumentReference.h:
        (WebCore::CachedSVGDocumentReference::loadRequested const): Deleted.
        (WebCore::CachedSVGDocumentReference::document): Deleted.
        * loader/ios/PreviewLoader.h:
        * page/CaptionUserPreferences.h:
        * page/PrewarmInformation.h:
        * page/ResizeObserver.h:
        * page/SuspendableTimer.h:
        * page/csp/ContentSecurityPolicyDirective.h:
        * page/ios/ContentChangeObserver.h:
        * page/ios/DOMTimerHoldingTank.h:
        * page/linux/ResourceUsageOverlayLinux.cpp:
        * page/mac/TextIndicatorWindow.h:
        * page/scrolling/ScrollSnapOffsetsInfo.h:
        * page/scrolling/ScrollingMomentumCalculator.h:
        * platform/CPUMonitor.h:
        * platform/FileMonitor.h:
        * platform/ScrollAnimation.h:
        * platform/SuddenTermination.h:
        * platform/audio/AudioBus.h:
        (WebCore::AudioBus::numberOfChannels const): Deleted.
        (WebCore::AudioBus::channel): Deleted.
        (WebCore::AudioBus::channel const): Deleted.
        (WebCore::AudioBus::length const): Deleted.
        (WebCore::AudioBus::sampleRate const): Deleted.
        (WebCore::AudioBus::setSampleRate): Deleted.
        (WebCore::AudioBus::reset): Deleted.
        (WebCore::AudioBus::AudioBus): Deleted.
        * platform/audio/AudioChannel.h:
        (WebCore::AudioChannel::AudioChannel): Deleted.
        (WebCore::AudioChannel::set): Deleted.
        (WebCore::AudioChannel::length const): Deleted.
        (WebCore::AudioChannel::mutableData): Deleted.
        (WebCore::AudioChannel::data const): Deleted.
        (WebCore::AudioChannel::zero): Deleted.
        (WebCore::AudioChannel::clearSilentFlag): Deleted.
        (WebCore::AudioChannel::isSilent const): Deleted.
        * platform/audio/AudioFIFO.h:
        (WebCore::AudioFIFO::framesInFifo const): Deleted.
        (WebCore::AudioFIFO::updateIndex): Deleted.
        * platform/audio/AudioPullFIFO.h:
        * platform/audio/AudioResampler.h:
        (WebCore::AudioResampler::rate const): Deleted.
        * platform/audio/AudioResamplerKernel.h:
        * platform/audio/AudioSession.cpp:
        * platform/audio/AudioSession.h:
        (WebCore::AudioSession::isActive const): Deleted.
        * platform/audio/Biquad.h:
        * platform/audio/Cone.h:
        (WebCore::ConeEffect::setInnerAngle): Deleted.
        (WebCore::ConeEffect::innerAngle const): Deleted.
        (WebCore::ConeEffect::setOuterAngle): Deleted.
        (WebCore::ConeEffect::outerAngle const): Deleted.
        (WebCore::ConeEffect::setOuterGain): Deleted.
        (WebCore::ConeEffect::outerGain const): Deleted.
        * platform/audio/DenormalDisabler.h:
        (WebCore::DenormalDisabler::DenormalDisabler): Deleted.
        (WebCore::DenormalDisabler::~DenormalDisabler): Deleted.
        (WebCore::DenormalDisabler::flushDenormalFloatToZero): Deleted.
        (WebCore::DenormalDisabler::getCSR): Deleted.
        (WebCore::DenormalDisabler::setCSR): Deleted.
        * platform/audio/DirectConvolver.h:
        * platform/audio/Distance.h:
        (WebCore::DistanceEffect::model): Deleted.
        (WebCore::DistanceEffect::setModel): Deleted.
        (WebCore::DistanceEffect::setRefDistance): Deleted.
        (WebCore::DistanceEffect::setMaxDistance): Deleted.
        (WebCore::DistanceEffect::setRolloffFactor): Deleted.
        (WebCore::DistanceEffect::refDistance const): Deleted.
        (WebCore::DistanceEffect::maxDistance const): Deleted.
        (WebCore::DistanceEffect::rolloffFactor const): Deleted.
        * platform/audio/DownSampler.h:
        * platform/audio/DynamicsCompressor.h:
        (WebCore::DynamicsCompressor::sampleRate const): Deleted.
        (WebCore::DynamicsCompressor::nyquist const): Deleted.
        (WebCore::DynamicsCompressor::tailTime const): Deleted.
        (WebCore::DynamicsCompressor::latencyTime const): Deleted.
        * platform/audio/DynamicsCompressorKernel.h:
        (WebCore::DynamicsCompressorKernel::latencyFrames const): Deleted.
        (WebCore::DynamicsCompressorKernel::sampleRate const): Deleted.
        (WebCore::DynamicsCompressorKernel::meteringGain const): Deleted.
        * platform/audio/EqualPowerPanner.h:
        * platform/audio/FFTConvolver.h:
        (WebCore::FFTConvolver::fftSize const): Deleted.
        * platform/audio/HRTFDatabase.h:
        (WebCore::HRTFDatabase::numberOfAzimuths): Deleted.
        (WebCore::HRTFDatabase::sampleRate const): Deleted.
        * platform/audio/HRTFElevation.h:
        (WebCore::HRTFElevation::HRTFElevation): Deleted.
        (WebCore::HRTFElevation::kernelListL): Deleted.
        (WebCore::HRTFElevation::kernelListR): Deleted.
        (WebCore::HRTFElevation::elevationAngle const): Deleted.
        (WebCore::HRTFElevation::numberOfAzimuths const): Deleted.
        (WebCore::HRTFElevation::sampleRate const): Deleted.
        * platform/audio/HRTFPanner.h:
        (WebCore::HRTFPanner::fftSize const): Deleted.
        (WebCore::HRTFPanner::sampleRate const): Deleted.
        * platform/audio/MultiChannelResampler.h:
        * platform/audio/PlatformAudioData.h:
        * platform/audio/Reverb.h:
        (WebCore::Reverb::impulseResponseLength const): Deleted.
        * platform/audio/ReverbAccumulationBuffer.h:
        (WebCore::ReverbAccumulationBuffer::readIndex const): Deleted.
        (WebCore::ReverbAccumulationBuffer::readTimeFrame const): Deleted.
        * platform/audio/ReverbConvolver.h:
        (WebCore::ReverbConvolver::impulseResponseLength const): Deleted.
        (WebCore::ReverbConvolver::inputBuffer): Deleted.
        (WebCore::ReverbConvolver::useBackgroundThreads const): Deleted.
        * platform/audio/ReverbConvolverStage.h:
        (WebCore::ReverbConvolverStage::inputReadIndex const): Deleted.
        * platform/audio/ReverbInputBuffer.h:
        (WebCore::ReverbInputBuffer::writeIndex const): Deleted.
        * platform/audio/SincResampler.h:
        * platform/audio/UpSampler.h:
        * platform/audio/ZeroPole.h:
        (WebCore::ZeroPole::ZeroPole): Deleted.
        (WebCore::ZeroPole::reset): Deleted.
        (WebCore::ZeroPole::setZero): Deleted.
        (WebCore::ZeroPole::setPole): Deleted.
        (WebCore::ZeroPole::zero const): Deleted.
        (WebCore::ZeroPole::pole const): Deleted.
        * platform/audio/cocoa/WebAudioBufferList.h:
        (WebCore::WebAudioBufferList::list const): Deleted.
        (WebCore::WebAudioBufferList::operator AudioBufferList& const): Deleted.
        (WebCore::WebAudioBufferList::kind const): Deleted.
        * platform/audio/ios/AudioSessionIOS.mm:
        * platform/audio/mac/CARingBuffer.h:
        * platform/encryptedmedia/clearkey/CDMClearKey.h:
        * platform/gamepad/mac/HIDGamepad.h:
        * platform/graphics/FloatPoint.h:
        * platform/graphics/Font.h:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/GraphicsContext3DPrivate.h:
        * platform/graphics/GraphicsContextImpl.h:
        * platform/graphics/GraphicsLayer.cpp:
        * platform/graphics/LegacyCDMSession.h:
        * platform/graphics/Region.h:
        * platform/graphics/VelocityData.h:
        * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
        * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
        * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:
        * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
        * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/ca/GraphicsLayerCA.h:
        * platform/graphics/cairo/FontCustomPlatformData.h:
        * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
        * platform/graphics/cairo/PlatformContextCairo.h:
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        * platform/graphics/cv/ImageRotationSessionVT.h:
        (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const): Deleted.
        (WebCore::ImageRotationSessionVT::transform const): Deleted.
        (WebCore::ImageRotationSessionVT::rotationProperties const): Deleted.
        (WebCore::ImageRotationSessionVT::size): Deleted.
        (WebCore::ImageRotationSessionVT::rotatedSize): Deleted.
        * platform/graphics/cv/PixelBufferConformerCV.h:
        * platform/graphics/cv/TextureCacheCV.h:
        * platform/graphics/cv/VideoTextureCopierCV.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
        * platform/graphics/iso/ISOBox.h:
        * platform/graphics/iso/ISOOriginalFormatBox.h:
        * platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
        * platform/graphics/iso/ISOSchemeInformationBox.h:
        * platform/graphics/iso/ISOSchemeTypeBox.h:
        * platform/graphics/iso/ISOTrackEncryptionBox.h:
        * platform/graphics/iso/ISOVTTCue.cpp:
        (WebCore::ISOStringBox::contents): Deleted.
        * platform/graphics/iso/ISOVTTCue.h:
        (WebCore::ISOWebVTTCue::boxTypeName): Deleted.
        (WebCore::ISOWebVTTCue::presentationTime const): Deleted.
        (WebCore::ISOWebVTTCue::duration const): Deleted.
        (WebCore::ISOWebVTTCue::sourceID const): Deleted.
        (WebCore::ISOWebVTTCue::id const): Deleted.
        (WebCore::ISOWebVTTCue::originalStartTime const): Deleted.
        (WebCore::ISOWebVTTCue::settings const): Deleted.
        (WebCore::ISOWebVTTCue::cueText const): Deleted.
        * platform/graphics/nicosia/NicosiaPaintingOperation.h:
        * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
        * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h:
        * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h:
        * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h:
        * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h:
        * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
        * platform/graphics/texmap/coordinated/Tile.h:
        * platform/graphics/win/FontCustomPlatformData.h:
        * platform/graphics/win/FullScreenController.cpp:
        * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
        * platform/graphics/win/PlatformContextDirect2D.h:
        * platform/graphics/win/WKCAImageQueue.cpp:
        * platform/gtk/PasteboardHelper.cpp:
        * platform/ios/LegacyTileGrid.h:
        * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
        * platform/mediastream/gstreamer/GStreamerAudioData.h:
        (WebCore::GStreamerAudioData::GStreamerAudioData): Deleted.
        (WebCore::GStreamerAudioData::getSample): Deleted.
        (WebCore::GStreamerAudioData::getAudioInfo): Deleted.
        (WebCore::GStreamerAudioData::kind const): Deleted.
        * platform/mediastream/gstreamer/GStreamerCapturer.h:
        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.h:
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
        * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
        * platform/mock/MediaPlaybackTargetPickerMock.h:
        * platform/mock/RTCDataChannelHandlerMock.h:
        * platform/network/ResourceErrorBase.h:
        * platform/network/curl/CookieJarDB.h:
        * platform/network/curl/CurlCacheEntry.h:
        * platform/network/curl/CurlContext.h:
        * platform/network/curl/CurlMultipartHandle.h:
        * platform/network/curl/CurlRequestScheduler.h:
        * platform/network/curl/CurlSSLVerifier.h:
        * platform/network/ios/PreviewConverter.h:
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        * platform/vr/openvr/VRPlatformDisplayOpenVR.h:
        * platform/vr/openvr/VRPlatformManagerOpenVR.h:
        * rendering/HitTestResult.h:
        * rendering/LayerOverlapMap.cpp:
        * rendering/RenderLayerCompositor.h:
        * rendering/svg/RenderSVGResourceMasker.h:
        * replay/UserInputBridge.h:
        * svg/graphics/filters/SVGFilterBuilder.h:
        * svg/properties/SVGAttributeAnimator.h:
        * svg/properties/SVGDecoratedProperty.h:
        * svg/properties/SVGPropertyAnimatorFactory.h:
        * testing/InternalSettings.cpp:
        * testing/LegacyMockCDM.cpp:
        * testing/LegacyMockCDM.h:
        * testing/MockCDMFactory.h:
        * workers/WorkerEventQueue.cpp:
        * workers/WorkerEventQueue.h:
        * workers/service/ServiceWorkerContainer.h:
        * worklets/PaintWorkletGlobalScope.h:
        * xml/XMLErrors.h:
        * xml/parser/XMLDocumentParserLibxml2.cpp:

2019-08-15  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Rename contentVisibilityDidChange to elementDidBecomeVisible
        https://bugs.webkit.org/show_bug.cgi?id=200780
        <rdar://problem/54358330>

        Reviewed by Simon Fraser.

        "elementDidBecomeVisible" name is more accurate and also we'll probably start tracking changes from visible to hidden soon.

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::didFinishTransition):
        (WebCore::ContentChangeObserver::visibilityChangedFromHiddenToVisible):
        (WebCore::ContentChangeObserver::adjustObservedState):
        (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
        (WebCore::ContentChangeObserver::contentVisibilityDidChange): Deleted.
        * page/ios/ContentChangeObserver.h:

2019-08-15  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Keep track of all the visibility candidates.
        https://bugs.webkit.org/show_bug.cgi?id=200777
        <rdar://problem/54356331>

        Reviewed by Simon Fraser.

        In order to find out whether a visible (and actionable) content change happened, we need to keep track of all the candidate elements.

        Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden2.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::reset):
        (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
        (WebCore::ContentChangeObserver::contentVisibilityDidChange):
        (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
        * page/ios/ContentChangeObserver.h:

2019-08-15  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Add unary plus
        https://bugs.webkit.org/show_bug.cgi?id=200753

        Reviewed by Saam Barati.

        HLSL has these, so we should too.

        Test: webgpu/whlsl/vector-matrix-addition-subtraction.html

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-08-15  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Matrices should have constructors that take a flattened list of scalars
        https://bugs.webkit.org/show_bug.cgi?id=200804

        Reviewed by Saam Barati.

        HLSL has them, so we should too.

        Test: webgpu/whlsl/matrix-constructors-list-of-scalars.html

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-08-15  Sihui Liu  <sihui_liu@apple.com>

        Use one VM per thread for IDB serialization work in network process
        https://bugs.webkit.org/show_bug.cgi?id=200526

        Reviewed by Geoffrey Garen.

        We had one static VM in UniqueIDBDatabase for serialization/deserialization in MemoryObjectStore. This VM was 
        never destroyed and could be used on different background threads.
 
        We also had one VM per SQLiteIDBBackingStore for serialization/deserialization in SQLiteIDBBackingStore. If 
        there were multiple IndexedDB databases of the same session opened, we would have multiple VMs created
        on the same thread. Each VM has its memory allocator and garbage collector, which takes up memory.
 
        To be more memory efficient and safe, we can use one VM per thread in the network process, and create/destroy
        the VMs on demand.

        * Modules/indexeddb/server/IDBSerializationContext.cpp: Added.
        (WebCore::IDBServer::IDBSerializationContext::getOrCreateIDBSerializationContext):
        (WebCore::IDBServer::IDBSerializationContext::~IDBSerializationContext):
        (WebCore::IDBServer::IDBSerializationContext::initializeVM):
        (WebCore::IDBServer::IDBSerializationContext::vm):
        (WebCore::IDBServer::IDBSerializationContext::execState):
        (WebCore::IDBServer::IDBSerializationContext::IDBSerializationContext):
        * Modules/indexeddb/server/IDBSerializationContext.h: Added.
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore):
        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
        (WebCore::IDBServer::MemoryIDBBackingStore::create):
        (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
        (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/MemoryObjectStore.cpp:
        (WebCore::IDBServer::MemoryObjectStore::create):
        (WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
        (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
        (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
        * Modules/indexeddb/server/MemoryObjectStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::initializeVM): Deleted.
        (WebCore::IDBServer::SQLiteIDBBackingStore::vm): Deleted.
        (WebCore::IDBServer::SQLiteIDBBackingStore::globalObject): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM): Deleted.
        (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:
        * Sources.txt:

2019-08-15  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Dispatch synthetic click when the visibility candidate element becomes hidden again.
        https://bugs.webkit.org/show_bug.cgi?id=200773
        <rdar://problem/54351728>

        Reviewed by Simon Fraser.

        This patch fixes the case when the candidate element (going from hidden to visible) becomes hidden by the end of the observation window. It essentially means that no visible change has happened
        and we should proceed with dispatching the synthetic click event.
        We now keep track of the candidate element and reset the visiblity state when it loses its renderer.

        Test: fast/events/touch/ios/content-observation/going-from-hidden-to-visible-and-to-hidden.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::didAddTransition):
        (WebCore::ContentChangeObserver::didFinishTransition):
        (WebCore::ContentChangeObserver::didInstallDOMTimer):
        (WebCore::ContentChangeObserver::reset):
        (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
        (WebCore::ContentChangeObserver::contentVisibilityDidChange):
        (WebCore::ContentChangeObserver::touchEventDidStart):
        (WebCore::ContentChangeObserver::touchEventDidFinish):
        (WebCore::ContentChangeObserver::mouseMovedDidStart):
        (WebCore::ContentChangeObserver::mouseMovedDidFinish):
        (WebCore::ContentChangeObserver::adjustObservedState):
        (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
        (WebCore::ContentChangeObserver::hasDeterminateState const): Deleted.
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::hasObservedTransition const):
        (WebCore::ContentChangeObserver::setTouchEventIsBeingDispatched):
        (WebCore::ContentChangeObserver::isTouchEventBeingDispatched const):
        (WebCore::ContentChangeObserver::setMouseMovedEventIsBeingDispatched):
        (WebCore::ContentChangeObserver::isMouseMovedEventBeingDispatched const):
        (WebCore::ContentChangeObserver::isObservingContentChanges const):

2019-08-15  Justin Fan  <justin_fan@apple.com>

        Unreviewed suggested patch follow-up to https://bugs.webkit.org/show_bug.cgi?id=200740.

        * platform/graphics/gpu/GPURequestAdapterOptions.h:
        (): Deleted.

2019-08-15  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Support web fonts
        https://bugs.webkit.org/show_bug.cgi?id=200771
        <rdar://problem/54350291>

        Reviewed by Dean Jackson.

        The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite.

        This patch does the following:
        1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we
           can share code in more places.
        2. After adding the font to GDI, it adds the font information to the DirectWrite font cache.
        3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used
           for downloaded fonts.

        * PlatformFTW.cmake: Add DirectWriteUtilities.cpp
        * css/CSSFontFaceSource.cpp:
        * loader/cache/CachedFont.cpp:
        * loader/cache/CachedSVGFont.cpp:
        * platform/graphics/Font.cpp:
        * platform/graphics/Font.h:
        * platform/graphics/FontCache.cpp:
        * platform/graphics/FontPlatformData.cpp:
        * platform/graphics/FontPlatformData.h:
        * platform/graphics/opentype/OpenTypeUtilities.cpp:
        (WebCore::renameAndActivateFont):
        * platform/graphics/win/DirectWriteUtilities.cpp: Added.
        * platform/graphics/win/DirectWriteUtilities.h: Added.
        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::createGDIFont):
        * platform/graphics/win/FontCascadeDirect2D.cpp:
        * platform/graphics/win/FontCustomPlatformData.cpp:
        (WebCore::FontCustomPlatformData::fontPlatformData):
        * platform/graphics/win/FontPlatformDataDirect2D.cpp:
        (WebCore::FontPlatformData::platformDataInit):
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::createFallbackFont):
        * platform/graphics/win/FontPlatformDataWin.cpp:
        * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
        (WebCore::GlyphPage::fill):
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        * platform/graphics/win/SimpleFontDataDirect2D.cpp:
        (WebCore::Font::systemDWriteFactory): Deleted.
        (WebCore::Font::systemDWriteGdiInterop): Deleted.
        * platform/graphics/win/SimpleFontDataWin.cpp:

2019-08-15  Jer Noble  <jer.noble@apple.com>

        [Cocoa] Adopt -preventDisplaySleepForVideoPlayback
        https://bugs.webkit.org/show_bug.cgi?id=200774

        Reviewed by Eric Carlson.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):

2019-08-15  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Don't accept operator&& or operator|| in the Lexer
        https://bugs.webkit.org/show_bug.cgi?id=200785

        Reviewed by Saam Barati.

        Implementing && or || as function calls would lose us short-circuiting.

        2 new tests in LayoutTests/webgpu/whlsl/lexing.html

        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Lexer::consumeTokenFromStream):

2019-08-15  Saam Barati  <sbarati@apple.com>

        Unreviewed. Debug build fix after r248730.

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):

2019-08-15  Devin Rousso  <drousso@apple.com>

        Web Inspector: support `console.screenshot` with detached <canvas>
        https://bugs.webkit.org/show_bug.cgi?id=200723

        Reviewed by Joseph Pecoraro.

        * page/PageConsoleClient.cpp:
        (WebCore::snapshotCanvas): Added.
        (WebCore::PageConsoleClient::screenshot):

2019-08-15  Sihui Liu  <sihui_liu@apple.com>

        Some improvements on web storage
        https://bugs.webkit.org/show_bug.cgi?id=200373

        Reviewed by Geoffrey Garen.

        Remove storage type EphemeralLocalStorage, which is used for localStorage in ephemeral session, and use 
        LocalStorage instead.

        Add SessionID to StorageNamespace to make StorageNamespace session-specific.

        No new test, updating existing tests for new behavior.

        * loader/EmptyClients.cpp:
        (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
        (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
        (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.

        * page/Chrome.cpp:
        (WebCore::Chrome::createWindow const): ephemeral localStorage of different windows will connect to the same 
        StorageArea in network process, so no need to copy from parent window to child window.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::prewarmLocalStorageIfNecessary): localStorage will be prewarmed in network process in the
        initialization of StorageAreaMap.

        * page/Page.cpp:
        (WebCore::m_applicationManifest):
        (WebCore::Page::~Page):
        (WebCore::Page::setSessionID):
        (WebCore::Page::ephemeralLocalStorage): Deleted.
        (WebCore::Page::setEphemeralLocalStorage): Deleted.
        (WebCore::Page::setStorageNamespaceProvider): Deleted.
        * page/Page.h:
        (WebCore::Page::storageNamespaceProvider):
        * storage/Storage.cpp:
        (WebCore::Storage::prewarm): Deleted.
        * storage/Storage.h:
        * storage/StorageArea.h:
        (WebCore::StorageArea::closeDatabaseIfIdle):
        (WebCore::StorageArea::prewarm): Deleted.
        * storage/StorageNamespace.h:
        * storage/StorageNamespaceProvider.cpp:
        (WebCore::StorageNamespaceProvider::~StorageNamespaceProvider):
        (WebCore::StorageNamespaceProvider::localStorageArea):
        (WebCore::StorageNamespaceProvider::localStorageNamespace):
        (WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
        (WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): change SessionID of storageNamespace
        and update every StorageArea in this namespace.
        (WebCore::StorageNamespaceProvider::addPage): Deleted.
        (WebCore::StorageNamespaceProvider::removePage): Deleted.
        * storage/StorageNamespaceProvider.h:
        * storage/StorageType.h:
        (WebCore::isLocalStorage):

2019-08-15  Saam Barati  <sbarati@apple.com>

        [WHLSL] Make length, clamp, operator+, operator-, operator*, operator/, operator[], operator[]=, operator.xy, operator.xy=, native
        https://bugs.webkit.org/show_bug.cgi?id=200700

        Reviewed by Robin Morisset.

        This makes us 50% faster in compute_boids.

        Tests: webgpu/whlsl/clamp-stdlib.html
               webgpu/whlsl/length-stdlib.html
               webgpu/whlsl/operator-div.html
               webgpu/whlsl/operator-minus.html
               webgpu/whlsl/operator-plus.html
               webgpu/whlsl/operator-times.html
               webgpu/whlsl/operator-vector-assign.html
               webgpu/whlsl/operator-vector-load.html
               webgpu/whlsl/operator-xy.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        (WebCore::WHLSL::includeStandardLibrary):

2019-08-15  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Trivial clean-up of the MSL code generated
        https://bugs.webkit.org/show_bug.cgi?id=200525

        Reviewed by Darin Adler.

        Emit simpler code for ternary expressions
        Remove duplicate {} around functions

        No new tests as it is covered by the existing ones.

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

2019-08-15  Youenn Fablet  <youenn@apple.com>

        Always create a Document with a valid SessionID
        https://bugs.webkit.org/show_bug.cgi?id=200727

        Reviewed by Alex Christensen.

        Pass a valid SessionID to the Document constructor.
        This allows getting us closer to use SessionID like ObjectIdentifier.
        Add a SessionID getter from Frame and use it when constructing a Document.
        Otherwise, retrieve the SessionID from the corresponding context.
        No change of behavior.

        * dom/DOMImplementation.cpp:
        (WebCore::createXMLDocument):
        (WebCore::DOMImplementation::createDocument):
        (WebCore::DOMImplementation::createHTMLDocument):
        * dom/DOMImplementation.h:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::m_undoManager):
        (WebCore::Document::create):
        (WebCore::Document::createNonRenderedPlaceholder):
        (WebCore::Document::cloneDocumentWithoutChildren const):
        (WebCore::Document::ensureTemplateDocument):
        * dom/Document.h:
        (WebCore::Document::create):
        (WebCore::Document::createNonRenderedPlaceholder): Deleted.
        * dom/XMLDocument.h:
        (WebCore::XMLDocument::create):
        (WebCore::XMLDocument::createXHTML):
        (WebCore::XMLDocument::XMLDocument):
        * html/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
        * html/FTPDirectoryDocument.h:
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createSynthesizedDocument):
        (WebCore::HTMLDocument::HTMLDocument):
        (WebCore::HTMLDocument::cloneDocumentWithoutChildren const):
        * html/HTMLDocument.h:
        (WebCore::HTMLDocument::create):
        (WebCore::HTMLDocument::createSynthesizedDocument): Deleted.
        * html/ImageDocument.cpp:
        (WebCore::ImageDocument::ImageDocument):
        * html/MediaDocument.cpp:
        (WebCore::MediaDocument::MediaDocument):
        * html/MediaDocument.h:
        * html/PluginDocument.cpp:
        (WebCore::PluginDocument::PluginDocument):
        * html/PluginDocument.h:
        * html/TextDocument.cpp:
        (WebCore::TextDocument::TextDocument):
        * html/TextDocument.h:
        * inspector/DOMPatchSupport.cpp:
        (WebCore::DOMPatchSupport::patchDocument):
        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::createDocument):
        (WebCore::DocumentWriter::begin):
        * loader/SinkDocument.cpp:
        (WebCore::SinkDocument::SinkDocument):
        * loader/SinkDocument.h:
        * loader/cache/CachedSVGDocument.cpp:
        (WebCore::CachedSVGDocument::finishLoading):
        * loader/cache/CachedSVGFont.cpp:
        (WebCore::CachedSVGFont::ensureCustomFontData):
        * page/Frame.cpp:
        (WebCore::Frame::sessionID const):
        * page/Frame.h:
        * svg/SVGDocument.cpp:
        (WebCore::SVGDocument::SVGDocument):
        (WebCore::SVGDocument::cloneDocumentWithoutChildren const):
        * svg/SVGDocument.h:
        (WebCore::SVGDocument::create):
        * xml/DOMParser.cpp:
        (WebCore::DOMParser::parseFromString):
        * xml/DOMParser.h:
        * xml/DOMParser.idl:
        * xml/XMLHttpRequest.cpp:
        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource):

2019-08-15  Antti Koivisto  <antti@apple.com>

        Negative size box with border radius causes hang under WebCore::approximateAsRegion
        https://bugs.webkit.org/show_bug.cgi?id=200769
        <rdar://problem/53380674>

        Reviewed by Alex Christensen.

        If a box's width or height computes negative the rounded border rect will also be negative.
        This caused near-infinite loop during rounded border region approximation.

        Test: fast/css/border-radius-negative-size.html

        * platform/graphics/RoundedRect.cpp:
        (WebCore::approximateAsRegion):

        Bail out if the region is empty (which includes negative sizes).
        For safety also limit the number of rectangles we generate for corner arc approximation.

2019-08-15  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer] Deal with slow buffer consumption in GStreamerMediaStreamSource
        https://bugs.webkit.org/show_bug.cgi?id=200633

        Refactoring the GStreamerMediaStreamSource factoring out streams specific
        data in a dedicated structure.

        Reviewed by Philippe Normand.

        No new tests, since I do not see how to reproduce that in a test in a simple way,
        this aims at enhancing user experience when running under high load.

        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        (WebCore::_WebKitMediaStreamSrc::SourceData::reset):
        (WebCore::_WebKitMediaStreamSrc::SourceData::src):
        (WebCore::_WebKitMediaStreamSrc::SourceData::setSrc):
        (WebCore::_WebKitMediaStreamSrc::SourceData::isUsed):
        (WebCore::_WebKitMediaStreamSrc::SourceData::pushSample):
        (WebCore::webkitMediaStreamSrcDispose):
        (WebCore::webkit_media_stream_src_init):
        (WebCore::webkitMediaStreamSrcNeedDataCb):
        (WebCore::webkitMediaStreamSrcEnoughDataCb):
        (WebCore::webkitMediaStreamSrcSetupAppSrc):
        (WebCore::webkitMediaStreamSrcRemoveTrackByType):
        (WebCore::webkitMediaStreamSrcPushVideoSample):
        (WebCore::webkitMediaStreamSrcPushAudioSample):

2019-08-15  Youenn Fablet  <youenn@apple.com>

        Make mock libwebrtc tests run with unified plan
        https://bugs.webkit.org/show_bug.cgi?id=200713

        Reviewed by Alex Christensen.

        Update mock endpoint to pass mock webrtc tests with unified plan.
        This requires implementing support for mock transceivers.
        Covered by existing tests.

        * testing/Internals.cpp:
        (WebCore::Internals::useMockRTCPeerConnectionFactory):
        Update assert to mandate unified plan.
        * testing/MockLibWebRTCPeerConnection.cpp:
        (WebCore::MockLibWebRTCPeerConnection::~MockLibWebRTCPeerConnection):
        (WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
        (WebCore::MockLibWebRTCPeerConnection::AddTrack):
        (WebCore::MockLibWebRTCPeerConnection::RemoveTrack):
        (WebCore::MockLibWebRTCPeerConnection::CreateOffer):
        (WebCore::MockLibWebRTCPeerConnection::CreateAnswer):
        * testing/MockLibWebRTCPeerConnection.h:
        (WebCore::MockRtpSender::MockRtpSender):
        (WebCore::MockRtpReceiver::id const):
        (WebCore::MockRtpReceiver::GetParameters const):
        (WebCore::MockRtpReceiver::SetParameters):
        (WebCore::MockRtpReceiver::SetObserver):
        (WebCore::MockRtpTransceiver::MockRtpTransceiver):
        (WebCore::MockLibWebRTCPeerConnection::MockLibWebRTCPeerConnection):
        (WebCore::MockLibWebRTCPeerConnection::gotLocalDescription):

2019-08-15  Chris Dumez  <cdumez@apple.com>

        Unreviewed WinCairo build fix after r248713.

        * platform/network/curl/NetworkStorageSessionCurl.cpp:
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::getRawCookies const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):

2019-08-15  Simon Fraser  <simon.fraser@apple.com>

        Use ObjectIdentifier<FrameIdentifierType> for frameIDs
        https://bugs.webkit.org/show_bug.cgi?id=199986

        Reviewed by Ryosuke Niwa.

        Use the strongly-typed FrameIdentifier instead of uint64_t as frame identifiers everywhere.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookies const):
        (WebCore::CookieJar::setCookies):
        (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
        (WebCore::CookieJar::getRawCookies const):
        * loader/CookieJar.h:
        * loader/EmptyFrameLoaderClient.h:
        * loader/FrameLoaderClient.h:
        * loader/NavigationAction.cpp:
        * loader/NavigationAction.h:
        (WebCore::NavigationAction::Requester::frameID const):
        * page/ChromeClient.h:
        * page/GlobalFrameIdentifier.h:
        (WebCore::GlobalFrameIdentifier::decode):
        * platform/network/CookieRequestHeaderFieldProxy.h:
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::shouldBlockCookies const):
        (WebCore::NetworkStorageSession::hasStorageAccess const):
        (WebCore::NetworkStorageSession::grantStorageAccess):
        (WebCore::NetworkStorageSession::removeStorageAccessForFrame):
        * platform/network/NetworkStorageSession.h:
        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::cookiesForURL):
        (WebCore::cookiesForSession):
        (WebCore::NetworkStorageSession::cookiesForDOM const):
        (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
        (WebCore::NetworkStorageSession::getRawCookies const):

2019-08-15  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer][WebRTC]: openh264 encoder bitrate is in bits per second
        https://bugs.webkit.org/show_bug.cgi?id=200578

        Reviewed by Philippe Normand.

        Not really testable as is.

        * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
        (gst_webrtc_video_encoder_class_init):

2019-08-14  Alexey Shvayka  <shvaikalesh@gmail.com>

        Error thrown during "acceptNode" lookup is overridden
        https://bugs.webkit.org/show_bug.cgi?id=200735

        Reviewed by Ross Kirsling.

        Test: imported/w3c/web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter-expected.html

        * bindings/js/JSCallbackData.cpp:
        (WebCore::JSCallbackData::invokeCallback): Catch and return exception of callback->get call.

2019-08-14  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Variables shouldn't be able to have void type
        https://bugs.webkit.org/show_bug.cgi?id=200751

        Reviewed by Robin Morisset.

        Trivial fix. Found by https://github.com/gpuweb/WHLSL/issues/320.

        Test: webgpu/whlsl/void-variable-parameter.html

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

2019-08-14  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Use of WebGPU should not force discrete GPU
        https://bugs.webkit.org/show_bug.cgi?id=200740

        Reviewed by Myles C. Maxfield.

        Request a low-power device from Metal by default.

        No change in testable behavior.

        * platform/graphics/gpu/GPURequestAdapterOptions.h:
        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
        (WebCore::GPUDevice::tryCreate):

2019-08-14  Chris Dumez  <cdumez@apple.com>

        Potentially non thread-safe usage of WebCore::MediaSample
        https://bugs.webkit.org/show_bug.cgi?id=200734

        Reviewed by Eric Carlson.

        ImageSource is a main thread object but ends up getting passed to a background queue for image
        decoding. In some cases, the background queue ends up being the last one holding a ref to the
        ImageSource which ends up destroying the ImageSource on a background thread. Doing so is not
        safe as shown by the crash.

        To address the issue, have ImageSource subclass ThreadSafeRefCounted<ImageSource, WTF::DestructionThread::Main>
        so that it is always destroyed on the main thread.

        No new tests, currently crashing on the debug bots.

        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::ImageSource):
        (WebCore::ImageSource::~ImageSource):
        * platform/graphics/ImageSource.h:

2019-08-14  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r248526.

        Caused two IndexedDB perf tests to fail

        Reverted changeset:

        "Remove IDB-specific quota"
        https://bugs.webkit.org/show_bug.cgi?id=196545
        https://trac.webkit.org/changeset/248526

2019-08-14  Keith Rollin  <krollin@apple.com>

        Remove support for macOS < 10.13
        https://bugs.webkit.org/show_bug.cgi?id=200694
        <rdar://problem/54278851>

        Reviewed by Youenn Fablet.

        Update conditionals that reference __MAC_OS_X_VERSION_MIN_REQUIRED and
        __MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=
        101300. This means that expressions like
        "__MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
        "__MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.

        No new tests -- no added or changed functionality.

        * Modules/applepay/cocoa/PaymentContactCocoa.mm:
        (WebCore::subLocality):
        (WebCore::setSubLocality):
        (WebCore::subAdministrativeArea):
        (WebCore::setSubAdministrativeArea):
        * WebCorePrefix.h:
        * crypto/mac/CryptoKeyRSAMac.cpp:
        * editing/cocoa/WebContentReaderCocoa.mm:
        * page/mac/TextIndicatorWindow.mm:
        (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
        * platform/PlatformScreen.h:
        * platform/cocoa/NetworkExtensionContentFilter.mm:
        (WebCore::NetworkExtensionContentFilter::initialize):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontDatabase::fontForPostScriptName):
        (WebCore::variationCapabilitiesForFontDescriptor):
        (WebCore::FontCache::lastResortFallbackFont):
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::setGPUByRegistryID):
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::screenDidChange):
        (WebCore::setGPUByDisplayMask): Deleted.
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
        (WebCore::isAcceptableDevice):
        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::platformFontWithFamilySpecialCase):
        * platform/graphics/mac/FontCustomPlatformData.cpp:
        (WebCore::createFontCustomPlatformData):
        * platform/mac/DragImageMac.mm:
        (WebCore::LinkImageLayout::LinkImageLayout):
        (WebCore::createDragImageForLink):
        * platform/mac/PlatformScreenMac.mm:
        (WebCore::collectScreenProperties):
        (WebCore::gpuIDForDisplayMask):
        * platform/mac/WebPlaybackControlsManager.h:
        * platform/mac/WebPlaybackControlsManager.mm:
        (toAVTouchBarMediaSelectionOptionType):
        (mediaSelectionOptions):
        (-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]): Deleted.
        (-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]): Deleted.
        (-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]): Deleted.
        (-[WebPlaybackControlsManager beginFunctionBarScrubbing]): Deleted.
        (-[WebPlaybackControlsManager endFunctionBarScrubbing]): Deleted.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const):
        (WebCore::RenderThemeMac::systemColor const):

2019-08-14  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Any previously destroyed renderer should not be considered a candidate for content observation.
        https://bugs.webkit.org/show_bug.cgi?id=200732
        <rdar://problem/54319654>

        Reviewed by Simon Fraser.

        A visible element should not be considered a candidate to content change observation when it loses the visiblity status momentarily.
        This patch extends the check of re-constructed renderers for the duration of the content change observation (as opposed to just a single render tree update cycle)

        Test: fast/events/touch/ios/content-observation/visible-content-gains-new-renderer2.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::reset):
        (WebCore::ContentChangeObserver::rendererWillBeDestroyed):
        (WebCore::ContentChangeObserver::adjustObservedState):
        (WebCore::ContentChangeObserver::renderTreeUpdateDidStart): Deleted.
        (WebCore::ContentChangeObserver::renderTreeUpdateDidFinish): Deleted.
        (WebCore::ContentChangeObserver::stopContentObservation): Deleted.
        (WebCore::ContentChangeObserver::willDestroyRenderer): Deleted.
        (WebCore::ContentChangeObserver::RenderTreeUpdateScope::RenderTreeUpdateScope): Deleted.
        (WebCore::ContentChangeObserver::RenderTreeUpdateScope::~RenderTreeUpdateScope): Deleted.
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::isObservingContentChanges const):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::willBeDestroyed):
        * rendering/updating/RenderTreeUpdater.cpp:
        (WebCore::RenderTreeUpdater::updateRenderTree):
        (WebCore::RenderTreeUpdater::tearDownRenderers):

2019-08-14  Andy Estes  <aestes@apple.com>

        [Cocoa] Add some WKA extension points
        https://bugs.webkit.org/show_bug.cgi?id=200506
        <rdar://problem/51682474>

        Reviewed by Tim Horton.

        * Modules/applepay/ApplePayPayment.h:
        * Modules/applepay/ApplePayPaymentMethod.h:
        * Modules/applepay/ApplePayRequestBase.cpp:
        (WebCore::finishConverting):
        (WebCore::convertAndValidate):
        * Modules/applepay/ApplePayRequestBase.h:
        * Modules/applepay/ApplePaySessionPaymentRequest.h:
        * Modules/applepay/PaymentCoordinatorClient.cpp:
        (WebCore::PaymentCoordinatorClient::supportsVersion):
        * Modules/applepay/cocoa/PaymentCocoa.mm:
        (WebCore::convert):
        * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
        (WebCore::finishConverting):
        (WebCore::convert):

2019-08-14  Devin Rousso  <drousso@apple.com>

        Web Inspector: support `console.screenshot` with dataURL strings
        https://bugs.webkit.org/show_bug.cgi?id=199307

        Reviewed by Joseph Pecoraro.

        Test: inspector/console/console-screenshot.html

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):

2019-08-14  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Stop content change observation explicitly.
        https://bugs.webkit.org/show_bug.cgi?id=200689
        <rdar://problem/54274887>

        Reviewed by Simon Fraser.

        This helps to clean up some temporary state. There are 2 exit points when content observation needs to stop.
        1. Soon after the synthetic mouseMove event when we decide not to continue with further observation (see WebPage::handleSyntheticClick)
        2. When we asynchronously notify the client about the visible content change after all pending events have been processed.

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::stopContentObservation):
        (WebCore::ContentChangeObserver::adjustObservedState):
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::stopContentObservation const):
        (WebCore::ContentChangeObserver::isObservingContentChanges const):
        (WebCore::ContentChangeObserver::observedContentChange const): Deleted.

2019-08-14  Youenn Fablet  <youenn@apple.com>

        Update Worker::notifyFinished to not use emptySessionID
        https://bugs.webkit.org/show_bug.cgi?id=200710

        Reviewed by Alex Christensen.

        No change of behavior.

        Exit early if context is gone since we should not dispatch events or create worker.
        Make sure to unset pending activity using a ScopeExit.

        * workers/Worker.cpp:
        (WebCore::Worker::notifyFinished):

2019-08-14  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Implement TableFormattingContext::computePreferredWidthForColumns
        https://bugs.webkit.org/show_bug.cgi?id=200701
        <rdar://problem/54287828>

        Reviewed by Antti Koivisto.

        Compute cells' min/max width first.

        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
        * layout/tableformatting/TableGrid.cpp:
        (WebCore::Layout::TableGrid::slot):
        (WebCore::Layout::TableGrid::appendCell):
        * layout/tableformatting/TableGrid.h:
        (WebCore::Layout::TableGrid::cells):

2019-08-14  Youenn Fablet  <youenn@apple.com>

        ThreadableBlobRegistry::blobSize should take a SessionID as parameter
        https://bugs.webkit.org/show_bug.cgi?id=200671

        Reviewed by Alex Christensen.

        Update FormData to compute its byte size based on a SessionID.
        We keep a WK1 byte length computation for FormDataElement.
        Update FormData call sites accordingly.
        Update CacheStorageConnection to implement a SessionID getter.
        No change of behavior.

        * Modules/cache/CacheStorageConnection.cpp:
        (WebCore::CacheStorageConnection::computeRealBodySize):
        (WebCore::computeRealBodySize): Deleted.
        * Modules/cache/CacheStorageConnection.h:
        * Modules/cache/WorkerCacheStorageConnection.cpp:
        (WebCore::WorkerCacheStorageConnection::sessionID const):
        * Modules/cache/WorkerCacheStorageConnection.h:
        * fileapi/Blob.cpp:
        (WebCore::Blob::size const):
        * fileapi/ThreadableBlobRegistry.cpp:
        (WebCore::ThreadableBlobRegistry::blobSize):
        * fileapi/ThreadableBlobRegistry.h:
        * loader/cache/KeepaliveRequestTracker.cpp:
        (WebCore::KeepaliveRequestTracker::tryRegisterRequest):
        (WebCore::KeepaliveRequestTracker::registerRequest):
        (WebCore::KeepaliveRequestTracker::unregisterRequest):
        * page/CacheStorageProvider.h:
        (WebCore::CacheStorageProvider::createCacheStorageConnection):
        * platform/network/BlobRegistry.h:
        * platform/network/FormData.cpp:
        (WebCore::computeLengthInBytes):
        (WebCore::FormDataElement::lengthInBytes const):
        (WebCore::FormData::lengthInBytes const):
        * platform/network/FormData.h:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore::createHTTPBodyCFReadStream):
        * platform/network/curl/CurlFormDataStream.cpp:
        (WebCore::m_sessionID):
        (WebCore::CurlFormDataStream::computeContentLength):
        (WebCore::CurlFormDataStream::CurlFormDataStream): Deleted.
        * platform/network/curl/CurlFormDataStream.h:
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::CurlRequest):
        * platform/network/curl/CurlRequest.h:
        (WebCore::CurlRequest::create):

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

2019-08-14  Antti Koivisto  <antti@apple.com>

        Remove TouchActionData
        https://bugs.webkit.org/show_bug.cgi?id=199668

        * dom/Element.cpp:
        (WebCore::Element::nearestScrollingNodeIDUsingTouchOverflowScrolling const): Deleted.

        As a follow-up also remove this now-unused function.

        * dom/Element.h:

2019-08-14  Youenn Fablet  <youenn@apple.com>

        Remove SessionID default constructor
        https://bugs.webkit.org/show_bug.cgi?id=200669

        Reviewed by Alex Christensen.

        Remove SessionID default constructor

        Update CookieRequestHeaderFiledProxy decoder to use an Optional<SessionID>.
        Update ServiceWorkerContextData accordingly.
        Update RegistrationStore/RegistrationDatabase to store a map of changed registration as follows:
        - The RegistrationStore map contains an Optional value. In case of removing, the map will contain WTF::nullopt.
        - RegistrationDatabase computes two vectors for removed registrations and updated registrations.

        No change of behavior.

        * dom/Document.cpp:
        * loader/CookieJar.cpp:
        (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
        * platform/network/CookieRequestHeaderFieldProxy.h:
        (WebCore::CookieRequestHeaderFieldProxy::decode):
        * workers/Worker.cpp:
        (WebCore::Worker::notifyFinished):
        * workers/service/ServiceWorkerContextData.h:
        (WebCore::ServiceWorkerContextData::decode):
        * workers/service/server/RegistrationDatabase.cpp:
        (WebCore::RegistrationDatabase::pushChanges):
        (WebCore::RegistrationDatabase::doPushChanges):
        * workers/service/server/RegistrationDatabase.h:
        * workers/service/server/RegistrationStore.cpp:
        (WebCore::RegistrationStore::pushChangesToDatabase):
        (WebCore::RegistrationStore::clearAll):
        (WebCore::RegistrationStore::flushChanges):
        (WebCore::RegistrationStore::startSuspension):
        (WebCore::RegistrationStore::removeRegistration):
        * workers/service/server/RegistrationStore.h:

2019-08-14  Youenn Fablet  <youenn@apple.com>

        Make privateBrowsingStateDidChange take an explicit SessionID
        https://bugs.webkit.org/show_bug.cgi?id=200666

        Reviewed by Alex Christensen.

        Instead of stating that the page session ID changed and get it from the page,
        pass it directly to privateBrowsingStateDidChange.
        No change of behavior.

        * dom/Document.cpp:
        (WebCore::Document::privateBrowsingStateDidChange):
        * dom/Document.h:
        * dom/Element.h:
        (WebCore::Element::privateBrowsingStateDidChange):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::privateBrowsingStateDidChange):
        * html/HTMLMediaElement.h:
        * page/Page.cpp:
        (WebCore::Page::setSessionID):

2019-08-13  Sam Weinig  <weinig@apple.com>

        Fix the WPE build.

        * platform/libwpe/PlatformKeyboardEventLibWPE.cpp:
        (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
        (WebCore::PlatformKeyboardEvent::singleCharacterString):
        Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

2019-08-13  Sam Weinig  <weinig@apple.com>

        Rename StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32) to avoid accidental change in behavior when replacing append with flexibleAppend
        https://bugs.webkit.org/show_bug.cgi?id=200675

        Reviewed by Darin Adler.

        * bindings/js/JSDOMConvertStrings.cpp:
        (WebCore::stringToUSVString):
        * css/CSSMarkup.cpp:
        (WebCore::serializeCharacter):
        (WebCore::serializeIdentifier):
        (WebCore::serializeString):
        * css/parser/CSSTokenizer.cpp:
        (WebCore::CSSTokenizer::consumeStringTokenUntil):
        (WebCore::CSSTokenizer::consumeUrlToken):
        (WebCore::CSSTokenizer::consumeName):
        * html/parser/HTMLEntityParser.cpp:
        (WebCore::HTMLEntityParser::consumeNamedEntity):
        * platform/mock/mediasource/MockBox.cpp:
        (WebCore::MockBox::peekType):
        (WebCore::MockTrackBox::MockTrackBox):
        * rendering/RenderText.cpp:
        (WebCore::capitalize):
        * xml/parser/CharacterReferenceParserInlines.h:
        (WebCore::consumeCharacterReference):
        Update for rename from StringBuilder::append(UChar32) to StringBuilder::appendCharacter(UChar32).

2019-08-13  Saam Barati  <sbarati@apple.com>

        [WHLSL] Make lexing faster
        https://bugs.webkit.org/show_bug.cgi?id=200596

        Reviewed by Myles C. Maxfield.

        Previously, our lexer would just branch on a series of string compares.
        We'd have code like this to match keywords:
        ```
        ...
        if (matchCurrent("false"))
            return FalseToken;
        if (matchCurrent("true"))
            return TrueToken;
        ...
        ```
        
        However, this is extremely inefficient. We now lex using a trie, which means
        we never backtrack in the lexer.
        
        This patch is a 3ms speedup in compute_boids.

        Tests: webgpu/whlsl/lexing.html
               webgpu/whlsl/literals.html

        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::isValidIdentifierStart):
        (WebCore::WHLSL::isValidNonStartingIdentifierChar):
        (WebCore::WHLSL::isHexadecimalCharacter):
        (WebCore::WHLSL::isDigit):
        (WebCore::WHLSL::Lexer::consumeTokenFromStream):
        (WebCore::WHLSL::Lexer::recognizeKeyword): Deleted.
        (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::decimalIntLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::decimalUintLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::intLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::uintLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::digit const): Deleted.
        (WebCore::WHLSL::Lexer::digitStar const): Deleted.
        (WebCore::WHLSL::Lexer::character const): Deleted.
        (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const): Deleted.
        (WebCore::WHLSL::Lexer::coreFloatLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::floatLiteral const): Deleted.
        (WebCore::WHLSL::Lexer::validIdentifier const): Deleted.
        (WebCore::WHLSL::Lexer::identifier const): Deleted.
        (WebCore::WHLSL::Lexer::completeOperatorName const): Deleted.
        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::Lexer::string const): Deleted.

2019-08-13  Said Abou-Hallawa  <sabouhallawa@apple.com>

        shouldRespectImageOrientation should be a value in ImageOrientation
        https://bugs.webkit.org/show_bug.cgi?id=200553

        Reviewed by Simon Fraser.

        This patch is a step towards implementing the css image-orientation.

        Instead of having ImageOrientationEnum, ImageOrientationDescription,
        ImageOrientation and RespectImageOrientationEnum we are going to have a
        single structure named 'ImageOrientation' which is a wrapper for the enum
        type "Orientation".

        This structure will have a constructor and casting operator such that
        assigning an enum value and comparing with an enum value will be done
        implicitly.

        RespectImageOrientation is represented as a new enum value 'FromImage'.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator ImageOrientation const):
        (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum const): Deleted.
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::createDragImage const):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::paint):
        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::imageSizeForRenderer const):
        * page/DragController.cpp:
        (WebCore::DragController::doImageDrag):
        * platform/DragImage.cpp:
        (WebCore::createDragImageFromSnapshot):
        (WebCore::createDragImageFromImage):
        * platform/DragImage.h:
        * platform/graphics/BitmapImage.cpp:
        (WebCore::BitmapImage::draw):
        (WebCore::BitmapImage::drawPattern):
        * platform/graphics/BitmapImage.h:
        * platform/graphics/CrossfadeGeneratedImage.cpp:
        (WebCore::CrossfadeGeneratedImage::draw):
        * platform/graphics/CrossfadeGeneratedImage.h:
        * platform/graphics/CustomPaintImage.cpp:
        (WebCore::CustomPaintImage::draw):
        * platform/graphics/CustomPaintImage.h:
        * platform/graphics/GeneratedImage.h:
        * platform/graphics/GradientImage.cpp:
        (WebCore::GradientImage::draw):
        * platform/graphics/GradientImage.h:
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawImage):
        (WebCore::GraphicsContext::drawTiledImage):
        * platform/graphics/GraphicsContext.h:
        (WebCore::ImagePaintingOptions::ImagePaintingOptions):
        * platform/graphics/GraphicsContextImpl.cpp:
        (WebCore::GraphicsContextImpl::drawImageImpl):
        (WebCore::GraphicsContextImpl::drawTiledImageImpl):
        * platform/graphics/Image.cpp:
        (WebCore::Image::drawTiled):
        * platform/graphics/Image.h:
        * platform/graphics/ImageFrame.h:
        * platform/graphics/ImageOrientation.cpp: Removed.
        * platform/graphics/ImageOrientation.h:
        (WebCore::ImageOrientation::ImageOrientation):
        (WebCore::ImageOrientation::fromEXIFValue):
        (WebCore::ImageOrientation::operator Orientation const):
        (WebCore::ImageOrientation::usesWidthAsHeight const):
        (WebCore::ImageOrientation::transformFromDefault const):
        (WebCore::ImageOrientation::isValidOrientation):
        (WebCore::ImageOrientation::isValidEXIFOrientation):
        (WebCore::ImageOrientationDescription::ImageOrientationDescription): Deleted.
        (WebCore::ImageOrientationDescription::setRespectImageOrientation): Deleted.
        (WebCore::ImageOrientationDescription::respectImageOrientation): Deleted.
        (WebCore::ImageOrientationDescription::setImageOrientationEnum): Deleted.
        (WebCore::ImageOrientationDescription::imageOrientation): Deleted.
        (WebCore::ImageOrientation::operator ImageOrientationEnum const): Deleted.
        (WebCore::ImageOrientation::operator== const): Deleted.
        (WebCore::ImageOrientation::operator!= const): Deleted.
        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::dump):
        * platform/graphics/NamedImageGeneratedImage.cpp:
        (WebCore::NamedImageGeneratedImage::draw):
        * platform/graphics/NamedImageGeneratedImage.h:
        * platform/graphics/NativeImage.h:
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::frameOrientationAtIndex const):
        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::drawShadowLayerBuffer):
        (WebCore::Cairo::drawShadowImage):
        (WebCore::Cairo::drawNativeImage):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::draw):
        * platform/graphics/cairo/NativeImageCairo.cpp:
        (WebCore::drawNativeImage):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawNativeImage):
        * platform/graphics/cg/ImageDecoderCG.cpp:
        (WebCore::orientationFromProperties):
        (WebCore::ImageDecoderCG::frameOrientationAtIndex const):
        * platform/graphics/cg/NativeImageCG.cpp:
        (WebCore::drawNativeImage):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::draw):
        * platform/graphics/cg/PDFDocumentImage.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::paint):
        (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):
        (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
        (WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):
        (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::drawNativeImage):
        * platform/graphics/win/ImageCGWin.cpp:
        (WebCore::BitmapImage::getHBITMAPOfSize):
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):
        * platform/graphics/win/ImageCairoWin.cpp:
        (WebCore::BitmapImage::getHBITMAPOfSize):
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):
        * platform/graphics/win/ImageDecoderDirect2D.cpp:
        (WebCore::ImageDecoderDirect2D::frameOrientationAtIndex const):
        * platform/graphics/win/ImageDirect2D.cpp:
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):
        * platform/graphics/win/NativeImageDirect2D.cpp:
        (WebCore::drawNativeImage):
        * platform/gtk/DragImageGtk.cpp:
        (WebCore::createDragImageFromImage):
        * platform/image-decoders/ScalableImageDecoderFrame.h:
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::readImageOrientation):
        * platform/ios/DragImageIOS.mm:
        (WebCore::createDragImageFromImage):
        * platform/mac/DragImageMac.mm:
        (WebCore::createDragImageFromImage):
        * platform/win/DragImageCGWin.cpp:
        (WebCore::createDragImageFromImage):
        * platform/win/DragImageCairoWin.cpp:
        (WebCore::createDragImageFromImage):
        * platform/win/DragImageDirect2D.cpp:
        (WebCore::createDragImageFromImage):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::imageOrientation const):
        (WebCore::RenderElement::shouldRespectImageOrientation const): Deleted.
        * rendering/RenderElement.h:
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::paintSnapshotImage):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintReplaced):
        (WebCore::RenderImage::paintIntoRect):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::isDirectlyCompositedImage const):
        * rendering/RenderSnapshottedPlugIn.cpp:
        (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::setImageOrientation):
        (WebCore::RenderStyle::initialImageOrientation):
        (WebCore::RenderStyle::imageOrientation const):
        * rendering/style/StyleRareInheritedData.h:
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::drawForContainer):
        (WebCore::SVGImage::nativeImageForCurrentFrame):
        (WebCore::SVGImage::nativeImage):
        (WebCore::SVGImage::draw):
        * svg/graphics/SVGImage.h:
        * svg/graphics/SVGImageForContainer.cpp:
        (WebCore::SVGImageForContainer::draw):
        * svg/graphics/SVGImageForContainer.h:

2019-08-13  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Move Qualifiers and Semantic from VariableDeclaration to VariableDeclaration::RareData
        https://bugs.webkit.org/show_bug.cgi?id=200696

        Reviewed by Myles C. Maxfield.

        Shrinking VariableDeclaration by 16 bytes in the common case.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:

2019-08-13  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Don't generate empty comma expressions for bare ';'
        https://bugs.webkit.org/show_bug.cgi?id=200681

        Reviewed by Myles C. Maxfield.

        Currently we emit a comma expression with no sub-expression for bare ';', as well as for the initialization of for loops with no initializers.
        This crashes the Checker, as it tries to access the last sub-expression of comma expressions.
        Instead we should generate an empty statement block for that case.

        This problem was found (and originally fixed before the commit was reverted) in https://bugs.webkit.org/show_bug.cgi?id=199726.
        I am just isolating the fix here for easier review and debugging.

        New test: LayoutTests/webgpu/whlsl/for-loop.html

        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * 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):
        (WebCore::WHLSL::Parser::parseStatement):
        (WebCore::WHLSL::Parser::parseEffectfulExpression):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):

2019-08-13  Daniel Bates  <dabates@apple.com>

        Focus rings are black
        https://bugs.webkit.org/show_bug.cgi?id=200593
        <rdar://problem/54145925>

        Reviewed by Wenson Hsieh.

        Work around <rdar://problem/50838886> and make focus rings a pretty blue.

        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::platformFocusRingColor const):

2019-08-13  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] adjustStateAndNotifyContentChangeIfNeeded should check isObservationTimeWindowActive()
        https://bugs.webkit.org/show_bug.cgi?id=200687
        <rdar://problem/54271221>

        Reviewed by Simon Fraser.

        Move the check to adjustStateAndNotifyContentChangeIfNeeded.

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::adjustObservedState):

2019-08-13  John Wilander  <wilander@apple.com>

        Resource Load Statistics: Switch NSURLSession on top navigation to prevalent resource with user interaction
        https://bugs.webkit.org/show_bug.cgi?id=200642
        <rdar://problem/53962073>

        Reviewed by Alex Christensen.

        Tests: http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.html
               http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.html

        This patch splits m_registrableDomainsToBlockCookieFor in WebCore:NetworkStorageSession into:
        - m_registrableDomainsToBlockAndDeleteCookiesFor
        - m_registrableDomainsToBlockButKeepCookiesFor
        ... to support different network load policies based on this distinction.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setITPSessionSwitchingEnabled):
        (WebCore::RuntimeEnabledFeatures::itpSessionSwitchingEnabled const):
        * page/Settings.yaml:
        * platform/network/NetworkStorageSession.cpp:
        (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
        (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookiesButKeepFirstPartyCookiesFor const):
        (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockAndDeleteCookiesFor):
        (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockButKeepCookiesFor):
        (WebCore::NetworkStorageSession::removePrevalentDomains):
        (WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor): Deleted.
        * platform/network/NetworkStorageSession.h:

2019-08-13  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] setShouldObserveDOMTimerScheduling and setShouldObserveTransitions are always called in pairs.
        https://bugs.webkit.org/show_bug.cgi?id=200685
        <rdar://problem/54269778>

        Reviewed by Simon Fraser.

        Let's merge these 2 functions.

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::stopObservingPendingActivities):
        (WebCore::ContentChangeObserver::adjustObservedState):
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::isObservingDOMTimerScheduling const):
        (WebCore::ContentChangeObserver::isObservingContentChanges const):
        (WebCore::ContentChangeObserver::setShouldObserveDOMTimerSchedulingAndTransitions):
        (WebCore::ContentChangeObserver::setShouldObserveDOMTimerScheduling): Deleted.
        (WebCore::ContentChangeObserver::setShouldObserveTransitions): Deleted.

2019-08-13  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Scope events in adjustObservedState
        https://bugs.webkit.org/show_bug.cgi?id=200679
        <rdar://problem/54266172>

        Reviewed by Simon Fraser.

        This is in preparation for simplifying adjustObservedState.

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::didFinishTransition):
        (WebCore::ContentChangeObserver::adjustObservedState):
        * page/ios/ContentChangeObserver.h:

2019-08-13  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Improve GPUBindGroup performance using one device-shared argument MTLBuffer
        https://bugs.webkit.org/show_bug.cgi?id=200606

        Reviewed by Myles C. Maxfield.

        Manage all argument buffer storage for GPUBindGroups in one large MTLBuffer for a GPUDevice.
        Vastly improves GPUProgrammablePassEncoder.setBindGroup performance; in alpha MotionMark WebGPU benchmark,
        score improves from ~12000 to ~90000.

        No expected change in WebGPU behavior, though bind-groups.html has been updated to cover more cases.

        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createBindGroup const):
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUBindGroup.h: No longer manages one unique MTLBuffer per MTLArgumentEncoder.
        (WebCore::GPUBindGroup::argumentBuffer const): Delegates to GPUBindGroupAllocator for current argument buffer.
        (WebCore::GPUBindGroup::vertexArgsBuffer const): Deleted.
        (WebCore::GPUBindGroup::fragmentArgsBuffer const): Deleted.
        (WebCore::GPUBindGroup::computeArgsBuffer const): Deleted.
        * platform/graphics/gpu/GPUBindGroupAllocator.h: Added. Allocates MTLBuffer for and assigns offsets for argument buffers.
        (WebCore::GPUBindGroupAllocator::argumentBuffer const):
        * platform/graphics/gpu/GPUBindGroupLayout.h:
        * platform/graphics/gpu/GPUBuffer.h: Move MTLResourceUsage calculation to GPUBuffer construction.
        (WebCore::GPUBuffer::platformUsage const):
        * platform/graphics/gpu/GPUComputePassEncoder.h: Prevent any potiential narrowing issues, as offset can be large.
        * platform/graphics/gpu/GPUDevice.cpp: Now owns a GPUBindGroupAllocator for owning all its argument buffer storage.
        (WebCore::GPUDevice::tryCreateBindGroup const):
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
        (WebCore::GPUProgrammablePassEncoder::setVertexBuffer):
        (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer):
        (WebCore::GPUProgrammablePassEncoder::setComputeBuffer):
        * platform/graphics/gpu/GPURenderPassEncoder.h:
        * platform/graphics/gpu/GPUTexture.h: Move MTLResourceUsage calculation to GPUTexture construction.
        (WebCore::GPUTexture::platformUsage const):
        * platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm: Added.
        (WebCore::GPUBindGroupAllocator::create):
        (WebCore::GPUBindGroupAllocator::GPUBindGroupAllocator):
        (WebCore::GPUBindGroupAllocator::allocateAndSetEncoders): Ensures that MTLArgumentEncoders have appropriate allocation for encoding.
        (WebCore::GPUBindGroupAllocator::reallocate): Create new MTLBuffer large enough for new encoder requirement, and copy over old argument buffer data.
        (WebCore::GPUBindGroupAllocator::tryReset): For now, resets argument buffer if all GPUBindGroups created with this allocator are destroyed.
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::tryGetResourceAsBufferBinding): Add size check.
        (WebCore::GPUBindGroup::tryCreate): No longer owns new MTLBuffers. Requests argument buffer space from GPUBindGroupAllocator.
        (WebCore::GPUBindGroup::GPUBindGroup):
        (WebCore::GPUBindGroup::~GPUBindGroup): Remind allocator to check for possible reset.
        (WebCore::tryCreateArgumentBuffer): Deleted.
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::GPUBuffer):
        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
        (WebCore::GPUComputePassEncoder::setComputeBuffer):
        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
        * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
        (WebCore::GPUProgrammablePassEncoder::setBindGroup): No need to recalculate usage every time. Set appropriate argument buffer and offsets for new bind group model.
        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
        (WebCore::GPURenderPassEncoder::setVertexBuffer):
        (WebCore::GPURenderPassEncoder::setFragmentBuffer):
        * platform/graphics/gpu/cocoa/GPUTextureMetal.mm:
        (WebCore::GPUTexture::GPUTexture):

2019-08-13  Antti Koivisto  <antti@apple.com>

        Event region collection should take clipping into account
        https://bugs.webkit.org/show_bug.cgi?id=200668
        <rdar://problem/53826561>

        Reviewed by Simon Fraser.

        Test: pointerevents/ios/touch-action-region-clip-and-transform.html

        * rendering/EventRegion.cpp:
        (WebCore::EventRegionContext::pushClip):
        (WebCore::EventRegionContext::popClip):

        Maintain clip rect stack.

        (WebCore::EventRegionContext::unite):

        Apply both transforms and clipping.

        * rendering/EventRegion.h:
        * rendering/RenderBlock.cpp:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::pushContentsClip):
        (WebCore::RenderBox::popContentsClip):

        Update clip for non-self-painting layers.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::clipToRect):
        (WebCore::RenderLayer::restoreClip):

        Update clip for self-painting layers.

2019-08-13  Devin Rousso  <drousso@apple.com>

        Web Inspector: Styles: show @supports CSS groupings
        https://bugs.webkit.org/show_bug.cgi?id=200419
        <rdar://problem/53971948>

        Reviewed by Joseph Pecoraro.

        Test: inspector/css/getMatchedStylesForNode.html

        * inspector/InspectorStyleSheet.cpp:
        (WebCore::buildArrayForGroupings): Added.
        (WebCore::InspectorStyleSheet::buildObjectForRule):
        (WebCore::buildMediaObject): Deleted.
        (WebCore::fillMediaListChain): Deleted.

        * css/MediaList.h:
        * css/MediaList.cpp:
        (WebCore::MediaQuerySet::MediaQuerySet):
        Remove the `lastLine` as it was never set by anyone and wasn't used by Web Inspector.

2019-08-13  Sihui Liu  <sihui_liu@apple.com>

        Make sure UniqueIDBDatabaseConnection unregister itself from IDBServer
        https://bugs.webkit.org/show_bug.cgi?id=200650
        <rdar://problem/54236010>

        Reviewed by Youenn Fablet.

        We register UniqueIDBDatabaseConnection unconditionally to IDBServer but fail to unregister if UniqueIDBDatabase
        of UniqueIDBDatabaseConnection is gone.

        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
        (WebCore::IDBServer::UniqueIDBDatabaseConnection::server):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
        (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

2019-08-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Introduce TableGrid
        https://bugs.webkit.org/show_bug.cgi?id=200656
        <rdar://problem/54240833>

        Reviewed by Antti Koivisto.

        table grid:
        A matrix containing as many rows and columns as needed to describe the position of all the table-rows
        and table-cells of a table-root, as determined by the grid-dimensioning algorithm.
        Each row of the grid might correspond to a table-row, and each column to a table-column.

        slot of the table grid:
        A slot (r,c) is an available space created by the intersection of a row r and a column c in the table grid.

        https://www.w3.org/TR/css-tables-3/#terminology

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isTableHeader const):
        (WebCore::Layout::Box::isTableBody const):
        (WebCore::Layout::Box::isTableFooter const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::layout const):
        (WebCore::Layout::TableFormattingContext::ensureTableGrid const):
        (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns const):
        (WebCore::Layout::TableFormattingContext::computeTableWidth const):
        (WebCore::Layout::TableFormattingContext::distributeAvailabeWidth const):
        (WebCore::Layout::TableFormattingContext::computeTableHeight const):
        (WebCore::Layout::TableFormattingContext::distributeAvailableHeight const):
        * layout/tableformatting/TableFormattingContext.h:
        (WebCore::Layout::TableFormattingContext::formattingState const):
        * layout/tableformatting/TableFormattingState.h:
        (WebCore::Layout::TableFormattingState::tableGrid):
        * layout/tableformatting/TableGrid.cpp: Added.
        (WebCore::Layout::TableGrid::CellInfo::CellInfo):
        (WebCore::Layout::TableGrid::SlotInfo::SlotInfo):
        (WebCore::Layout::TableGrid::TableGrid):
        (WebCore::Layout::TableGrid::appendCell):
        (WebCore::Layout::TableGrid::insertCell):
        (WebCore::Layout::TableGrid::removeCell):
        * layout/tableformatting/TableGrid.h: Copied from Source/WebCore/layout/tableformatting/TableFormattingContext.h.

2019-08-13  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Add rowSpan and colSpan to Box
        https://bugs.webkit.org/show_bug.cgi?id=200654
        <rdar://problem/54239281>

        Reviewed by Antti Koivisto.

        colSpan and rowSpan are not part of the RenderStyle. We eventually need to find a more appropriate place for the "random DOM things".

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::setRowSpan):
        (WebCore::Layout::Box::setColumnSpan):
        (WebCore::Layout::Box::rowSpan const):
        (WebCore::Layout::Box::columnSpan const):
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):

2019-08-13  Youenn Fablet  <youenn@apple.com>

        Blob registries should be keyed by session IDs
        https://bugs.webkit.org/show_bug.cgi?id=200567
        <rdar://problem/54120212>

        Reviewed by Alex Christensen.

        Pass session IDs to all BlobRegistry methods in particular ThreadableLoaderRegistry.
        The only exception is blobSize which should be dealt with a follow-up patch.
        blobSize blob registry is retrieved from the connection -> sessionID map in Network Process.
        Covered by existing tests.

        * Modules/fetch/FetchLoader.cpp:
        (WebCore::FetchLoader::~FetchLoader):
        (WebCore::FetchLoader::startLoadingBlobURL):
        * Modules/fetch/FetchLoader.h:
        * fileapi/FileReaderLoader.cpp:
        (WebCore::FileReaderLoader::~FileReaderLoader):
        (WebCore::FileReaderLoader::start):
        * fileapi/FileReaderLoader.h:
        * fileapi/ThreadableBlobRegistry.cpp:
        (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
        (WebCore::ThreadableBlobRegistry::registerBlobURL):
        (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
        * fileapi/ThreadableBlobRegistry.h:
        * html/PublicURLManager.cpp:
        * loader/PolicyChecker.cpp:
        (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
        * platform/network/BlobRegistry.h:
        * platform/network/BlobRegistryImpl.cpp:
        (WebCore::createBlobResourceHandle):
        (WebCore::loadBlobResourceSynchronously):
        (WebCore::BlobRegistryImpl::filesInBlob const):
        * platform/network/BlobRegistryImpl.h:
        * platform/network/FormData.cpp:
        (WebCore::appendBlobResolved):
        (WebCore::FormData::resolveBlobReferences):
        * platform/network/FormData.h:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore::createHTTPBodyCFReadStream):
        * platform/network/soup/ResourceRequest.h:
        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::updateSoupMessageBody const):
        (WebCore::ResourceRequest::updateSoupMessage const):

2019-08-13  Youenn Fablet  <youenn@apple.com>

        User Agent and SessionID should be given to NetworkRTCProvider to set up the correct proxy information
        https://bugs.webkit.org/show_bug.cgi?id=200583

        Reviewed by Eric Carlson.

        Use a socket factory that is specific to the user agent and session ID.
        This factory is stored in the media endpoint.
        Not testable without proxy infrastructure.

        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::LibWebRTCProvider::createPeerConnection):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:

2019-08-12  Ryosuke Niwa  <rniwa@webkit.org>

        FrameLoader::open can execute scritps via style recalc in Frame::setDocument
        https://bugs.webkit.org/show_bug.cgi?id=200377

        Reviewed by Antti Koivisto.

        Fixed the bug that FrameLoader::open can execute arbitrary author scripts via post style update callbacks
        by adding PostResolutionCallbackDisabler, WidgetHierarchyUpdatesSuspensionScope, and NavigationDisabler
        to CachedFrameBase::restore and FrameLoader::open.

        This ensures all frames are restored from the page cache before any of them would start running scripts.

        Test: fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html

        * history/CachedFrame.cpp:
        (WebCore::CachedFrameBase::restore):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::open):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::FrameViewLayoutContext::layout): Fixed the debug assertion. The layout of a document may be
        updated while we're preparing to put a page into the page cache.
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateCompositingLayers): Ditto.

2019-08-12  Sam Weinig  <weinig@apple.com>

        Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
        https://bugs.webkit.org/show_bug.cgi?id=200614

        Reviewed by Darin Adler.

        Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and 
        StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).
        
        Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to 
        StringBuilder::appendSubstring(...).

        * dom/Range.cpp:
        (WebCore::Range::toString const):
        * editing/Editing.cpp:
        (WebCore::stringWithRebalancedWhitespace):
        * editing/MarkupAccumulator.cpp:
        (WebCore::appendCharactersReplacingEntitiesInternal):
        * editing/TextIterator.cpp:
        (WebCore::TextIteratorCopyableText::appendToStringBuilder const):
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
        * html/parser/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::bufferedCharacters const):
        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
        (WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
        * platform/text/SegmentedString.cpp:
        (WebCore::SegmentedString::Substring::appendTo const):
        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::decode):
        * xml/XSLTProcessorLibxslt.cpp:
        (WebCore::writeToStringBuilder):
        Update for renames.

2019-08-12  Adrian Perez de Castro  <aperez@igalia.com>

        [WPE][GTK] Fix building without unified sources
        https://bugs.webkit.org/show_bug.cgi?id=200641

        Reviewed by Žan Doberšek.

        * CMakeLists.txt: Add WebCore as the list of libraries to link into WebCoreTestSupport, to
        avoid underlinking, which makes it possible to link with LDFLAGS="-Wl,--no-undefined".
        * editing/WebCorePasteboardFileReader.h: Add missing inclusion of the pal/SessionID.h
        header.

2019-08-12  Yusuke Suzuki  <ysuzuki@apple.com>

        [WTF][JSC] Make JSC and WTF aggressively-fast-malloced
        https://bugs.webkit.org/show_bug.cgi?id=200611

        Reviewed by Saam Barati.

        Changed the accessor since we changed std::unique_ptr to Ref for this field.

        No behavior change.

        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::addTimerSetNotification):
        (WebCore::WorkerScriptController::removeTimerSetNotification):

2019-08-12  Youenn Fablet  <youenn@apple.com>

        Make Blob::m_size an Optional
        https://bugs.webkit.org/show_bug.cgi?id=200617

        Reviewed by Alex Christensen.

        Use an Optional instead of -1 to know that m_size is initialized or not.
        No change of behavior.

        Refactoring to make all Blob members private.
        Remove one static Blob create method.

        Covered by existing tests.

        * Modules/fetch/FetchBody.cpp:
        (WebCore::FetchBody::fromFormData):
        * fileapi/Blob.cpp:
        (WebCore::Blob::Blob):
        (WebCore::Blob::size const):
        * fileapi/Blob.h:
        (WebCore::Blob::setInternalURL):
        * fileapi/File.cpp:
        (WebCore::File::create):
        (WebCore::File::File):
        (WebCore::File::computeNameAndContentType):
        * fileapi/File.h:
        * html/FileListCreator.cpp:
        (WebCore::FileListCreator::createFileList):

2019-08-12  Chris Dumez  <cdumez@apple.com>

        GPUBuffer seems to be ref'd / deref'd from multiple thread concurrently but is not ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=200629

        Reviewed by Geoffrey Garen.

        Make sure GPUBuffer only gets ref'd / deref'd on the main thread, since it is not
        ThreadSafeRefCounted.

        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::commandBufferCommitted):
        (WebCore::GPUBuffer::commandBufferCompleted):

2019-08-12  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
        https://bugs.webkit.org/show_bug.cgi?id=200584

        Reviewed by Philippe Normand.

        Listening to parsers warnings and error messages (synchronously so that we react
        right away) and requesting keyframes from the peer.

        Also simplify the decoder code by trying to make decoding happen
        in one single pass, also hiding away GStreamer threading and allowing
        us to react as soon as the decoder/parser fails.

        * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
        (WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder):
        (WebCore::GStreamerVideoDecoder::pullSample):
        (WebCore::H264Decoder::H264Decoder):
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

2019-08-12  Antti Koivisto  <antti@apple.com>

        Only construct ComplexLineLayout when needed
        https://bugs.webkit.org/show_bug.cgi?id=200625

        Reviewed by Zalan Bujtas.

        * rendering/ComplexLineLayout.cpp:
        (WebCore::ComplexLineLayout::createInlineBoxForRenderer):
        (WebCore::ComplexLineLayout::createLineBoxes):
        (WebCore::ComplexLineLayout::constructLine):
        (WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):

        Make static so this can be invoked without constructing complex line layout (from startAlignedOffsetForLine).

        (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
        (WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
        (WebCore::ComplexLineLayout::checkLinesForTextOverflow):
        (WebCore::ComplexLineLayout::startAlignedOffsetForLine): Deleted.

        This is also used in block layout to set static positions of positioned objects.
        Move to RenderBlockFlow where its only caller is.

        * rendering/ComplexLineLayout.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::RenderBlockFlow):
        (WebCore::RenderBlockFlow::willBeDestroyed):
        (WebCore::RenderBlockFlow::layoutInlineChildren):
        (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
        (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
        (WebCore::RenderBlockFlow::deleteLines):
        (WebCore::RenderBlockFlow::hitTestInlineChildren):
        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
        (WebCore::RenderBlockFlow::paintInlineChildren):
        (WebCore::RenderBlockFlow::hasLines const):
        (WebCore::RenderBlockFlow::layoutSimpleLines):
        (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
        (WebCore::RenderBlockFlow::ensureLineBoxes):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::firstRootBox const):
        (WebCore::RenderBlockFlow::lastRootBox const):
        (WebCore::RenderBlockFlow::complexLineLayout):
        (WebCore::RenderBlockFlow::lineBoxes): Deleted.
        (WebCore::RenderBlockFlow::lineBoxes const): Deleted.
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::removeLineBoxFromRenderObject):
        (WebCore::RootInlineBox::extractLineBoxFromRenderObject):
        (WebCore::RootInlineBox::attachLineBoxToRenderObject):
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::generateLineBoxTree):

2019-08-12  Youenn Fablet  <youenn@apple.com>

        Remove IDBValue::m_sessionID
        https://bugs.webkit.org/show_bug.cgi?id=199320

        Reviewed by Alex Christensen.

        Remove sessionID from IDBValue.
        This does not seem to be really used in any way.
        No change of behavior.

        * Modules/indexeddb/IDBValue.cpp:
        (WebCore::IDBValue::IDBValue):
        * Modules/indexeddb/IDBValue.h:
        (WebCore::IDBValue::blobURLs const):
        (WebCore::IDBValue::encode const):
        (WebCore::IDBValue::decode):
        (WebCore::IDBValue::sessionID const): Deleted.
        * Modules/indexeddb/shared/IDBRequestData.cpp:
        (WebCore::IDBRequestData::isolatedCopy):
        * Modules/indexeddb/shared/IDBRequestData.h:
        (WebCore::IDBRequestData::databaseIdentifier const):
        (WebCore::IDBRequestData::decode):
        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::deserializeIDBValueToJSValue):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneSerializer::serialize):
        (WebCore::CloneSerializer::CloneSerializer):
        (WebCore::CloneSerializer::dumpIfTerminal):
        (WebCore::CloneDeserializer::deserialize):
        (WebCore::CloneDeserializer::CloneDeserializer):
        (WebCore::SerializedScriptValue::SerializedScriptValue):
        (WebCore::SerializedScriptValue::create):
        (WebCore::SerializedScriptValue::deserialize):
        (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
        * bindings/js/SerializedScriptValue.h:
        (WebCore::SerializedScriptValue::sessionID const): Deleted.

2019-08-12  Youenn Fablet  <youenn@apple.com>

        Remove IDB-specific quota
        https://bugs.webkit.org/show_bug.cgi?id=196545

        Reviewed by Alex Christensen.

        No change of behavior as IDB specific quota is no longer used.
        Instead a global quota is used. This quota currently handles IDB and Cache API.

        * Modules/indexeddb/server/IDBBackingStore.h:
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore):
        (WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted.
        * Modules/indexeddb/server/IDBServer.h:
        (WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted.
        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
        (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
        (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted.
        (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted.
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-08-11  Alicia Boya García  <aboya@igalia.com>

        [MSE][GStreamer] Don't use vorbisparse
        https://bugs.webkit.org/show_bug.cgi?id=200622

        Reviewed by Philippe Normand.

        This patch has been splitted from the original WebKitMediaSrc rework
        patch (https://bugs.webkit.org/show_bug.cgi?id=199719).

        Unlike other parsers, vorbisparse has latency (in the sense that when
        it gets a chain call with a series of complete frames, it may not emit
        the parsed frames until another chain in the future), which makes it
        inappropriate for AppendPipeline, as there is no good way I know to
        flush it.

        But actually vorbisparse is not known to be necessary and it was only
        introduced for consistency with other formats. Parsers are used in
        AppendPipeline to reconstruct information that is lost due to poor
        muxes. There have been no reported cases of this being a problem with
        Vorbis in WebM, so I'm just removing the parser.

        Fixes imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html

        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
        (WebCore::createOptionalParserForFormat):

2019-08-11  Antti Koivisto  <antti@apple.com>

        Factor complex line layout path out from RenderBlockFlow
        https://bugs.webkit.org/show_bug.cgi?id=200612

        Reviewed by Zalan Bujtas.

        This patch factors the line layout code that is currently part of the RenderBlockFlow and lives in RenderBlockLineLayout.cpp
        into a new ComplexLineLayout class. ComplexLineLayout is a member of RenderBlockFlow.

        In the future we can stop constructing ComplexLineLayout at all when using other line layout paths.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * rendering/ComplexLineLayout.cpp: Copied from Source/WebCore/rendering/RenderBlockLineLayout.cpp.
        (WebCore::ComplexLineLayout::ComplexLineLayout):
        (WebCore::ComplexLineLayout::appendRunsForObject):
        (WebCore::ComplexLineLayout::createRootInlineBox):
        (WebCore::ComplexLineLayout::createAndAppendRootInlineBox):
        (WebCore::ComplexLineLayout::createInlineBoxForRenderer):
        (WebCore::ComplexLineLayout::createLineBoxes):
        (WebCore::ComplexLineLayout::constructLine):
        (WebCore::ComplexLineLayout::textAlignmentForLine const):
        (WebCore::ComplexLineLayout::setMarginsForRubyRun):
        (WebCore::ComplexLineLayout::updateRubyForJustifiedText):
        (WebCore::ComplexLineLayout::computeExpansionForJustifiedText):
        (WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):
        (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForLine):
        (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
        (WebCore::ComplexLineLayout::removeInlineBox const):
        (WebCore::ComplexLineLayout::computeBlockDirectionPositionsForLine):
        (WebCore::ComplexLineLayout::handleTrailingSpaces):
        (WebCore::ComplexLineLayout::appendFloatingObjectToLastLine):
        (WebCore::ComplexLineLayout::createLineBoxesFromBidiRuns):
        (WebCore::ComplexLineLayout::layoutRunsAndFloats):
        (WebCore::ComplexLineLayout::restartLayoutRunsAndFloatsInRange):
        (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
        (WebCore::ComplexLineLayout::reattachCleanLineFloats):
        (WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
        (WebCore::ComplexLineLayout::layoutLineBoxes):
        (WebCore::ComplexLineLayout::checkFloatInCleanLine):
        (WebCore::ComplexLineLayout::determineStartPosition):
        (WebCore::ComplexLineLayout::determineEndPosition):
        (WebCore::ComplexLineLayout::checkPaginationAndFloatsAtEndLine):
        (WebCore::ComplexLineLayout::lineWidthForPaginatedLineChanged const):
        (WebCore::ComplexLineLayout::matchedEndLine):
        (WebCore::ComplexLineLayout::addOverflowFromInlineChildren):
        (WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
        (WebCore::ComplexLineLayout::checkLinesForTextOverflow):
        (WebCore::ComplexLineLayout::positionNewFloatOnLine):
        (WebCore::ComplexLineLayout::startAlignedOffsetForLine):
        (WebCore::ComplexLineLayout::updateFragmentForLine const):
        (WebCore::ComplexLineLayout::style const):
        (WebCore::ComplexLineLayout::layoutContext const):
        (WebCore::RenderBlockFlow::appendRunsForObject): Deleted.
        (WebCore::RenderBlockFlow::createRootInlineBox): Deleted.
        (WebCore::RenderBlockFlow::createAndAppendRootInlineBox): Deleted.
        (WebCore::createInlineBoxForRenderer): Deleted.
        (WebCore::RenderBlockFlow::createLineBoxes): Deleted.
        (WebCore::RenderBlockFlow::constructLine): Deleted.
        (WebCore::RenderBlockFlow::textAlignmentForLine const): Deleted.
        (WebCore::RenderBlockFlow::setMarginsForRubyRun): Deleted.
        (WebCore::RenderBlockFlow::updateRubyForJustifiedText): Deleted.
        (WebCore::RenderBlockFlow::computeExpansionForJustifiedText): Deleted.
        (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment): Deleted.
        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine): Deleted.
        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Deleted.
        (WebCore::RenderBlockFlow::removeInlineBox const): Deleted.
        (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine): Deleted.
        (WebCore::RenderBlockFlow::handleTrailingSpaces): Deleted.
        (WebCore::RenderBlockFlow::appendFloatingObjectToLastLine): Deleted.
        (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Deleted.
        (WebCore::RenderBlockFlow::layoutRunsAndFloats): Deleted.
        (WebCore::RenderBlockFlow::restartLayoutRunsAndFloatsInRange): Deleted.
        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Deleted.
        (WebCore::RenderBlockFlow::reattachCleanLineFloats): Deleted.
        (WebCore::RenderBlockFlow::linkToEndLineIfNeeded): Deleted.
        (WebCore::RenderBlockFlow::layoutLineBoxes): Deleted.
        (WebCore::RenderBlockFlow::checkFloatInCleanLine): Deleted.
        (WebCore::RenderBlockFlow::determineStartPosition): Deleted.
        (WebCore::RenderBlockFlow::determineEndPosition): Deleted.
        (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine): Deleted.
        (WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const): Deleted.
        (WebCore::RenderBlockFlow::matchedEndLine): Deleted.
        (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Deleted.
        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren): Deleted.
        (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes): Deleted.
        (WebCore::RenderBlockFlow::checkLinesForTextOverflow): Deleted.
        (WebCore::RenderBlockFlow::positionNewFloatOnLine): Deleted.
        (WebCore::RenderBlockFlow::startAlignedOffsetForLine): Deleted.
        (WebCore::RenderBlockFlow::updateFragmentForLine const): Deleted.
        * rendering/ComplexLineLayout.h: Added.
        (WebCore::ComplexLineLayout::lineBoxes):
        (WebCore::ComplexLineLayout::lineBoxes const):
        (WebCore::ComplexLineLayout::firstRootBox const):
        (WebCore::ComplexLineLayout::lastRootBox const):
        * rendering/InlineIterator.h:
        (WebCore::IsolateTracker::addFakeRunIfNecessary):
        (WebCore::InlineBidiResolver::appendRunInternal):
        * rendering/RenderBlock.h:
        * rendering/RenderBlockFlow.cpp:
        (WebCore::RenderBlockFlow::RenderBlockFlow):
        (WebCore::RenderBlockFlow::willBeDestroyed):
        (WebCore::RenderBlockFlow::layoutInlineChildren):
        (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
        (WebCore::RenderBlockFlow::deleteLines):
        (WebCore::RenderBlockFlow::hitTestInlineChildren):
        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
        (WebCore::RenderBlockFlow::paintInlineChildren):
        (WebCore::RenderBlockFlow::layoutSimpleLines):
        (WebCore::RenderBlockFlow::ensureLineBoxes):
        * rendering/RenderBlockFlow.h:
        (WebCore::RenderBlockFlow::lineBoxes):
        (WebCore::RenderBlockFlow::lineBoxes const):
        (WebCore::RenderBlockFlow::firstRootBox const):
        (WebCore::RenderBlockFlow::lastRootBox const):
        (WebCore::RenderBlockFlow::floatingObjects):
        (WebCore::RenderBlockFlow::complexLineLayout):
        (WebCore::RenderBlockFlow::overrideTextAlignmentForLine const):
        (WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds const):
        * rendering/RenderBlockLineLayout.cpp: Removed.
        * rendering/RenderRubyBase.cpp:
        (WebCore::RenderRubyBase::overrideTextAlignmentForLine const):
        (WebCore::RenderRubyBase::textAlignmentForLine const): Deleted.
        * rendering/RenderRubyBase.h:
        * rendering/RenderRubyText.cpp:
        (WebCore::RenderRubyText::overrideTextAlignmentForLine const):
        (WebCore::RenderRubyText::textAlignmentForLine const): Deleted.
        * rendering/RenderRubyText.h:
        * rendering/SimpleLineLayoutFunctions.cpp:
        (WebCore::SimpleLineLayout::generateLineBoxTree):
        * rendering/line/LineBreaker.cpp:
        (WebCore::LineBreaker::skipLeadingWhitespace):
        * rendering/line/LineBreaker.h:
        (WebCore::LineBreaker::positionNewFloatOnLine):
        * rendering/line/LineInlineHeaders.h:
        (WebCore::setStaticPositions):
        * rendering/svg/RenderSVGText.cpp:
        (WebCore::RenderSVGText::createRootInlineBox): Deleted.
        * rendering/svg/RenderSVGText.h:
        * rendering/updating/RenderTreeBuilderList.cpp:
        (WebCore::generatesLineBoxesForInlineChild):
        (WebCore::getParentOfFirstLineBox):

2019-08-10  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r245974): Missing content on habitburger.com, amazon.com
        https://bugs.webkit.org/show_bug.cgi?id=200618
        rdar://problem/53920224

        Reviewed by Zalan Bujtas.

        In r245974 TileController::adjustTileCoverageRect() started to intersect the coverage
        rect with the bounds of the layer, which is wrong because this coverage rect is passed down
        to descendant layers, and they may project outside the bounds of this tiled layer.
        
        This caused missing dropdowns on amazon.com, and a missing menu on habitburger.com on iPhone.

        The fix is to just not do the intersection with the bounds. TileGrid::getTileIndexRangeForRect()
        already ensures that we never make tiles outside the bounds of a TileController.

        Test: compositing/backing/layer-outside-tiled-parent.html

        * platform/graphics/ca/TileController.cpp:
        (WebCore::TileController::adjustTileCoverageRect):
        * platform/graphics/ca/TileGrid.cpp:
        (WebCore::TileGrid::ensureTilesForRect):

2019-08-10  Andres Gonzalez  <andresg_22@apple.com>

        Accessibility client cannot navigate to internal links targets on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=200559
        <rdar://problem/45242534>

        Reviewed by Zalan Bujtas.

        The cause of the problem on iOS is that AccessibilityObject::firstAccessibleObjectFromNode
        used in AccessibilityRenderObject::linkedUIElements may return an object
        that is ignored by accessibility clients on iOS, and thus the client
        would not track the target of an internal link. This change ensures that
        accessibilityLinkedElement will return a valid accessibility element to
        the client, if it is exists.
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
        (WebCore::firstAccessibleObjectFromNode):
        * accessibility/AccessibilityObject.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):

2019-08-10  Youenn Fablet  <youenn@apple.com>

        Blob should store its session ID
        https://bugs.webkit.org/show_bug.cgi?id=200572

        Reviewed by Darin Adler.

        Blob at creation time now initializes its session ID.
        This will allow in the future to call blob registry routines with it.
        Update all call sites to provide the session ID.

        No observable change.

        * Modules/entriesapi/DOMFileSystem.cpp:
        (WebCore::DOMFileSystem::getFile):
        * Modules/fetch/FetchBody.cpp:
        (WebCore::FetchBody::fromFormData):
        * Modules/fetch/FetchBody.h:
        * Modules/fetch/FetchBodyConsumer.cpp:
        (WebCore::blobFromData):
        (WebCore::resolveWithTypeAndData):
        (WebCore::FetchBodyConsumer::resolve):
        (WebCore::FetchBodyConsumer::takeAsBlob):
        * Modules/fetch/FetchBodyConsumer.h:
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::blob):
        * Modules/mediarecorder/MediaRecorder.cpp:
        (WebCore::MediaRecorder::createRecordingDataBlob):
        * Modules/mediastream/RTCDataChannel.cpp:
        (WebCore::RTCDataChannel::didReceiveRawData):
        * Modules/websockets/WebSocket.cpp:
        (WebCore::WebSocket::didReceiveBinaryData):
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
        * bindings/js/JSDOMPromiseDeferred.h:
        (WebCore::DeferredPromise::sessionID const):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneDeserializer::readFile):
        (WebCore::CloneDeserializer::readTerminal):
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::DataTransfer):
        (WebCore::DataTransfer::createForCopyAndPaste):
        (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
        (WebCore::DataTransfer::createForInputEvent):
        (WebCore::DataTransfer::createForDrag):
        (WebCore::DataTransfer::createForDragStartEvent):
        (WebCore::DataTransfer::createForDrop):
        (WebCore::DataTransfer::createForUpdatingDropTarget):
        * dom/DataTransfer.h:
        * dom/Document.cpp:
        (WebCore::Document::originIdentifierForPasteboard const):
        * dom/Document.h:
        * editing/ReplaceRangeWithTextCommand.cpp:
        (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
        * editing/SpellingCorrectionCommand.cpp:
        (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::inputEventDataTransfer const):
        * editing/WebCorePasteboardFileReader.cpp:
        (WebCore::WebCorePasteboardFileReader::readFilename):
        (WebCore::WebCorePasteboardFileReader::readBuffer):
        * editing/WebCorePasteboardFileReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::createFragmentForImageAttachment):
        (WebCore::replaceRichContentWithAttachments):
        (WebCore::createFragmentAndAddResources):
        (WebCore::sanitizeMarkupWithArchive):
        (WebCore::WebContentReader::readImage):
        (WebCore::attachmentForFilePath):
        (WebCore::attachmentForData):
        * editing/markup.cpp:
        (WebCore::restoreAttachmentElementsInFragment):
        * fileapi/Blob.cpp:
        (WebCore::Blob::Blob):
        * fileapi/Blob.h:
        (WebCore::Blob::create):
        (WebCore::Blob::deserialize):
        (WebCore::Blob::slice const):
        * fileapi/Blob.idl:
        * fileapi/File.cpp:
        (WebCore::File::createWithRelativePath):
        (WebCore::File::File):
        * fileapi/File.h:
        * fileapi/File.idl:
        * html/FileInputType.cpp:
        (WebCore::FileInputType::appendFormData const):
        (WebCore::FileInputType::filesChosen):
        * html/FileListCreator.cpp:
        (WebCore::appendDirectoryFiles):
        (WebCore::FileListCreator::FileListCreator):
        (WebCore::FileListCreator::createFileList):
        * html/FileListCreator.h:
        (WebCore::FileListCreator::create):
        * html/HTMLAttachmentElement.cpp:
        (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::toBlob):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleDrag):
        * testing/Internals.cpp:
        (WebCore::Internals::createFile):
        * testing/ServiceWorkerInternals.cpp:
        (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
        * workers/service/context/ServiceWorkerFetch.cpp:
        (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createResponseBlob):

2019-08-10  Alex Christensen  <achristensen@webkit.org>

        Disable ContentChangeObserver TouchEvent adjustment on youtube.com on iOS in mobile browsing mode
        https://bugs.webkit.org/show_bug.cgi?id=200609
        <rdar://problem/54015403>

        Reviewed by Maciej Stachowiak.

        When watching a youtube video on iOS with "Autoplay" switched to off,
        upon finishing the video all clicks anywhere on the page are effectively ignored.
        Disabling ContentChangeObserver's TouchEvent adjustment fixes this bug.  I verified this manually.
        This switch was introduced in r242621, and it disables part of a new feature, so there is low risk of fallout.

        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::setAllowContentChangeObserverQuirk):
        (WebCore::DocumentLoader::allowContentChangeObserverQuirk const):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDisableContentChangeObserverTouchEventAdjustment const):
        * page/Quirks.h:
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::touchEventDidStart):

2019-08-10  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [iOS] Add a quirk for gmail.com messages on iPhone iOS13
        https://bugs.webkit.org/show_bug.cgi?id=200605

        Reviewed by Maciej Stachowiak.

        Add a quirk which sets the user agent for gmail.com messages on iPhone
        OS 13 to be iPhone OS 12. This is a workaround for a gmail.com bug till
        it is fixed.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldAvoidUsingIOS13ForGmail const):
        * page/Quirks.h:
        * platform/UserAgent.h:
        * platform/ios/UserAgentIOS.mm:
        (WebCore::osNameForUserAgent):
        (WebCore::standardUserAgentWithApplicationName):
        * platform/mac/UserAgentMac.mm:
        (WebCore::standardUserAgentWithApplicationName):

2019-08-10  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer][WebRTC] Remove unused GstAdapter
        https://bugs.webkit.org/show_bug.cgi?id=200585

        Reviewed by Philippe Normand.

        Minor "refactoring"

        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
        (WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):

2019-08-10  Antti Koivisto  <antti@apple.com>

        Can’t sort videos on a YouTube channel page on iPad
        https://bugs.webkit.org/show_bug.cgi?id=200573
        <rdar://problem/53415195>

        Reviewed by Darin Adler.

        Add a quirk to make touch events non-cancelable (preventDefault() does nothing).

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
        * page/Quirks.h:

2019-08-10  Devin Rousso  <drousso@apple.com>

        Web Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messages to the frontend before it's loaded
        https://bugs.webkit.org/show_bug.cgi?id=200587

        Reviewed by Joseph Pecoraro.

        WK1 inspector sends messages to the frontend using `WebCore::InspectorClient::doDispatchMessageOnFrontendPage`,
        which does not do any sort of queueing to wait until the frontend is loaded (`InspectorFrontendHost.loaded()`).

        Now that we are sending messages immediately, we should always queue.

        Covered by existing tests (which were failing after r248454, and now won't fail).

        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
        (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
        (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
        (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
        (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
        (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
        (WebCore::InspectorFrontendClientLocal::showConsole):
        (WebCore::InspectorFrontendClientLocal::showResources):
        (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
        (WebCore::InspectorFrontendClientLocal::dispatch): Added.
        (WebCore::InspectorFrontendClientLocal::dispatchMessage): Added.
        (WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Added.
        (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
        Provide additional ways for subclasses to call other `InspectorFrontendAPI` methods using
        the "on load" queue.

        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::sendMessageToFrontend):
        (WebCore::InspectorStubFrontend::frontendLoaded): Deleted.
        Leverage the base `InspectorFrontendClientLocal`'s functions for queueing messages.

        * inspector/InspectorClient.h:
        * inspector/InspectorClient.cpp: Removed.
        (WebCore::InspectorClient::doDispatchMessageOnFrontendPage): Deleted.

        * inspector/agents/InspectorTimelineAgent.cpp:
        Add missing include.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-08-09  Yusuke Suzuki  <ysuzuki@apple.com>

        Universal XSS in JSObject::putInlineSlow and JSValue::putToPrimitive
        https://bugs.webkit.org/show_bug.cgi?id=199864

        Reviewed by Saam Barati.

        Test: http/tests/security/cross-frame-access-object-put-optimization.html

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::doPutPropertySecurityCheck):
        * bindings/js/JSLocationCustom.cpp:
        (WebCore::JSLocation::doPutPropertySecurityCheck):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader):
        * bindings/scripts/test/JS/JSTestActiveDOMObject.h:

2019-08-09  Saam Barati  <sbarati@apple.com>

        When I did the devirtualization of the AST in r248488, I needed to
        update the various type checks under the Type class hierarchy
        operate on Type itself, since we now downcast straight from Type
        instead of UnnamedType, ResolvableType, and NamedType.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:

2019-08-09  Chris Dumez  <cdumez@apple.com>

        Possible non-thread safe usage of RefCounted in ~VideoFullscreenControllerContext()
        https://bugs.webkit.org/show_bug.cgi?id=200599

        Reviewed by Geoffrey Garen.

        WebVideoFullscreenControllerAVKit's m_playbackModel & m_fullscreenModel data members are
        WebThread objects so we need to make sure we grab the WebThread lock before dereferencing
        them in the WebVideoFullscreenControllerAVKit destructor, when destroyed on the UIThread.

        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (VideoFullscreenControllerContext::~VideoFullscreenControllerContext):

2019-08-09  Ali Juma  <ajuma@chromium.org>

        Don't allow cross-origin iframes to autofocus
        https://bugs.webkit.org/show_bug.cgi?id=200515
        <rdar://problem/54092988>

        Reviewed by Ryosuke Niwa.

        According to Step 6 in the WhatWG Spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofocusing-a-form-control:-the-autofocus-attribute),
        the 'autofocus' attribute shouldn't work for cross-origin iframes.

        This change is based on the Blink change (patch by <mustaq@chromium.org>):
        <https://chromium-review.googlesource.com/c/chromium/src/+/1593026>

        Also disallow cross-origin iframes from focusing programmatically without ever having
        had any user interaction.

        * dom/Element.cpp: Check if an invalid frame is trying to grab the focus.
        (WebCore::Element::focus):
        * html/HTMLFormControlElement.cpp: Check if the focus is moving to an invalid frame.
        (WebCore::shouldAutofocus):
        * page/DOMWindow.cpp: Check if an invalid frame is trying to grab the focus.
        (WebCore::DOMWindow::focus):

2019-08-09  Saam Barati  <sbarati@apple.com>

        [WHLSL] Devirtualize the AST
        https://bugs.webkit.org/show_bug.cgi?id=200522

        Reviewed by Robin Morisset.

        This patch devirtualizes the AST for Type, Expression, and Statement.
        We now have an enum which represents all the concrete types in the
        three hierarchies. Doing dynamic dispatch is implemented as a switch
        on that type enum.
        
        The interesting part of this patch is how to handle destruction. We do
        this by defining a custom deleter for all nodes in the AST. This ensures
        that when they're used inside UniqueRef, unique_ptr, Ref, and RefPtr,
        we do dynamic dispatch when we delete the object. This allows each base
        class to define a "destroy" method which does dynamic dispatch on type
        and calls the appropriate delete. We also mark all non-concrete nodes
        in all type hierarchies with a protected destructor, which ensures it's
        never called except from within the concrete child classes. We allow
        all concrete classes to have public destructors, as it's valid for
        their destructors to be called explicitly since there is no need for
        dynamic dispatch in such scenarios. All concrete classes are also marked
        as final.
        
        This is a 3ms speedup on compute_boids, which is about a 10% improvement
        in the WHLSL compiler.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        (WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression): Deleted.
        (WebCore::WHLSL::AST::AssignmentExpression::left): Deleted.
        (WebCore::WHLSL::AST::AssignmentExpression::right): Deleted.
        (WebCore::WHLSL::AST::AssignmentExpression::takeRight): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
        (WebCore::WHLSL::AST::Block::Block): Deleted.
        (WebCore::WHLSL::AST::Block::statements): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
        (WebCore::WHLSL::AST::BooleanLiteral::BooleanLiteral): Deleted.
        (WebCore::WHLSL::AST::BooleanLiteral::value const): Deleted.
        (WebCore::WHLSL::AST::BooleanLiteral::clone const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
        (WebCore::WHLSL::AST::Break::Break): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::CallExpression): Deleted.
        (WebCore::WHLSL::AST::CallExpression::arguments): Deleted.
        (WebCore::WHLSL::AST::CallExpression::name): Deleted.
        (WebCore::WHLSL::AST::CallExpression::setCastData): Deleted.
        (WebCore::WHLSL::AST::CallExpression::isCast): Deleted.
        (WebCore::WHLSL::AST::CallExpression::castReturnType): Deleted.
        (WebCore::WHLSL::AST::CallExpression::function): Deleted.
        (WebCore::WHLSL::AST::CallExpression::setFunction): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
        (WebCore::WHLSL::AST::CommaExpression::CommaExpression): Deleted.
        (WebCore::WHLSL::AST::CommaExpression::list): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
        (WebCore::WHLSL::AST::ConstantExpression::ConstantExpression): Deleted.
        (WebCore::WHLSL::AST::ConstantExpression::integerLiteral): Deleted.
        (WebCore::WHLSL::AST::ConstantExpression::visit): Deleted.
        (WebCore::WHLSL::AST::ConstantExpression::visit const): Deleted.
        (WebCore::WHLSL::AST::ConstantExpression::clone const): Deleted.
        (WebCore::WHLSL::AST::ConstantExpression::matches const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
        (WebCore::WHLSL::AST::Continue::Continue): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h: Added.
        * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
        (WebCore::WHLSL::AST::DereferenceExpression::DereferenceExpression): Deleted.
        (WebCore::WHLSL::AST::DereferenceExpression::pointer): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
        (WebCore::WHLSL::AST::DoWhileLoop::DoWhileLoop): Deleted.
        (WebCore::WHLSL::AST::DoWhileLoop::body): Deleted.
        (WebCore::WHLSL::AST::DoWhileLoop::conditional): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        (WebCore::WHLSL::AST::DotExpression::DotExpression): Deleted.
        (WebCore::WHLSL::AST::DotExpression::fieldName): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
        (WebCore::WHLSL::AST::EffectfulExpressionStatement::EffectfulExpressionStatement): Deleted.
        (WebCore::WHLSL::AST::EffectfulExpressionStatement::effectfulExpression): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition): Deleted.
        (WebCore::WHLSL::AST::EnumerationDefinition::type): Deleted.
        (WebCore::WHLSL::AST::EnumerationDefinition::add): Deleted.
        (WebCore::WHLSL::AST::EnumerationDefinition::memberByName): Deleted.
        (WebCore::WHLSL::AST::EnumerationDefinition::enumerationMembers): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::left const): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::right const): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition const): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember const): Deleted.
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::setEnumerationMember): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp: Added.
        (WebCore::WHLSL::AST::Expression::destroy):
        (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const):
        (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const):
        (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const):
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::Expression):
        (WebCore::WHLSL::AST::Expression::kind const):
        (WebCore::WHLSL::AST::Expression::isAssignmentExpression const):
        (WebCore::WHLSL::AST::Expression::isBooleanLiteral const):
        (WebCore::WHLSL::AST::Expression::isCallExpression const):
        (WebCore::WHLSL::AST::Expression::isCommaExpression const):
        (WebCore::WHLSL::AST::Expression::isDereferenceExpression const):
        (WebCore::WHLSL::AST::Expression::isDotExpression const):
        (WebCore::WHLSL::AST::Expression::isGlobalVariableReference const):
        (WebCore::WHLSL::AST::Expression::isFloatLiteral const):
        (WebCore::WHLSL::AST::Expression::isIndexExpression const):
        (WebCore::WHLSL::AST::Expression::isIntegerLiteral const):
        (WebCore::WHLSL::AST::Expression::isLogicalExpression const):
        (WebCore::WHLSL::AST::Expression::isLogicalNotExpression const):
        (WebCore::WHLSL::AST::Expression::isMakeArrayReferenceExpression const):
        (WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
        (WebCore::WHLSL::AST::Expression::isNullLiteral const):
        (WebCore::WHLSL::AST::Expression::isPropertyAccessExpression const):
        (WebCore::WHLSL::AST::Expression::isReadModifyWriteExpression const):
        (WebCore::WHLSL::AST::Expression::isTernaryExpression const):
        (WebCore::WHLSL::AST::Expression::isUnsignedIntegerLiteral const):
        (WebCore::WHLSL::AST::Expression::isVariableReference const):
        (WebCore::WHLSL::AST::Expression::isEnumerationMemberLiteral const):
        (WebCore::WHLSL::AST::Expression::codeLocation const):
        (WebCore::WHLSL::AST::Expression::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
        (WebCore::WHLSL::AST::Fallthrough::Fallthrough): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        (WebCore::WHLSL::AST::FloatLiteral::FloatLiteral): Deleted.
        (WebCore::WHLSL::AST::FloatLiteral::type): Deleted.
        (WebCore::WHLSL::AST::FloatLiteral::value const): Deleted.
        (WebCore::WHLSL::AST::FloatLiteral::clone const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
        (WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        (WebCore::WHLSL::AST::FloatLiteralType::value const): Deleted.
        (WebCore::WHLSL::AST::FloatLiteralType::preferredType): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        (WebCore::WHLSL::AST::ForLoop::ForLoop): Deleted.
        (WebCore::WHLSL::AST::ForLoop::~ForLoop): Deleted.
        (WebCore::WHLSL::AST::ForLoop::initialization): Deleted.
        (WebCore::WHLSL::AST::ForLoop::condition): Deleted.
        (WebCore::WHLSL::AST::ForLoop::increment): Deleted.
        (WebCore::WHLSL::AST::ForLoop::body): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
        (WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference): Deleted.
        (WebCore::WHLSL::AST::GlobalVariableReference::structField): Deleted.
        (WebCore::WHLSL::AST::GlobalVariableReference::base): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
        (WebCore::WHLSL::AST::IfStatement::IfStatement): Deleted.
        (WebCore::WHLSL::AST::IfStatement::conditional): Deleted.
        (WebCore::WHLSL::AST::IfStatement::body): Deleted.
        (WebCore::WHLSL::AST::IfStatement::elseBody): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        (WebCore::WHLSL::AST::IndexExpression::IndexExpression): Deleted.
        (WebCore::WHLSL::AST::IndexExpression::indexExpression): Deleted.
        (WebCore::WHLSL::AST::IndexExpression::takeIndex): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        (WebCore::WHLSL::AST::IntegerLiteral::IntegerLiteral): Deleted.
        (WebCore::WHLSL::AST::IntegerLiteral::type): Deleted.
        (WebCore::WHLSL::AST::IntegerLiteral::value const): Deleted.
        (WebCore::WHLSL::AST::IntegerLiteral::clone const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        (WebCore::WHLSL::AST::IntegerLiteralType::value const): Deleted.
        (WebCore::WHLSL::AST::IntegerLiteralType::preferredType): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
        (WebCore::WHLSL::AST::LogicalExpression::LogicalExpression): Deleted.
        (WebCore::WHLSL::AST::LogicalExpression::type const): Deleted.
        (WebCore::WHLSL::AST::LogicalExpression::left): Deleted.
        (WebCore::WHLSL::AST::LogicalExpression::right): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
        (WebCore::WHLSL::AST::LogicalNotExpression::LogicalNotExpression): Deleted.
        (WebCore::WHLSL::AST::LogicalNotExpression::operand): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression): Deleted.
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::leftValue): Deleted.
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression): Deleted.
        (WebCore::WHLSL::AST::MakePointerExpression::leftValue): Deleted.
        (WebCore::WHLSL::AST::MakePointerExpression::mightEscape const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        (WebCore::WHLSL::AST::NamedType::NamedType):
        (WebCore::WHLSL::AST::NamedType::unifyNodeImpl):
        (): Deleted.
        (WebCore::WHLSL::AST::NamedType::isTypeDefinition const): Deleted.
        (WebCore::WHLSL::AST::NamedType::isStructureDefinition const): Deleted.
        (WebCore::WHLSL::AST::NamedType::isEnumerationDefinition const): Deleted.
        (WebCore::WHLSL::AST::NamedType::isNativeTypeDeclaration const): Deleted.
        (WebCore::WHLSL::AST::NamedType::unifyNode const): Deleted.
        (WebCore::WHLSL::AST::NamedType::unifyNode): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        (WebCore::WHLSL::AST::NativeTypeDeclaration::NativeTypeDeclaration): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::typeArguments): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isInt const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isNumber const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isFloating const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isVector const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isMatrix const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isOpaqueType const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isTexture const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isSigned const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<bool const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<int64_t const): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::iterateAllValues): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsInt): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsNumber): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsFloating): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsAtomic): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsVector): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsMatrix): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsOpaqueType): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTexture): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsSigned): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentInteger): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentUnsignedInteger): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentFloat): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setSuccessor): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromInteger): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromUnsignedInteger): Deleted.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIterateAllValues): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        (WebCore::WHLSL::AST::NullLiteral::NullLiteral): Deleted.
        (WebCore::WHLSL::AST::NullLiteral::type): Deleted.
        (WebCore::WHLSL::AST::NullLiteral::clone const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        (WebCore::WHLSL::AST::PropertyAccessExpression::PropertyAccessExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::create): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::setNewValueExpression): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::setResultExpression): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldVariableReference): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::newVariableReference): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::leftValue): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldValue): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValue): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeLeftValue): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeOldValue): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValue): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValueExpression): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeResultExpression): Deleted.
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        (WebCore::WHLSL::AST::ReferenceType::ReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
        (WebCore::WHLSL::AST::ResolvableType::ResolvableType):
        (): Deleted.
        (WebCore::WHLSL::AST::ResolvableType::isFloatLiteralType const): Deleted.
        (WebCore::WHLSL::AST::ResolvableType::isIntegerLiteralType const): Deleted.
        (WebCore::WHLSL::AST::ResolvableType::isNullLiteralType const): Deleted.
        (WebCore::WHLSL::AST::ResolvableType::isUnsignedIntegerLiteralType const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        (WebCore::WHLSL::AST::Return::Return): Deleted.
        (WebCore::WHLSL::AST::Return::value): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp: Added.
        (WebCore::WHLSL::AST::Statement::destroy):
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::Statement):
        (WebCore::WHLSL::AST::Statement::kind const):
        (WebCore::WHLSL::AST::Statement::isBlock const):
        (WebCore::WHLSL::AST::Statement::isBreak const):
        (WebCore::WHLSL::AST::Statement::isContinue const):
        (WebCore::WHLSL::AST::Statement::isDoWhileLoop const):
        (WebCore::WHLSL::AST::Statement::isEffectfulExpressionStatement const):
        (WebCore::WHLSL::AST::Statement::isFallthrough const):
        (WebCore::WHLSL::AST::Statement::isForLoop const):
        (WebCore::WHLSL::AST::Statement::isIfStatement const):
        (WebCore::WHLSL::AST::Statement::isReturn const):
        (WebCore::WHLSL::AST::Statement::isStatementList const):
        (WebCore::WHLSL::AST::Statement::isSwitchCase const):
        (WebCore::WHLSL::AST::Statement::isSwitchStatement const):
        (WebCore::WHLSL::AST::Statement::isVariableDeclarationsStatement const):
        (WebCore::WHLSL::AST::Statement::isWhileLoop const):
        (WebCore::WHLSL::AST::Statement::codeLocation const):
        (WebCore::WHLSL::AST::Statement::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
        (WebCore::WHLSL::AST::StatementList::StatementList): Deleted.
        (WebCore::WHLSL::AST::StatementList::statements): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        (WebCore::WHLSL::AST::StructureDefinition::StructureDefinition): Deleted.
        (WebCore::WHLSL::AST::StructureDefinition::structureElements): Deleted.
        (WebCore::WHLSL::AST::StructureDefinition::find): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        (WebCore::WHLSL::AST::StructureElement::StructureElement): Deleted.
        (WebCore::WHLSL::AST::StructureElement::codeLocation const): Deleted.
        (WebCore::WHLSL::AST::StructureElement::type): Deleted.
        (WebCore::WHLSL::AST::StructureElement::name): Deleted.
        (WebCore::WHLSL::AST::StructureElement::semantic): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
        (WebCore::WHLSL::AST::SwitchCase::SwitchCase): Deleted.
        (WebCore::WHLSL::AST::SwitchCase::value): Deleted.
        (WebCore::WHLSL::AST::SwitchCase::block): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
        (WebCore::WHLSL::AST::SwitchStatement::SwitchStatement): Deleted.
        (WebCore::WHLSL::AST::SwitchStatement::value): Deleted.
        (WebCore::WHLSL::AST::SwitchStatement::switchCases): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
        (WebCore::WHLSL::AST::TernaryExpression::TernaryExpression): Deleted.
        (WebCore::WHLSL::AST::TernaryExpression::predicate): Deleted.
        (WebCore::WHLSL::AST::TernaryExpression::bodyExpression): Deleted.
        (WebCore::WHLSL::AST::TernaryExpression::elseExpression): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLType.cpp: Added.
        (WebCore::WHLSL::AST::Type::destroy):
        (WebCore::WHLSL::AST::Type::unifyNode):
        (WebCore::WHLSL::AST::ResolvableType::canResolve const):
        (WebCore::WHLSL::AST::ResolvableType::conversionCost const):
        (WebCore::WHLSL::AST::UnnamedType::toString const):
        * Modules/webgpu/WHLSL/AST/WHLSLType.h:
        (WebCore::WHLSL::AST::Type::Type):
        (WebCore::WHLSL::AST::Type::kind const):
        (WebCore::WHLSL::AST::Type::isUnnamedType const):
        (WebCore::WHLSL::AST::Type::isNamedType const):
        (WebCore::WHLSL::AST::Type::isResolvableType const):
        (WebCore::WHLSL::AST::Type::isTypeReference const):
        (WebCore::WHLSL::AST::Type::isPointerType const):
        (WebCore::WHLSL::AST::Type::isArrayReferenceType const):
        (WebCore::WHLSL::AST::Type::isArrayType const):
        (WebCore::WHLSL::AST::Type::isReferenceType const):
        (WebCore::WHLSL::AST::Type::isTypeDefinition const):
        (WebCore::WHLSL::AST::Type::isStructureDefinition const):
        (WebCore::WHLSL::AST::Type::isEnumerationDefinition const):
        (WebCore::WHLSL::AST::Type::isNativeTypeDeclaration const):
        (WebCore::WHLSL::AST::Type::isFloatLiteralType const):
        (WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
        (WebCore::WHLSL::AST::Type::isNullLiteralType const):
        (WebCore::WHLSL::AST::Type::isUnsignedIntegerLiteralType const):
        (WebCore::WHLSL::AST::Type::unifyNode const):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        (WebCore::WHLSL::AST::TypeDefinition::TypeDefinition): Deleted.
        (WebCore::WHLSL::AST::TypeDefinition::type): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp:
        (WebCore::WHLSL::AST::UnnamedType::hash const):
        (WebCore::WHLSL::AST::UnnamedType::operator== const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        (WebCore::WHLSL::AST::UnnamedType::UnnamedType):
        (WebCore::WHLSL::AST::UnnamedType::unifyNodeImpl):
        (): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::kind const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::isTypeReference const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::isPointerType const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::isArrayReferenceType const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::isArrayType const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::isReferenceType const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::unifyNode const): Deleted.
        (WebCore::WHLSL::AST::UnnamedType::unifyNode): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::UnsignedIntegerLiteral): Deleted.
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::type): Deleted.
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::value const): Deleted.
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::value const): Deleted.
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::preferredType): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
        (WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement): Deleted.
        (WebCore::WHLSL::AST::VariableDeclarationsStatement::variableDeclarations): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
        (WebCore::WHLSL::AST::VariableReference::VariableReference): Deleted.
        (WebCore::WHLSL::AST::VariableReference::wrap): Deleted.
        (WebCore::WHLSL::AST::VariableReference::name): Deleted.
        (WebCore::WHLSL::AST::VariableReference::variable): Deleted.
        (WebCore::WHLSL::AST::VariableReference::setVariable): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
        (WebCore::WHLSL::AST::WhileLoop::WhileLoop): Deleted.
        (WebCore::WHLSL::AST::WhileLoop::conditional): Deleted.
        (WebCore::WHLSL::AST::WhileLoop::body): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
        (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
        (WebCore::WHLSL::Metal::parent):
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseSuffixOperator):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * workers/WorkerScriptLoader.h:

2019-08-09  Youenn Fablet  <youenn@apple.com>

        Pass a ScriptExecutionContext as input to register/unregister URLRegistry routines
        https://bugs.webkit.org/show_bug.cgi?id=200571

        Reviewed by Darin Adler.

        Passing a ScriptExecutionContext to register/unregister routines will allow
        to have session ID based handling for blobs, in particular to use session partitioned blob registries.
        No change of behavior.

        * Modules/mediasource/MediaSourceRegistry.cpp:
        (WebCore::MediaSourceRegistry::registerURL):
        (WebCore::MediaSourceRegistry::unregisterURL):
        * Modules/mediasource/MediaSourceRegistry.h:
        * fileapi/Blob.cpp:
        (WebCore::BlobURLRegistry::registerURL):
        (WebCore::BlobURLRegistry::unregisterURL):
        * html/DOMURL.cpp:
        (WebCore::DOMURL::createPublicURL):
        * html/PublicURLManager.cpp:
        (WebCore::PublicURLManager::registerURL):
        (WebCore::PublicURLManager::revoke):
        (WebCore::PublicURLManager::stop):
        * html/PublicURLManager.h:
        * html/URLRegistry.h:

2019-08-09  Alex Christensen  <achristensen@webkit.org>

        Disable CSSOM View Scrolling API for IMDb iOS app
        https://bugs.webkit.org/show_bug.cgi?id=200586
        <rdar://problem/53645833>

        Reviewed by Simon Fraser.

        They are calling scrollHeight on the HTML element and it is running new code introduced in r235806
        Disable this new feature until they update their app to use the iOS13 SDK.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isIMDb):

2019-08-09  Youenn Fablet  <youenn@apple.com>

        Remove MediaStreamRegistry
        https://bugs.webkit.org/show_bug.cgi?id=200570

        Reviewed by Eric Carlson.

        MediaStream cannot be registered as an URL by JavaScript.
        Remove MediaStreamRegistry and the 'src' loading specific handling in HTMLMediaElement.
        Implement ending of capture track by directly handling MediaStreamTrack which is more accurate.
        No change of behavior.

        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::MediaStream):
        (WebCore::MediaStream::~MediaStream):
        (WebCore::MediaStream::stop):
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamRegistry.cpp: Removed.
        * Modules/mediastream/MediaStreamRegistry.h: Removed.
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::~MediaStreamTrack):
        (WebCore::MediaStreamTrack::endCapture):
        * Modules/mediastream/MediaStreamTrack.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::stopMediaCapture):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource):

2019-08-09  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>

        [GL][GStreamer] activate wrapped shared context
        https://bugs.webkit.org/show_bug.cgi?id=196966

        Reviewed by Žan Doberšek.

        This patch consists in four parts:

        1\ When the media player is instantiated, and it is intended to
        render textures, it will create a wrapped object of the
        application's GL context, and in order to populate the wrapped
        object with the GL vtable, the context has to be current. Thus,
        this patch makes current the shared WebKit application context,
        and populate the wrapped GstGLContext by activating it and filling
        in it. Afterwards, the wrapped context is deactivated.

        2\ This patch makes GL texture use the RGBA color space, thus the
        color transformation is done in GStreamer, and no further color
        transformation is required in WebKit.

        3\ Since it is not necessary to modify behavior if the decoder is
        imxvpudecoder, its identification and label were removed.

        4\ As only RGBA is used, the old color conversions when rendering
        using Cairo (fallback) were changed to convert the RGBA, as in
        GStreamer's format, to ARGB32, as in Cairo format -which depends
        on endianness.

        No new tests because there is no behavior change.

        * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
        (WebCore::ImageGStreamer::ImageGStreamer): Only convert GStreamer
        RGBA to Cairo RGB32.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Removes
        the IMX VPU identification.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
        Intializes the wrapped GL Context.
        (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
        Removes frame's color conversion.
        (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
        Instead of parsing a string, the GstCaps are created manually, and
        it is set to appsink, rather than a filtered linking.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        Removes ImxVPU enumeration value.
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
        Adds NoConvert option to texture copier, setting an identity
        matrix.
        (WebCore::VideoTextureCopierGStreamer::updateColorConversionMatrix):
        * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Adds
        NoConvert enumeration value.

2019-08-09  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (iOS 13): united.com web forms do not respond to taps
        https://bugs.webkit.org/show_bug.cgi?id=200531

        Reviewed by Antti Koivisto and Wenson Hsieh.

        The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
        the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
        in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
        Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.

        Ignore this constant content change in ContentChangeObserver as a site specific quirk.

        In the future, we should make ContentChangeObserver observe the final location of each element
        being observed so that we can ignore content that like this which is placed outside the viewport,
        and/or far away from where the user tapped.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldIgnoreContentChange const): Added.
        * page/Quirks.h:
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):

2019-08-08  Devin Rousso  <drousso@apple.com>

        Web Inspector: Page: don't allow the domain to be disabled
        https://bugs.webkit.org/show_bug.cgi?id=200109

        Reviewed by Brian Burg.

        The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
        sense to support the ability to "disable" (as well as "enable") the agent.

        When the first frontend connects, we should treat the `PageAgent` as active and available.

        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorPageAgent::timestamp):
        (WebCore::InspectorPageAgent::enable): Deleted.
        (WebCore::InspectorPageAgent::disable): Deleted.

        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
        (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
        (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
        * inspector/agents/InspectorCSSAgent.cpp:
        (WebCore::InspectorCSSAgent::createStyleSheet):
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::highlightSelector):
        (WebCore::InspectorDOMAgent::highlightFrame):
        (WebCore::InspectorDOMAgent::buildObjectForNode):
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::setFrameIdentifier):
        * inspector/agents/page/PageNetworkAgent.cpp:
        (WebCore::PageNetworkAgent::loaderIdentifier):
        (WebCore::PageNetworkAgent::frameIdentifier):
        (WebCore::PageNetworkAgent::scriptExecutionContext):
        * inspector/agents/page/PageRuntimeAgent.cpp:
        (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
        (WebCore::PageRuntimeAgent::reportExecutionContextCreation):

        * testing/Internals.cpp:
        (WebCore::InspectorStubFrontend::InspectorStubFrontend):
        (WebCore::InspectorStubFrontend::frontendLoaded): Added.
        (WebCore::InspectorStubFrontend::closeWindow):
        (WebCore::InspectorStubFrontend::sendMessageToFrontend):
        (WebCore::InspectorStubFrontend::frontendPage): Deleted.
        Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
        messages being sent to the frontend are batched.

2019-08-08  Chris Lord  <clord@igalia.com>

        Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
        https://bugs.webkit.org/show_bug.cgi?id=200499

        Reviewed by Darin Adler.

        This patch adds a shortcut when a framebuffer isn't bound on WebGL
        canvases when retrieving ALPHA_BITS.

        No new tests, covered by existing tests.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getParameter):
        Return 0 for ALPHA_BITS if canvas has no alpha component.
        * html/canvas/WebGL2RenderingContext.cpp:
        (WebCore::WebGLRenderingContext::getParameter):
        Return 0 for ALPHA_BITS if canvas has no alpha component.

2019-08-08  Chris Dumez  <cdumez@apple.com>

        ScrollingStateNode is not ThreadSafeRefCounted but is ref'd / deref'd from several threads
        https://bugs.webkit.org/show_bug.cgi?id=200545

        Reviewed by Antti Koivisto.

        The ScrollingStateTree and its ScrollingStateNodes are being passed to the scrolling thread.
        ScrollingStateNode is not ThreadSafeRefCounted, which is potentially unsafe. Make it
        ThreadSafeRefCounted for safety in this patch given that using RefCounted here is either
        wrong or fragile.

        * page/scrolling/ScrollingStateNode.h:

2019-08-08  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Get WebKit, WebKit2, and MiniBrowser building and executing
        https://bugs.webkit.org/show_bug.cgi?id=200539
        <rdar://problem/54082550>

        Reviewed by Dean Jackson.

        * platform/graphics/win/BackingStoreBackendDirect2D.h:
        (WebCore::BackingStoreBackendDirect2D::renderTarget const):
        (WebCore::BackingStoreBackendDirect2D::surface const):
        (): Deleted.
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
        (WebCore::BackingStoreBackendDirect2DImpl::~BackingStoreBackendDirect2DImpl):
        (WebCore::BackingStoreBackendDirect2DImpl::scroll):
        (WebCore::createDirect2DImageSurfaceWithFastMalloc): Deleted.
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
        * platform/graphics/win/DIBPixelData.cpp:
        (WebCore::DIBPixelData::DIBPixelData):
        * platform/graphics/win/DIBPixelData.h:
        * platform/graphics/win/Direct2DOperations.cpp:
        (WebCore::Direct2D::fillRectWithRoundedHole):
        (WebCore::Direct2D::fillRectWithGradient):
        (WebCore::Direct2D::drawGlyphs):
        (WebCore::Direct2D::PlatformContextStateSaver::PlatformContextStateSaver): Deleted.
        (WebCore::Direct2D::PlatformContextStateSaver::~PlatformContextStateSaver): Deleted.
        (WebCore::Direct2D::PlatformContextStateSaver::save): Deleted.
        (WebCore::Direct2D::PlatformContextStateSaver::restore): Deleted.
        (WebCore::Direct2D::PlatformContextStateSaver::didSave const): Deleted.
        * platform/graphics/win/Direct2DOperations.h:
        * platform/graphics/win/Direct2DUtilities.cpp:
        (WebCore::Direct2D::bitmapSize):
        (WebCore::Direct2D::bitmapResolution):
        (WebCore::Direct2D::createWicBitmap):
        (WebCore::Direct2D::createBitmap):
        (WebCore::Direct2D::createGDIRenderTarget):
        (WebCore::Direct2D::copyRectFromOneSurfaceToAnother):
        * platform/graphics/win/Direct2DUtilities.h:
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContext::GraphicsContext):
        (WebCore::GraphicsContext::platformContext const):
        (WebCore::GraphicsContextPlatformPrivate::setAlpha):
        (WebCore::GraphicsContext::savePlatformState):
        (WebCore::GraphicsContext::restorePlatformState):
        (WebCore::GraphicsContext::releaseWindowsContext):
        (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContextPlatformPrivate::beginDraw):
        (WebCore::GraphicsContextPlatformPrivate::endDraw):
        (WebCore::GraphicsContext::beginDraw):
        (WebCore::GraphicsContext::endDraw):
        (WebCore::GraphicsContext::setCTM):
        (WebCore::GraphicsContext::isAcceleratedContext const):
        * platform/graphics/win/GraphicsContextImplDirect2D.cpp:
        (WebCore::GraphicsContextImplDirect2D::fillRect):
        (WebCore::GraphicsContextImplDirect2D::fillRectWithRoundedHole):
        (WebCore::GraphicsContextImplDirect2D::drawGlyphs):
        * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
        (WebCore::GraphicsContextPlatformPrivate::platformContext):
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::transform):
        * platform/graphics/win/PlatformContextDirect2D.cpp:
        (WebCore::PlatformContextDirect2D::beginDraw):
        (WebCore::PlatformContextDirect2D::endDraw):
        * platform/graphics/win/PlatformContextDirect2D.h:
        (WebCore::PlatformContextStateSaver::PlatformContextStateSaver):
        (WebCore::PlatformContextStateSaver::~PlatformContextStateSaver):
        (WebCore::PlatformContextStateSaver::save):
        (WebCore::PlatformContextStateSaver::restore):
        (WebCore::PlatformContextStateSaver::didSave const):

2019-08-08  Chris Dumez  <cdumez@apple.com>

        Unreviewed, address post-landing review comments for r248431.

        * Modules/indexeddb/IDBRequest.h:

2019-08-08  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [iOS] Position image information should respect the image orientation
        https://bugs.webkit.org/show_bug.cgi?id=200487

        Reviewed by Simon Fraser.

        Re-factor CachedImage::imageSizeForRenderer() into another overriding
        function which does not scale the imageSize. Therefore the new function
        returns FloatSize while the original function returns LayoutSize.

        * loader/cache/CachedImage.cpp:
        (WebCore::CachedImage::imageSizeForRenderer const):
        * loader/cache/CachedImage.h:
        * rendering/RenderElement.h:

2019-08-08  Devin Rousso  <drousso@apple.com>

        Web Inspector: rename `queryObjects` to `queryInstances` for clarity
        https://bugs.webkit.org/show_bug.cgi?id=200520

        Reviewed by Brian Burg.

        Test: inspector/console/queryInstances.html

        * inspector/CommandLineAPIModuleSource.js:
        (CommandLineAPIImpl.prototype.queryInstances): Added.
        (CommandLineAPIImpl.prototype.queryObjects):

2019-08-08  Chris Dumez  <cdumez@apple.com>

        Fix thread safety bug in AudioSourceProviderAVFObjC::prepare()
        https://bugs.webkit.org/show_bug.cgi?id=200542

        Reviewed by Jer Noble.

        Fix thread safety bug in AudioSourceProviderAVFObjC::prepare(). It calls callOnMainThread()
        from a background thread and captures makeRef(*this) in the lambda, even though |this| is a
        AudioSourceProviderAVFObjC, which subclasses RefCounted, not ThreadSafeRefCounted.

        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:

2019-08-08  Chris Dumez  <cdumez@apple.com>

        Make IDBRequest ThreadSafeRefCounted
        https://bugs.webkit.org/show_bug.cgi?id=200540

        Reviewed by Alex Christensen.

        Make IDBRequest ThreadSafeRefCounted, as it looks like it is being ref'd / deref'd
        from several threads, in IDBConnectionProxy::notifyOpenDBRequestBlocked() for
        example.

        * Modules/indexeddb/IDBRequest.h:

2019-08-08  Brady Eidson  <beidson@apple.com>

        Do not allow navigations of frames about to get replaced by the result of evaluating javascript: URLs
        <rdar://problem/53788893> and https://bugs.webkit.org/show_bug.cgi?id=198786

        Reviewed by Geoff Garen.

        Covered by API Test

        Add a "willReplaceWithResultOfExecutingJavascriptURL" flag which is respected inside FrameLoader::isNavigationAllowed

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeIfJavaScriptURL):
        * bindings/js/ScriptController.h:
        (WebCore::ScriptController::willReplaceWithResultOfExecutingJavascriptURL const):

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::isNavigationAllowed const):

2019-08-08  Rob Buis  <rbuis@igalia.com>

        Add runtime flag for lazy image loading
        https://bugs.webkit.org/show_bug.cgi?id=199794

        Reviewed by Darin Adler.

        Add loading attribute and expose it on HTMLImageElement.

        * html/HTMLAttributeNames.in:
        * html/HTMLImageElement.idl:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setLazyImageLoadingEnabled):
        (WebCore::RuntimeEnabledFeatures::lazyImageLoadingEnabled const):

2019-08-08  Miguel Gomez  <magomez@igalia.com>

        [GTK][WPE] Remove the reference to WebCore::Animation from TextureMapperAnimation
        https://bugs.webkit.org/show_bug.cgi?id=200533

        Reviewed by Žan Doberšek.

        Pass the relevant parameters to TextureMapperAnimation instead of creating a new WebCore::Animation
        inside it.

        * platform/graphics/texmap/TextureMapperAnimation.cpp:
        (WebCore::timingFunctionForAnimationValue):
        (WebCore::TextureMapperAnimation::TextureMapperAnimation):
        (WebCore::TextureMapperAnimation::apply):
        (WebCore::TextureMapperAnimation::isActive const):
        * platform/graphics/texmap/TextureMapperAnimation.h:
        (WebCore::TextureMapperAnimation::keyframes const):
        (WebCore::TextureMapperAnimation::timingFunction const):
        (WebCore::TextureMapperAnimation::animation const): Deleted.

2019-08-08  Charlie Turner  <cturner@igalia.com>

        [GTK] WebKitWebProcess crashes when viewing an HTML with a <video> element referencing unknown file
        https://bugs.webkit.org/show_bug.cgi?id=200530

        Reviewed by Xabier Rodriguez-Calvar.

        Not amenable to unit testing.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):

2019-08-07  Saam Barati  <sbarati@apple.com>

        [WHLSL] Prune unreachable stdlib functions after the Checker runs
        https://bugs.webkit.org/show_bug.cgi?id=200518

        Reviewed by Robin Morisset.

        We now prune unreachable stdlib functions after the checker runs. We must
        do this after the checker runs because that's when we resolve all remaining
        function calls. While we can't prune unreachable user code, because we must
        still report errors in it, we can prune unreachable standard library code
        because we know a priori that it has no errors. This is a 10ms end-to-end
        speedup in compute_boids.

        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp: Added.
        (WebCore::WHLSL::pruneUnreachableStandardLibraryFunctions):
        * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.h: Added.
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-08-07  Kate Cheney  <katherine_cheney@apple.com>

        Adopt non-deprecated CGColorSpace API
        https://bugs.webkit.org/show_bug.cgi?id=184358

        Reviewed by Darin Adler.

        * platform/ScreenProperties.h:
        (WebCore::ScreenData::decode):

        We changed the deprecated CGColorSpaceCreateWithICCProfile function to 
        CGColorSpaceCreateWithICCData. 
 
2019-08-07  Sam Weinig  <weinig@apple.com>

        [WHLSL] Metal code generation takes a long time uniquing UnnamedTypes
        https://bugs.webkit.org/show_bug.cgi?id=200512

        Reviewed by Saam Barati.

        Instead of using a trie for unnamed type uniquing, use the same technique used
        in SynthesizeConstructors and use a HashMap of UnnamedTypeKeys. To make this
        profitable, we also need to devirtualize the hash and equality functions on
        UnnamedType, instead using an enum + switch. While this change only devirtualizes
        the UnnamedType subtree, we should probably do it for the entire AST in a future
        change.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp: Added.
        (WebCore::WHLSL::AST::UnnamedType::hash const):
        (WebCore::WHLSL::AST::UnnamedType::operator== const):
         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        Devirtualize hash, operator== and type predicates.

        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h: Added.
        (WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey): Deleted.
        Moved UnnamedTypeKey into it's own header from WHLSLSynthesizeConstructors.cpp
        
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::kind):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isReferenceTypeNameNode const):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
        Devirtualize BaseTypeNameNode as well. In a future change, we should consider removing
        this class entirely and instead mapping directly to a parent/mangled name pair.
 
        (WebCore::WHLSL::Metal::TypeNamer::visit):
        (WebCore::WHLSL::Metal::TypeNamer::find):
        (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
        (WebCore::WHLSL::Metal::parent):
        (WebCore::WHLSL::Metal::TypeNamer::insert):
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
        (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
        (WebCore::WHLSL::Metal::findInVector): Deleted.
        (WebCore::WHLSL::Metal::find): Deleted.
        (WebCore::WHLSL::Metal::TypeNamer::emitAllUnnamedTypeDefinitions): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
        Switch from a Vector based trie to a HashMap for UnnamedType uniquing. Also
        use UnnamedType::Kind where possible with switch statements to clarify code.

        * WebCore.xcodeproj/project.pbxproj:
        Add new files.

2019-08-07  Devin Rousso  <drousso@apple.com>

        Web Inspector: Uncaught Exception: TimelineAgent already enabled
        https://bugs.webkit.org/show_bug.cgi?id=200513

        Reviewed by Joseph Pecoraro.

        Call `disable` when the last frontend disconnects, so that if Web Inspector is reopened the
        `TimelineAgent` is back to being in a disabled state.

        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):

2019-08-07  Jer Noble  <jer.noble@apple.com>

        Muted <video> elements can block display from sleeping.
        https://bugs.webkit.org/show_bug.cgi?id=200511

        Reviewed by Eric Carlson.

        Test: media/video-muted-holds-sleep-assertion.html

        Modify the shouldDisableSleep() method to take muting into account.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::shouldDisableSleep const):

2019-08-07  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Simplify and eliminate redundant work in WHLSLFunctionWriter.cpp
        https://bugs.webkit.org/show_bug.cgi?id=200460

        Reviewed by Myles Maxfield.

        2 trivial simplifications:
        - Replace FunctionDeclarationWriter by a standalone function, there was no reason to make it a subclass of Visitor
        - Avoid an exponential blow-up in the computation of reachable functions.

        I have way too much noise on my system (swings back and forth between 7 and 12ms for this phase) to measure a performance win,
        but since this patch simplifies things without adding complexity I think it is worth it.

        No new test as there is no functional change intended.

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::declareFunction):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::sharedMetalFunctions):
        (WebCore::WHLSL::Metal::metalFunctions):

2019-08-07  Saam Barati  <sbarati@apple.com>

        [WHLSL] checkRecursion, checkTextureReferences, and EscapedVariableCollector should skip stdlib functions
        https://bugs.webkit.org/show_bug.cgi?id=200510

        Reviewed by Myles C. Maxfield.

        We can skip walking the stdlib part of the AST in various semantic checking phases:
        - checkRecursion: the stdlib does not have recursion
        - checkTextureReferences: the stdlib does not have references to textures
        - EscapedVariableCollector: this is used inside preserveVariableLifetimes, and
          the stdlib never escapes any variables.
        
        This patch speeds up checkRecursion, checkTextureReferences, and preserveVariableLifetimes
        by about 1ms each, leading to a 3ms compile time speedup in compute_boids.

        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
        (WebCore::WHLSL::TextureReferencesChecker::visit):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::preserveVariableLifetimes):
        (WebCore::WHLSL::EscapedVariableCollector::escapeVariableUse): Deleted.
        (WebCore::WHLSL::EscapedVariableCollector::takeEscapedVariables): Deleted.
        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:

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

        Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region
        https://bugs.webkit.org/show_bug.cgi?id=200374
        rdar://problem/54095519

        Reviewed by Tim Horton.

        Add to InteractionInformationAtPosition a ScrollingNodeID which represents the enclosing scrolling
        node that affects the targeted element's position. We use this to find a UIScrollView in the UI process.
        
        The entrypoint to finding the enclosing scrolling node is ScrollingCoordinator::scrollableContainerNodeID(),
        which calls RenderLayerCompositor::asyncScrollableContainerNodeID() to look for a scrolling ancestor in
        the current frame, and then looks for an enclosing scrollable frame, or a scrolling ancestor in
        the enclosing frame.
        
        There's a bit of subtlety in RenderLayerCompositor::asyncScrollableContainerNodeID() because if you're asking
        for the node that scrolls the renderer, if the renderer itself has a layer and is scrollable, you want
        its enclosing scroller.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::scrollableContainerNodeID const):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::scrollableContainerNodeID const):
        * page/scrolling/ScrollingCoordinator.h:
        * rendering/RenderLayer.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::asyncScrollableContainerNodeID):
        * rendering/RenderLayerCompositor.h:

2019-08-07  Saam Barati  <sbarati@apple.com>

        [WHLSL] cache results of argumentTypeForAndOverload inside Checker
        https://bugs.webkit.org/show_bug.cgi?id=200462

        Reviewed by Robin Morisset.

        When I profiled the time we spent in the checker, it turned out that 
        argumentTypeForAndOverload is one of the most expensive functions. If
        we just cache the results of that function, we can avoid 99% of the
        duplicate allocations that function does in compute_boids. This patch
        is a ~4ms speedup in the checker on compute_boids.

        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::AndOverloadTypeKey::AndOverloadTypeKey):
        (WebCore::WHLSL::AndOverloadTypeKey::isEmptyValue const):
        (WebCore::WHLSL::AndOverloadTypeKey::isHashTableDeletedValue const):
        (WebCore::WHLSL::AndOverloadTypeKey::hash const):
        (WebCore::WHLSL::AndOverloadTypeKey::operator== const):
        (WebCore::WHLSL::AndOverloadTypeKey::Hash::hash):
        (WebCore::WHLSL::AndOverloadTypeKey::Hash::equal):
        (WebCore::WHLSL::AndOverloadTypeKey::Traits::isEmptyValue):
        (WebCore::WHLSL::Checker::argumentTypeForAndOverload):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::argumentTypeForAndOverload): Deleted.

2019-08-07  Youenn Fablet  <youenn@apple.com>

        Remove IDBDatabaseIdentifier::m_sessionID
        https://bugs.webkit.org/show_bug.cgi?id=200489

        Reviewed by Darin Adler.

        IDBDatabaseIdentifier can be created without a valid session ID.
        Its session ID is only used in NetworkProcess where it can be retrieved from the IDBServer.
        In WebProcess, session ID is also known from the IDB connection.
        Update SQLiteIDBBackingStore to store a session ID which is given from its IDBServer.
        No observable change of behavior.

        * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
        (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
        (WebCore::IDBDatabaseIdentifier::isolatedCopy const):
        * Modules/indexeddb/IDBDatabaseIdentifier.h:
        (WebCore::IDBDatabaseIdentifier::hash const):
        (WebCore::IDBDatabaseIdentifier::databaseName const):
        (WebCore::IDBDatabaseIdentifier::encode const):
        (WebCore::IDBDatabaseIdentifier::decode):
        (WebCore::IDBDatabaseIdentifier::sessionID const): Deleted.
        * Modules/indexeddb/IDBFactory.cpp:
        (WebCore::IDBFactory::openInternal):
        (WebCore::IDBFactory::deleteDatabase):
        * Modules/indexeddb/server/IDBServer.cpp:
        (WebCore::IDBServer::IDBServer::createBackingStore):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
        (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
        (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
        (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
        (WebCore::IDBServer::SQLiteIDBBackingStore::sessionID const):
        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
        (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):

2019-08-07  Chris Dumez  <cdumez@apple.com>

        Fix thread safety issue under JSHistory::visitAdditionalChildren()
        https://bugs.webkit.org/show_bug.cgi?id=200504

        Reviewed by Darin Adler.

        JSHistory::visitAdditionalChildren() is called from a GC thread and was calling
        History::cachedState() whose implementation goes deep into WebCore
        (FrameLoader / HistoryController). Among other things, it null checks m_window
        which is a WeakPtr and then later dereferences it to get the Frame object, which
        is not safe from the non-main thread.

        To address the issue, introduce a simpler cachedStateForGC() getter which is
        thread safe, and use it in JSHistory::visitAdditionalChildren().

        * bindings/js/JSHistoryCustom.cpp:
        (WebCore::JSHistory::visitAdditionalChildren):
        * page/History.h:

2019-08-07  Priyanka Agarwal  <pagarwal999@apple.com>

        Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining 
        a yellow auto-filled appearance
        https://bugs.webkit.org/show_bug.cgi?id=200037
        rdar://problem/51900961

        Reviewed by Daniel Bates.

        Tests: fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html
               fast/forms/auto-fill-button/input-strong-password-viewable.html

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::selectorText const):
        Adding CSSSelector case for new pseudo class of AutofillStrongPasswordViewable.

        * css/CSSSelector.h: Added PseudoClassAutofillStrongPasswordViewable

        * css/SelectorChecker.cpp:
        (WebCore::SelectorChecker::checkOne const): Added handling for SelectorChecker.cpp

        * css/SelectorCheckerTestFunctions.h:
        (WebCore::isAutofilledStrongPasswordViewable):
        Checking if the element is an input element and considered to be
        AutoFilled and Viewable. Returns a boolean accordingly.

        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
        Add -webkit-autofill-strong-password-viewable css class.

        * css/html.css:
        (input:-webkit-autofill, input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable):
        (input:-webkit-autofill-strong-password-viewable):
        (input:-webkit-autofill, input:-webkit-autofill-strong-password): Deleted. Updated to include viewable pseudo class.

        * cssjit/SelectorCompiler.cpp:
        (WebCore::SelectorCompiler::addPseudoClassType):
        Add case handling for PseudoClassAutofillStrongPasswordViewable.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::HTMLInputElement):
        Add boolean m_isAutoFilledAndViewable for representing if the
        input element is both AutoFilled and should be viewable.
        Don't update the viewable treatment in setValueFromRenderer() because even if the user makes edits to the input field
        the visual treatment should still be applied.

        (WebCore::HTMLInputElement::resignStrongPasswordAppearance):
        Updates boolean representing if input element is autofilled and viewable to false.

        (WebCore::HTMLInputElement::reset):
        Updates boolean representing if input element is autofilled and viewable to false.

        (WebCore::HTMLInputElement::setAutoFilledAndViewable):
        Setter function for the boolean of m_isAutoFilledAndViewable.

        * html/HTMLInputElement.h:
        (WebCore::HTMLInputElement::isAutoFilledAndViewable const):
        Creating boolean value for m_isAutoFilledAndViewable.

        * testing/Internals.cpp:
        (WebCore::Internals::setAutoFilledAndViewable): Adding for testing purposes.
        * testing/Internals.h: Adding for testing purposes.
        * testing/Internals.idl:

2019-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>

        Declarations and implementations of findCaret(Min|Max)imumOffset have inconsistent signatures
        https://bugs.webkit.org/show_bug.cgi?id=200503

        Reviewed by Darin Adler.

        No change in behavior.

        * rendering/SimpleLineLayoutFunctions.h:

        Update these function declarations to take "const RenderText&", which matches the signatures of their inline
        implementations below.

2019-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>

        Extra space inserted at start of line when inserting a newline in Mail compose
        https://bugs.webkit.org/show_bug.cgi?id=200490
        <rdar://problem/53501354>

        Reviewed by Antti Koivisto.

        This started happening after r244494, which deferred editor state computation until the next layer tree flush
        when changing selection. After inserting a paragraph, the act of computing an editor state ensured that the text
        node containing the caret drops out of simple line layout, while grabbing the characters near the selection
        (i.e., calling charactersAroundPosition). This meant that when we subsequently ask positionAfterSplit whether it
        isRenderedCharacter() at the end of the command, we are guaranteed to have line boxes, so we get a meaningful
        answer and avoid inserting an extra non-breaking space.

        However, after r244494, we defer the editor state computation until the end of the edit command; this means that
        we may not have line boxes for positionAfterSplit's text node renderer, due to remaining in simple line layout.
        In turn, this means that we end up hitting the assertion in containsRenderedCharacterOffset in debug builds; on
        release builds, we simply return false from containsRenderedCharacterOffset, which causes us to insert an extra
        space.

        To fix this, we educate RenderText::containsRenderedCharacterOffset about simple line layout.

        Test: editing/inserting/insert-paragraph-in-designmode-document.html

        * rendering/RenderText.cpp:
        (WebCore::RenderText::containsRenderedCharacterOffset const):
        (WebCore::RenderText::containsCaretOffset const):

        Changed to use SimpleLineLayout::containsOffset.

        * rendering/SimpleLineLayoutFunctions.h:
        (WebCore::SimpleLineLayout::containsOffset):

        I first contrasted the behavior of RenderTextLineBoxes::containsOffset in the cases where the OffsetType is
        CaretOffset or CharacterOffset, and found that the only interesting differences were:

        1. The caret offset type case has special handling for line breaks.
        2. Both offset types have handling for reversed text.
        3. The end offset of a line box contains a caret offset, but not a character offset.

        For the purposes of OffsetType CharacterOffset, (1) is irrelevant; furthermore, (2) is already not handled by
        logic in containsCaretOffset(). Thus, the only major difference in the CharacterOffset case should be (3), which
        we handle by only allowing the case where the given offset is equal to the very end of a text run for caret
        offsets, and not character offsets.

        (WebCore::SimpleLineLayout::containsCaretOffset): Deleted.

        Renamed to just containsOffset.

2019-08-07  Youenn Fablet  <youenn@apple.com>

        ASSERT that a sessionID is valid when encoding it
        https://bugs.webkit.org/show_bug.cgi?id=199302

        Reviewed by Darin Adler.

        For IDBValue, instead of encoding an invalid session ID, encode a boolean that tells there is no sessionID.
        For IDBRequestData, keep track of whether there is an IDBDatabaseIdentifier
        and encode/decode accordingly to not encode an invalid sessionID.
        No observable change of behavior.

        * Modules/indexeddb/IDBValue.h:
        (WebCore::IDBValue::sessionID const):
        (WebCore::IDBValue::encode const):
        (WebCore::IDBValue::decode):
        * Modules/indexeddb/shared/IDBRequestData.cpp:
        (WebCore::IDBRequestData::isolatedCopy):
        * Modules/indexeddb/shared/IDBRequestData.h:
        (WebCore::IDBRequestData::databaseIdentifier const):
        (WebCore::IDBRequestData::decode):

2019-08-07  Zalan Bujtas  <zalan@apple.com>

        [LFC] Rename FormattingContext::layoutOutOfFlowDescendants to layoutOutOfFlowContent
        https://bugs.webkit.org/show_bug.cgi?id=200502
        <rdar://problem/54032534>

        Reviewed by Antti Koivisto.

        The layoutOutOfFlowDescendants name is not entirely accurate. In a formatting context we only
        lay out the out-of-flow boxes that actually belong to the current formatting context.

        <div style="float: left">
          <div id=outer style="position: absolute">
            <div id=inner style="position: absolute"></div>
          </div>
        </div>

        The float's formatting context only lays out the outer absolutely positioned box. The inner box
        (which is also an out-of-flow descendant of the float box) is taken care of by the outer box.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const):
        (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
        (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): Deleted.
        * layout/FormattingContext.h:
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):

2019-08-07  Zalan Bujtas  <zalan@apple.com>

        [LFC] Introduce Layout::Phase class
        https://bugs.webkit.org/show_bug.cgi?id=200473
        <rdar://problem/53996061>

        Reviewed by Antti Koivisto.

        It helps to check whether we could run certain actions like layout while constructing the tree.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/LayoutState.h:
        * layout/floats/FloatingContext.cpp:
        * layout/inlineformatting/InlineLine.cpp:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesFormattingContext const):
        (WebCore::Layout::Box::containingBlock const):
        (WebCore::Layout::Box::formattingContextRoot const):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutTree):

2019-08-07  Chris Lord  <clord@igalia.com>

        context-attributes-alpha-depth-stencil-antialias fails on WPE WebKit
        https://bugs.webkit.org/show_bug.cgi?id=200434

        Reviewed by Žan Doberšek.

        This patch fixes 16-bit surfaces being used for FBOs with no
        alpha component when using the GLES implementation of GraphicsContext3D.

        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
        (WebCore::GraphicsContext3D::reshapeFBOs):
        Use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_SHORT_5_6_5 for surfaces with no alpha.

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

        [WHLSL] Make resolveFunction in Checker faster
        https://bugs.webkit.org/show_bug.cgi?id=200287

        Reviewed by Robin Morisset.

        This patch makes compute_boids faster by making function overload
        resolution faster inside the Checker. It's a ~6ms speedup in the
        checker. The main idea is to limit the number of overloads we need
        to look for by using a hash table that describes a function's type
        instead of just using a hash table keyed by a function's name.
        
        The interesting implementation detail here is we must construct entries
        in the hash table such that they still allow constants to be resolved to
        various types. This means that the key in the hash table must normalize
        the vector of types it uses to express a function's identity. The normalization
        rules are:
        - int => float
        - uint => float
        - T* => float*
        - T[] => float*
        
        The first two rules are because int constants can be matched against
        the float and uint types. The latter two rules are because the null
        literal can be matched against any pointer or any array reference
        (we pick float* arbitrarily). Even though it seems like these
        normalization rules would drastically broaden the efficacy of the hash
        table, we still see a 100x reduction in the number of overloads we must
        resolve inside compute_boids. We go from having to resolve 400,000
        overloads to just resolving 4,000.

        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::FunctionKey::FunctionKey):
        (WebCore::WHLSL::FunctionKey::isEmptyValue const):
        (WebCore::WHLSL::FunctionKey::isHashTableDeletedValue const):
        (WebCore::WHLSL::FunctionKey::hash const):
        (WebCore::WHLSL::FunctionKey::operator== const):
        (WebCore::WHLSL::FunctionKey::Hash::hash):
        (WebCore::WHLSL::FunctionKey::Hash::equal):
        (WebCore::WHLSL::FunctionKey::Traits::isEmptyValue):
        (WebCore::WHLSL::Checker::Checker):
        (WebCore::WHLSL::Checker::wrappedFloatType):
        (WebCore::WHLSL::Checker::genericPointerType):
        (WebCore::WHLSL::Checker::normalizedTypeForFunctionKey):
        (WebCore::WHLSL::Checker::resolveFunction):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::resolveFunction): Deleted.

2019-08-06  Loïc Yhuel  <loic.yhuel@softathome.com>

        Fix 32-bit Linux build after r248282
        https://bugs.webkit.org/show_bug.cgi?id=200491

        Reviewed by Youenn Fablet.

        minInterToneGapMs must be a size_t like interToneGap for std::max call.
        The other constants are updated for consistency, even if the compiler
        was able to cast them automatically.

        * Modules/mediastream/RTCDTMFSender.cpp:

2019-08-06  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r248289.
        https://bugs.webkit.org/show_bug.cgi?id=200488

        Broke internal builds (Requested by drousso on #webkit).

        Reverted changeset:

        "Web Inspector: Styles: show @supports CSS groupings"
        https://bugs.webkit.org/show_bug.cgi?id=200419
        https://trac.webkit.org/changeset/248289

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

        Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&)
        https://bugs.webkit.org/show_bug.cgi?id=200475

        Reviewed by Darin Adler.

        In the case where CFStringGetCStringPtr() succeeds in returning us a pointer
        to the CFStringRef underlying characters but it is not a common header, we
        would fall back to calling HTTPHeaderMap::set(const String&, const String&)
        which would unecessarily call findHTTPHeaderName() again to try and determine
        if it is a common header. Avoid this by introducing a new setUncommonHeader()
        private method and calling this one instead. Also got rid of some code
        duplication at the same time.

        * platform/network/HTTPHeaderMap.cpp:
        (WebCore::HTTPHeaderMap::set):
        (WebCore::HTTPHeaderMap::setUncommonHeader):
        * platform/network/HTTPHeaderMap.h:
        * platform/network/HTTPParsers.cpp:
        (WebCore::parseHTTPHeader):
        * testing/MockCDMFactory.cpp:
        (WebCore::MockCDMInstance::setServerCertificate):

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

        [WHLSL] Remove the auto initialize variables pass
        https://bugs.webkit.org/show_bug.cgi?id=200472

        Reviewed by Robin Morisset.

        From a separation of concerns perspective, it's a bit nicer to make variables
        without initializers call their default constructors as a transformation over the AST.
        This removes the need for the lowering to need to worry about such things. However,
        changing metal lowering to deal with this is trivial. It means we need to change one
        line of code in Metal code generation, and we get to remove a ~50 LOC AST pass.
        Also, in this case, it saves us from the compile time hit of having to run the
        auto initialize variables phase, which takes ~1.2ms on compute_boids.

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: Removed.
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h: Removed.
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-08-06  Sam Weinig  <weinig@apple.com>

        WHLSL Metal code generation unnecessarily does string copies by passing partial results as Strings
        https://bugs.webkit.org/show_bug.cgi?id=200471

        Reviewed by Saam Barati.

        Avoid string copies by passing a single StringBuilder all the way through Metal code
        generation and only converting to a String when passing the constructed shader to Metal
        API.
        
        Where possible, use StringView in lieu of String for temporary strings being passed to
        the StringBuilder to avoid the allocation overhead of StringImpl. 

        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::toString):
        Switch to StringView.

        * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
        (WebCore::WHLSL::AST::BuiltInSemantic::toString const):
        Switch to StringView.

        * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
        (WebCore::WHLSL::AST::toString):
        Switch to StringView.

        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        Remove unnecessary "private:".
    
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
        (WebCore::WHLSL::AST::ResourceSemantic::toString):
        Switch to StringView.

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitBuiltInsSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledInputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledOutputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitUnpack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitPack):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes): Deleted.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceSignature): Deleted.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature): Deleted.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath): Deleted.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledOutputPath): Deleted.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns): Deleted.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes): Deleted.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature): Deleted.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::unpack): Deleted.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): Deleted.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes): Deleted.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature): Deleted.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::unpack): Deleted.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): Deleted.
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::helperTypes): Deleted.
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature): Deleted.
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::unpack): Deleted.
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        Rather than have scaffolding return strings, pass in StringBuilders everywhere. 

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString):
        (WebCore::WHLSL::Metal::generateMetalFunctionsMapping):
        (WebCore::WHLSL::Metal::emitSharedMetalFunctions):
        (WebCore::WHLSL::Metal::emitMetalFunctions):
        (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter): Deleted.
        (WebCore::WHLSL::Metal::FunctionDeclarationWriter::toString): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::toString): Deleted.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString): Deleted.
        (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter): Deleted.
        (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter): Deleted.
        (WebCore::WHLSL::Metal::sharedMetalFunctions): Deleted.
        (WebCore::WHLSL::Metal::metalFunctions): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
        Rather than returning Strings from function generation functions, pass in StringBuilders everywhere.

        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
        (WebCore::WHLSL::Metal::metalCodeProlog):
        (WebCore::WHLSL::Metal::dumpMetalCodeIfNeeded):
        (WebCore::WHLSL::Metal::generateMetalCode):
        (WebCore::WHLSL::Metal::generateMetalCodeShared): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
        Switch RenderMetalCode and ComputeMetalCode to contain StringBuilders to allow
        delaying conversion to String to the latest point possible.
        
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDeclarations):
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::emitAllUnnamedTypeDefinitions):
        (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
        (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypes):
        (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter): Deleted.
        (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::toString): Deleted.
        (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::visit): Deleted.
        (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations): Deleted.
        (WebCore::WHLSL::Metal::TypeNamer::metalTypeDefinitions): Deleted.
        (WebCore::WHLSL::Metal::TypeNamer::metalTypes): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
        Rather than returning Strings from function generation functions, pass in StringBuilders everywhere.

        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseResourceSemantic):
        Remove use of _str, which allocates a String, and just use a StringView directly.

        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        Switch RenderPrepareResult and ComputePrepareResult to contain StringBuilders to allow
        delaying conversion to String to the latest point possible.

        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetFunctions):
        Convert StringBuilders to String at the last moment necessary. Adds a FIXME to improve
        in the future by adding direct conversion from StringBuilder to NSString to avoid another
        copy.

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

        [WHLSL] Reduce the number of variables that make it into the global struct by skipping stdlib functions and internal uses of MakePointerExpression/MakeArrayReference
        https://bugs.webkit.org/show_bug.cgi?id=200463

        Reviewed by Myles C. Maxfield.

        This patch makes it so that we put fewer variables in the global struct.
        This decreases end-to-end running time in compute_boids by 30% (with p = 0.0001).
        
        We achieve this in two ways:
        1. We track if each function is user code or "standard library" code. We also
        count native functions as the standard library. We know a priori that the
        standard library never escapes any variables. So the preserve variable
        lifetimes phase skips analyzing all standard library functions and also
        skips passing the global struct to any standard library functions.
        
        2. We internally emit MakePointerExpression/MakeArrayReferenceExpression nodes in
        the compiler in various phases. We sometimes emit these nodes in such a way
        that we know that this address-of expression does not cause the variable to
        escape. We now mark each address-of expressions as either:
        - Conservatively escaping. We conservatively do this for all user code.
        - Not escaping. This means that this address-of operation definitely does
        not escape the variable. If a variable never has an escaping use, we will
        omit putting this variable in the struct.

        * Modules/webgpu/WHLSL/AST/WHLSLAddressEscapeMode.h: Added.
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
        (WebCore::WHLSL::AST::FunctionDeclaration::parsingMode const):
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression):
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const):
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression):
        (WebCore::WHLSL::AST::MakePointerExpression::mightEscape const):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLParsingMode.h: Added.
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        (WebCore::WHLSL::includeStandardLibrary):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):
        * WebCore.xcodeproj/project.pbxproj:

2019-08-06  Jer Noble  <jer.noble@apple.com>

        Adopt -expectMinimumUpcomingSampleBufferPresentationTime:
        https://bugs.webkit.org/show_bug.cgi?id=200457
        <rdar://problem/53961130>

        Reviewed by Eric Carlson.

        Test: media/media-source/media-source-minimumupcomingpresentationtime.html

        Adopt a new API vended by AVSampleBufferDisplayLayer, piped from SourceBuffer down
        through SourceBufferPrivate to SourceBufferPrivateAVFObjC. This value should be
        reset and updated when new samples are appended.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
        (WebCore::SourceBuffer::provideMediaData):
        (WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime):
        (WebCore::SourceBuffer::resetMinimumUpcomingPresentationTime):
        (WebCore::SourceBuffer::minimumUpcomingPresentationTimeForTrackID):
        (WebCore::SourceBuffer::setMaximumQueueDepthForTrackID):
        * Modules/mediasource/SourceBuffer.h:
        * platform/graphics/SourceBufferPrivate.h:
        (WebCore::SourceBufferPrivate::canSetMinimumUpcomingPresentationTime const):
        (WebCore::SourceBufferPrivate::setMinimumUpcomingPresentationTime):
        (WebCore::SourceBufferPrivate::clearMinimumUpcomingPresentationTime):
        (WebCore::SourceBufferPrivate::enqueuedSamplesForTrackID):
        (WebCore::SourceBufferPrivate::minimumUpcomingPresentationTimeForTrackID):
        (WebCore::SourceBufferPrivate::setMaximumQueueDepthForTrackID):
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
        (WebCore::SourceBufferPrivateAVFObjC::setMinimumUpcomingPresentationTime):
        (WebCore::SourceBufferPrivateAVFObjC::clearMinimumUpcomingPresentationTime):
        * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
        (WebCore::MockSourceBufferPrivate::minimumUpcomingPresentationTimeForTrackID):
        (WebCore::MockSourceBufferPrivate::setMaximumQueueDepthForTrackID):
        (WebCore::MockSourceBufferPrivate::canSetMinimumUpcomingPresentationTime const):
        (WebCore::MockSourceBufferPrivate::setMinimumUpcomingPresentationTime):
        (WebCore::MockSourceBufferPrivate::clearMinimumUpcomingPresentationTime):
        * platform/mock/mediasource/MockSourceBufferPrivate.h:
        * testing/Internals.cpp:
        (WebCore::Internals::minimumUpcomingPresentationTimeForTrackID):
        (WebCore::Internals::setMaximumQueueDepthForTrackID):
        * testing/Internals.h:
        * testing/Internals.idl:

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

        Add release assert against InvalidationRuleSet mutation during invalidation
        https://bugs.webkit.org/show_bug.cgi?id=200467

        Reviewed by Chris Dumez.

        Try to get a more informative stack for rdar://problem/53413013

        * css/DocumentRuleSets.cpp:
        (WebCore::DocumentRuleSets::~DocumentRuleSets):
        (WebCore::DocumentRuleSets::collectFeatures const):
        * css/DocumentRuleSets.h:
        * style/AttributeChangeInvalidation.cpp:
        (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
        * style/ClassChangeInvalidation.cpp:
        (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):

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

        REGRESSION: Cannot tap on any buttons on m.naver.com home screen on iPad
        https://bugs.webkit.org/show_bug.cgi?id=200466

        Reviewed by Zalan Bujtas.

        The page calls preventDefault() for a mouse event generated by a site specific quirk.

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

        Disable the quirk for the "m." subdomain. This is a mobile site that don't need or expect them.

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

        [iPadOS] Unable to increase zoom level on Google using the Aa menu
        https://bugs.webkit.org/show_bug.cgi?id=200453
        <rdar://problem/52278579>

        Reviewed by Tim Horton.

        Makes a couple of minor adjustments to how layout size scale factor is handled in ViewportConfiguration, to
        address some scenarios in which adjusting WKWebView's _viewScale does not have any apparent effect on the page.
        See changes below for more detail.

        Tests: fast/viewport/ios/non-responsive-viewport-after-changing-view-scale.html
               fast/viewport/ios/responsive-viewport-with-minimum-width-after-changing-view-scale.html

        * page/ViewportConfiguration.cpp:
        (WebCore::ViewportConfiguration::initialScaleFromSize const):

        When the page is either zoomed in or zoomed out using _viewScale, let the specified initial scale take
        precedence over the scale computed by fitting the content width to the view width, or the scale computed by
        fitting the content height to the view height.

        This avoids a scenario in which nothing happens when increasing view scale in a responsively designed web page
        that has a fixed minimum width. Before this change, when computing the initial scale at a view scale that would
        not allow the entire content width of the page to fit within the viewport, the new initial scale would remain
        unchanged if the initial scale in the meta viewport is not also set to 1, because a new initial scale would be
        computed in ViewportConfiguration::initialScaleFromSize to accomodate for the entire content width.

        Our new behavior allows us to zoom into the page, even if doing so would cause horizontal scrolling.

        (WebCore::ViewportConfiguration::updateConfiguration):

        When the page is either zoomed in or zoomed out using _viewScale and the default viewport configuration has a
        fixed width (e.g. on iPhone), then adjust the width of the default viewport configuration to account for the
        _viewScale. For example, the default width of a viewport-less web page is 980px on iPhone; at a view scale of 2,
        this would become 490px instead, and at 0.5 view scale, it would become 1960px.

        This ensures that on iPhone, for web pages without a meta viewport, changing the view scale still changes the
        layout and initial scale of the web page.

        * page/ViewportConfiguration.h:
        (WebCore::ViewportConfiguration::layoutSizeIsExplicitlyScaled const):

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

        [LFC] Remove out-of-flow descendants from Container
        https://bugs.webkit.org/show_bug.cgi?id=200430
        <rdar://problem/53923980>

        Reviewed by Antti Koivisto.

        The out-of-flow descendant list is the last "formatting context type" bit in the layout tree.
        Let's cached them in the FormattingStates instead for now. 

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
        * layout/FormattingContext.h:
        * layout/FormattingState.h:
        (WebCore::Layout::FormattingState::addOutOfFlowBox):
        (WebCore::Layout::FormattingState::outOfFlowBoxes const):
        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
        (WebCore::Layout::LayoutState::run):
        * layout/LayoutState.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutContainer.cpp:
        (WebCore::Layout::Container::addOutOfFlowDescendant): Deleted.
        * layout/layouttree/LayoutContainer.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutTree):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        Web Inspector: Styles: show @supports CSS groupings
        https://bugs.webkit.org/show_bug.cgi?id=200419

        Reviewed by Joseph Pecoraro.

        Test: inspector/css/getMatchedStylesForNode.html

        * inspector/InspectorStyleSheet.cpp:
        (WebCore::buildArrayForGroupings): Added.
        (WebCore::InspectorStyleSheet::buildObjectForRule):
        (WebCore::buildMediaObject): Deleted.
        (WebCore::fillMediaListChain): Deleted.

        * css/MediaList.h:
        * css/MediaList.cpp:
        (WebCore::MediaQuerySet::MediaQuerySet):
        Remove the `lastLine` as it was never set by anyone and wasn't used by Web Inspector.

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

        Make Logger::log thread safe so that it can be used from background threads
        https://bugs.webkit.org/show_bug.cgi?id=200448

        Reviewed by Eric Carlson.

        No change of behavior.

        * dom/Document.cpp:
        (WebCore::crossThreadCopy):
        (WebCore::Document::didLogMessage):
        Make sure to hop to the main thread if needed.
        * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
        (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
        Remove hopping to the main thread.
        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
        (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):
        Remove hopping to the main thread.

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

        Can't use $0, $1 etc when inspecting Google Docs pages because the content uses these for function names
        https://bugs.webkit.org/show_bug.cgi?id=195834

        Reviewed by Joseph Pecoraro.

        Allow the user to alias saved results by providing a different prefix (e.g. "$") from within
        Web Inspector. When changing the alias, all existing saved results will update to be
        reference-able from the new alias.

        Test: inspector/runtime/setSavedResultAlias.html

        * inspector/CommandLineAPIModuleSource.js:
        (CommandLineAPI):

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

        Web Inspector: Timelines: disable related agents when the tab is closed
        https://bugs.webkit.org/show_bug.cgi?id=200118

        Reviewed by Joseph Pecoraro.

        Rework how `enable`/`disable` is used for timeline-related agents so that events are not sent
        and data isn't kept alive when the Timelines tab isn't enabled.

        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorTimelineAgent::enable):
        (WebCore::InspectorTimelineAgent::disable):
        (WebCore::InspectorTimelineAgent::start):
        (WebCore::InspectorTimelineAgent::stop):
        (WebCore::InspectorTimelineAgent::internalStart):
        (WebCore::InspectorTimelineAgent::internalStop):
        (WebCore::InspectorTimelineAgent::startFromConsole):
        (WebCore::InspectorTimelineAgent::stopFromConsole):
        (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
        (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
        (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
        Rename `m_enabled*` to `m_tracking*` to match other timeline-related agents.

        * inspector/agents/InspectorMemoryAgent.h:
        * inspector/agents/InspectorMemoryAgent.cpp:
        (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
        (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorMemoryAgent::enable):
        (WebCore::InspectorMemoryAgent::disable):
        (WebCore::InspectorMemoryAgent::didHandleMemoryPressure):

        * inspector/InstrumentingAgents.h:
        (WebCore::InstrumentingAgents::trackingInspectorTimelineAgent): Added.
        (WebCore::InstrumentingAgents::setTrackingInspectorTimelineAgent): Added.
        (WebCore::InstrumentingAgents::persistentInspectorTimelineAgent): Added.
        (WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent): Added.
        * inspector/InstrumentingAgents.cpp:
        (WebCore::InstrumentingAgents::reset):
        * inspector/InspectorInstrumentation.h:
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::didInstallTimerImpl):
        (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
        (WebCore::InspectorInstrumentation::willCallFunctionImpl):
        (WebCore::InspectorInstrumentation::willDispatchEventImpl):
        (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
        (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
        (WebCore::InspectorInstrumentation::willFireTimerImpl):
        (WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
        (WebCore::InspectorInstrumentation::willLayoutImpl):
        (WebCore::InspectorInstrumentation::willCompositeImpl):
        (WebCore::InspectorInstrumentation::didCompositeImpl):
        (WebCore::InspectorInstrumentation::willPaintImpl):
        (WebCore::InspectorInstrumentation::didPaintImpl):
        (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
        (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
        (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
        (WebCore::InspectorInstrumentation::startProfilingImpl):
        (WebCore::InspectorInstrumentation::stopProfilingImpl):
        (WebCore::InspectorInstrumentation::timelineAgentTracking): Added.
        (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
        (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
        (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
        (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
        * bindings/js/JSExecStateInstrumentation.h:
        (WebCore::JSExecState::instrumentFunctionInternal):
        Rename for clarity/correctness:
         - `inspectorTimelineAgent` => `trackingInspectorTimelineAgent`
         - `persistentInspectorTimelineAgent` => `inspectorTimelineAgent`

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

        [Win] Specifying huge font-size causes crashing
        https://bugs.webkit.org/show_bug.cgi?id=200340

        Reviewed by Don Olmstead.

        Covered by existing tests.

        * platform/graphics/win/FontPlatformDataWin.cpp:
        (WebCore::FontPlatformData::FontPlatformData): Use GetTextFace to
        get font face names instead of GetOutlineTextMetrics which returns
        null for huge size fonts.

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

        Response constructor doesn't throw on disturbed ReadableStream
        https://bugs.webkit.org/show_bug.cgi?id=200130
        <rdar://problem/53550351>

        Reviewed by Alex Christensen.

        Make FetchBody::extract return an exception in error cases.
        Update call sites accordingly.
        Add the error case as per https://fetch.spec.whatwg.org/#concept-bodyinit-extract, ReadableStream handling.

        Covered by updated and rebased tests.

        * Modules/beacon/NavigatorBeacon.cpp:
        (WebCore::NavigatorBeacon::sendBeacon):
        * Modules/fetch/FetchBody.cpp:
        (WebCore::FetchBody::extract):
        * Modules/fetch/FetchBody.h:
        * Modules/fetch/FetchBodyOwner.cpp:
        (WebCore::FetchBodyOwner::extractBody):
        * Modules/fetch/FetchBodyOwner.h:
        * Modules/fetch/FetchRequest.cpp:
        (WebCore::FetchRequest::initializeWith):
        (WebCore::FetchRequest::setBody):
        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::create):
        * Modules/streams/ReadableStreamInternals.js:
        (readableStreamPipeTo): fix a case where the promise would be unhandled and would show up in
        unhandledrejectionhandler.

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

        Support RTCRtpSender.dtmf
        https://bugs.webkit.org/show_bug.cgi?id=200431

        Reviewed by Eric Carlson.

        Add a new backend interface to RTCDTMFSender and implementation of it using libwebrtc.
        Update RTCDTMFSender to use that new backend and make RTCRtpSender return a RTCDTMFSender
        conditionally on a newly added runtime flag.
        Update RTCDTMFSender implementation based on https://w3c.github.io/webrtc-pc/#peer-to-peer-dtmf.

        Covered by rebased tests.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::context const):
        (WebCore::PeerConnectionBackend::transceiverFromSender):
        * Modules/mediastream/PeerConnectionBackend.h:
        * Modules/mediastream/RTCDTMFSender.cpp:
        (WebCore::RTCDTMFSender::RTCDTMFSender):
        (WebCore::RTCDTMFSender::canInsertDTMF const):
        (WebCore::RTCDTMFSender::toneBuffer const):
        (WebCore::isToneCharacterInvalid):
        (WebCore::RTCDTMFSender::insertDTMF):
        (WebCore::RTCDTMFSender::playNextTone):
        (WebCore::RTCDTMFSender::onTonePlayed):
        (WebCore::RTCDTMFSender::toneTimerFired):
        (WebCore::RTCDTMFSender::stop):
        (WebCore::RTCDTMFSender::activeDOMObjectName const):
        (WebCore::RTCDTMFSender::canSuspendForDocumentSuspension const):
        * Modules/mediastream/RTCDTMFSender.h:
        * Modules/mediastream/RTCDTMFSender.idl:
        * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
        * Modules/mediastream/RTCDTMFToneChangeEvent.h:
        * Modules/mediastream/RTCDTMFToneChangeEvent.idl:
        * Modules/mediastream/RTCRtpSender.cpp:
        (WebCore::RTCRtpSender::dtmf):
        (WebCore::RTCRtpSender::currentTransceiverDirection const):
        * Modules/mediastream/RTCRtpSender.h:
        * Modules/mediastream/RTCRtpSender.idl:
        * Modules/mediastream/RTCRtpSenderBackend.h:
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
        (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend):
        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/EventNames.in:
        * dom/EventTargetFactory.in:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::webRTCDTMFEnabled const):
        (WebCore::RuntimeEnabledFeatures::setWebRTCDTMFEnabled):
        * platform/mediastream/RTCDTMFSenderBackend.h: Added.
        * platform/mediastream/RTCDTMFSenderHandler.h: Removed.
        * platform/mediastream/RTCDTMFSenderHandlerClient.h: Removed.
        * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp: Added.
        (WebCore::toWTFString):
        (WebCore::LibWebRTCDTMFSenderBackend::LibWebRTCDTMFSenderBackend):
        (WebCore::LibWebRTCDTMFSenderBackend::~LibWebRTCDTMFSenderBackend):
        (WebCore::LibWebRTCDTMFSenderBackend::canInsertDTMF):
        (WebCore::LibWebRTCDTMFSenderBackend::playTone):
        (WebCore::LibWebRTCDTMFSenderBackend::tones const):
        (WebCore::LibWebRTCDTMFSenderBackend::duration const):
        (WebCore::LibWebRTCDTMFSenderBackend::interToneGap const):
        (WebCore::LibWebRTCDTMFSenderBackend::OnToneChange):
        (WebCore::LibWebRTCDTMFSenderBackend::onTonePlayed):
        * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h: Added.

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

        [WHLSL] Inline all native function calls
        https://bugs.webkit.org/show_bug.cgi?id=200350

        Reviewed by Robin Morisset.

        Native functions calls tend to be really small. If we inline in the generated
        Metal code, we end up with faster Metal compile times. On compute_boids, this
        provides a ~10ms improvement.

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::sharedMetalFunctions):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::inlineNativeFunction):
        (WebCore::WHLSL::Metal::writeNativeFunction): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:

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

        RealtimeOutgoingAudioSource::pullAudioData is no longer needed
        https://bugs.webkit.org/show_bug.cgi?id=200450

        Reviewed by Geoffrey Garen.

        No change of behavior, removing base class method declaration.

        * platform/mediastream/RealtimeOutgoingAudioSource.h:
        (WebCore::RealtimeOutgoingAudioSource::pullAudioData): Deleted.
        * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h:
        * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:

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

        [WHLSL] Add compile time flag to dump metal compile times
        https://bugs.webkit.org/show_bug.cgi?id=200447

        Reviewed by Myles C. Maxfield.

        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetFunctions):

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

        navigator.geolocation wrapper should not become GC-collectable once its frame is detached
        https://bugs.webkit.org/show_bug.cgi?id=200436

        Reviewed by Darin Adler.

        navigator.geolocation wrapper should not become GC-collectable once its frame is detached, given
        that it can outlive the frame. Instead, tie the navigator.geolocation wrapper's lifetime to its
        Navigator's.

        Test: fast/dom/navigator-property-gc-after-frame-detach.html

        * Modules/geolocation/Geolocation.cpp:
        (WebCore::Geolocation::create):
        (WebCore::Geolocation::Geolocation):
        (WebCore::Geolocation::navigator):
        (WebCore::Geolocation::frame const):
        * Modules/geolocation/Geolocation.h:
        * Modules/geolocation/Geolocation.idl:
        * Modules/geolocation/NavigatorGeolocation.cpp:
        (WebCore::NavigatorGeolocation::NavigatorGeolocation):
        (WebCore::NavigatorGeolocation::from):
        (WebCore::NavigatorGeolocation::geolocation):
        (WebCore::NavigatorGeolocation::geolocation const):
        * Modules/geolocation/NavigatorGeolocation.h:
        * bindings/js/JSNavigatorCustom.cpp:
        (WebCore::JSNavigator::visitAdditionalChildren):
        * bindings/js/JSWorkerNavigatorCustom.cpp:
        (WebCore::JSWorkerNavigator::visitAdditionalChildren):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/IDLAttributes.json:
        * page/Navigator.cpp:
        (WebCore::Navigator::plugins):
        (WebCore::Navigator::mimeTypes):
        * page/NavigatorBase.h:
        * plugins/DOMMimeTypeArray.cpp:
        (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
        * plugins/DOMMimeTypeArray.h:
        * plugins/DOMMimeTypeArray.idl:
        * plugins/DOMPluginArray.cpp:
        (WebCore::DOMPluginArray::DOMPluginArray):
        * plugins/DOMPluginArray.h:
        * plugins/DOMPluginArray.idl:
        * workers/service/ServiceWorkerContainer.h:
        * workers/service/ServiceWorkerContainer.idl:

2019-08-05  Andy Estes  <aestes@apple.com>

        [WebIDL] Support partial dictionaries and conditional dictionary members
        https://bugs.webkit.org/show_bug.cgi?id=200441

        Reviewed by Alex Christensen.

        Added new bindings tests.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateDictionaryImplementationContent):
        * bindings/scripts/IDLParser.pm:
        (parsePartialDefinition):
        (parsePartialInterface): Deleted.
        (parsePartialDictionary): Deleted.
        * bindings/scripts/generate-bindings.pl:
        (generateBindings):
        * bindings/scripts/preprocess-idls.pl:
        (getPartialNamesFromIDL):
        (getPartialInterfaceNameFromIDL): Deleted.
        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
        (WebCore::convertDictionary<TestEventConstructor::Init>):
        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
        (WebCore::convertDictionary<DictionaryImplName>):
        (WebCore::convertDictionaryToJS):
        * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
        * bindings/scripts/test/TestStandaloneDictionary.idl:
        * bindings/scripts/test/TestSupplemental.idl:

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

        Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
        https://bugs.webkit.org/show_bug.cgi?id=200422

        Reviewed by Joseph Pecoraro.

        No observable change in functionality.

        * inspector/agents/InspectorPageAgent.h:
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::resourceTypeJSON):
        (WebCore::InspectorPageAgent::inspectorResourceType):

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

        [Curl] implement CertificateInfo::summaryInfo
        https://bugs.webkit.org/show_bug.cgi?id=191498

        Reviewed by Alex Christensen.

        Implement CertificaeInfo::SummaryInfo.
        This patch makes WebInspector show summary of certificates.

        Tests: http/tests/inspector/network/resource-security-certificate.html
               http/tests/inspector/network/getSerializedCertificate.html

        * platform/Curl.cmake:
        * platform/network/curl/CertificateInfo.h:
        (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
        (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
        (WebCore::CertificateInfo::summaryInfo const): Deleted.
        * platform/network/curl/CertificateInfoCurl.cpp:
        (WebCore::CertificateInfo::summaryInfo const):
        * platform/network/curl/CurlSSLVerifier.cpp:
        (WebCore::CurlSSLVerifier::collectInfo):
        (WebCore::CurlSSLVerifier::verifyCallback):
        (WebCore::StackOfX509::StackOfX509): Deleted.
        (WebCore::StackOfX509::~StackOfX509): Deleted.
        (WebCore::StackOfX509::count): Deleted.
        (WebCore::StackOfX509::item): Deleted.
        (): Deleted.
        (WebCore::BIOHolder::BIOHolder): Deleted.
        (WebCore::BIOHolder::~BIOHolder): Deleted.
        (WebCore::BIOHolder::write): Deleted.
        (WebCore::BIOHolder::asCertificate): Deleted.
        (WebCore::pemDataFromCtx): Deleted.
        * platform/network/curl/CurlSSLVerifier.h:
        * platform/network/curl/OpenSSLHelper.cpp: Added.
        (OpenSSL::deleter<X509>::operator()):
        (OpenSSL::StackOfGeneralName::StackOfGeneralName):
        (OpenSSL::StackOfGeneralName::~StackOfGeneralName):
        (OpenSSL::StackOfGeneralName::operator bool):
        (OpenSSL::StackOfGeneralName::count):
        (OpenSSL::StackOfGeneralName::item):
        (OpenSSL::StackOfX509::StackOfX509):
        (OpenSSL::StackOfX509::~StackOfX509):
        (OpenSSL::StackOfX509::count):
        (OpenSSL::StackOfX509::item):
        (OpenSSL::BIO::BIO):
        (OpenSSL::BIO::~BIO):
        (OpenSSL::BIO::getDataAsVector const):
        (OpenSSL::BIO::getDataAsString const):
        (OpenSSL::BIO::readX509):
        (OpenSSL::BIO::get):
        (OpenSSL::pemDataFromCtx):
        (OpenSSL::createCertificateInfo):
        (OpenSSL::toString):
        (OpenSSL::getCommonName):
        (OpenSSL::getSubjectName):
        (OpenSSL::convertASN1TimeToSeconds):
        (OpenSSL::getSubjectAltName):
        (OpenSSL::createSummaryInfo):
        * platform/network/curl/OpenSSLHelper.h: Copied from Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp.

2019-08-04  Youenn Fablet  <youenn@apple.com>

        WebRTC: got incorrect `this` in negotiationneeded event
        https://bugs.webkit.org/show_bug.cgi?id=200427

        Reviewed by Darin Adler.

        Make sure a dom object created through a JS built-in constructor is added to the wrapper cache.

        Test: webrtc/onnegotiationneeded.html

        * bindings/js/JSDOMBuiltinConstructor.h:
        (WebCore::createJSObjectFromWrapper):
        (WebCore::createJSObject):

2019-08-04  Sam Weinig  <weinig@apple.com>

        Mangled WHLSL names don't need to allocate Strings
        https://bugs.webkit.org/show_bug.cgi?id=200429

        Reviewed by Saam Barati.

        To avoid allocating strings for each mangled name used to transform WHLSL to Metal, which we'd
        like to avoid since it is both unnecessarily expensive in time and space, we can instead just
        store the unique integer identifier that was being used to construct the String. 
        
        Since the existing mangled names were all of the form "prefix" + unsigned integer value (where 
        prefix could be "type", "enumerationMember", "structureElement", "variable" or "function") we
        strongly type the integer by storing it in a struct (MangledVariableName, MangledTypeName, etc.)
        When the full name is actually needed, StringTypeAdapter's specialized for the structs are
        used to write directly into the preallocated buffers of StringBuilders or makeString().

        * Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h: Added.
        (WebCore::WHLSL::Metal::MangledVariableName):
        (WebCore::WHLSL::Metal::MangledTypeName):
        (WebCore::WHLSL::Metal::MangledStructureElementName):
        (WebCore::WHLSL::Metal::MangledEnumerationMemberName):
        (WebCore::WHLSL::Metal::MangledFunctionName):
        Adds structs for each type of mangled name and StringTypeAdapter specializations for
        each to allow their use in StringBuilder.flexibleAppend() or makeString(). 
        
        Additionally, a Variant, MangledOrNativeTypeName, of MangledTypeName and String is 
        declared to allow for the few cases where a native type (e.g. float4) is needed. The
        StringTypeAdapter for MangledOrNativeTypeName could be generalized for any Variant
        in the future, but I left it non-general for now, as it is non-obvious if one would
        want to store Variant<Types...>, and have each member function construct a temporary
        StringTypeAdapter, or store a Variant<StringTypeAdapter<Types>...> and perform conversion
        in the construction.

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding):
        (WebCore::WHLSL::Metal::internalTypeForSemantic):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::FragmentEntryPointScaffolding):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::ComputeEntryPointScaffolding):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack):
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::parameterVariables):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter):
        (WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::generateNextVariableName):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding):
        (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding):
        (WebCore::WHLSL::Metal::sharedMetalFunctions):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
        (WebCore::WHLSL::Metal::BaseTypeNameNode::mangledName const):
        (WebCore::WHLSL::Metal::ArrayTypeNameNode::ArrayTypeNameNode):
        (WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::ArrayReferenceTypeNameNode):
        (WebCore::WHLSL::Metal::PointerTypeNameNode::PointerTypeNameNode):
        (WebCore::WHLSL::Metal::ReferenceTypeNameNode::ReferenceTypeNameNode):
        (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter):
        (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations):
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
        (WebCore::WHLSL::Metal::TypeNamer::mangledNameForEnumerationMember):
        (WebCore::WHLSL::Metal::TypeNamer::mangledNameForStructureElement):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
        (WebCore::WHLSL::Metal::TypeNamer::generateNextTypeName):
        (WebCore::WHLSL::Metal::TypeNamer::generateNextStructureElementName):
        (WebCore::WHLSL::Metal::TypeNamer::generateNextEnumerationMemberName):
        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        Replace uses of String with the appropriate mangled name type.

        * WebCore.xcodeproj/project.pbxproj:
        Add WHLSLMangledNames.h

        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetFunctions):
        Convert the mangled names to Strings for passing to Metal API. NOTE: We could avoid having the
        toString() member function on MangledFunctionName if we allowed makeString() to take a single
        argument.

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

        Ping loads should not prevent page caching
        https://bugs.webkit.org/show_bug.cgi?id=200418
        <rdar://problem/53901632>

        Reviewed by Darin Adler.

        We normally prevent page caching if there were any pending subresource loads when navigating,
        to avoid caching partial / broken content. However, this should not apply to Ping / Beacon
        loads since those do not impact page rendering and can outlive the page.

        Tests: http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
               http/tests/navigation/page-cache-pending-ping-load-same-origin.html

        * history/PageCache.cpp:
        (WebCore::PageCache::addIfCacheable):
        After we've fired the 'pagehide' event in each frame, stop all the loads again. This is needed
        since pages are allowed to start ping / beacon loads in their 'pagehide' handlers. If we do not
        stop those loads, then the next call to canCachePage() would fail because the DocumentLoader is
        still loading. Note that we're not actually preventing these ping loads from hitting the server
        since we never cancel page loads and those can outlive their page.

        * loader/DocumentLoader.cpp:
        (WebCore::shouldPendingCachedResourceLoadPreventPageCache):
        (WebCore::areAllLoadersPageCacheAcceptable):
        Make sure that Ping / Beacon / Prefetches / Icon loads do not prevent page caching.

        (WebCore::DocumentLoader::addSubresourceLoader):
        Tweak assertion that was incorrect since we actually allow ping / beacon loads when the
        document is about to enter PageCache (while firing pagehide event).

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

        [LFC][TFC] Create formatting context/state.
        https://bugs.webkit.org/show_bug.cgi?id=200428
        <rdar://problem/53913625>

        Reviewed by Antti Koivisto.

        * layout/LayoutState.cpp:
        (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
        (WebCore::Layout::LayoutState::createFormattingContext):

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

        [LFC] Cleanup preferred width computation
        https://bugs.webkit.org/show_bug.cgi?id=200426
        <rdar://problem/53912607>

        Reviewed by Antti Koivisto.

        The intrinsic width for a formatting root box has 2 sets of values now. One set(min/max) is stored in the established formatting context's state
        while the other is in the formatting context's state where the box lives.

        <div style="position: absolute"><div style="float: left; border: 1px solid green">foobar</div></div>

        The float box participates in the formatting context established by the absolutely position box, but it also establishes an inline formatting context.
        The min/max width pair in the established context is the width of the "foobar" (same value for min/max). This set is stored in the inline formatting state.
        However the float box has horizontal border so the "final" min/max width pair is expanded by this border value and stored in the formatting state where
        the box lives (which is different from the one it establishes).

        This and the "remove the formatting context type classes from the tree" changes open up interesting optimization opportunities.
        Here is a very simple case:
        <div style="display: inline-block; width: auto;">
          <div style="float: left">some text</div>
          <div style="float: left">some super long .... text</div>
          <div></div>
        </div>
        In order to lay out this content properly, we
        1. Compute the min/max width of the first float (expensive text measuring)
        2. Compute the min/max width of the second float (some more expensive text measuring)
        3. Compute the min/max width of the inline-block (that is pretty much the 2 float's min/max)
        4. Lay out the 2 floats, the empty div and the inline-block using these min/max width pairs.

        Now if the inline-block box's display value is changed to "block" and the positioning is to absolute (style="display: box; position: absolute;")
        we currently(on trunk) tear down the render tree, build a new one and run all the steps again from #1 to #4.

        In LFC, we start with the following layout tree
        <container> -> block formatting context
          <container> -> inline formatting context
            <anonymous inline box>
          <container> -> inline formatting context
            <anonymous inline box>
          <container> -> inline formatting context
        and when the style change happens, we don't need to tear down the tree at all. Not only that, but since every formatting contexts stay the same
        we can just reuse their states and actually skip all the steps (even the positioning since the absolutely positioned container has static top/bottom/left/right).

        Surprisingly the final layout produces the exact same "display boxes" as the original layout.

        * layout/FormattingContext.h:
        (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::expand):
        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
        * layout/FormattingState.h:
        (WebCore::Layout::FormattingState::setIntrinsicWidthConstraints):
        (WebCore::Layout::FormattingState::intrinsicWidthConstraints const):
        (WebCore::Layout::FormattingState::setIntrinsicWidthConstraintsForBox):
        (WebCore::Layout::FormattingState::clearIntrinsicWidthConstraints):
        (WebCore::Layout::FormattingState::intrinsicWidthConstraintsForBox const):
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const):
        (WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const): Deleted.
        * layout/blockformatting/BlockFormattingContext.h:
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
        (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth): Deleted.
        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::horizontalMarginBorderAndPadding const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::nextInPreOrder):
        (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFloatBox const): Deleted.
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForInlineBlock const): Deleted.
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/tableformatting/TableFormattingContext.cpp:
        (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const):
        * layout/tableformatting/TableFormattingContext.h:

2019-08-03  Devin Rousso  <drousso@apple.com>

        Web Inspector: DOM: add a special breakpoint for "All Events"
        https://bugs.webkit.org/show_bug.cgi?id=200285

        Reviewed by Joseph Pecoraro.

        Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
        that would pause for any DOM event, regardless of the event's name. This is useful for
        situations where the event name isn't known, or where one simply want's to pause on the next
        entry to the event loop.

        Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
        event breakpoints into special breakpoints that can be added/removed via the create
        breakpoint context menu. This simplifies the process for setting these breakpoints, and also
        makes them more discoverable (most people wouldn't consider them to be "events").

        Tests: inspector/dom/breakpoint-for-event-listener.html
               inspector/dom-debugger/event-animation-frame-breakpoints.html
               inspector/dom-debugger/event-breakpoint-with-navigation.html
               inspector/dom-debugger/event-interval-breakpoints.html
               inspector/dom-debugger/event-listener-breakpoints.html
               inspector/dom-debugger/event-timeout-breakpoints.html

        * inspector/agents/InspectorDOMDebuggerAgent.h:
        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::disable):
        (WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated):
        (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint):
        (WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
        (WebCore::InspectorDOMDebuggerAgent::willFireTimer):
        (WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame):
        (WebCore::InspectorDOMDebuggerAgent::discardBindings): Deleted.
        Make `eventName` optional for `addEventBreakpoint`/`removeEventBreakpoint`. When omitted,
        the corresponding breakpoint that is added/removed is treated as a global breakpoint that
        applies to all events of that type (e.g. a global `listener` breakpoint would pause for any
        event that is fired).

2019-08-03  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove formatting context type leaf classes
        https://bugs.webkit.org/show_bug.cgi?id=200224
        <rdar://problem/53661907>

        Reviewed by Antti Koivisto.

        Let's keep the layout tree formatting context type independent.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
        (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const):
        (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::placeInlineItem):
        * layout/inlineformatting/InlineItem.h:
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
        (WebCore::Layout::InlineTextItem::InlineTextItem):
        (WebCore::Layout::InlineTextItem::split const):
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::inlineBox const): Deleted.
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        (WebCore::Layout::TextUtil::split):
        * layout/inlineformatting/text/TextUtil.h:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::Box):
        (WebCore::Layout::Box::~Box):
        (WebCore::Layout::Box::formattingContextRoot const):
        (WebCore::Layout::Box::setTextContent):
        (WebCore::Layout::Box::hasTextContent const):
        (WebCore::Layout::Box::textContent const):
        (WebCore::Layout::Box::replaced const):
        (WebCore::Layout::Box::replaced):
        (WebCore::Layout::Box::rareDataMap):
        (WebCore::Layout::Box::rareData const):
        (WebCore::Layout::Box::ensureRareData):
        (WebCore::Layout::Box::removeRareData):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isLineBreakBox const):
        (WebCore::Layout::Box::hasRareData const):
        (WebCore::Layout::Box::setHasRareData):
        (WebCore::Layout::Box::isInlineBox const): Deleted.
        (WebCore::Layout::Box::replaced const): Deleted.
        (WebCore::Layout::Box::replaced): Deleted.
        * layout/layouttree/LayoutContainer.h:
        (WebCore::Layout::Container::firstChild const): Deleted.
        (WebCore::Layout::Container::lastChild const): Deleted.
        (WebCore::Layout::Container::hasChild const): Deleted.
        (WebCore::Layout::Container::hasInFlowChild const): Deleted.
        (WebCore::Layout::Container::hasInFlowOrFloatingChild const): Deleted.
        (WebCore::Layout::Container::outOfFlowDescendants const): Deleted.
        * layout/layouttree/LayoutInlineBox.cpp: Removed.
        * layout/layouttree/LayoutInlineBox.h: Removed.
        * layout/layouttree/LayoutLineBreakBox.cpp: Removed.
        * layout/layouttree/LayoutLineBreakBox.h: Removed.
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::outputLayoutBox):

2019-08-03  Zalan Bujtas  <zalan@apple.com>

        [LFC] Remove formatting context type container classes.
        https://bugs.webkit.org/show_bug.cgi?id=200202

        Reviewed by Antti Koivisto.

        These are formatting context specific classes. Let's try to have a layout tree without such types.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const):
        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout const):
        (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendTextContent):
        * layout/layouttree/LayoutBlockContainer.cpp: Removed.
        * layout/layouttree/LayoutBlockContainer.h: Removed.
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesInlineFormattingContext const):
        (WebCore::Layout::Box::establishesInlineFormattingContextOnly const):
        (WebCore::Layout::Box::formattingContextRoot const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isBlockContainer const):
        (WebCore::Layout::Box::isInlineContainer const):
        (WebCore::Layout::Box::isInlineBox const):
        (WebCore::Layout::Box::establishesInlineFormattingContext const): Deleted.
        (WebCore::Layout::Box::establishesInlineFormattingContextOnly const): Deleted.
        * layout/layouttree/LayoutInlineContainer.cpp: Removed.
        * layout/layouttree/LayoutInlineContainer.h: Removed.
        * layout/layouttree/LayoutIterator.h:
        (WebCore::Layout::LayoutBoxTraversal::firstChild):
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createLayoutTree):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::TreeBuilder::createTableStructure):
        (WebCore::Layout::outputLayoutBox):
        * layout/layouttree/LayoutTreeBuilder.h:
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

2019-08-02  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Avoid visiting the full AST in computeDimensions
        https://bugs.webkit.org/show_bug.cgi?id=200410

        Reviewed by Myles C. Maxfield.

        Avoid visiting the full AST in computeDimensions
        This cuts the time spent in computeDimensions on compute_boids.html from about 2ms to about 0.002ms.

        No new tests as there is no functional change intended.

        * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:
        (WebCore::WHLSL::computeDimensions):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:

2019-08-02  Ryosuke Niwa  <rniwa@webkit.org>

        Ref Frame in DOMWindow::screen* functions
        https://bugs.webkit.org/show_bug.cgi?id=200409

        Reviewed by Simon Fraser.

        Ref Frame in the following functions.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::innerHeight const):
        (WebCore::DOMWindow::innerWidth const):
        (WebCore::DOMWindow::screenX const):
        (WebCore::DOMWindow::screenY const):
        (WebCore::DOMWindow::scrollX const):
        (WebCore::DOMWindow::scrollY const):

2019-08-02  Mark Lam  <mark.lam@apple.com>

        [ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer.
        https://bugs.webkit.org/show_bug.cgi?id=200292
        <rdar://problem/53706881>

        Reviewed by Geoffrey Garen.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        - Update to work with the new DOMJIT::Signature constructor.

        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        - Re-base test results.

2019-08-02  Keith Rollin  <krollin@apple.com>

        Consistently use Obj-C boolean literals
        https://bugs.webkit.org/show_bug.cgi?id=200405
        <rdar://problem/53880043>

        Reviewed by Simon Fraser, Joseph Pecoraro.

        There are places where we use equivalent but different expressions for
        Obj-C boolean objects. For example, we use both [NSNumber
        numberWithBool:YES] and @YES. There are places where both are used in
        the same function, such as -[WebPreferences initialize]. The boolean
        literal is in greater use and is more succinct, so standardize on
        that. Also, change @(YES/NO) to @YES/NO.

        No new tests -- no new or changed functionality.

        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
        * platform/graphics/cv/ImageTransferSessionVT.mm:
        (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
        (WebCore::ImageTransferSessionVT::setSize):
        (WebCore::ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions):
        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
        (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
        * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
        (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::applySniffingPoliciesIfNeeded):

2019-08-02  Andres Gonzalez  <andresg_22@apple.com>

        Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client.
        https://bugs.webkit.org/show_bug.cgi?id=200394
        <rdar://problem/52914964>

        Reviewed by Chris Fleizach.

        Explicitly returning BOOL to avoid error in some compiler configurations.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):

2019-08-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: fix inverted check in InspectorDOMStorageAgent::enable
        Followup to r248179.

        Rubber-stamped by Joseph Pecoraro.

        * inspector/agents/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::enable):

2019-08-02  Fujii Hironori  <Hironori.Fujii@sony.com>

        [Curl] Crash while destructing a URL in ~SocketStreamHandle due to data race
        https://bugs.webkit.org/show_bug.cgi?id=200378

        Reviewed by Ross Kirsling.

        URL::isolatedCopy() is called in the worker thread. URL is using a
        thread-unsafe ref-counter. It should be called in the main thread.

        Covered by existing tests.

        * platform/network/curl/SocketStreamHandleImpl.h:
        * platform/network/curl/SocketStreamHandleImplCurl.cpp:
        (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): Call URL::isolatedCopy() in the main thread.
        (WebCore::SocketStreamHandleImpl::threadEntryPoint): Added a URL argument.

2019-08-02  Sihui Liu  <sihui_liu@apple.com>

        API tests using permanent credentials should clear credentials left by previous tests
        https://bugs.webkit.org/show_bug.cgi?id=199729

        Reviewed by Alex Christensen.

        Update existing API tests.

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::clearSessionCredentials):
        (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted.
        * platform/network/CredentialStorage.h:
        * platform/network/mac/CredentialStorageMac.mm:
        (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted.

2019-08-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: Storage: disable related agents when the tab is closed
        https://bugs.webkit.org/show_bug.cgi?id=200117

        Reviewed by Joseph Pecoraro.

        Rework how `enable`/`disable` is used for storage-related agents so that events are not sent
        and data isn't kept alive when the Storage tab isn't enabled.

        Covered by existing tests.

        * inspector/agents/InspectorApplicationCacheAgent.h:
        * inspector/agents/InspectorApplicationCacheAgent.cpp:
        (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
        (WebCore::InspectorApplicationCacheAgent::enable):
        (WebCore::InspectorApplicationCacheAgent::disable): Added.

        * inspector/agents/InspectorDOMStorageAgent.cpp:
        (WebCore::InspectorDOMStorageAgent::enable):
        (WebCore::InspectorDOMStorageAgent::disable):

        * inspector/agents/InspectorDatabaseAgent.cpp:
        (WebCore::InspectorDatabaseAgent::enable):
        (WebCore::InspectorDatabaseAgent::disable):

2019-08-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window
        https://bugs.webkit.org/show_bug.cgi?id=200125
        <rdar://problem/53543008>

        Reviewed by Brian Burg.

        Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops.
        Notify the UIProcess whenever the timeline recording state changes.

        * inspector/InspectorClient.h:
        (WebCore::InspectorClient::timelineRecordingChanged): Added.

        * inspector/agents/InspectorTimelineAgent.h:
        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
        (WebCore::InspectorTimelineAgent::internalStart):
        (WebCore::InspectorTimelineAgent::internalStop):

2019-08-02  Yury Semikhatsky  <yurys@chromium.org>

        Web Inspector: Crash when interacting with Template Content in Console
        https://bugs.webkit.org/show_bug.cgi?id=196280

        Reviewed by Joseph Pecoraro.

        Test: inspector/dom/inspect-template-node.html

        * bindings/js/JSDOMBindingSecurity.cpp:
        (WebCore::canAccessDocument): if target element is from a
        <template> use its host document to check the access. Elements
        from the host document always have access to its template elements content.
        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::resolveNode): templates are created in
        special template document which doesn't have a frame, in such case get
        the frame from the host document.

2019-08-02  Ryosuke Niwa  <rniwa@webkit.org>

        Harden NodeRareData::m_connectedFrameCount
        https://bugs.webkit.org/show_bug.cgi?id=200300

        Reviewed by Geoffrey Garen.

        Use unsinged integer type in NodeRareData::m_connectedFrameCount since it's padded anyway.

        * dom/Node.cpp:
        (WebCore::Node::decrementConnectedSubframeCount): Check that hasRareNode() is true in release builds.
        * dom/NodeRareData.h:

2019-08-02  Ryosuke Niwa  <rniwa@webkit.org>

        Document::resume should delay resetting of form control elements.
        https://bugs.webkit.org/show_bug.cgi?id=200376

        Reviewed by Geoffrey Garen.

        Delay the execution of form control element resets until the next task
        to avoid synchronously mutating DOM during page cache restoration.

        Test: fast/frames/restoring-page-cache-should-not-run-scripts.html

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::resumeFromDocumentSuspension):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::resumeFromDocumentSuspension):

2019-08-02  Youenn Fablet  <youenn@apple.com>

        [iOS] Directly use RealtimeMediaSourceCenter to compute the media capture  state
        https://bugs.webkit.org/show_bug.cgi?id=200368
        <rdar://problem/53191450>

        Unreviewed.
        Build fix by guarding with MEDIA_STREAM in addition to IOS.

        * dom/Document.cpp:
        (WebCore::Document::updateIsPlayingMedia):
        (WebCore::Document::pageMutedStateDidChange):

2019-08-02  Andres Gonzalez  <andresg_22@apple.com>

        Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client.
        https://bugs.webkit.org/show_bug.cgi?id=200394
        <rdar://problem/52914964>

        Reviewed by Chris Fleizach.

        Test: accessibility/ios-simulator/element-in-table-cell.html

        Added _accessibilityIsInTableCell needed for iOS accessibility client.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):

2019-08-02  Eric Carlson  <eric.carlson@apple.com>

        [macOS, iOS] webaudio/silent-audio-interrupted-in-background.html sometimes crashes
        https://bugs.webkit.org/show_bug.cgi?id=200396
        <rdar://problem/53819720>

        Reviewed by Youenn Fablet.

        No new test, this fixes an existing test.

        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): Drop the
        lock before clearing m_tapStorage. 

2019-08-02  Youenn Fablet  <youenn@apple.com>

        [iOS] Directly use RealtimeMediaSourceCenter to compute the media capture  state
        https://bugs.webkit.org/show_bug.cgi?id=200368
        <rdar://problem/53191450>

        Reviewed by Eric Carlson.

        Instead of registering a MediaStreamTrack as a media producer to compute capture state,
        go directly to the sources from the RealtimeMediaSourceCenter.
        Do the same when requested to mute capture tracks.

        No observable change of behavior.
        Covered by manual test on iOS and existing tests.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::~MediaStreamTrack):
        (WebCore::MediaStreamTrack::mediaState const):
        (WebCore::sourceCaptureState):
        (WebCore::MediaStreamTrack::captureState):
        (WebCore::MediaStreamTrack::muteCapture):
        * Modules/mediastream/MediaStreamTrack.h:
        * dom/Document.cpp:
        (WebCore::Document::updateIsPlayingMedia):
        (WebCore::Document::pageMutedStateDidChange):

2019-08-02  Chris Dumez  <cdumez@apple.com>

        DOMWindow properties may get GC'd before their Window object
        https://bugs.webkit.org/show_bug.cgi?id=200359

        Reviewed by Ryosuke Niwa.

        DOMWindow properties may get GC'd before their Window object once their frame is detached. This
        is unexpected behavior given that these properties persist on the Window after the frame is
        detached. This patch thus updates their bindings so that they live as long as their window, not
        their frame.

        Note that this also fixes a thread-safety issue since DOMWindowProperty::frame() would get called
        from GC threads, although its implementation looks like:
        """
          return m_window ? m_window->frame() : nullptr;
        """

        Because m_window is a WeakPtr<DOMWindow> and because windows get destroyed on the main thread,
        we could in theory crash when dereferencing m_window->frame() from the GC thread.

        Test: fast/dom/dom-window-property-gc-after-frame-detach.html

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::visitAdditionalChildren):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateImplementation):
        * bindings/scripts/IDLAttributes.json:
        * css/StyleMedia.idl:
        * loader/appcache/DOMApplicationCache.idl:
        * page/BarProp.idl:
        * page/DOMSelection.idl:
        * page/History.idl:
        * page/Location.idl:
        * page/Navigator.idl:
        * page/Screen.idl:
        * page/VisualViewport.idl:
        * plugins/DOMMimeTypeArray.idl:
        * plugins/DOMPluginArray.idl:
        * storage/Storage.idl:

2019-08-02  Konstantin Tokarev  <annulen@yandex.ru>

        Remove constructors and operators of FontPlatformData defined only for Freetype
        https://bugs.webkit.org/show_bug.cgi?id=200379

        Reviewed by Carlos Garcia Campos.

        These methods only make maintenance harder, as all data fields are
        trivially copyable. Constructors generated by compiler should be used
        instead.

        * platform/graphics/FontPlatformData.h:
        * platform/graphics/freetype/FontPlatformDataFreeType.cpp:

2019-08-02  Konstantin Tokarev  <annulen@yandex.ru>

        Remove unused constructor declaration from FontPlatformData
        https://bugs.webkit.org/show_bug.cgi?id=200371

        Reviewed by Carlos Garcia Campos.

        It is not implemented by any port.

        * platform/graphics/FontPlatformData.h:

2019-08-01  Chris Dumez  <cdumez@apple.com>

        Pages using MessagePorts should be PageCacheable
        https://bugs.webkit.org/show_bug.cgi?id=200366
        <rdar://problem/53837882>

        Reviewed by Geoffrey Garen.

        Allow a page to enter PageCache, even if it has MessagePorts (potentially with
        pending messages). If there are pending messages on the MessagePorts when
        entering PageCache, those will get dispatched upon restoring from PageCache.

        Test: fast/history/page-cache-MessagePort-pending-message.html

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::messageAvailable):
        (WebCore::MessagePort::dispatchMessages):
        Do not dispatch messages while in PageCache.

        (WebCore::MessagePort::canSuspendForDocumentSuspension const):
        Allow pages with MessagePort objects to enter PageCache.

        * dom/ScriptExecutionContext.cpp:
        (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
        Make sure pending messages on MessagePorts get dispatched asynchronously after restoring
        from PageCache.

        * loader/DocumentLoader.cpp:
        (WebCore::areAllLoadersPageCacheAcceptable):
        Make sure only CachedResources that are still loading upon load cancelation prevent
        entering PageCache.

2019-08-01  Konstantin Tokarev  <annulen@yandex.ru>

        Fix compilation of PageConsoleClient with !ENABLE(VIDEO)
        https://bugs.webkit.org/show_bug.cgi?id=200380

        Reviewed by Joseph Pecoraro.

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):

2019-08-01  Mark Lam  <mark.lam@apple.com>

        Add crash diagnostics for debugging unexpected zapped cells.
        https://bugs.webkit.org/show_bug.cgi?id=200149
        <rdar://problem/53570112>

        Reviewed by Yusuke Suzuki.

        No new tests because this is a feature for debugging crashes.  It has been tested
        manually by modifying the code to force a crash at the point of interest.

        Added some comments to document the hashes of known subspaces.

        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):

2019-08-01  Saam Barati  <sbarati@apple.com>

        [WHLSL] Do simple nullptr check elimination using basic data flow analysis when generating metal code
        https://bugs.webkit.org/show_bug.cgi?id=200352

        Reviewed by Myles C. Maxfield.

        When doing metal code generation, we frequently know whether something
        is null or not. This patch does a basic propagation of this information
        to avoid emitting excessive null checks in the generated Metal code.
        This is a 6% speedup (with a p value of 0.0001) in Metal compile times
        on compute_boids.

        An example of a null check we now eliminate is:
        ```
        int x;
        thread int* ptr = &x; // We know that the lvalue for "x" is non-null, so we produce a non-null rvalue here.
        *ptr = 42; // We know that the "ptr" rvalue is non-null, so we omit the null check.
        ```

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):

2019-08-01  Alex Christensen  <achristensen@webkit.org>

        Move FormData zip file generation to NetworkProcess and enable it for all WebKit clients for uploading directories
        https://bugs.webkit.org/show_bug.cgi?id=200102
        <rdar://problem/53275114>

        Reviewed by Darin Adler.

        To enable directory uploading in WebKit2, we extended WebKit1's model of asking the application to generate a file for uploading.
        This means the WebProcess needed access to everything necessary to zip a whole directory, and clients that have not implemented
        the strange WKBundlePageUIClient callbacks won't be able to upload directories.  Safari's implementation had already been copied
        to BlobDataFileReference::generateReplacementFile, so I reused that code to do the zipping.  Instead of a complicated model of
        keeping track of a filename, possibly a generated filename, and whether we think we own the file or not and having nobody clean up,
        we now do the generation, use, and cleaning up in the network process starting with a new function generateFilesForUpload.
        This removes unimplemented SPI in WebUIDelegatePrivate in WebKitLegacy and stops calling the WKBundlePageUIClient related to upload
        file generation and replaces them with automatic behavior equivalent to Safari's implementation of the WKBundlePageUIClient calls.
        Since we no longer need to do these file operations in the WebProcess, I am also reverting r245322 and r246077 which tightens the sandbox.

        Covered by an API test.

        * Modules/fetch/FetchBody.cpp:
        (WebCore::FetchBody::extract):
        (WebCore::FetchBody::bodyAsFormData const):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::create):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::submitForm):
        (WebCore::FrameLoader::loadDifferentDocumentItem):
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didReceiveResponse):
        (WebCore::ResourceLoader::cleanupForError):
        * page/Chrome.cpp:
        (WebCore::ChromeClient::shouldReplaceWithGeneratedFileForUpload): Deleted.
        (WebCore::ChromeClient::generateReplacementFile): Deleted.
        * page/ChromeClient.h:
        * platform/network/FormData.cpp:
        (WebCore::FormData::FormData):
        (WebCore::FormData::~FormData):
        (WebCore::FormData::createMultiPart):
        (WebCore::FormDataElement::lengthInBytes const):
        (WebCore::FormData::appendFile):
        (WebCore::FormData::appendFileRange):
        (WebCore::FormData::appendMultiPartFileValue):
        (WebCore::FormData::appendMultiPartKeyValuePairItems):
        (WebCore::FormData::resolveBlobReferences):
        (WebCore::generateFileForUpload):
        (WebCore::FormData::generateFilesForUpload):
        (WebCore::FormData::generateFiles): Deleted.
        (WebCore::FormData::hasGeneratedFiles const): Deleted.
        (WebCore::FormData::hasOwnedGeneratedFiles const): Deleted.
        (WebCore::FormData::removeGeneratedFilesIfNeeded): Deleted.
        * platform/network/FormData.h:
        (WebCore::FormDataElement::FormDataElement):
        (WebCore::FormDataElement::EncodedFileData::isolatedCopy const):
        (WebCore::FormDataElement::EncodedFileData::operator== const):
        (WebCore::FormDataElement::EncodedFileData::encode const):
        (WebCore::FormDataElement::EncodedFileData::decode):
        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore::advanceCurrentStream):
        (WebCore::formCreate):
        (WebCore::formFinalize):
        (WebCore::createHTTPBodyCFReadStream):
        * platform/network/mac/BlobDataFileReferenceMac.mm:
        (WebCore::generateFileForUpload):
        (WebCore::BlobDataFileReference::generateReplacementFile):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):

2019-08-01  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Text autosizing] [iPadOS] Add targeted hacks to address some remaining text autosizing issues
        https://bugs.webkit.org/show_bug.cgi?id=200271
        <rdar://problem/51734741>

        Reviewed by Zalan Bujtas.

        Makes some targeted adjustments to the text autosizing heuristic, to ensure compatibility with several high-
        profile websites. See changes below for more detail.

        Tests:  fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases.html
                fast/text-autosizing/ios/idempotentmode/line-height-boosting.html

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

        Avoid clipped sidebar links on sohu.com by not performing line-height boosting in the case where the element
        probably has a small, fixed number of lines. See below for more detail. Additionally, don't attempt to adjust
        the line height using the boosted font size, in the case where the element is not a candidate for idempotent
        text autosizing.

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):

        Make various targeted hacks to fix a few websites:

        -   Add a special case for top navigation bar links on yandex.ru, where line height greatly exceeds the
            specified font size.

        -   Avoid boosting some related video links on v.youku.com by considering the line-clamp CSS property when
            determining the maximum number of lines of text an element is expected to contain.

        -   Avoid boosting some front page links on asahi.com, which have non-repeating background images.

        -   Add several other adjustments to more aggressively boost pieces of text on Google search results, such as
            taking the `word-break` CSS property into account.

        The bottom few pixels of sidebar links on naver.com are also no longer clipped after these changes.

        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::probablyContainsASmallFixedNumberOfLines):

        Pulls out a piece of the heuristic added to fix sephora.com in r247467 out into a separate helper method. To
        recap, this heuristic identifies elements with both a fixed height and fixed line height, for which the fixed
        height is close to an integer multiple of the line height.

        Also makes several small tweaks in the process: (1) change the max difference between fixed line height and
        font size from 6 to 5 to ensure that some multiline caption text on Google search results is boosted, and (2)
        replace usages of `lineHeight()` with `specifiedLineHeight()`, which current prevents this function from being
        truly idempotent.

        (WebCore::AutosizeStatus::updateStatus):
        * rendering/style/TextSizeAdjustment.h:

2019-07-31  Mark Lam  <mark.lam@apple.com>

        Rename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeChecks.
        https://bugs.webkit.org/show_bug.cgi?id=200323

        Reviewed by Yusuke Suzuki.

        No new tests.  This is just a refactoring exercise.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GetArgumentTypeForFunctionWithoutTypeCheck):
        (GenerateImplementation):
        (GenerateOperationDefinition):
        (ToNativeForFunctionWithoutTypeCheck):
        (GetUnsafeArgumentType): Deleted.
        (UnsafeToNative): Deleted.
        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
        (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
        (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
        (WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute): Deleted.
        (WebCore::unsafeJsTestDOMJITPrototypeFunctionItem): Deleted.
        (WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute): Deleted.
        (WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById): Deleted.
        (WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName): Deleted.

2019-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] WebSockets: add support for extensions when using web sockets libsoup API
        https://bugs.webkit.org/show_bug.cgi?id=199943

        Reviewed by Alex Christensen.

        Add SOUP_TYPE_WEBSOCKET_EXTENSION_MANAGER feature to the soup session to enable WebSocket extensions.

        Tests: http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-comp-bit-onoff.html
               http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter.html
               http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-parameter.html
               http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-set-bfinal.html
               http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-split-frames.html
               http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response.html
               http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-window-bits.html

        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::SoupNetworkSession):

2019-08-01  Chris Dumez  <cdumez@apple.com>

        [iOS][WK1] Unsafe unsafe of WeakPtr<Document> from UIThread under PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit()
        https://bugs.webkit.org/show_bug.cgi?id=200324

        Reviewed by Ryosuke Niwa.

        The Document is a WebThread object, but a WeakPtr<Document> was dereferenced from the
        UIThread in HTMLMediaElement::supportsSeeking(), from the PlaybackSessionInterfaceAVKit
        constructor. To address the issue we now grab the WebThread lock before constructing
        the PlaybackSessionInterfaceAVKit.

        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (VideoFullscreenControllerContext::setUpFullscreen):

2019-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Switch to use libsoup WebSockets API
        https://bugs.webkit.org/show_bug.cgi?id=200162

        Reviewed by Michael Catanzaro.

        Use the libsoup WebSockets API unconditionally for libsoup based ports.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create): Do not check the env var anymore.
        * platform/SourcesSoup.txt:
        * platform/network/SocketStreamHandleImpl.cpp:
        * platform/network/StorageSessionProvider.h:
        * platform/network/soup/SocketStreamHandleImpl.h:
        * platform/network/soup/SocketStreamHandleImplSoup.cpp: Removed.

2019-07-31  Devin Rousso  <drousso@apple.com>

        Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
        https://bugs.webkit.org/show_bug.cgi?id=200272

        Reviewed by Joseph Pecoraro.

        When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.

        Tests: inspector/debugger/evaluateOnCallFrame-emulateUserGesture.html
               inspector/debugger/evaluateOnCallFrame-emulateUserGesture-userIsInteracting.html

        * inspector/agents/page/PageDebuggerAgent.h:
        * inspector/agents/page/PageDebuggerAgent.cpp:
        (WebCore::PageDebuggerAgent::evaluateOnCallFrame): Added.

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

        [WHLSL] Replace memsetZero function with inline "= { }" code
        https://bugs.webkit.org/show_bug.cgi?id=200328

        Reviewed by Robin Morisset.

        This is a ~20ms metal compile time improvement on compute_boids.

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

2019-07-31  Andy Estes  <aestes@apple.com>

        REGRESSION (r240942): first visually non-empty layout milestone is not reached in media documents until after the video finishes loading
        https://bugs.webkit.org/show_bug.cgi?id=200293
        <rdar://problem/52937749>

        Reviewed by Alex Christensen.

        r240942 changed FrameView::qualifiesAsVisuallyNonEmpty() to consider only documents in the
        Interactive or Complete ready states as "finished parsing". Documents considered finished
        parsing can qualify as visually non-empty even without exceeding the visual character or
        pixel thresholds, but documents considered not finished must first exceed one of these
        thresholds in order to qualify as visually non-empty.

        HTMLDocuments are placed in the Interactive ready state by their HTMLDocumentParsers.
        However, HTMLDocument subclasses like ImageDocument and MediaDocument use their own custom
        parsers that never set the Interactive ready state on their documents; these documents go
        from Loading directly to Complete.

        In order for these HTMLDocument subclasses to be considered visually non-empty before they
        finish loading they must render something that exceeds the visual character or pixel
        thresholds. For image documents, rendering the image is usually enough to cross the
        threshold, but for media documents the visual pixel threshold was never crossed because
        videos did not contribute to the visually non-empty pixel count.

        As a result, media documents are not considered visually non-empty until the main resource
        finishes loading. On iOS this means that the layer tree remains frozen until this point,
        even though the media might have started autoplaying with audio long before it finished
        loading.

        Fix this by teaching RenderVideo to contribute the video player's size to FrameView's
        visually non-empty pixel count once the video player has loaded enough data to determine its
        intrinsic size. Videos that render more than 1024 pixels will qualify a media document as
        visually non-empty even when it is still loading its main resource.

        Added a new API test.

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):
        (WebCore::RenderImage::incrementVisuallyNonEmptyPixelCountIfNeeded):
        * rendering/RenderImage.h:
        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::updateIntrinsicSize):

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

        [WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
        https://bugs.webkit.org/show_bug.cgi?id=200188
        <rdar://problem/53628171>

        Unreviewed followup.

        As Darin pointed out in the bugzilla comments, when defining a copy
        constructor in C++ (either deleted or an implementation), the move
        constructor is implicitly deleted. This match removes the excessive
        use of WTF_MAKE_NONMOVABLE when we're already using WTF_MAKE_NONCOPYABLE.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:

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

        [ContentChangeObserver] twitch.tv video controls do not always respond to taps in fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=200309
        <rdar://problem/52964977>

        Reviewed by Simon Fraser.

        Do not consider an element visible if it is not a descendant of the active fullscreen element.

        This patch fixes the cases when the user taps on a button in fullscreen mode while the non-fullscreen content is being mutated and
        the ContentChangeObserver mistakenly registers it as a valid, actionable change and as a result we don't fire the click event (stay at hover).

        Test: fast/events/touch/ios/content-observation/non-visible-content-change-in-fullscreen-mode.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::fullscreenElement):
        (WebCore::ContentChangeObserver::isVisuallyHidden):

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

        [WHLSL Remove char/short/half types
        https://bugs.webkit.org/show_bug.cgi?id=200312

        Reviewed by Myles C. Maxfield.

        This patch removes the char/short/half types from WHLSL. Since it's not
        supported by all HW, WebGPU is leaving these types out for now. This is
        also a huge speedup, since it halves the size of the standard library.
        
        In the compute_boids demo, WHLSL::prepare goes from running in ~140ms to
        running in ~60ms.

        Test: webgpu/whlsl/smaller-than-32-bit-types.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
        (WebCore::WHLSL::Intrinsics::addPrimitive):
        (WebCore::WHLSL::Intrinsics::addVector):
        (WebCore::WHLSL::Intrinsics::addMatrix):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
        (WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
        (WebCore::WHLSL::Intrinsics::ucharType const): Deleted.
        (WebCore::WHLSL::Intrinsics::ushortType const): Deleted.
        (WebCore::WHLSL::Intrinsics::charType const): Deleted.
        (WebCore::WHLSL::Intrinsics::shortType const): Deleted.
        (WebCore::WHLSL::Intrinsics::uchar2Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::uchar4Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::ushort2Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::ushort4Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::char2Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::char4Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::short2Type const): Deleted.
        (WebCore::WHLSL::Intrinsics::short4Type const): Deleted.
        * Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h:
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:
        (WebCore::WHLSL::isAcceptableFormat):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::convertTextureFormat):

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

        Use CTFontCreateForCharactersWithLanguageAndOption if available instead of CTFontCreateForCharactersWithLanguage
        https://bugs.webkit.org/show_bug.cgi?id=200241

        Reviewed by Myles C. Maxfield.

        We can use CTFontCreateForCharactersWithLanguageAndOption instead of CTFontCreateForCharactersWithLanguage
        as it allows setting more easily the fallback option.
        This allows us to never fallback to user installed fonts.
        In such a case, we no longer need to wrap the fonts to change the fallback option.
        We also prewarm the fonts with the same SPI and use system fallback as the default value.

        Covered by existing tests.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::preparePlatformFont):
        (WebCore::lookupFallbackFont):
        (WebCore::FontCache::systemFallbackForCharacters):
        (WebCore::FontCache::prewarm):
        (WebCore::fontFamiliesForPrewarming):

2019-07-31  Devin Rousso  <drousso@apple.com>

        Web Inspector: Overlay: add page width/height display
        https://bugs.webkit.org/show_bug.cgi?id=199369

        Reviewed by Joseph Pecoraro.

        Show `${width}px x ${height}px` in the corner where the horizontal and vertical rulers meet.
        This way, if the rulers shift due to the highlighted content, the page width/height does too.

        * inspector/InspectorOverlay.h:
        * inspector/InspectorOverlay.cpp:
        (WebCore::truncateWithEllipsis):
        (WebCore::InspectorOverlay::drawNodeHighlight):
        (WebCore::InspectorOverlay::drawQuadHighlight):
        (WebCore::InspectorOverlay::drawRulers):
        (WebCore::InspectorOverlay::drawElementTitle):

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

        Owners of MultiChannelResampler should make sure that the output bus given to it has the same number of channels
        https://bugs.webkit.org/show_bug.cgi?id=200248
        <rdar://problem/53411051>

        Reviewed by Eric Carlson.

        When a track's number of channels changes, MediaStreamAudioSourceNode is expected
        to update its MultiChannelResampler and its output number of channels.
        MultiChannelResampler expects to have the same number of channels as the output
        but it is not always the case since the channel numbers are changed in different threads
        and locks do not help there.

        Instead, whenever detecting that the number of channels do not match, render silence
        and wait for the next rendering where the number of channels should again match.

        Add internals API to change the number of channels from 2 to 1 or 1 to 2
        to allow testing that code path (iOS only as MacOS audio capture is in UIProcess).
        Covered by updated test.

        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
        (WebCore::MediaElementAudioSourceNode::process):
        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        (WebCore::MediaStreamAudioSourceNode::process):
        * platform/audio/MultiChannelResampler.cpp:
        (WebCore::MultiChannelResampler::process):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
        (WebCore::MockRealtimeAudioSourceMac::reconfigure):
        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::setChannelCount):
        * platform/mock/MockRealtimeAudioSource.h:
        (isType):
        * platform/mock/MockRealtimeVideoSource.h:
        * testing/Internals.cpp:
        (WebCore::Internals::setMockAudioTrackChannelNumber):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-07-31  Chris Dumez  <cdumez@apple.com>

        Element.outerHTML is missing attribute prefixes in some cases in HTML documents
        https://bugs.webkit.org/show_bug.cgi?id=200283

        Reviewed by Ryosuke Niwa.

        When HTML serializing a prefixed element attribute, we should always serialize the
        prefix as per [1]. However, our code was only serializing the well-known ones (xml,
        xmlns & xlink).

        [1] https://html.spec.whatwg.org/#attribute's-serialised-name

        Test: fast/dom/Element/outerHTML-prefixed-attribute.html

        * editing/MarkupAccumulator.cpp:
        (WebCore::htmlAttributeSerialization):
        (WebCore::MarkupAccumulator::xmlAttributeSerialization):
        (WebCore::MarkupAccumulator::appendAttribute):
        * editing/MarkupAccumulator.h:

2019-07-31  Loïc Yhuel  <loic.yhuel@softathome.com>

        [GStreamer] Fix printf format warnings for 32-bit build in GST traces
        https://bugs.webkit.org/show_bug.cgi?id=200299

        Reviewed by Xabier Rodriguez-Calvar.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): %zu for size_t
        (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered): Ditto
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcCreate): G_GUINT64_FORMAT for uint64_t
        * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp: G_GINT64_FORMAT for int64_t
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: Ditto

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

        AX: Re-enable accessibility/set-selected-text-range-after-newline.html test.
        https://bugs.webkit.org/show_bug.cgi?id=199431
        <rdar://problem/52563340>

        Reviewed by Chris Fleizach.

        - Re-enabled LayoutTests/accessibility/set-selected-text-range-after-newline.html.
        - Put back workaround in visiblePositionForIndexUsingCharacterIterator
        that is needed for several accessibility issues.
        - This workaround was rolled back because it was thought the cause of:
        https://bugs.webkit.org/show_bug.cgi?id=199434
        It turned out that the actual cause of that hang was unrelated and was
        fixed in:
        https://bugs.webkit.org/show_bug.cgi?id=199845

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

2019-07-31  Devin Rousso  <drousso@apple.com>

        Web Inspector: Second call to setAttributeNS creates non-prefixed attribute
        https://bugs.webkit.org/show_bug.cgi?id=200230
        <rdar://problem/53712672>

        Reviewed by Joseph Pecoraro.

        Original patch by Chris Dumez <cdumez@apple.com>.

        Test: inspector/dom/attributeModified.html

        * dom/Element.cpp:
        (WebCore::Element::didAddAttribute):
        (WebCore::Element::didModifyAttribute):
        (WebCore::Element::didRemoveAttribute):
        Use the fully qualified name, not just the local name, when notifying the inspector frontend
        about changes to attributes.

2019-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Datalist element support for TextFieldInputType
        https://bugs.webkit.org/show_bug.cgi?id=98934

        Reviewed by Michael Catanzaro.

        Add support for rendering the arrow indicator of text fields having data list.

        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::paintTextField):
        (WebCore::RenderThemeGtk::adjustListButtonStyle const):
        (WebCore::RenderThemeGtk::paintListButtonForInput):
        (WebCore::RenderThemeGtk::adjustSearchFieldStyle const):
        * rendering/RenderThemeGtk.h:

2019-07-30  Tim Horton  <timothy_horton@apple.com>

        ASSERTion failure under takeSnapshot after r247846

        * page/TextIndicator.cpp:
        (WebCore::takeSnapshots):
        We now sometimes inflate the scale factor; allow this.

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

        [WHLSL] Add a fast path for TypeNamer::insert where we've already seen the type
        https://bugs.webkit.org/show_bug.cgi?id=200284

        Reviewed by Myles C. Maxfield.

        This is a ~27% speedup in the WHLSL::prepare for the compute_boids test.
        This optimization makes sense since my previous patch to make UnnamedType
        ref counted was also a huge speedup. So the TypeNamer is seeing many
        UnnamedTypes which are the same pointer value. On compute_boids, this
        makes generateMetalCode ~40ms faster.

        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::insert):

2019-07-29  Ryosuke Niwa  <rniwa@webkit.org>

        WorkerGlobalScope::wrapCryptoKey/unwrapCryptoKey should use local heap objects for replies
        https://bugs.webkit.org/show_bug.cgi?id=200179
        <rdar://problem/52334658>

        Reviewed by Brent Fulgham.

        Based on the patch by Jiewen Tan.

        WorkerGlobalScope::wrapCryptoKey and WorkerGlobalScope::unwrapCryptoKey had a bug that they could exit
        the function before the main thread had finished writing to the result vector passed in to these functions
        when the worker's runloop receives MessageQueueTerminated before the main thread finishes writing.

        Fixed the bug by creating a new temporary Vector inside a ThreadSafeRefCounted object shared between
        the main thread and the worker thread, which extends the lifetime of the Vector until when the worker thread
        receives the result or when the main thread finishes writing to the Vector, whichever happens last.

        Unfortunately no new tests since there is no reproducible test case, and this crash is highly racy.

        * workers/WorkerGlobalScope.cpp:
        (WebCore::CryptoBufferContainer): Added.
        (WebCore::CryptoBufferContainer::create): Added.
        (WebCore::CryptoBufferContainer::buffer): Added.
        (WebCore::WorkerGlobalScope::wrapCryptoKey):
        (WebCore::WorkerGlobalScope::unwrapCryptoKey):

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

        [WHLSL] Checker sets wrong type for property access instruction with an ander
        https://bugs.webkit.org/show_bug.cgi?id=200282

        Reviewed by Myles C. Maxfield.

        We were assigning resulting type based on the base value instead of the ander
        of the base value. For example, consider:
        ```
        struct Point { float x; float y; }
        compute main(device Point[] buffer) { buffer[0]; }
        ```
        
        The local variable "buffer" is in the "thread" address space. So we would end up
        trying to use the thread address space for "buffer[0]". This caused us to
        generate invalid Metal code because we would call a "thread" ander with a
        "device" pointer. The fix is to use the "device" address space, which is
        the type of the ander we were already setting on this property access instruction.

        Test: webgpu/whlsl/device-proper-type-checker.html

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

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

        [WHLSL] Make ASTDumper dump types and address spaces
        https://bugs.webkit.org/show_bug.cgi?id=200281

        Reviewed by Robin Morisset.

        This makes it much easier to gain insight into what type resolution
        the checker does. I used this logging to debug https://bugs.webkit.org/show_bug.cgi?id=200282

        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::TypeAnnotation::isAbstractLeftValue const):
        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        (WebCore::WHLSL::ASTDumper::visit):

2019-07-30  Brent Fulgham  <bfulgham@apple.com>

        [FTW] Refactor Direct2D code to follow Cairo's model to support modern WebKit
        https://bugs.webkit.org/show_bug.cgi?id=200270

        Reviewed by Dean Jackson.

        Refactor the Direct2D code in WebCore so that the core routines can be shared
        between GraphicsContext and GraphicsContextImpl. Implement PlatformContext,
        BackingStoreBackend, and GraphicsContextImpl for the Direct2D engine.
       
        This patch effectively just moves code around.

        * PlatformFTW.cmake:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/GraphicsContextImpl.h:
        * platform/graphics/ImageSource.cpp:
        * platform/graphics/Pattern.h:
        * platform/graphics/displaylists/DisplayListRecorder.cpp:
        * platform/graphics/displaylists/DisplayListRecorder.h:
        * platform/graphics/win/BackingStoreBackendDirect2D.h: Added.
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp: Added.
        * platform/graphics/win/BackingStoreBackendDirect2DImpl.h: Added.
        * platform/graphics/win/Direct2DOperations.cpp: Added.
        * platform/graphics/win/Direct2DOperations.h: Added.
        * platform/graphics/win/Direct2DUtilities.cpp: Added.
        * platform/graphics/win/Direct2DUtilities.h: Added.
        * platform/graphics/win/FontCascadeDirect2D.cpp:
        * platform/graphics/win/GradientDirect2D.cpp:
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        * platform/graphics/win/GraphicsContextImplDirect2D.cpp: Added.
        * platform/graphics/win/GraphicsContextImplDirect2D.h: Added.
        * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
        * platform/graphics/win/ImageBufferDataDirect2D.h:
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        * platform/graphics/win/NativeImageDirect2D.cpp:
        * platform/graphics/win/PathDirect2D.cpp:
        * platform/graphics/win/PatternDirect2D.cpp:
        * platform/graphics/win/PlatformContextDirect2D.cpp: Added.
        * platform/graphics/win/PlatformContextDirect2D.h: Added.
        * platform/win/DragImageWin.cpp:
        * svg/graphics/SVGImage.cpp:

2019-07-30  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION(r241288): Text on Yahoo Japan mobile looks too bold
        https://bugs.webkit.org/show_bug.cgi?id=200065
        <rdar://problem/50912757>

        Reviewed by Simon Fraser.

        Before r241288, we were mapping Japanese sans-serif to Hiragino Kaku Gothic ProN, which
        has a 300 weight and a 600 weight. However, we can't use that font because it's user-installed,
        so in r241288 we switched to using Hiragino Sans, which has a 300 weight, a 600 weight, and an
        800 weight. According to the CSS font selection algorithm, sites that request a weight of 700
        would get the 800 weight instead of the 600 weight, which caused the text to look too heavy.
        Therefore, the apparent visual change is from a weight change from 600 to 800.

        In general, this is working as intended. However, text on Yahoo Japan looks too heavy in weight
        800. Instead, this patch adds a quirk specific to Yahoo Japan that overwrites any font requests
        to give them a weight of 600 instead of 700. This way, the lighter font will be used.

        No new tests because quirks cannot be tested.

        * css/CSSFontSelector.cpp:
        (WebCore::resolveGenericFamily):
        (WebCore::CSSFontSelector::fontRangesForFamily):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const):
        * page/Quirks.h:

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

        [iPadOS] Enable simulated mouse events on iqiyi.com to fix the video controls
        https://bugs.webkit.org/show_bug.cgi?id=200322
        rdar://problem/53235709

        Reviewed by Wenson Hsieh.
        
        iqiyi.com needs to get mouseMove events for dragging the video scrubber to work.

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

2019-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed, fix GTK build after SoupNetworkSession ownership rework.

        * platform/network/soup/SocketStreamHandleImplSoup.cpp:

2019-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Compilation errors when GL is disabled
        https://bugs.webkit.org/show_bug.cgi?id=200223

        Unreviewed, keep trying to fix build with -DENABLE_OPENGL=OFF.

        The previous commit was sufficient for the 2.24 branch, but on trunk there are more
        problems. This doesn't solve all of them, but it gets us closer.

        * SourcesGTK.txt:
        * platform/graphics/GLContext.h:

2019-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>

        [SOUP] Move SoupNetworkSession ownership from NetworkStorageSession to NetworkSession
        https://bugs.webkit.org/show_bug.cgi?id=200076

        Reviewed by Michael Catanzaro.

        Remove the SoupNetworkSession from NetworkStorageSession.

        * platform/network/NetworkStorageSession.h:
        (WebCore::NetworkStorageSession::cookieStorage const): Return the cookie jar.
        * platform/network/StorageSessionProvider.h:
        (WebCore::StorageSessionProvider::soupSession const): Temporary add this virtual method that is required by
        SocketStreamHandleImplSoup. It will be removed once we switch to libsoup WebSockets API soon.
        * platform/network/soup/DNSResolveQueueSoup.cpp:
        (WebCore::globalDefaultSoupSessionAccessor): Rework the accessor to return the SoupSession directly since
        that's what we really want.
        (WebCore::DNSResolveQueueSoup::setGlobalDefaultSoupSessionAccessor):
        (WebCore::DNSResolveQueueSoup::updateIsUsingProxy):
        (WebCore::DNSResolveQueueSoup::platformResolve):
        (WebCore::DNSResolveQueueSoup::resolve):
        * platform/network/soup/DNSResolveQueueSoup.h:
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::NetworkStorageSession): Create and setup the default cookie jar.
        (WebCore::NetworkStorageSession::~NetworkStorageSession): Only disconnect the cookie jar signals.
        (WebCore::NetworkStorageSession::setCookieStorage): Update the cookie jar, now we know it's always a new one.
        * platform/network/soup/SocketStreamHandleImplSoup.cpp:
        (WebCore::SocketStreamHandleImpl::create): Use the new virtual method from StorageSessionProvider to get the SoupSession.
        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::SoupNetworkSession): Remove the SoupCookieJar parameter.
        * platform/network/soup/SoupNetworkSession.h:

2019-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] Compilation errors when GL is disabled
        https://bugs.webkit.org/show_bug.cgi?id=200223

        Unreviewed, fix build with -DENABLE_OPENGL=OFF.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

2019-07-29  Eric Carlson  <eric.carlson@apple.com>

        MediaSource.isTypeSupported claims FLAC-in-MP4 support on iOS and macOS, but plays silence
        https://bugs.webkit.org/show_bug.cgi?id=198583
        <rdar://problem/51487853>

        Reviewed by Maciej Stachowiak.

        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
        (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Use anParseExtendedMIMEType:
        when it is available.

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

        [LFC][TFC] <table> initiates a principal block container box called table wrapper box.
        https://bugs.webkit.org/show_bug.cgi?id=200198
        <rdar://problem/53623803>

        Reviewed by Antti Koivisto.

        The table wrapper box contains the table box itself and any caption boxes.

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isBlockContainerBox const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isTableCaption const):
        (WebCore::Layout::Box::isTableRow const):
        (WebCore::Layout::Box::isTableCell const):
        * layout/layouttree/LayoutContainer.h:
        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::appendChild):
        (WebCore::Layout::TreeBuilder::createLayoutBox):
        (WebCore::Layout::TreeBuilder::createTableStructure):
        (WebCore::Layout::TreeBuilder::createSubTree):
        (WebCore::Layout::outputLayoutBox):
        * layout/layouttree/LayoutTreeBuilder.h:

2019-07-29  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Replace Vectors with HashSets for tracking resources used by GPUCommandBuffer
        https://bugs.webkit.org/show_bug.cgi?id=200200

        Reviewed by Myles C. Maxfield.

        Resources bound to a command buffer or bind group only need be tracked once rather than once per sub-view. 
        This patch cuts GPUQueue.submit validation from 2-12 ms down to ~0 when drawing 12000 triangles in Animometer.

        Covered by existing tests; no behavior change expected.

        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: Removed unused variable.
        * platform/graphics/gpu/GPUBindGroup.h:
        (WebCore::GPUBindGroup::boundBuffers const):
        (WebCore::GPUBindGroup::boundTextures const):
        * platform/graphics/gpu/GPUCommandBuffer.h:
        (WebCore::GPUCommandBuffer::usedBuffers const):
        (WebCore::GPUCommandBuffer::usedTextures const):
        (WebCore::GPUCommandBuffer::useBuffer):
        (WebCore::GPUCommandBuffer::useTexture):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
        (WebCore::GPUBindGroup::tryCreate):
        (WebCore::GPUBindGroup::GPUBindGroup):

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

        [LFC][TFC] Introduce Box::establishesTableFormattingContext
        https://bugs.webkit.org/show_bug.cgi?id=200060

        Reviewed by Antti Koivisto.

        https://www.w3.org/TR/CSS22/tables.html

        The table generates a principal block container box called the table wrapper box that contains the table box itself and any caption boxes.
        The table box is a block-level box that contains the table's internal table boxes.
        The table wrapper box is block-level for 'display: table', and inline-level; for 'display: inline-table'. The table wrapper box establishes a block
        formatting context, and the table box establishes a table formatting context."

        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::establishesFormattingContext const):
        (WebCore::Layout::Box::establishesTableFormattingContext const):
        (WebCore::Layout::Box::isBlockLevelBox const):
        (WebCore::Layout::Box::isInlineLevelBox const):
        (WebCore::Layout::Box::isBlockContainerBox const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::isTableWrapperBox const):
        (WebCore::Layout::Box::isTableBox const):

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

        [ContentChangeObserver] didFinishContentChangeObserving should include the type of content change.
        https://bugs.webkit.org/show_bug.cgi?id=200247
        <rdar://problem/53681149>

        Reviewed by Simon Fraser.

        Now we don't have to query the content change observer for the type of the change in the callback.

        * loader/EmptyClients.h:
        * page/ChromeClient.h:
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::adjustObservedState):
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::mouseMoved):

2019-07-29  Sergei Glazunov  <glazunov@google.com>

        The maximum subframe count check should not be skipped for empty URLs.
        https://bugs.webkit.org/show_bug.cgi?id=200032

        Reviewed by Ryosuke Niwa.

        Move the check closer to the actual frame creation code in `loadSubframe`.

        Test: fast/dom/connected-subframe-counter-overflow.html

        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction): Assert that all child frames have been detached.
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::canLoad const):
        (WebCore::HTMLFrameElementBase::canLoadURL const):
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::canAddSubframe const): Deleted.
        * html/HTMLFrameOwnerElement.h:
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::canLoadURL const):
        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::loadSubframe):

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

        [ContentChangeObserver] ChromeClient::observedContentChange() name is misleading
        https://bugs.webkit.org/show_bug.cgi?id=200238
        <rdar://problem/53677038>

        Reviewed by Simon Fraser.

        This function indicates that we've finished observing content changes.

        * loader/EmptyClients.h:
        * page/ChromeClient.h:
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::adjustObservedState):
        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::mouseMoved):

2019-07-29  Sam Weinig  <weinig@apple.com>

        StringBuilder::append(makeString(...)) is inefficient
        https://bugs.webkit.org/show_bug.cgi?id=200034

        Reviewed by Saam Barati.

        Replace uses of StringBuilder::append(makeString(...)) with StringBuilder::flexiblAppend(...).
        Where possible, also merged consecutive calls to StringBuilder::append(...) into a single call
        to StringBuilder::flexiblAppend(...) to avoid unnecessary additional overflow checks and resizes.
        Also where possible, replaced StringBuilder with makeString() if no branching was used during
        construction.
        
        A lot more can be done to improve the efficiency of StringBuilder use in the WHLSL code including:
        - Using StringView more prevelently, especially when passing a substring to the StringBuilder.
        - Passing existing StringBuilders to functions for them to use rather than returning a String and 
          then appending that to another StringBuilder.
        - Using custom StringTypeAdapters for generated names, rather than storing them as Strings. 

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledOutputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::unpack):
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::unpack):
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack):
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
        (WebCore::WHLSL::Metal::generateMetalCodeShared):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::visit):
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::metalTypes):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Types::appendNameTo):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::logLayerInfo):
        * testing/Internals.cpp:
        (WebCore::Internals::ongoingLoadsDescriptions const):

2019-07-29  Megan Gardner  <megan_gardner@apple.com>

        Force Reveal to always lookup from menu
        https://bugs.webkit.org/show_bug.cgi?id=200186
        <rdar://problem/52967940>

        Reviewed by Tim Horton.

        We currently only have the 'lookup' menu item, so we should always force the 'lookup' action from it.

        Reveal is not currently testable.

        * editing/cocoa/DictionaryLookup.mm:
        (WebCore::showPopupOrCreateAnimationController):

2019-07-29  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r246899): Subtitles show twice when controls show/hide on hulu.com
        https://bugs.webkit.org/show_bug.cgi?id=200187
        rdar://problem/53511121

        Reviewed by Zalan Bujtas.

        When a layer that painted into shared backing moved, we'd fail to repaint its old position
        because the RenderLayer's repaint rects are cleared via BackingSharingState::updateBeforeDescendantTraversal().

        Recomputing repaint rects is expensive, so we only want to do it when necessary, which is for
        layers that start and stop sharing (going into and out of compositing already recomputes them).
        So add logic to RenderLayerBacking::setBackingSharingLayers() that recomputes repaint rects
        on layers that will no longer use shared backing, and those that are newly using shared
        backing.

        Test: compositing/shared-backing/backing-sharing-repaint.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setBackingProviderLayer):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::setBackingSharingLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::BackingSharingState::appendSharingLayer):
        (WebCore::RenderLayerCompositor::updateBacking):

2019-07-29  Simon Fraser  <simon.fraser@apple.com>

        The touch-action property was ignored on replaced elements (canvas, img etc)
        https://bugs.webkit.org/show_bug.cgi?id=200205
        rdar://problem/53331224

        Reviewed by Antti Koivisto.

        The event region painting code didn't handle replaced elements correctly,
        causing touch-action to get ignored for <canvas>, <img> etc. Fix by handling
        region painting in RenderReplaced.

        This still doesn't fix <iframe> but I'm not sure what the correct behavior is there
        (webkit.org/b/200204).

        Test: pointerevents/ios/touch-action-region-replaced-elements.html

        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::paint):
        (WebCore::RenderReplaced::shouldPaint):

2019-07-29  Philippe Normand  <pnormand@igalia.com>

        REGRESSION(r243058): [GStreamer] WebKitWebSrc's internal queue can exhaust the WebProcess memory
        https://bugs.webkit.org/show_bug.cgi?id=199998

        Reviewed by Xabier Rodriguez-Calvar.

        With the webkitwebsrc rewrite the element lost its ability to tell
        the resource loader when to pause and resume downloading because
        we don't use appsrc and its enough-data/need-data signals anymore.
        So new heuristics are introduced with this patch. Downloading of
        resources bigger than 2MiB might pause when the internal adapter
        has enough data (2% of the full resource) and resume when the
        adapter size goes below 20% of those 2%.

        No new tests, the media element spec doesn't clearly mandate how
        the resource loading should behave when the element is paused or
        how aggressively the resource should be downloaded during
        playback.

        This patch was functionally tested with a 1.3GiB resource loaded
        over the local network, the resource was downloaded in ~30MiB
        chunks, stopping and resuming every 20 seconds, approximately.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webkit_web_src_class_init):
        (webKitWebSrcCreate):
        (CachedResourceStreamingClient::responseReceived):
        (CachedResourceStreamingClient::dataReceived):

2019-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        WebSockets: workers never use the platform WebSockets path
        https://bugs.webkit.org/show_bug.cgi?id=200161

        Reviewed by Michael Catanzaro.

        A WebCore::WebSocketChannel is created unconditionally in WorkerThreadableWebSocketChannel::Peer.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create): New create method that receives a Document& and creates the
        WebSocket channel checking the runtime enabled features to decide.
        * Modules/websockets/ThreadableWebSocketChannel.h:
        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer): Use ThreadableWebSocketChannel::create().

2019-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Multiple context menu actions broken for YouTube videos
        https://bugs.webkit.org/show_bug.cgi?id=199999

        Reviewed by Eric Carlson.

        Do not include CopyMediaLinkItem and OpenMediaInNewWindowItem to the context menu when media URL is not
        downloadable or the request can't be handled.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::populate):

2019-07-28  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r247886.
        https://bugs.webkit.org/show_bug.cgi?id=200214

        "Causes PLT5 regression on some machines" (Requested by mlam|a
        on #webkit).

        Reverted changeset:

        "Add crash diagnostics for debugging unexpected zapped cells."
        https://bugs.webkit.org/show_bug.cgi?id=200149
        https://trac.webkit.org/changeset/247886

2019-07-28  Tim Horton  <timothy_horton@apple.com>

        Fix the release build

        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::insert):

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

        [iOS] Touch regions overlay needs to show touch-action:none
        https://bugs.webkit.org/show_bug.cgi?id=200203

        Reviewed by Wenson Hsieh.

        When I added touch-action overlay painting, I didn't realize that touch-action:none
        was an important value to display. But it is, so fix that.

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

2019-07-27  Saam Barati  <sbarati@apple.com>

        [WHLSL] Remove UnnamedType copy/move constructors and mark classes as final
        https://bugs.webkit.org/show_bug.cgi?id=200188

        Reviewed by Myles C. Maxfield.

        Since they are ref counted, you should make taking a ref to them
        instead of moving or copying them. This patch encodes that by deleting
        the relevant copy/move constructors and assignment operators.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        (WebCore::WHLSL::AST::ArrayType::ArrayType): Deleted.
        (WebCore::WHLSL::AST::ArrayType::create): Deleted.
        (WebCore::WHLSL::AST::ArrayType::type const): Deleted.
        (WebCore::WHLSL::AST::ArrayType::type): Deleted.
        (WebCore::WHLSL::AST::ArrayType::numElements const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        (WebCore::WHLSL::AST::PointerType::PointerType): Deleted.
        (WebCore::WHLSL::AST::PointerType::create): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        (WebCore::WHLSL::AST::TypeReference::TypeReference): Deleted.
        (WebCore::WHLSL::AST::TypeReference::create): Deleted.
        (WebCore::WHLSL::AST::TypeReference::name): Deleted.
        (WebCore::WHLSL::AST::TypeReference::typeArguments): Deleted.
        (WebCore::WHLSL::AST::TypeReference::maybeResolvedType const): Deleted.
        (WebCore::WHLSL::AST::TypeReference::resolvedType const): Deleted.
        (WebCore::WHLSL::AST::TypeReference::setResolvedType): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:

2019-07-27  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Update GPUComputePipeline errors to match GPURenderPipeline implementation
        https://bugs.webkit.org/show_bug.cgi?id=200097

        Reviewed by Myles C. Maxfield.

        Remove passing around a functionName in GPUComputePipeline creation in favor of setting it on the GPUErrorScopes.
        Also, WebGPU objects no longer create new Ref<>s unless object creation succeeds.

        No new tests. Covered by existing tests.

        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createBuffer const):
        (WebCore::WebGPUDevice::createBufferMapped const):
        (WebCore::WebGPUDevice::createComputePipeline const):
        * platform/graphics/gpu/GPUBuffer.h:
        * platform/graphics/gpu/GPUComputePipeline.h:
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateBuffer):
        (WebCore::GPUDevice::tryCreateComputePipeline const):
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUErrorScopes.cpp:
        (WebCore::GPUErrorScopes::generatePrefixedError): Only validaton errors have messages right now.
        * platform/graphics/gpu/GPUErrorScopes.h:
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::validateBufferUsage):
        (WebCore::GPUBuffer::tryCreate):
        (WebCore::GPUBuffer::GPUBuffer):
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):
        (WebCore::convertComputePipelineDescriptor):
        (WebCore::tryCreateMTLComputePipelineState):
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):

        These classes were made RefCounted in a previous patch; remove their move ctors to fix build.
        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:

2019-07-27  Andres Gonzalez  <andresg_22@apple.com>

        Expose the aria-label attribute for <video> elements.
        https://bugs.webkit.org/show_bug.cgi?id=200169
        <rdar://problem/51754558>

        Reviewed by Chris Fleizach.

        Tests: accessibility/ios-simulator/media-with-aria-label.html
               accessibility/media-with-aria-label.html

        We now expose the <video> element to accessibility clients as long as auto-play is not enabled.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityIsWebInteractiveVideo]):

2019-07-26  Saam Barati  <sbarati@apple.com>

        Unreviewed. Remove invalid assertion after r247878.
        We were essentially asserting all UnnamedType* were
        unique. But my patch made this no longer the case by
        design to make things faster.

        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::insert):

2019-07-26  Mark Lam  <mark.lam@apple.com>

        Add crash diagnostics for debugging unexpected zapped cells.
        https://bugs.webkit.org/show_bug.cgi?id=200149
        <rdar://problem/53570112>

        Reviewed by Yusuke Suzuki, Saam Barati, and Michael Saboff.

        No new tests because this is a feature for debugging crashes.  It has been tested
        manually by modifying the code to force a crash at the point of interest.

        Added some comments to document the hashes of known subspaces.

        * bindings/js/WebCoreJSClientData.cpp:
        (WebCore::JSVMClientData::JSVMClientData):

2019-07-26  Ryosuke Niwa  <rniwa@webkit.org>

        Moving right by word boundary right before an object element followed by a br element hangs
        https://bugs.webkit.org/show_bug.cgi?id=200144

        Reviewed by Simon Fraser.

        The bug was caused by an infinite loop inside wordBreakIteratorForMinOffsetBoundary when it's trying to
        find the previous word boundary at the beginning of a word after the object element and the br element.
        In this case, previousBox is at the br element after the object element in the preceding line, and
        logicallyPreviousBox ends up returning the same inline box (that of the br element), causing a hang.

        Here's how. In logicallyPreviousBox, previousRootInlineBoxCandidatePosition returns a legacy position
        immediately after the object element. The root inline box for this position (previousRoot) is the one
        that contains the object element and the br element. However, when previousTextOrLineBreakBox is called
        on this root inline box, "box" argument of the function is set to nullptr, and as a result, the function
        finds and returns the same inline box of the br element that was passed to logicallyPreviousBox.

        Fixed the bug by passing the starting inline box to previousRootInlineBoxCandidatePosition when its
        root inline box is the previous root inline box (previousRoot). Also applied the same fix to
        logicallyNextBox even though we don't have a reproduction for that case for now (RTL test case is
        unaffected by nextRootInlineBoxCandidatePosition).

        Tests: editing/selection/move-by-word-visually-across-object-element-1.html
               editing/selection/move-by-word-visually-across-object-element-2.html
               editing/selection/move-by-word-visually-across-object-element-3.html

        * editing/VisibleUnits.cpp:
        (WebCore::logicallyPreviousBox): Fixed the bug.
        (WebCore::logicallyNextBox): Ditto.

2019-07-26  Brady Eidson  <beidson@apple.com>

        Do not fire readystatechange events at documents about to get replaced by javascript URLs.
        <rdar://problem/51665406> and https://bugs.webkit.org/show_bug.cgi?id=198786

        Reviewed by Ryosuke Niwa.

        Test: http/tests/dom/ready-state-on-javascript-replace.html

        We were firing too many readystatechange events, more than other browsers.
        Our behavior on this test with this patch now matches Chrome.

        (There was even an ancient FIXME alluding to this referencing a spec issue, and that issues has long been resolvedv)

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopLoading):

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

        [iPadOS] wix.com cannot select a template to edit or view
        https://bugs.webkit.org/show_bug.cgi?id=200174
        <rdar://problem/53281296>

        Reviewed by Simon Fraser.

        Opt out of simulated mouse event sending for template selection on wix.com.
        When wix.com receives a simulated mouse event during the touch events, it calls preventDefault() which prevents us from running the hover heuristics -> no click.

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

2019-07-26  Saam Barati  <sbarati@apple.com>

        [WHLSL] UnnamedType should be reference counted
        https://bugs.webkit.org/show_bug.cgi?id=200098

        Reviewed by Dean Jackson.

        This patch makes UnnamedType reference counted. The motivation for doing this
        is I measured how many times we were cloning UnnamedTypes, and I found we were
        doing it ~433,000 times in some of Justin's demos. This is hugely wasteful,
        given that an UnnamedType is immutable in the sense that once the type is
        resolved, it will never change. So instead of repeatedly cloning the same
        type, and having Expression point to a UniqueRef of UnnamedType, we should
        instead make UnnamedType reference counted, and have expressions point to a
        potentially shared UnnamedType.
        
        Doing this is hugely beneficial to WHLSL compile times. On Justin's demos,
        these are the results I'm getting:
        
        hello-triangle: neutral
        hello-cube: 55% faster
        compute-blur: 35% faster
        textured-cube: 49% faster

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        (WebCore::WHLSL::AST::ArrayReferenceType::ArrayReferenceType):
        (WebCore::WHLSL::AST::ArrayReferenceType::create):
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        (WebCore::WHLSL::AST::ArrayType::ArrayType):
        (WebCore::WHLSL::AST::ArrayType::create):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::setType):
        (WebCore::WHLSL::AST::Expression::copyTypeTo const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        (WebCore::WHLSL::AST::FloatLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
        (WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
        (WebCore::WHLSL::AST::FloatLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        (WebCore::WHLSL::AST::IntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
        (WebCore::WHLSL::AST::IntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        (WebCore::WHLSL::AST::NullLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        (WebCore::WHLSL::AST::PointerType::PointerType):
        (WebCore::WHLSL::AST::PointerType::create):
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        (WebCore::WHLSL::AST::ReferenceType::ReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
        (WebCore::WHLSL::AST::ResolvableType::resolve):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        (WebCore::WHLSL::AST::StructureElement::StructureElement):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp:
        (WebCore::WHLSL::AST::clone):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        (WebCore::WHLSL::AST::TypeDefinition::TypeDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.cpp:
        (WebCore::WHLSL::AST::TypeReference::wrap):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        (WebCore::WHLSL::AST::TypeReference::create):
        (WebCore::WHLSL::AST::TypeReference::cloneTypeReference const): Deleted.
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::vectorInnerType):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::DuplicateFunctionKey::hash const):
        * 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::matchAndCommit):
        (WebCore::WHLSL::commit):
        (WebCore::WHLSL::Checker::assignConcreteType):
        (WebCore::WHLSL::Checker::assignType):
        (WebCore::WHLSL::Checker::forwardType):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::getUnnamedType):
        (WebCore::WHLSL::argumentTypeForAndOverload):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::isBoolType):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matchAndCommit):
        (WebCore::WHLSL::commit):
        (WebCore::WHLSL::inferTypesForTypeArguments):
        (WebCore::WHLSL::inferTypesForCallImpl):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.h:
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
        (WebCore::WHLSL::Intrinsics::addVector):
        (WebCore::WHLSL::Intrinsics::addMatrix):
        (WebCore::WHLSL::Intrinsics::addTexture):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseTypeArgument):
        (WebCore::WHLSL::Parser::parseType):
        (WebCore::WHLSL::Parser::parseEnumerationDefinition):
        (WebCore::WHLSL::Parser::parseVariableDeclaration):
        (WebCore::WHLSL::Parser::parseVariableDeclarations):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::PreserveLifetimes::PreserveLifetimes):
        (WebCore::WHLSL::PreserveLifetimes::makeStructVariableReference):
        (WebCore::WHLSL::PreserveLifetimes::assignVariableIntoStruct):
        (WebCore::WHLSL::preserveVariableLifetimes):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::anderCallArgument):
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
        (WebCore::WHLSL::conversionCost):
        * Modules/webgpu/WHLSL/WHLSLResolvingType.h:
        (WebCore::WHLSL::ResolvingType::ResolvingType):
        (WebCore::WHLSL::ResolvingType::getUnnamedType):
        (WebCore::WHLSL::ResolvingType::visit):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (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):

2019-07-26  Takashi Komori  <Takashi.Komori@sony.com>

        [curl] Heap corruption in ~CurlResponse
        https://bugs.webkit.org/show_bug.cgi?id=198320

        Reviewed by Fujii Hironori.

        Stop sharing object which was reffered by two threads to fix crash bug.

        No tests needed, no functionality changes.

        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::start):
        (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
        * platform/network/curl/CurlRequest.h:

2019-07-26  Youenn Fablet  <youenn@apple.com>

        slides.google.com: opening speaker notes while presenting causes a fatal error in the web app on iPad
        https://bugs.webkit.org/show_bug.cgi?id=199933
        <rdar://problem/53034345>

        Reviewed by Darin Adler.

        docs.google.com might sometimes try to window.open an about URL that not about:blank or about:srcdoc.
        In that case, WebKit is opening a window but is considering that the window is cross origin with its opener.
        This breaks docs.google.com as they want to access the website.
        Add a site-specific hack so as to treat all about URLs being opened through window.open as about:blank.

        Manually tested on docs.google.com website.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::createWindow):
        (WebCore::DOMWindow::open):
        * page/Quirks.cpp:
        (WebCore::Quirks::needsYouTubeOverflowScrollQuirk const):
        (WebCore::Quirks::shouldOpenAsAboutBlank const):
        * page/Quirks.h:

2019-07-26  Alexander Mikhaylenko  <exalm7659@gmail.com>

        REGRESSION(r246496): [GTK] Tapping the web view scrolls up a bit
        https://bugs.webkit.org/show_bug.cgi?id=200084

        Reviewed by Carlos Garcia Campos.

        gdk_event_get_scroll_direction() returns false, but also sets direction to GDK_SCROLL_UP if
        the direction was GDK_SCROLL_SMOOTH. Relying on zero deltas in this case is not correct, because
        they can also be zero with GDK_SCROLL_SMOOTH. In this case, set the direction manually to avoid
        that.

        See https://gitlab.gnome.org/GNOME/gtk/issues/2048

        * platform/gtk/PlatformWheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2019-07-26  Rob Buis  <rbuis@igalia.com>

        Make storing cross-origin top-level prefetches in HTTP cache optional
        https://bugs.webkit.org/show_bug.cgi?id=199499

        Reviewed by Youenn Fablet.

        Add Internals API for adding an event listener to prefetch load.

        Test: http/wpt/prefetch/link-prefetch-skip-disk-cache.html

        * bindings/js/JSEventListener.h:
        * dom/EventTarget.h:
        (WebCore::EventTarget::addEventListener):
        * dom/Node.h:
        * html/HTMLLinkElement.h:
        * testing/Internals.cpp:
        (WebCore::Internals::addPrefetchLoadEventListener):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-07-25  Tim Horton  <timothy_horton@apple.com>

        Subpixel fringes around TextIndicator snapshots at non-integral scale factors
        https://bugs.webkit.org/show_bug.cgi?id=200145

        Reviewed by Simon Fraser.

        * page/FrameSnapshotting.cpp:
        (WebCore::snapshotFrameRectWithClip):
        * page/FrameSnapshotting.h:
        * page/TextIndicator.cpp:
        (WebCore::snapshotOptionsForTextIndicatorOptions):
        Round the scale factor up, and snappily enclose the clip rects.

        TextIndicator doesn't require the use of the precise scale factor that
        the page is painted at, but we want it to be sharp, so we overshoot!

2019-07-25  Brent Fulgham  <bfulgham@apple.com>

        Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr on FTW
        https://bugs.webkit.org/show_bug.cgi?id=200093

        Reviewed by Dean Jackson.

        When I wrote the original Direct2D code, I did not realize that the backing memory for the
        ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There
        is no API to access or modify the pixels.

        Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are
        converted to ID2D1Bitmap objects when things are ready to be rendered.

        This makes it possible to use the TextureMapper backend to do efficient compositing and tile
        drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us
        to support filters and other effects.

        * PlatformFTW.cmake:
        * platform/MIMETypeRegistry.cpp:
        (WebCore::supportedImageMIMETypesForEncoding):
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ImageBuffer.h:
        * platform/graphics/NativeImage.h:
        * platform/graphics/OpenGLShims.h:
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::platformLayer const):
        * platform/graphics/texmap/BitmapTexture.cpp:
        (WebCore::BitmapTexture::updateContents):
        * platform/graphics/texmap/BitmapTextureGL.cpp:
        (WebCore::BitmapTextureGL::updateContents):
        * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContext::GraphicsContext):
        (WebCore::GraphicsContext::platformInit):
        (WebCore::GraphicsContextPlatformPrivate::setAlpha):
        (WebCore::GraphicsContext::drawNativeImage):
        (WebCore::GraphicsContext::drawDeviceBitmap):
        (WebCore::GraphicsContext::releaseWindowsContext):
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContextPlatformPrivate::beginDraw):
        (WebCore::GraphicsContextPlatformPrivate::endDraw):
        (WebCore::GraphicsContext::drawPattern):
        (WebCore::GraphicsContext::clipPath):
        * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
        * platform/graphics/win/ImageBufferDataDirect2D.cpp:
        (WebCore::ImageBufferData::getData const):
        (WebCore::ImageBufferData::putData):
        * platform/graphics/win/ImageBufferDataDirect2D.h:
        (): Deleted.
        * platform/graphics/win/ImageBufferDirect2D.cpp:
        (WebCore::ImageBuffer::createCompatibleBuffer):
        (WebCore::ImageBuffer::ImageBuffer):
        (WebCore::createCroppedImageIfNecessary):
        (WebCore::createBitmapImageAfterScalingIfNeeded):
        (WebCore::ImageBuffer::copyImage const):
        (WebCore::ImageBuffer::sinkIntoNativeImage):
        (WebCore::ImageBuffer::copyNativeImage const):
        (WebCore::ImageBuffer::draw):
        * platform/graphics/win/ImageDecoderDirect2D.cpp:
        (WebCore::ImageDecoderDirect2D::createFrameImageAtIndex):
        * platform/graphics/win/ImageDirect2D.cpp:
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):
        * platform/graphics/win/NativeImageDirect2D.cpp:
        (WebCore::imagingFactory):
        (WebCore::nativeImageSize):
        (WebCore::nativeImageHasAlpha):
        (WebCore::nativeImageSinglePixelSolidColor):
        (WebCore::drawNativeImage):
        (WebCore::clearNativeImageSubimages):
        * platform/graphics/win/PathDirect2D.cpp:
        (WebCore::Path::strokeContains const):
        * platform/graphics/win/PatternDirect2D.cpp:
        (WebCore::Pattern::createPlatformPattern const):
        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::read):
        * rendering/RenderElement.cpp:
        (WebCore::RenderElement::shouldRespectImageOrientation const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::nativeImage):

2019-07-25  Ryosuke Niwa  <rniwa@webkit.org>

        REGRESSION (r243637): Some web fonts fail to load on Google docs
        https://bugs.webkit.org/show_bug.cgi?id=200106

        Reviewed by Geoffrey Garen.

        Prior to r243637, WebKit threw an exception if the font family name didn't parse as a CSS identifier in the setter
        of `family` IDL attribute of FontFace interface because WebKit implemented the old spec faithfully unlike Chrome
        and Firefox which basically treated it as a string and didn't throw any exception. [1]

        To account for this browser behavior difference, Google docs implemented a workaround for Safari which is to wrap
        some identifiers in font family names with quotation marks: `docs-Amatic SC` as `'docs-Amatic SC'` and
        `docs-Playfair Display` as `docs-'Playfair Display'`. Unfortunately, this in turn causes the latest Safari to
        not match these font face family with those that appear in stylesheet since we no longer parse it as a CSS identifier.

        This patch adds a site specific quirk for Google docs to undo this workaround by stripping away single quotation marks.

        [1] See https://github.com/w3c/csswg-drafts/issues/3776 for the context.

        * css/FontFace.cpp:
        (WebCore::FontFace::create):
        (WebCore::FontFace::setFamily):
        * css/FontFace.h:
        * css/FontFace.idl:
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldStripQuotationMarkInFontFaceSetFamily const):
        * page/Quirks.h:

2019-07-25  Dean Jackson  <dino@apple.com>

        Add helper for ignoring deprecated implementation warnings
        https://bugs.webkit.org/show_bug.cgi?id=200135

        Reviewed by Wenson Hsieh.

        Add ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN/END macro which
        is IGNORE_WARNINGS_BEGIN("deprecated-implementations")

        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
        (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
        (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
        (-[WebAccessibilityObjectWrapper accessibilityActionDescription:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
        (-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]): Deleted.
        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
        (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]):
        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):

2019-07-25  Saam Barati  <sbarati@apple.com>

        Unreviewed. Speculative build fix for tvOS of missing include.

        * Modules/webgpu/WHLSL/WHLSLLexer.h:

2019-07-25  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed, fix -Wunused-parameter warning

        * testing/Internals.cpp:
        (WebCore::Internals::privatePlayerVolume):

2019-07-25  Saam Barati  <sbarati@apple.com>

        [WHLSL] Add descriptive error messages
        https://bugs.webkit.org/show_bug.cgi?id=195682
        <rdar://problem/50746322>

        Reviewed by Myles C. Maxfield.

        This patch adds error messages to the WHLSL compiler. I'm taking a first pass
        at having decent error messages everywhere we set an error. However, we will
        probably refine these messages to be more accurate and descriptive over time.
        
        Passes that can fail no longer return a boolean. Instead, they return Expected<void, Error>.
        From Error, we can generate a descriptive error message. Visitor::setError now
        requires an Error as an argument. So anywhere in Visitor that might fail is
        now required to provide an error message.
        
        In a follow-up to this, we should actually make our checkFail tests test that
        they get the expected error message: https://bugs.webkit.org/show_bug.cgi?id=200049

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLQualifier.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        (WebCore::WHLSL::autoInitializeVariables):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h:
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::checkDuplicateFunctions):
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.h:
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
        (WebCore::WHLSL::TextureReferencesChecker::visit):
        (WebCore::WHLSL::checkTextureReferences):
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h:
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        (WebCore::WHLSL::resolveByInstantiation):
        (WebCore::WHLSL::resolveFunction):
        (WebCore::WHLSL::checkSemantics):
        (WebCore::WHLSL::Checker::assignTypes):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::Checker::recurseAndGetInfo):
        (WebCore::WHLSL::Checker::getInfo):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::recurseAndRequireBoolType):
        (WebCore::WHLSL::check):
        * Modules/webgpu/WHLSL/WHLSLChecker.h:
        * Modules/webgpu/WHLSL/WHLSLCodeLocation.h: Added.
        (WebCore::WHLSL::CodeLocation::CodeLocation):
        (WebCore::WHLSL::CodeLocation::startOffset const):
        (WebCore::WHLSL::CodeLocation::endOffset const):
        (WebCore::WHLSL::CodeLocation::operator== const):
        (WebCore::WHLSL::CodeLocation::operator!= const):
        (WebCore::WHLSL::CodeLocation::operator bool const):
        * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:
        (WebCore::WHLSL::computeDimensions):
        * Modules/webgpu/WHLSL/WHLSLError.h: Added.
        (WebCore::WHLSL::Error::Error):
        (WebCore::WHLSL::Error::codeLocation const):
        (WebCore::WHLSL::Error::message const):
        * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp:
        (WebCore::WHLSL::checkFunctionStages):
        * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.h:
        * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
        (WebCore::WHLSL::Gatherer::reset):
        (WebCore::WHLSL::Gatherer::visit):
        (WebCore::WHLSL::gatherEntryPointItems):
        * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Lexer::lineAndColumnNumberFromOffset):
        (WebCore::WHLSL::Lexer::errorString):
        (WebCore::WHLSL::Lexer::lineNumberFromOffset): Deleted.
        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::CodeLocation::CodeLocation):
        (WebCore::WHLSL::Lexer::errorString):
        (WebCore::WHLSL::AST::CodeLocation::CodeLocation): Deleted.
        (WebCore::WHLSL::AST::CodeLocation::startOffset const): Deleted.
        (WebCore::WHLSL::AST::CodeLocation::endOffset const): Deleted.
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::~NameResolver):
        (WebCore::WHLSL::NameResolver::visit):
        (WebCore::WHLSL::resolveNamesInTypes):
        (WebCore::WHLSL::resolveTypeNamesInFunctions):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::intLiteralToInt):
        (WebCore::WHLSL::uintLiteralToUint):
        (WebCore::WHLSL::floatLiteralToFloat):
        (WebCore::WHLSL::recognizeSimpleUnsignedInteger):
        (WebCore::WHLSL::Parser::parseTypeArgument):
        (WebCore::WHLSL::Parser::parseType):
        (WebCore::WHLSL::Parser::parseForLoop):
        (WebCore::WHLSL::Parser::parseWhileLoop):
        (WebCore::WHLSL::Parser::parseEffectfulExpression):
        (WebCore::WHLSL::Parser::parseLimitedSuffixOperator):
        (WebCore::WHLSL::Parser::parseSuffixOperator):
        (WebCore::WHLSL::Parser::parseExpression):
        (WebCore::WHLSL::Parser::completeTernaryConditional):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleShift):
        (WebCore::WHLSL::Parser::completePossibleAdd):
        (WebCore::WHLSL::Parser::completePossibleMultiply):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        (WebCore::WHLSL::Parser::parseCallExpression):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        (WebCore::WHLSL::Parser::Error::Error): Deleted.
        (WebCore::WHLSL::Parser::Error::dump const): Deleted.
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        (WebCore::WHLSL::prepare):
        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
        (WebCore::WHLSL::checkRecursion):
        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.h:
        * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
        (WebCore::WHLSL::checkRecursiveTypes):
        * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.h:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        (WebCore::WHLSL::includeStandardLibrary):
        * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp:
        (WebCore::WHLSL::checkStatementBehavior):
        * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.h:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.h:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.h:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.h:
        * Modules/webgpu/WHLSL/WHLSLVisitor.h:
        (WebCore::WHLSL::Visitor::hasError const):
        (WebCore::WHLSL::Visitor::expectedError):
        (WebCore::WHLSL::Visitor::checkErrorAndVisit):
        (WebCore::WHLSL::Visitor::setError):
        (WebCore::WHLSL::Visitor::error const): Deleted.
        (): Deleted.
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):

2019-07-25  Saam Barati  <sbarati@apple.com>

        [WHLSL] Add optional logging for phase timings
        https://bugs.webkit.org/show_bug.cgi?id=200099

        Reviewed by Dean Jackson.

        As we're doing WHLSL compiler speedup work, it helps to be able to
        log phase times. I think a few of us have written such patches locally.
        In this patch, I'm adding a way to easily switch this logging on and
        off by flipping a "constexpr bool" and rebuilding.

        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::logPhaseTimes):
        (WebCore::WHLSL::PhaseTimer::PhaseTimer):
        (WebCore::WHLSL::PhaseTimer::~PhaseTimer):
        (WebCore::WHLSL::prepareShared):
        (WebCore::WHLSL::prepare):

2019-07-25  Chris Dumez  <cdumez@apple.com>

        Avoid some unnecessary HashMap copies
        https://bugs.webkit.org/show_bug.cgi?id=200129

        Reviewed by Youenn Fablet.

        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::addRegistrationFromStore):

2019-07-25  Joshua Watt  <JPEW.hacker@gmail.com>

        [WPE] Draw other button types
        https://bugs.webkit.org/show_bug.cgi?id=199377

        Reviewed by Michael Catanzaro.

        There are other button types that should be drawn with the default style
        besides just push buttons.

        * platform/wpe/ThemeWPE.cpp:
        (WebCore::ThemeWPE::paint):
        (WebCore::ThemeWPE::paintButton):
        * platform/wpe/ThemeWPE.h:

2019-07-25  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r244995): Assertion failure when addEventListener to an SVGElement which has an. instance in shadow tree
        https://bugs.webkit.org/show_bug.cgi?id=200083

        Reviewed by Ryosuke Niwa.

        When adding an event listener to an SVGElement, the same event listener
        has to be add to all the instances of SVGElement in the shadow tree. See
        SVGElement::addEventListener().

        In r244995, an assertion was added to ensure if the event listener is
        attached to an event target, the new event target has be the same as the
        attached one. This assertion isn't correct for the event targets which 
        were copied from the targetElement sub tree of an SVGUseElement to the
        shadow tree.

        Test: svg/custom/add-event-listener-shadow-tree-element.html

        * bindings/js/JSLazyEventListener.cpp:
        (WebCore::isCloneInShadowTreeOfSVGUseElement):
        (WebCore::JSLazyEventListener::checkValidityForEventTarget):

2019-07-25  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r247821.

        Caused two crashing Layout Tests

        Reverted changeset:

        "Make storing cross-origin top-level prefetches in HTTP cache
        optional"
        https://bugs.webkit.org/show_bug.cgi?id=199499
        https://trac.webkit.org/changeset/247821

2019-07-25  Chris Dumez  <cdumez@apple.com>

        Avoid UI Process hangs when the WebContent process is showing JS prompts / alerts
        https://bugs.webkit.org/show_bug.cgi?id=200107
        <rdar://problem/53034592>

        Reviewed by Geoffrey Garen.

        Add testing infrastructure for SendSyncOption::ProcessIncomingSyncMessagesWhenWaitingForSyncReply.

        Test: fast/misc/testProcessIncomingSyncMessagesWhenWaitingForSyncReply.html

        * page/ChromeClient.h:
        * testing/Internals.cpp:
        (WebCore::Internals::testProcessIncomingSyncMessagesWhenWaitingForSyncReply):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-07-25  Rob Buis  <rbuis@igalia.com>

        Make storing cross-origin top-level prefetches in HTTP cache optional
        https://bugs.webkit.org/show_bug.cgi?id=199499

        Reviewed by Youenn Fablet.

        Add Internals API for adding an event listener to prefetch load.

        Test: http/wpt/prefetch/link-prefetch-skip-disk-cache.html

        * bindings/js/JSEventListener.h:
        * dom/EventTarget.h:
        (WebCore::EventTarget::addEventListener):
        * dom/Node.h:
        * html/HTMLLinkElement.h:
        * testing/Internals.cpp:
        (WebCore::Internals::addPrefetchLoadEventListener):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-07-24  Yusuke Suzuki  <ysuzuki@apple.com>

        [bmalloc] Add IsoHeap test to ensure that IsoHeap pages are not allocating too large VA
        https://bugs.webkit.org/show_bug.cgi?id=200103

        Reviewed by Mark Lam.

        No behavior change in WebCore.

        * page/MemoryRelease.cpp:
        * page/ResourceUsageThread.h:
        (WebCore::TagInfo::TagInfo): Deleted.
        * page/cocoa/ResourceUsageThreadCocoa.mm:
        (WebCore::vmPageSize): Deleted.
        (WebCore::logFootprintComparison): Deleted.
        (WebCore::displayNameForVMTag): Deleted.
        (WebCore::pagesPerVMTag): Deleted.

2019-07-24  Devin Rousso  <drousso@apple.com>

        Web Inspector: support `console.screenshot` with detached Nodes that are graphical
        https://bugs.webkit.org/show_bug.cgi?id=199309

        Reviewed by Joseph Pecoraro.

        Test: inspector/console/console-screenshot.html

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):

2019-07-24  Saam Barati  <sbarati@apple.com>

        [WHLSL] Use bmalloc instead of system malloc for WHLSL data structures
        https://bugs.webkit.org/show_bug.cgi?id=200063

        Rubber-stamped by Sam Weinig.

        This is a 25-30% WHLSL compile time speedup on Justin's textured-cube demo
        and a ~40% compile time speedup on the hello-cube demo.
        
        The phases that speed up from this are:
        checker
        includeStandardLibrary
        autoInitializeVariables
        resolveProperties

        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNumThreadsFunctionAttribute.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
        * Modules/webgpu/WHLSL/AST/WHLSLType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:

2019-07-24  Devin Rousso  <drousso@apple.com>

        Web Inspector: support `console.screenshot` with ImageData and ImageBitmap
        https://bugs.webkit.org/show_bug.cgi?id=199304

        Reviewed by Joseph Pecoraro.

        Test: inspector/console/console-screenshot.html

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::screenshot):

2019-07-24  Devin Rousso  <drousso@apple.com>

        Web Inspector: REGRESSION: Overlay: highlighting a ::before/::after shows the node info of the parent instead
        https://bugs.webkit.org/show_bug.cgi?id=200051

        Reviewed by Joseph Pecoraro.

        When highlighting a pseudo-element, only use the parent node for selector information. All
        rendering data should still come from the pseudo-element itself.

        * inspector/InspectorOverlay.cpp:
        (WebCore::drawShapeHighlight):
        (WebCore::InspectorOverlay::drawElementTitle):

2019-07-24  Devin Rousso  <drousso@apple.com>

        Web Inspector: support `console.screenshot` with subclasses of CanvasRenderingContext
        https://bugs.webkit.org/show_bug.cgi?id=199305

        Reviewed by Joseph Pecoraro.

        Test: inspector/console/console-screenshot.html

        * page/PageConsoleClient.cpp:
        (WebCore::canvasRenderingContext):
        (WebCore::PageConsoleClient::record):
        (WebCore::PageConsoleClient::recordEnd):
        (WebCore::PageConsoleClient::screenshot):

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

        Remove MediaPlayerPrivate::supportsMuting()
        https://bugs.webkit.org/show_bug.cgi?id=200005

        Reviewed by Eric Carlson.

        Remove no longer needed interface method.
        No change of behavior.

        * WebCore.order:
        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setVolume):
        (WebCore::MediaPlayer::setMuted):
        * platform/graphics/MediaPlayerPrivate.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

2019-07-24  Tim Horton  <timothy_horton@apple.com>

        Daring Fireball long press highlights are unnecessarily inflated due to false illegibility
        https://bugs.webkit.org/show_bug.cgi?id=200064

        Reviewed by Geoff Garen.

        If we consider text illegible on the given estimated background color,
        we bail from doing a tightly fitted selection-only TextIndicator and
        instead just paint the page without modification into the indicator,
        causing ugly overlap and an excessively inflated indicator.

        Change the mechanism we use to determine illegibility to be based on
        a standard, instead of a constant chosen by hand 13 years ago.

        Test: fast/text-indicator/text-indicator-with-low-contrast-text.html

        * platform/graphics/ColorUtilities.cpp:
        (WebCore::luminance):
        Fix a typo.

        (WebCore::contrastRatio):
        Add a function that computes the contrast ratio given two colors using
        the formula from WCAG.

        * platform/graphics/ColorUtilities.h:
        * rendering/TextPaintStyle.cpp:
        (WebCore::textColorIsLegibleAgainstBackgroundColor):
        Make use of WCAG's minimum legible contrast ratio instead of an
        arbitrary color difference cutoff for determining whether we consider
        text legible. It seems sensible and also considers the text on DF readable
        (which it seems to be to me!).

        * testing/Internals.cpp:
        (WebCore::Internals::TextIndicatorInfo::TextIndicatorInfo):
        * testing/Internals.h:
        * testing/Internals.idl:
        Expose all of the text rects to Internals, not just the bounding rect.
        Expose some more TextIndicator options to Internals so that we can
        turn on the legibility mechanism.

2019-07-24  Devin Rousso  <drousso@apple.com>

        Web Inspector: print the target of `console.screenshot` last so the target is the closest item to the image
        https://bugs.webkit.org/show_bug.cgi?id=199308

        Reviewed by Joseph Pecoraro.

        Right now, evaluating `console.screenshot(document, "test", 1);` will log a message to the
        console with `#document`, `"test"`, and `1`, all on different lines (togglable by a
        disclosure triangle) since `#document` isn't stringifiable.

        The ideal situation would be to have `"test"` and `1` logged on the same line, and then have
        `#document` be in a disclosure triangle. This way, you can "label" your images using
        additional arguments (e.g. `console.screenshot(document.images[1], "second image");`), as
        well as provide other data.

        If the only argument was the target, it should print as if it was `console.log(target);`.

        If there are no arguments, it should print the text "Viewport"` before the image.

        Test: inspector/console/console-screenshot.html

        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::addMessage):
        (WebCore::PageConsoleClient::screenshot):

2019-07-24  Alicia Boya García  <aboya@igalia.com>

        [MSE] Reenqueue after removeCodedFrames()
        https://bugs.webkit.org/show_bug.cgi?id=199749

        Reviewed by Xabier Rodriguez-Calvar.

        Before this patch, SourceBuffer::removeCodedFrames() did not trigger
        an immediate reenqueue, but rather just set the `needsReenqueuing`
        flag, deferring it for the next append... but there may not be another
        append! In that case, the removed frames would still wrongly play.

        This is the case for instance in tests where a single long media
        append is done and then "cropped" with SourceBuffer.erase().

        Test: media/media-source/media-source-erase-after-last-append.html

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::removeCodedFrames):

2019-07-24  Jer Noble  <jer.noble@apple.com>

        Add per-document autoplay quirk for netflix.com.
        https://bugs.webkit.org/show_bug.cgi?id=200058

        Reviewed by Eric Carlson.

        Opt netflix.com into the desktop-style per-document autoplay quirk.

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

2019-07-24  Alicia Boya García  <aboya@igalia.com>

        [GStreamer] Don't crash with empty video src
        https://bugs.webkit.org/show_bug.cgi?id=200081

        When a <video> element is set to load empty or about:blank, a player is still
        created, but no pipeline is loaded. This patch fixes some assertion errors that
        manifested in that case.

        Reviewed by Philippe Normand.

        Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_crash_empty_src.html

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
        (WebCore::MediaPlayerPrivateGStreamer::platformDuration const):
        (WebCore::MediaPlayerPrivateGStreamer::paused const):

2019-07-23  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Implement errors for GPURenderPipeline creation
        https://bugs.webkit.org/show_bug.cgi?id=200046

        Reviewed by Myles C. Maxfield.

        Replacing error logging in GPURenderPipeline creation with GPUError generation. 
        Update GPUErrorScopes to re-use an error message prefix for less boiler-plate.

        Test: webgpu/render-pipeline-errors.html

        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createRenderPipeline const):
        * Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
        (WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
        * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateRenderPipeline const):
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUErrorScopes.cpp:
        (WebCore::GPUErrorScopes::generatePrefixedError):
        * platform/graphics/gpu/GPUErrorScopes.h:
        (WebCore::GPUErrorScopes::setErrorPrefix):
        * platform/graphics/gpu/GPURenderPipeline.h:
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::tryCreateMtlDepthStencilState):
        (WebCore::trySetVertexInput):
        (WebCore::trySetColorStates):
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):
        (WebCore::convertRenderPipelineDescriptor):
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::GPURenderPipeline::tryCreate):
        (WebCore::GPURenderPipeline::GPURenderPipeline):

2019-07-23  Konstantin Tokarev  <annulen@yandex.ru>

        ImageDecoderDirect2D::hotSpot() should return WTF::nullopt instead of default constructed value
        https://bugs.webkit.org/show_bug.cgi?id=200055

        Reviewed by Brent Fulgham.

        * platform/graphics/win/ImageDecoderDirect2D.cpp:
        (WebCore::ImageDecoderDirect2D::hotSpot const):

2019-07-23  Tim Horton  <timothy_horton@apple.com>

        Long press hint has half blue shape in Feedly.com
        https://bugs.webkit.org/show_bug.cgi?id=200053
        <rdar://problem/53323369>

        Reviewed by Simon Fraser.

        No new tests, because TextIndicator snapshots are not yet testable.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintForegroundForFragments):
        Paint ChildBlockBackgrounds when painting selection AND backgrounds;
        only exclude it when doing a selection-only paint.

2019-07-23  Chris Fleizach  <cfleizach@apple.com>

        AX: CrashTracer: com.apple.WebKit.WebContent at WebKit: WebKit::WebSpeechSynthesisClient::speak
        https://bugs.webkit.org/show_bug.cgi?id=199988

        Reviewed by Per Arne Vollan.

        Implement the reset state to cancel current speech jobs.

        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::startSpeakingImmediately):
        (WebCore::SpeechSynthesis::cancel):
        * platform/PlatformSpeechSynthesizer.h:
        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
        (WebCore::PlatformSpeechSynthesizer::resetState):
        * platform/mac/PlatformSpeechSynthesizerMac.mm:
        (WebCore::PlatformSpeechSynthesizer::resetState):

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

        [iOS] Tapping the search field on a search results page on zillow.com shows and immediately dismisses the keyboard
        https://bugs.webkit.org/show_bug.cgi?id=200044
        <rdar://problem/53103732>

        Reviewed by Wenson Hsieh.

        1. The keyboard gets dismissed as the result of scroll event.
        2. The (horizontal)scroll event is initiated by WebKit as we try to re-center the content.
        3. The content gets off-centered as the result of the newly constructed drop-down menu which slightly sticks out of the document to the right (layout overflows).

        It works with shipping version of iOS because _zoomToFocusRect operates on stale viewport information (see r244494 for the progression).
        This patch applies a site specific quirk to restore shipping behavior.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldAvoidScrollingWhenFocusedContentIsVisible const):
        * page/Quirks.h:

2019-07-23  Said Abou-Hallawa  <sabouhallawa@apple.com>

        CanvasRenderingContext2D.setTransfrom() reads only the aliases attributes of DOMMatrix2DInit
        https://bugs.webkit.org/show_bug.cgi?id=199850

        Reviewed by Simon Fraser.

        The validateAndFixup step of DOMMatrix2DInit sets the matrix attributes 
        (m** fields) from the aliases attributes (a, b, c, d, e, f) if the former
        ones do not exist and the later ones exist. See
        https://www.w3.org/TR/geometry-1/#dommatrixinit-dictionary and
        DOMMatrixReadOnly::validateAndFixup(DOMMatrix2DInit& init).

        Since CanvasRenderingContext2DBase::setTransform() validates and fixes
        the input DOMMatrix2DInit, it should rely on matrix attributes.

        Test: fast/canvas/setTransfrom-aliases-transform.html

        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::setTransform):

2019-07-24  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] A top fixed bar can flicker when scrolling with the keyboard up
        https://bugs.webkit.org/show_bug.cgi?id=200105
        rdar://problem/52871975

        Reviewed by Wenson Hsieh.

        ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition() computes a visual viewport
        from the current scroll position and scrollableAreaSize(). This doesn't know anything about
        the impact of keyboards on the visual viewport, so it computes a too-large visual viewport
        when the keyboard is up, triggering incorrect manipulations of the layout viewport. This
        leads to the top bar flashing to position 0 when it should be hidden off the top.

        Fix by feeding into the scrolling tree the height of the visual viewport which takes
        FrameView::visualViewportOverrideRect() into account. This is stored on ScrollingStateFrameScrollingNode/
        ScrollingTreeFrameScrollingNode.

        Test: scrollingcoordinator/ios/fixed-scrolling-with-keyboard.html

        * page/FrameView.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
        (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateFrameScrollingNode::setOverrideVisualViewportSize):
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitTreeState): LOG_WITH_STREAM() doesn't evaluate scrollingTreeAsText()
        every time.
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition const):
        (WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:

2019-07-23  Tim Horton  <timothy_horton@apple.com>

        Long press hint of AirPods buy buttons are tall and narrow during animation
        https://bugs.webkit.org/show_bug.cgi?id=200036
        <rdar://problem/53145697>

        Reviewed by Wenson Hsieh.

        New test: fast/text-indicator/text-indicator-with-tiny-child.html

        * dom/Range.cpp:
        (WebCore::Range::borderAndTextRects const):
        * dom/Range.h:
        Add a BoundingRectBehavior that ignores 1x1 and smaller rects.

        * page/TextIndicator.cpp:
        (WebCore::absoluteBoundingRectForRange):
        Enable IgnoreTinyRects.

2019-07-23  Wenson Hsieh  <wenson_hsieh@apple.com>

        [macOS 10.15] Web process crashes when attempting to show the font panel via Font > Show Fonts
        https://bugs.webkit.org/show_bug.cgi?id=200021
        <rdar://problem/53301325>

        Reviewed by Ryosuke Niwa.

        In macOS 10.15, attempting to access ~/Library/FontCollections/ from the web process causes a Sandbox violation
        and a subsequent crash. This can be triggered by trying to show the font panel via Font > Show Fonts in the
        context menu after right clicking.

        In the (near) future, we should fix this by moving logic to show the font panel, color panel and styles panel
        from the Editor in the web process to the UI process in WebKit2. However, for the time being, we can just work
        around this by adding a new EditorClient hook to determine whether to allow the font panel to show; this returns
        true in the legacy macOS WebKit port, and false everywhere else.

        Test: editing/mac/style/do-not-crash-when-showing-font-panel.html

        * editing/mac/EditorMac.mm:
        (WebCore::Editor::showFontPanel):
        * loader/EmptyClients.cpp:
        * page/EditorClient.h:

2019-07-23  Ryosuke Niwa  <rniwa@webkit.org>

        WebKit should strip away system font names from the pasted content
        https://bugs.webkit.org/show_bug.cgi?id=199975
        <rdar://problem/53336353>

        Reviewed by Darin Adler.

        Cocoa HTML Writer sometimes generate system font names such as ".AppleSystemUIFont", ".SFUI-Regular", and ".SF UI Mono".
        We need to strip away these font names upon paste to avoid these font names falling back to Times New Roman.

        Added the code to strip these font names away in EditingStyle::mergeStyleFromRulesForSerialization, which is used by
        StylizedMarkupAccumulator to generate HTML during copy. This works because WebContentReader::readWebArchive invokes
        sanitizeMarkupWithArchive which inserts the pasteboard content into a temporary document then re-serializes back to HTML
        using StylizedMarkupAccumulator before the actual pasting happens.

        This approach has a few benefits over stripping away these font names in ReplaceSelectionCommand:

        1. It would only affect clients that opts-in to copy & paste sanitization. e.g. it won't affect legacy WebKit clients
        and those that opt out of pasteboard content sanitization.

        2. It preserves font names such as ".SF Blah" that a website may insert as some kind of house keeping purposes if ever.
        While we don't have any evidence that there is any such a website but it's a real risk nonetheless. The copy side fix would
        only affect cross-site and cross-app pasting, which is rare and less likely to affect real user scenarios.

        3. It avoids exposing bogus .Apple* or .SF* font names to websites that directly use event.clipboardData.getData.
        Indeed stripping away bogus markup like this is one of the key features / benefit of using copy & paste sanitization.

        Test: editing/pasteboard/paste-cocoa-writer-markup-with-system-fonts.html

        * editing/EditingStyle.cpp:
        (WebCore::usesForbiddenSystemFontAsOnlyFontFamilyName): Added.
        (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): Added the code to remove font-family property when needed.
        * platform/graphics/FontCache.h:
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::isSystemFont): Moved.
        (WebCore::FontCache::isSystemFontForbiddenForEditing): Added.
        * platform/graphics/freetype/FontCacheFreeType.cpp:
        (WebCore::FontCache::isSystemFontForbiddenForEditing): Added. Always returns false.
        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::FontCache::isSystemFontForbiddenForEditing): Ditto.

2019-07-22  Yusuke Suzuki  <ysuzuki@apple.com>

        [bmalloc] Each IsoPage gets 1MB VA because VMHeap::tryAllocateLargeChunk rounds up
        https://bugs.webkit.org/show_bug.cgi?id=200024

        Reviewed by Saam Barati.

        Changed how we interpret VM tags. Add IsoHeap VM tag support, and rename WebAssembly tag
        to Gigacage tag.

        * page/ResourceUsageData.h:
        * page/ResourceUsageOverlay.h:
        * page/cocoa/ResourceUsageOverlayCocoa.mm:
        (WebCore::HistoricResourceUsageData::HistoricResourceUsageData):
        * page/cocoa/ResourceUsageThreadCocoa.mm:
        (WebCore::displayNameForVMTag):
        (WebCore::categoryForVMTag):

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

        Fix inspector override conversion in InspectorPageAgent::overrideSetting
        https://bugs.webkit.org/show_bug.cgi?id=200017

        Reviewed by Devin Rousso.

        Covered by inspector/page/overrideSetting-MockCaptureDevicesEnabled.html
        which should not fail on bots not having cameras

        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::toOptionalBool):
        (WebCore::InspectorPageAgent::overrideSetting):
        Previously, the conversion for the mock capture value was implicit from a bool pointer to an optional.
        Make an explicit conversion as done for regular settings.

2019-07-22  Ross Kirsling  <ross.kirsling@sony.com>

        Unreviewed non-unified build fix.

        * Modules/webdatabase/DatabaseContext.h:
        * html/HTMLDialogElement.cpp:
        * html/HTMLScriptElement.cpp:
        * inspector/agents/InspectorDatabaseAgent.cpp:
        * workers/service/server/SWServerWorker.cpp:
        * workers/service/server/SWServerWorker.h:
        * worklets/WorkletGlobalScope.cpp:
        * worklets/WorkletGlobalScope.h:

2019-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>

        [iOS] [WK1] UIWebView always jumps to the top left corner when scrolling to reveal the selection
        https://bugs.webkit.org/show_bug.cgi?id=200013
        <rdar://problem/52526901>

        Reviewed by Simon Fraser.

        After <https://trac.webkit.org/r244141>, we no longer attempt to scroll to reveal the text selection in
        UIWebView after changing the selection, due to how we use the legacy document view rect in legacy WebKit when
        computing the visual viewport. This causes the viewRect in RenderLayer::scrollRectToVisible to be the same size
        as the content size, which then causes us to always scroll to the origin when revealing the selection.

        To make selection revealing work again in legacy WebKit, conditionally restore the old behavior of using the
        unobscured content rect as the view rect, only in the case where scrolling is delegated and the platform widget
        is present.

        Test: WebKitLegacy.ScrollToRevealSelection

        * page/FrameView.cpp:
        (WebCore::FrameView::viewRectExpandedByContentInsets const):
        (WebCore::FrameView::visualViewportRectExpandedByContentInsets const): Deleted.

        Additionally rename visualViewportRectExpandedByContentInsets to viewRectExpandedByContentInsets, to reflect the
        fact that this may either be the visual viewport rect or unobscured content rect.

        * page/FrameView.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):

2019-07-22  Brent Fulgham  <bfulgham@apple.com>

        Correct web audio-related crash in seed reports
        https://bugs.webkit.org/show_bug.cgi?id=200009
        <rdar://problem/51565203>

        Reviewed by Per Arne Vollan.

        Update the 'createMix' method to do proper return value checking so that
        we can clear the result of MTAudioProcessingTapCreate if the create operation
        failed.

        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
        (WebCore::AudioSourceProviderAVFObjC::createMix):

2019-07-22  Per Arne Vollan  <pvollan@apple.com>

        Prewarmed font does not find any matches
        https://bugs.webkit.org/show_bug.cgi?id=200007

        Reviewed by Brent Fulgham.

        Prewarming the font name 'SF Pro Text' does not find any matches. The font name ".SF NS Text/Display"
        should be used instead. Also add 'Lucida Grande' to the list of prewarmed font, since it is used as
        fallback font in many cases.

        No new tests, covered by existing tests.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::fontFamiliesForPrewarming):

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

        Make sure the player underlying volume is correctly set after creating a new player
        https://bugs.webkit.org/show_bug.cgi?id=199974
        <rdar://problem/52762559>

        Reviewed by Eric Carlson.

        When creating a player before starting to play, the volume might not be correctly initialized.
        Fix that by updating the volume like done for rate and muted state.
        A future refactoring should probably move that code in MediaPlayer.

        Add an internal API to query the volume value from the underlying player.

        Test: http/tests/media/audio-volume-zero.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::updateVolume):
        (WebCore::HTMLMediaElement::updatePlayState):
        (WebCore::HTMLMediaElement::effectiveVolume const):
        (WebCore::HTMLMediaElement::effectiveMuted const):
        * html/HTMLMediaElement.h:
        * testing/Internals.cpp:
        (WebCore::Internals::privatePlayerVolume):
        * testing/Internals.h:
        * testing/Internals.idl:
        * testing/Internals.mm:
        (WebCore::Internals::privatePlayerVolume):

2019-07-22  Devin Rousso  <drousso@apple.com>

        Web Inspector: Page: mark any WebCore::Setting inspector override as UNLIKELY
        https://bugs.webkit.org/show_bug.cgi?id=199925

        Reviewed by Joseph Pecoraro.

        * Scripts/SettingsTemplates/Settings.cpp.erb:

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

        Fix crashes in ScrollingStateNode::insertChild()
        https://bugs.webkit.org/show_bug.cgi?id=200023
        rdar://problem/53265378

        Reviewed by Darin Adler.

        Crash data suggest that ScrollingStateNode::insertChild() can be passed an index that
        is larger than the size of the vector, causing crashes.

        Fix defensively by falling back to append() if the passed index is equal to or larger
        than the size of the children vector.

        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::insertChild):

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

        Make some constructors explicit
        https://bugs.webkit.org/show_bug.cgi?id=199981

        Reviewed by Daniel Bates.

        Make explicit public constructors of objects that take POD or String& arguments,
        to reduce the changes of the compiler doing implicit conversions.

        * Modules/indexeddb/server/IndexValueEntry.h:
        * Modules/indexeddb/server/IndexValueStore.h:
        * Modules/indexeddb/shared/IDBDatabaseInfo.h:
        * Modules/webdatabase/ChangeVersionData.h:
        (WebCore::ChangeVersionData::ChangeVersionData):
        * Modules/webdatabase/OriginLock.h:
        * Modules/websockets/WebSocketExtensionParser.h:
        (WebCore::WebSocketExtensionParser::WebSocketExtensionParser):
        * bindings/js/ScriptCachedFrameData.h:
        * contentextensions/URLFilterParser.cpp:
        (WebCore::ContentExtensions::PatternParser::PatternParser):
        * css/parser/CSSTokenizer.h:
        * css/parser/SizesAttributeParser.h:
        * dom/SpaceSplitString.cpp:
        (WebCore::TokenIsEqualToCStringTokenProcessor::TokenIsEqualToCStringTokenProcessor):
        * html/FormController.cpp:
        (WebCore::SavedFormState::appendControlState):
        (WebCore::SavedFormState::takeControlState):
        * loader/ProgressTracker.cpp:
        (WebCore::ProgressItem::ProgressItem):
        * page/DragController.cpp:
        (WebCore::DragController::DragController):
        (WebCore::DragController::performDragOperation):
        * page/DragController.h:
        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
        * page/ios/DOMTimerHoldingTank.h:
        (WebCore::DeferDOMTimersForScope::DeferDOMTimersForScope):
        * platform/CountedUserActivity.h:
        (WebCore::CountedUserActivity::CountedUserActivity):
        * platform/audio/DirectConvolver.h:
        * platform/audio/DownSampler.h:
        * platform/audio/DynamicsCompressorKernel.h:
        * platform/audio/EqualPowerPanner.h:
        * platform/audio/MultiChannelResampler.h:
        * platform/audio/ReverbAccumulationBuffer.h:
        * platform/audio/ReverbInputBuffer.h:
        * platform/audio/SincResampler.cpp:
        * platform/audio/UpSampler.h:
        * platform/audio/ios/AudioFileReaderIOS.h:
        * platform/audio/mac/AudioFileReaderMac.h:
        * platform/audio/mac/AudioSessionMac.cpp:
        (WebCore::AudioSessionPrivate::AudioSessionPrivate):
        * platform/cf/KeyedDecoderCF.h:
        * platform/graphics/WidthIterator.cpp:
        (WebCore::OriginalAdvancesForCharacterTreatedAsSpace::OriginalAdvancesForCharacterTreatedAsSpace):
        * platform/graphics/cocoa/FontCacheCoreText.h:
        (WebCore::SynthesisPair::SynthesisPair):
        * platform/graphics/displaylists/DisplayListItems.h:
        (WebCore::DisplayList::DrawingItem::DrawingItem):
        * platform/network/cf/ResourceRequest.h:
        (WebCore::ResourceRequest::ResourceRequest):
        * platform/text/TextCodecICU.h:
        * rendering/RenderTableSection.h:
        (WebCore::CellSpan::CellSpan):
        * rendering/shapes/RasterShape.cpp:
        * rendering/shapes/RasterShape.h:
        (WebCore::RasterShapeIntervals::RasterShapeIntervals):
        * testing/MockLibWebRTCPeerConnection.h:
        (WebCore::MockLibWebRTCIceCandidate::MockLibWebRTCIceCandidate):

2019-07-22  Rob Buis  <rbuis@igalia.com>

        Remove some unneeded code in MathOperator
        https://bugs.webkit.org/show_bug.cgi?id=199935

        Reviewed by Frédéric Wang.

        Remove unused method.

        No new tests, not changing behavior.

        * rendering/mathml/MathOperator.h:

2019-07-21  Konstantin Tokarev  <annulen@yandex.ru>

        Add DataListButtonElement.cpp to unified sources
        https://bugs.webkit.org/show_bug.cgi?id=199989

        Reviewed by Michael Catanzaro.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-07-21  Andres Gonzalez  <andresg_22@apple.com>

        Add accessibilityInsertText for text insertion in edit fields.
        https://bugs.webkit.org/show_bug.cgi?id=199973

        Reviewed by Chris Fleizach.

        Renamed accessibilityInsertText to _accessibilityInsertText.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]): Deleted.
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityInsertText:]):
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]): Deleted.

2019-07-21  Saam Barati  <sbarati@apple.com>

        [WHLSL] Checker needs to setError() when a property access node can't commit its base type
        https://bugs.webkit.org/show_bug.cgi?id=199978

        Reviewed by Dean Jackson.

        Test: webgpu/whlsl/null-array-property-access.html

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

2019-07-21  Saam Barati  <sbarati@apple.com>

        [WHLSL] Return the zero-value enum in the enum-from-integer constructor when the integer is not a valid enum value
        https://bugs.webkit.org/show_bug.cgi?id=199853

        Reviewed by Dean Jackson.

        Test: webgpu/whlsl/enum-integer-constructor.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):

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

        [iOS] Fast and complex text codepaths disagree about how to lay out bopomofo with tone marks
        https://bugs.webkit.org/show_bug.cgi?id=199912
        <rdar://problem/52182454>

        Reviewed by Simon Fraser.

        This is because CoreText has special composition rules for CJK languages, which we don't have in our simple
        text codepath. Rather than implementing the composition rules in WebKit, we can simply disable them in
        CoreText.

        Test: fast/text/international/system-language/composition.html

        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
        (WebCore::Font::getCFStringAttributes const):

2019-07-20  Andres Gonzalez  <andresg_22@apple.com>

        Add accessibilityInsertText for text insertion in edit fields.
        https://bugs.webkit.org/show_bug.cgi?id=199973

        Reviewed by Chris Fleizach.

        Tests: accessibility/insert-newline.html
               accessibility/ios-simulator/insert-newline.html

        Accessibility clients like VoiceOver and Voice Control were entering
        text in text fields by replacing the entire content of the field
        (SetValue) and then setting the insertion point to the appropriate
        offset (SetSelectedTextRange). accessibilityInsertText gives a simpler
        interface to clients to insert text at the insertion point location.
        In addition, this provides a workaround for the issue encountered with
        the previous method when inserting a linebreak.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::insertText):
        * accessibility/AccessibilityObject.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityInsertText:]):

2019-07-20  Alexander Mikhaylenko  <exalm7659@gmail.com>

        REGRESSION(r246033/r246496): [GTK] Kinetic scrolling doesn't work
        https://bugs.webkit.org/show_bug.cgi?id=199322

        Reviewed by Michael Catanzaro.

        Check ENABLE(KINETIC_SCROLLING) instead of ENABLE(ASYNC_SCROLLING) for kinetic scrolling.

        * platform/PlatformWheelEvent.h:
        * platform/generic/ScrollAnimatorGeneric.cpp:
        (WebCore::ScrollAnimatorGeneric::handleWheelEvent):
        * platform/gtk/PlatformWheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2019-07-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][TFC] Introduce table formatting context.
        https://bugs.webkit.org/show_bug.cgi?id=199979
        <rdar://problem/53346292>

        Reviewed by Antti Koivisto.

        Add the basic class structure for the table formatting context.
        https://www.w3.org/TR/CSS22/tables.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/FormattingState.h:
        (WebCore::Layout::FormattingState::isTableFormattingState const):
        * layout/tableformatting/TableFormattingContext.cpp: Added.
        (WebCore::Layout::TableFormattingContext::TableFormattingContext):
        (WebCore::Layout::TableFormattingContext::layout const):
        * layout/tableformatting/TableFormattingContext.h: Added.
        * layout/tableformatting/TableFormattingState.cpp: Added.
        (WebCore::Layout::TableFormattingState::TableFormattingState):
        (WebCore::Layout::TableFormattingState::~TableFormattingState):
        * layout/tableformatting/TableFormattingState.h: Added.
        * layout/tableformatting/TableInvalidation.cpp: Added.
        (WebCore::Layout::TableInvalidation::invalidate):
        * layout/tableformatting/TableInvalidation.h: Added.

2019-07-20  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add support for mid-word break.
        https://bugs.webkit.org/show_bug.cgi?id=199976
        <rdar://problem/53337349>

        Reviewed by Antti Koivisto.

        Introduce leading and trailing InlineTextItem to support incoming and outgoing partial content.
        TextUtil::split is a straight copy of SimpleLineLayout::split.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::layout):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::split const):
        (WebCore::Layout::InlineTextItem::split): Deleted.
        * layout/inlineformatting/InlineTextItem.h:
        (WebCore::Layout::InlineTextItem::inlineBox const):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::split):
        * layout/inlineformatting/text/TextUtil.h:

2019-07-20  Zalan Bujtas  <zalan@apple.com>

        [Text autosizing] Do not nuke the style on dynamicViewportSizeUpdate
        https://bugs.webkit.org/show_bug.cgi?id=199718
        <rdar://problem/53344961>

        Reviewed by Simon Fraser.

        When the page scale changes (e.g. as the result of shink to fit mode) we need to visit all the text content on the page and check whether they need to be boosted.
        Currently we call setNeedsRecalcStyleInAllFrames() to accomplish it. Unfortunatelly setNeedsRecalcStyleInAllFrames destroys all the style information which means that the
        subsequent styleResolve() needs to start from scratch.
        This patch addresses this issue by directly adjusting the computed style information when text boosting is required and schedules layout accordingly. We also trigger this style adjusting
        on a timer so that rapid dynamicViewportSizeUpdate() calls won't trigger redundant layouts.

        * css/StyleResolver.cpp:
        (WebCore::hasTextChild):
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
        (WebCore::hasTextChildren): Deleted.
        * css/StyleResolver.h:
        * page/FrameView.h:
        * page/Page.cpp:
        (WebCore::Page::invalidateTextAutoSizeInAllFrames):
        * page/Page.h:

2019-07-20  Saam Barati  <sbarati@apple.com>

        [WHLSL] Make enums work
        https://bugs.webkit.org/show_bug.cgi?id=199634

        Reviewed by Robin Morisset.

        This patch makes enums work. There were a couple changes needed to do this work:
        1. In the metal codegen, we were emitting code like "EnumType.EnumValue"
        instead of "EnumType::EnumValue".
        
        2. Inside the enumeration declaration AST node, we track enums in a HashMap
        because we need to look up names of enum values in that map in parts of the
        compiler. However, HashMap is not ordered but we were relying on the iteration
        order of it to generate the default values of enums. E.g, in: "enum { Foo = 10, Bar }",
        Bar should be 11. However, there was no guarantee that we iterated over Bar
        after Foo. Instead, we just track the default values as we parse an enum
        inside of the parser. This allows us to continue to keep using HashMap without
        also adding an auxiliary data structure (or using more memory in some way) to
        track the order of the enum elements.
        
        I've also filed a patch to do follow-up work on implementing the correct
        operational behavior when constructing an enum from its underlying type when
        the underlying value does not match any enum value:
        https://bugs.webkit.org/show_bug.cgi?id=199853

        Tests: webgpu/whlsl/enums-2.html
               webgpu/whlsl/enums.html

        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        (WebCore::WHLSL::AST::EnumerationMember::EnumerationMember):
        (WebCore::WHLSL::AST::EnumerationMember::value):
        (WebCore::WHLSL::AST::EnumerationMember::setValue): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        * 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::parseEnumerationDefinition):
        (WebCore::WHLSL::Parser::parseEnumerationMember):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):

2019-07-19  Youenn Fablet  <youenn@apple.com>

        Remote WebInspector should enable mock capture devices in UIProcess if doing it in WebProcess
        https://bugs.webkit.org/show_bug.cgi?id=199924
        <rdar://problem/50552067>

        Reviewed by Devin Rousso.

        Add necessary API to set mock capture devices override.
        In case of desynchronization between webprocess and uiprocess, make sure to return early
        and fail capture instead of crashing.

        * inspector/InspectorClient.h:
        (WebCore::InspectorClient::setMockCaptureDevicesEnabled):
        * inspector/agents/InspectorPageAgent.cpp:
        (WebCore::InspectorPageAgent::disable):
        (WebCore::InspectorPageAgent::overrideSetting):
        * platform/mock/MockRealtimeMediaSourceCenter.cpp:

2019-07-19  Andy Estes  <aestes@apple.com>

        [Apple Pay] Log less in PaymentCoordinator::shouldEnableApplePayAPIs()
        https://bugs.webkit.org/show_bug.cgi?id=199958

        Reviewed by Tim Horton.

        Only log when APIs are disabled due to user scripts.

        * Modules/applepay/PaymentCoordinator.cpp:
        (WebCore::PaymentCoordinator::shouldEnableApplePayAPIs const):

2019-07-19  Dean Jackson  <dino@apple.com>

        Add a menu item to toggle between showing and hiding link previews
        https://bugs.webkit.org/show_bug.cgi?id=199940
        <rdar://problem/53032288>

        Reviewed by Beth Dakin.

        New strings for Show/Hide Link Previews.

        * en.lproj/Localizable.strings:

2019-07-19  Antoine Quint  <graouts@apple.com>

        Links stop working after long-pressing a link (WK1)
        https://bugs.webkit.org/show_bug.cgi?id=199952
        <rdar://problem/52291860>

        Reviewed by Wenson Hsieh.

        Test: fast/events/touch/ios/click-after-long-press.html

        When EventHandler::tryToBeginDragAtPoint() is called, we must reset m_mousePressed to false so that
        WebChromeClientIOS::observedContentChange() is called by EventHandler::mousePressed() when we would
        process the next tap after a drag interaction.

        * page/ios/EventHandlerIOS.mm:
        (WebCore::EventHandler::tryToBeginDragAtPoint):

2019-07-19  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: error in starting version change transaction may be neglected
        https://bugs.webkit.org/show_bug.cgi?id=199818
        <rdar://problem/52925738>

        Reviewed by Brady Eidson.

        For version change transaction, IDBServer didn't wait the result of beginTransaction on the background thread 
        before giving the IDBClient the result of open request. In this case, beginTransaction may fail to update the 
        DatabaseVersion in database file or set m_originalDatabaseInfoBeforeVersionChange, but the transaction was
        marked as started. When we later set m_databaseInfo with m_originalDatabaseInfoBeforeVersionChange, 
        m_databaseInfo could become nullptr.

        To write a test for this, we will need to simulate an SQLite error. I manually tested this by crafting the 
        SQLiteStatement in beginTransaction, making it an invalid statement, and verified that error event, instead of 
        ungradeneeded event is dispatched to the IDBRequest.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::performStartVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformStartVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
        (WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-07-19  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Add partial content handling
        https://bugs.webkit.org/show_bug.cgi?id=199930

        Reviewed by Antti Koivisto.

        Move the actual inline item placement to a dedicated functions. This enables us to
        construct a dedicated InlineItem for the partial content and pass it in to this function.

        <span>The quick brown fox jumps over the lazy dog</span> <- inline content
        [The][ ][quick][ ][brown][ ][fox][ ][jumps][ ][over][ ][the][ ][lazy][ ][dog] <- InlineItems

        Line breaking:
        [The][ ][qu]
        [ick] <- Partial InlineItem (position: 6 length: 3) from [quick] (position: 4 length: 5)

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::placeInlineItem):
        (WebCore::Layout::LineLayout::layout):
        (WebCore::Layout::LineInput::LineInput):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::split):
        * layout/inlineformatting/InlineTextItem.h:

2019-07-19  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Flush get_range calls during PAUSED->READY in WebKitWebSource
        https://bugs.webkit.org/show_bug.cgi?id=199934

        Reviewed by Xabier Rodriguez-Calvar.

        Unit testing not applicable.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcChangeState): A well-behaved element should unblock streaming threads
        during a PAUSED->READY transition, so do that here.

2019-07-19  Rob Buis  <rbuis@igalia.com>

        Remove some unneeded code in MathOperator
        https://bugs.webkit.org/show_bug.cgi?id=199935

        Reviewed by Frédéric Wang.

        The initialize method is unneeded since the member
        variables all use default initialization.

        No new tests, not changing behavior.

        * rendering/mathml/MathOperator.cpp:
        (WebCore::MathOperator::MathOperator):
        (WebCore::MathOperator::GlyphAssemblyData::initialize): Deleted.

2019-07-18  Antoine Quint  <graouts@apple.com>

        Enable simulated mouse events quirk for soundcloud.com
        https://bugs.webkit.org/show_bug.cgi?id=199908
        <rdar://problem/52915981>

        Reviewed by Brent Fulgham.

        Scrubbing on soundcloud.com relies on mouse events alone when displaying on iPad with the desktop UA string.
        Opting into the simulated mouse events quirk makes scrubbing work and we also ensure that page scrolling is
        disabled as a result of scrubbing by returning true in shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented().

        Also making a drive-by fix in shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented() to use a reference
        instead of a pointer when downcasting a null-checked pointer.

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

2019-07-18  Per Arne Vollan  <pvollan@apple.com>

        Prewarm font cache with more fonts
        https://bugs.webkit.org/show_bug.cgi?id=199283

        Reviewed by Myles C. Maxfield.

        Initialize the list of families requiring system fallback in the prewarming information struct, since
        this was part of the original, approved patch, and is needed for the performance improvement.

        No new tests, covered by existing tests.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::fontFamiliesForPrewarming):
        (WebCore::FontCache::prewarmGlobally):

2019-07-18  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r247531.

        Caused multiple IndexedDB layout test crashes.

        Reverted changeset:

        "IndexedDB: error in starting version change transaction may
        be neglected"
        https://bugs.webkit.org/show_bug.cgi?id=199818
        https://trac.webkit.org/changeset/247531

2019-07-18  Antoine Quint  <graouts@apple.com>

        Ensure Quirks::shouldDispatchSimulatedMouseEvents() works for all Google Maps and Amazon domains
        https://bugs.webkit.org/show_bug.cgi?id=199904
        <rdar://problem/53250104>

        Reviewed by Dean Jackson.

        Use topPrivatelyControlledDomain() to determine whether the URL is a Google or Amazon domain so as to apply
        Google Maps and Amazon quirks to all the various domain names used.

        * page/Quirks.cpp:
        (WebCore::Quirks::isAmazon const):
        (WebCore::Quirks::isGoogleMaps const):
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
        (WebCore::Quirks::simulatedMouseEventTypeForTarget const):
        * page/Quirks.h:

2019-07-18  Per Arne Vollan  <pvollan@apple.com>

        Crash under WebPage::boundaryEventOccurred
        https://bugs.webkit.org/show_bug.cgi?id=199907

        Reviewed by Chris Fleizach.

        Add null pointer checks.

        No new tests, since I have not been able to reproduce this in a test.

        * Modules/speech/SpeechSynthesis.cpp:
        (WebCore::SpeechSynthesis::didStartSpeaking):
        (WebCore::SpeechSynthesis::didFinishSpeaking):
        (WebCore::SpeechSynthesis::didPauseSpeaking):
        (WebCore::SpeechSynthesis::didResumeSpeaking):
        (WebCore::SpeechSynthesis::speakingErrorOccurred):
        (WebCore::SpeechSynthesis::boundaryEventOccurred):

2019-07-18  Antoine Quint  <graouts@apple.com>

        [Pointer Events] The button and buttons properties are incorrect on iOS
        https://bugs.webkit.org/show_bug.cgi?id=199910
        <rdar://problem/52778374>

        Reviewed by Dean Jackson.

        The button and buttons properties were always set to 0 on iOS. We now use the correct values such that
        button is always 0 except for "pointermove" where it's -1, and "buttons" is 1 as long as the pointer is
        in contact with the touch surface.

        Tests: pointerevents/ios/pointer-event-button-and-buttons-pointer-cancel.html
               pointerevents/ios/pointer-event-button-and-buttons.html

        * dom/ios/PointerEventIOS.cpp:
        (WebCore::buttonForType):
        (WebCore::buttonsForType):
        (WebCore::PointerEvent::PointerEvent):

2019-07-18  Antoine Quint  <graouts@apple.com>

        REGRESSION: Unable to enable simulated mouse events using the runtime flag
        https://bugs.webkit.org/show_bug.cgi?id=199909
        <rdar://problem/53254895>

        Reviewed by Dean Jackson.

        The fix for wkb.ug/199508 (r247152) broke the ability enable simulated mouse events using the runtime flag.
        We now add a check for the flag in Quirks::shouldDispatchSimulatedMouseEvents() so that the runtime flag
        overrides the content of that function. This is more practical and allows for a quick override using the flag.

        Additionally, we need only call shouldDispatchSimulatedMouseEvents() in simulatedMouseEventTypeForTarget() since
        that function already calls needsQuirks().

        * dom/EventNames.h:
        (WebCore::EventNames::isTouchRelatedEventType const):
        * dom/Node.cpp:
        (WebCore::Node::moveNodeToNewDocument):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
        (WebCore::Quirks::simulatedMouseEventTypeForTarget const):

2019-07-18  Antoine Quint  <graouts@apple.com>

        REGRESSION: Panning on an Amazon product image scrolls the page on iPadOS
        https://bugs.webkit.org/show_bug.cgi?id=199905
        <rdar://problem/49124529>

        Reviewed by Dean Jackson.

        Amazon product pages include images that the user can touch and pan to show zoomed details in a side image. This
        currently works on iPadOS thanks to the dispatch of simulated "mousemove" events on the product image, but the site
        doesn't call preventDefault() when handling those events as it wasn't necessary for macOS.

        We add a new quirk that will indicate that a given element is such a product image.

        * page/Quirks.cpp:
        (WebCore::Quirks::isAmazon const):
        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
        (WebCore::Quirks::shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented const):
        (WebCore::Quirks::simulatedMouseEventTypeForTarget const):
        * page/Quirks.h:

2019-07-18  Youenn Fablet  <youenn@apple.com>

        Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts
        https://bugs.webkit.org/show_bug.cgi?id=199769
        <rdar://problem/49390297>

        Reviewed by Myles C. Maxfield.

        When getting a system font, set the appropriate attribute so that it
        does not fallback to a user initiated font.
        Add an ASSERT that checks that the font in use is not a user font if
        policy is to not use user installed fonts.

        Tests: fast/text/user-installed-fonts/extended-character-with-user-font.html
               fast/text/user-installed-fonts/extended-character.html

        * platform/graphics/Font.h:
        * platform/graphics/FontCascadeFonts.cpp:
        (WebCore::FontCascadeFonts::glyphDataForSystemFallback):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::preparePlatformFont):
        (WebCore::FontDatabase::singletonAllowingUserInstalledFonts):
        (WebCore::FontDatabase::singletonDisallowingUserInstalledFonts):
        (WebCore::addAttributesForInstalledFonts):
        (WebCore::addAttributesForWebFonts):
        (WebCore::installedFontMandatoryAttributes):
        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
        (WebCore::Font::isUserInstalledFont const):

2019-07-18  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] InlineFormattingContext::LineLayout::placeInlineItems is getting too complex.
        https://bugs.webkit.org/show_bug.cgi?id=199898
        <rdar://problem/53235958>

        Reviewed by Antti Koivisto.

        It's time to restructure LineLayout::placeInlineItems to be able to expand it further.
        Introduce the LineLayout class. This class is responsible to place the inline items on the current line.
        (Rename InlineFormattingContext::lineLayout -> InlineFormattingContext::InlineLayout and
        use Line::InitialConstraints in LineInput)

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::LineLayout::layoutState const): Deleted.
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::inlineItemWidth):
        (WebCore::Layout::LineLayout::layoutState const):
        (WebCore::Layout::LineLayout::UncommittedContent::runs):
        (WebCore::Layout::LineLayout::UncommittedContent::isEmpty const):
        (WebCore::Layout::LineLayout::UncommittedContent::size const):
        (WebCore::Layout::LineLayout::UncommittedContent::width const):
        (WebCore::Layout::LineLayout::UncommittedContent::add):
        (WebCore::Layout::LineLayout::UncommittedContent::reset):
        (WebCore::Layout::LineLayout::LineLayout):
        (WebCore::Layout::LineLayout::commitPendingContent):
        (WebCore::Layout::LineLayout::close):
        (WebCore::Layout::LineLayout::layout):
        (WebCore::Layout::LineInput::LineInput):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
        (WebCore::Layout::InlineFormattingContext::InlineLayout::alignRuns const):
        (WebCore::Layout::UncommittedContent::runs): Deleted.
        (WebCore::Layout::UncommittedContent::isEmpty const): Deleted.
        (WebCore::Layout::UncommittedContent::size const): Deleted.
        (WebCore::Layout::UncommittedContent::width const): Deleted.
        (WebCore::Layout::UncommittedContent::add): Deleted.
        (WebCore::Layout::UncommittedContent::reset): Deleted.
        (WebCore::Layout::LineInput::HorizontalConstraint::HorizontalConstraint): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineLayout): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const): Deleted.
        (WebCore::Layout::InlineFormattingContext::LineLayout::alignRuns const): Deleted.
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        * layout/inlineformatting/InlineLine.h:

2019-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] MOUSE_CURSOR_SCALE is not implemented
        https://bugs.webkit.org/show_bug.cgi?id=109469

        Reviewed by Darin Adler.

        Use gdk_cursor_new_from_surface() instead of gdk_cursor_new_from_pixbuf() to avoid the surface to pixbuf
        conversion.

        * platform/gtk/CursorGtk.cpp:
        (WebCore::createCustomCursor):

2019-07-17  Chris Dumez  <cdumez@apple.com>

        Prewarm local storage in the NetworkProcess to reduce WebContent process hangs
        https://bugs.webkit.org/show_bug.cgi?id=199879
        <rdar://problem/53217757>

        Reviewed by Ryosuke Niwa.

        When JS accesses window.localStorage for the first time, we end up doing a
        synchronous IPC to the network process to pull in all items in the local
        storage for the origin. If the network process does not have this data in
        memory, it has to read it from a database on disk, which may take a significant
        amount of time and hang the WebContent process during this time.

        To alleviate this problem, this patch introduces prewarming on the local storage
        in the network process when loading a given origin in the WebContent process.
        This way, in most cases, when the JS accesses window.localStorage for the first
        time, the synchronous IPC to the network process returns much faster (measured
        50-100ms for a very large database, down from 250-300ms), as it only needs to
        IPC the data over, without the need to fetch it from disk.

        As a safety net to avoid excessive prewarming, we currently prewarm at most 5
        security origins per page load.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::commitData):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::prewarmLocalStorageIfNecessary):
        * page/DOMWindow.h:
        * page/Frame.cpp:
        (WebCore::Frame::didPrewarmLocalStorage):
        (WebCore::Frame::mayPrewarmLocalStorage const):
        * page/Frame.h:
        * storage/Storage.cpp:
        (WebCore::Storage::prewarm):
        * storage/Storage.h:
        * storage/StorageArea.h:
        (WebCore::StorageArea::prewarm):

2019-07-17  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] The lexer should not choke on a single '/'
        https://bugs.webkit.org/show_bug.cgi?id=199886

        Reviewed by Myles Maxfield.

        The bug is trivial: just recognize that a single '/' without a '*' or '/' afterwards is not the beginning of a comment.

        While investigating this bug, I also found that part of the parser fails to properly propagate errors, so I fixed it.

        New test in LayoutTests/webgpu/whlsl/float-math.html
        I also added a new flag to WHLSLPrepare.cpp. It can be used to parse the full standard library (this is how I found this bug in the first place).

        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
        (WebCore::WHLSL::includeStandardLibrary):
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h:

2019-07-17  Simon Fraser  <simon.fraser@apple.com>

        Unreviewed build fix after r247549.

        * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:

2019-07-17  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Remove traps from the compiler
        https://bugs.webkit.org/show_bug.cgi?id=195811
        <rdar://problem/50746299>

        Reviewed by Myles Maxfield.

        Remove the Trap statement from the language, see https://github.com/gpuweb/WHLSL/issues/301.

        No new tests, as this part of the language was already untested, and we are removing it, not adding anything.

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::isSwitchStatement const):
        * Modules/webgpu/WHLSL/AST/WHLSLTrap.h: Removed.
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Token::typeName):
        (WebCore::WHLSL::Lexer::recognizeKeyword):
        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseStatement):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.h:
        * WebCore.xcodeproj/project.pbxproj:

2019-07-17  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] checkRecursiveType should not have exponential complexity.
        https://bugs.webkit.org/show_bug.cgi?id=199835

        Reviewed by Myles Maxfield.

        The change is very similar to that in https://bugs.webkit.org/show_bug.cgi?id=199688.
        Just keep track of which types have already been visited, and don't visit them again.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
        (WebCore::WHLSL::RecursiveTypeChecker::visit):
        (WebCore::WHLSL::checkRecursiveTypes):

2019-07-17  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>

        Add missing #include's
        https://bugs.webkit.org/show_bug.cgi?id=199856

        Reviewed by Simon Fraser.

        The missing headers were found during development when unified sources changed.

        No new tests required. Adding #include's only.

        * Modules/speech/DOMWindowSpeechSynthesis.cpp:
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        * Modules/webgpu/WebGPUCommandEncoder.cpp:

2019-07-17  Ryosuke Niwa  <rniwa@webkit.org>

        Add inputmode to the feature status page
        https://bugs.webkit.org/show_bug.cgi?id=199884

        Reviewed by Wenson Hsieh.

        Added as supported.

        * features.json:

2019-07-17  Antoine Quint  <graouts@apple.com>

        Disable Pointer Events prior to watchOS 6
        https://bugs.webkit.org/show_bug.cgi?id=199890
        <rdar://problem/53206113>

        Reviewed by Dean Jackson.

        * Configurations/FeatureDefines.xcconfig:

2019-07-17  Antoine Quint  <graouts@apple.com>

        Unable to bring up custom media controls on iOS for video.sina.cn
        https://bugs.webkit.org/show_bug.cgi?id=199889
        <rdar://problem/51883919>

        Reviewed by Dean Jackson.

        Videos on video.sina.cn by default have the "controls" attribute and are set not to autoplay. This means that the original state
        of the media controls are set to show the built-in media controls and also show the prominent play button to begin playback. The
        display of the play button also requires a tap gesture recognizer, which calls preventDefault() when the "touchend" is received
        to prevent double-tap-to-zoom, but also has the side-effect of preventing a "click" event from being dispatched for a tap.

        The video.sina.cn code would eventually remove the "controls" attribute, which would make the built-in media controls not visible,
        but still participate in hit-testing because we keep the shadow DOM around in order to potentially show the Airplay or picture-in-picture
        placards. Additionally, we wouldn't disable the tap gesture recognizer when the "controls" attribute was removed.

        We now ensure that both gesture recognizers used by iOS inline media controls are only enabled when media controls are visible.

        Test: media/modern-media-controls/media-controller/ios/media-controller-allows-click-over-video-with-no-controls.html

        * Modules/modern-media-controls/controls/ios-inline-media-controls.js:
        (IOSInlineMediaControls.prototype.set showsStartButton):
        (IOSInlineMediaControls.prototype.get visible):
        (IOSInlineMediaControls.prototype.set visible):
        (IOSInlineMediaControls.prototype._updateGestureRecognizers):
        (IOSInlineMediaControls.prototype._tapGestureRecognizerStateDidChange):
        (IOSInlineMediaControls.prototype._pinchGestureRecognizerStateDidChange):

2019-07-17  Christopher Reid  <chris.reid@sony.com>

        Bytecode cache should use FileSystem
        https://bugs.webkit.org/show_bug.cgi?id=199759

        Reviewed by Yusuke Suzuki.

        * platform/SharedBuffer.cpp:

2019-07-17  Zalan Bujtas  <zalan@apple.com>

        Unable to tap buttons at top of Wells Fargo app’s Payees screen
        https://bugs.webkit.org/show_bug.cgi?id=199846
        <rdar://problem/48112220>

        Reviewed by Simon Fraser.

        This patch restores the stop-before-reaching-the-body heuristics for the approximate node finding feature only.
        (WebFrame::approximateNodeAtViewportLocation mistakenly relied on this odd quirk of nodeRespondingToClickEvents.)

        * page/Frame.h:
        * page/ios/FrameIOS.mm:
        (WebCore::Frame::approximateNodeAtViewportLocationLegacy):

2019-07-17  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Avoid lots of compositing backing store for offscreen position:fixed descendants
        https://bugs.webkit.org/show_bug.cgi?id=199819
        rdar://problem/51977416

        Reviewed by Zalan Bujtas.

        There was code to ensure that position:fixed layers and their descendants don't have their
        backing store detached (thrown away to save memory when offscreen), since that can trigger
        flashing when async scrolling moves layers in and out of the visual viewport.

        However, some pages have many descendant layers of positon:fixed which entrain backing
        store, because, for example, they have a stack of translated-offscreen menu elements inside
        a fixed header, and those elements may composite because of overflow:scroll.

        To avoid using too much memory on such pages, allow backing store detachment for fixed
        layers that are outside the layout viewport. Add a flag to RenderLayer that's set for layers
        which are fixed, or descendants of fixed, and consult that flag in
        updateAllowsBackingStoreDetaching(). The logic there is similar to
        RenderLayerCompositor::requiresCompositingForPosition().
        
        I considered allowing all position:fixed to composite (since this patch would keep most of
        the memory saving), but historically we've avoided compositing out-of-viewport
        position:fixed because it's quite common to have them with negative z-index, and compositing
        those has significant compositing knock-on effects.
        
        GraphicsLayer flushing no longer needs to track the viewport-constrained status of layers,
        so remove that code.
        
        This patch removes backing-store pinning for sticky layers.
        scrolling/ios/reconcile-layer-position-recursive.html then revealed a bug in
        ScrollingStateStickyNode::reconcileLayerPositionForViewportRect(), which was assuming that
        the sticky element was scrolled by the page, causing a bad layer position to get sync'd onto
        the layer. Fixed by copying code from ScrollingTreeStickyNode that is smarter about
        computing layer positions.
        
        This patch fixes jetsams on kmart.com.au in iOS 13 beta.

        Test: compositing/layer-creation/fixed-position-descendants-out-of-view.html

        * page/scrolling/ScrollingStateStickyNode.cpp:
        (WebCore::ScrollingStateStickyNode::computeLayerPosition const):
        (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
        * page/scrolling/ScrollingStateStickyNode.h:
        * platform/graphics/GraphicsLayer.h:
        (WebCore::GraphicsLayer::setAllowsBackingStoreDetaching):
        (WebCore::GraphicsLayer::allowsBackingStoreDetaching const):
        (WebCore::GraphicsLayer::setIsViewportConstrained): Deleted.
        (WebCore::GraphicsLayer::isViewportConstrained const): Deleted.
        (WebCore::GraphicsLayer::setCanDetachBackingStore): Deleted.
        (WebCore::GraphicsLayer::canDetachBackingStore const): Deleted.
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
        (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
        (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
        (WebCore::GraphicsLayerCA::updateCoverage):
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
        * platform/graphics/ca/GraphicsLayerCA.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::RenderLayer):
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::outputPaintOrderTreeLegend):
        (WebCore::outputPaintOrderTreeRecursive):
        * rendering/RenderLayer.h:
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateAllowsBackingStoreDetaching):
        (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
        (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole): Deleted.
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
        (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):

2019-07-17  Chris Dumez  <cdumez@apple.com>

        Avoid unnecessary copy of monitors under DisplayRefreshMonitorManager::displayWasUpdated()
        https://bugs.webkit.org/show_bug.cgi?id=199847

        Reviewed by Said Abou-Hallawa.

        There is always one one monitor in m_monitors for a given displayID so there is
        no need to copy the monitors inside DisplayRefreshMonitorManager::displayWasUpdated()
        and no need to iterate over all of them. This patch also factors a bit differently
        so that it becomes more obvious.

        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
        (WebCore::DisplayRefreshMonitorManager::unregisterClient):
        (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
        (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
        (WebCore::DisplayRefreshMonitorManager::findMonitorForDisplay const):
        (WebCore::DisplayRefreshMonitorManager::monitorForDisplay const):
        * platform/graphics/DisplayRefreshMonitorManager.h:

2019-07-17  Sihui Liu  <sihui_liu@apple.com>

        IndexedDB: error in starting version change transaction may be neglected
        https://bugs.webkit.org/show_bug.cgi?id=199818
        <rdar://problem/52925738>

        Reviewed by Brady Eidson.

        For version change transaction, IDBServer didn't wait the result of beginTransaction on the background thread 
        before giving the IDBClient the result of open request. In this case, beginTransaction may fail to update the 
        DatabaseVersion in database file or set m_originalDatabaseInfoBeforeVersionChange, but the transaction was
        marked as started. When we later set m_databaseInfo with m_originalDatabaseInfoBeforeVersionChange, 
        m_databaseInfo could become nullptr.

        To write a test for this, we will need to simulate an SQLite error. I manually tested this by crafting the 
        SQLiteStatement in beginTransaction, making it an invalid statement, and verified that error event, instead of 
        ungradeneeded event is dispatched to the IDBRequest.

        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
        (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::performStartVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::didPerformStartVersionChangeTransaction):
        (WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore): Deleted.
        * Modules/indexeddb/server/UniqueIDBDatabase.h:

2019-07-17  Daniel Bates  <dabates@apple.com>

        Typing into a cell in a Google Sheet lags behind by one character
        https://bugs.webkit.org/show_bug.cgi?id=199587
        <rdar://problem/51616845>

        Reviewed by Brent Fulgham.

        Add a Google Sheets quirk. Put all DOM timers scheduled from keydown and keypress event listeners
        into a holding tank. The timers continue to tick, but are barred from executing their action until
        the next text insertion or deletion or 32 ms (on device) have elapsed, whichever is sooner. We only
        allocate a holding tank once per document, only if the quirk is active, and this allocation is done
        when the document schedules a timer on keydown or keypress. The holding tank lives for the lifetime
        of the document.

        The story behind the quirk:

        On keypress Google Sheets schedules timers and expects that a DOM update will occur (i.e. text
        will be inserted or deleted) within the same event loop iteration as the dispatched keypress. The
        UI Events spec. [1] makes no such guarantee of when a DOM update must occur in relation to the keypress
        event. It could happen in the same event loop iteration as the key press (as Google expects), the
        next iteration, 500ms later, 2 minutes later, etc. What the spec does guarantee is that by the time
        a DOM input event is dispatched that the DOM will be updated. And this is the solution to the problem
        Google Sheets is trying to solve, but is doing so using pre-IE 9 technology (though similar
        functionality was available via onpropertychange in IE < 9).

        See also <https://github.com/w3c/uievents/issues/238>, which is tracking a spec. text update for
        this quirk.

        Test: fast/events/ios/dom-update-on-keydown-quirk.html

        [1] <https://w3c.github.io/uievents/> (Editor's Draft, 14 October 2018)

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        Add some files to the project.

        * dom/Document.cpp:
        (WebCore::Document::domTimerHoldingTank): Added.
        * dom/Document.h:
        (WebCore::Document::domTimerHoldingTankIfExists): Added.

        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::install): Put the newly instantiated timer into the holding tank.
        (WebCore::DOMTimer::removeById): Remove the timer from the holding tank.
        (WebCore::DOMTimer::fired): Check if the timer is in the holding tank. If it is and it is a one-
        shot timer then schedule it for the next event loop iteration. If it's a repeating timer just
        let it continue ticking. Otherwise, do what we no now and execute the timer's action. The reason
        we do not suspend timers in the holding tank is because:
            1. Far out timers (Google Sheets registers timers as far out as 5 minutes!) are not penalized.
            Though smart supension logic could avoid this. See (3).

            2. Empirical observations indicate that the keyboard will perform the insertion or deletion
            reasonably quickly (not the same event loop iteration as the keydown, but within two iterations out).
            So, the timers in the holding tank are short-lived.

            3. Simplifies the code. There is no need to keep additional bookkeeping to track multiple timer
            suspension reasons (timers currently can only have one suspension reason) or alternatively defer
            scheduling a timer until a later time and computing a new "fair" firing time when scheduled.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::internalKeyEvent): Place a token on the stack to put all DOM timers
        scheduled on keydown and keypress into the holding tank if the quirk is enabled.
        * page/Quirks.cpp:
        (WebCore::Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand const): Added.
        * page/Quirks.h:
        * page/Settings.yaml: Added setting so that this quirk can be enabled from a layout test. This setting
        also lets us enable the quirk for all sites or for certain third-party apps if desired.
        * page/ios/DOMTimerHoldingTank.cpp: Added.
        (WebCore::DOMTimerHoldingTank::DOMTimerHoldingTank):
        (WebCore::DOMTimerHoldingTank::add):
        (WebCore::DOMTimerHoldingTank::remove):
        (WebCore::DOMTimerHoldingTank::contains):
        (WebCore::DOMTimerHoldingTank::removeAll):
        (WebCore::DOMTimerHoldingTank::stopExceededMaximumHoldTimer):
        * page/ios/DOMTimerHoldingTank.h: Added.
        (WebCore::DeferDOMTimersForScope::DeferDOMTimersForScope):
        (WebCore::DeferDOMTimersForScope::~DeferDOMTimersForScope):
        (WebCore::DeferDOMTimersForScope::isDeferring):

2019-07-17  Darin Adler  <darin@apple.com>

        No need for isURLAllowed function in Frame
        https://bugs.webkit.org/show_bug.cgi?id=120266

        Reviewed by Alex Christensen.

        * css/SelectorCheckerTestFunctions.h:
        (WebCore::matchesFullScreenPseudoClass): Use is<> instead of
        the isFrameElementBase function. Also updated includes and spacing.

        * dom/Document.cpp:
        (WebCore::Document::resolveStyle): Shortened an old, long comment
        that happened to mention HTMLFrameElementBase::isURLAllowed by name.

        * dom/Element.h: Deleted isFrameElementBase.

        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::updateWidget): Tweaked comment.

        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::insertedIntoAncestor): Moved comment from
        here to didFinishInsertingNode, since the code it's talking about is there.
        Also got rid of unnecessary local variable.
        (WebCore::HTMLBodyElement::didFinishInsertingNode): Moved comment here
        and elaborated a bit. Also changed the code to copy margin attributes in a
        simpler way without requiring special getter functions. There is a slight
        behavior change here, but seems unlikely to affect any websites or tests.
        Would be good to add better test coverage, which I think should be done
        when fixing the problems described in the FIXME.

        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::updateWidget): allowedToLoadFrameURL -> canLoadURL
        Also Tweaked comments.

        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::rendererIsNeeded): isURLAllowed -> canLoad

        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed initial
        values for no-longer-needed data members.

        (WebCore::HTMLFrameElementBase::canLoadScriptURL const): Renamed from
        isURLAllowed. Also refactored so it now calls canLoadURL.
        (WebCore::HTMLFrameElementBase::canLoad const): Renamed from isURLAllowed.
        Also added FIXME comments about multiple ways that this code incorrectly
        handles the empty string. Might inspire some tests and future fixes.
        (WebCore::HTMLFrameElementBase::canLoadURL const): Renamed from isURLAllowed.
        Added an overload that takes a relative URL string largely to make this
        more parallel with the similar code in HTMLPlugInImageElement. Refactored
        to call canAddSubframe and isProhibitedSelfReference, removing the need
        to call Frame::isURLAllowed.
        (WebCore::HTMLFrameElementBase::openURL): isURLAllowed -> canLoad
        (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code
        to parse marginwidth, marginheight, and scrolling, which are now done
        as needed instead. Might have to add code back if we ever add code to
        make these cause dynamic updates when changed, but that was not the
        behavior of the existing code.
        (WebCore::HTMLFrameElementBase::scrollingMode const): Changed to call
        attributeWithoutSynchronization rather than reading from a data member.

        * html/HTMLFrameElementBase.h: Moved scrollingMode into the .cpp file.
        Removed marginWidth and marginHeight since they are no longer called.
        Made canContainRangeEndPoint override be private. Renamed isURLAllowed
        to canLoad/canLoadScriptURL/canLoadURL. Removed unneeded isFrameElementBase
        since is<HTMLFrameElementBase> already works without it. Removed unneeded
        data members m_scrolling, m_marginWidth, and m_marginHeight.

        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Moved initialization
        of m_contentFrame and m_sandboxFlags to the header.
        (WebCore::HTMLFrameOwnerElement::clearContentFrame): 0 -> nullptr
        (WebCore::HTMLFrameOwnerElement::canAddSubframe const): Added. Code was moved
        here from multiple functions that enforced the subframe count limit.
        (WebCore::HTMLFrameOwnerElement::isProhibitedSelfReference const): Added.
        Moved code here from Frame::isURLAllowed so it's easy to use as needed.

        * html/HTMLFrameOwnerElement.h: Renamed isURLAllowed to canLoadScriptURL.
        Added protected canAddSubframe and isProhibitedSelfReference functions.
        Initialized the data members here.

        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::sandbox): Added braces for multi-line if statement.
        (WebCore::HTMLIFrameElement::parseAttribute): Removed unneeded storage of the
        allow attribute value. Added missing code to invalidate m_featurePolicy when
        the allow attribute changes. This could change behavior, but unlikely to affect
        any websites of tests. Would be good to add a test for this.
        (WebCore::HTMLIFrameElement::rendererIsNeeded): isURLAllowed -> canLoad. Also
        reordered the code to be more efficient for display: none (why not?).
        (WebCore::HTMLIFrameElement::featurePolicy const): Use attributeWithoutSynchronization
        to read the allow attribute rather than using a data member.

        * html/HTMLIFrameElement.h: Removed the unneeded allow function member and
        m_allow data member since DOM reflection takes care of the function and the
        featurePolicy function can get the attribute without a data member.

        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateWidget): allowedToLoadFrameURL -> canLoadURL
        Also tweaked comments.

        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::canLoadScriptURL const): Added. Code moved here
        from HTMLFrameOwnerElement::isURLAllowed. Added comment about why this is not
        necessarily correct and might need improvement.

        * html/HTMLPlugInElement.h: Added private override of canLoadScriptURL.

        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::canLoadURL const): Renamed from
        allowedToLoadFrameURL and refactored into two functions to match the
        structure of the similar function in HTMLFrameElementBase. Also refactored
        to use canAddSubframe and isProhibitedSelfReference rather than Frame::isURLAllowed.
        (WebCore::HTMLPlugInImageElement::canLoadPlugInContent const): Renamed from
        allowedToLoadPluginContent.
        (WebCore::HTMLPlugInImageElement::requestObject): allowedToLoadPluginContent
        -> canLoadPlugInContent

        * html/HTMLPlugInImageElement.h: Renamed functions as mentioned above.

        * loader/SubframeLoader.cpp:
        (WebCore::SubframeLoader::requestFrame): isURLAllowed -> canLoadScriptURL

        * page/FocusController.h: Removed unneeded forward declaration of HTMLFrameOwnerElement.

        * page/Frame.cpp:
        (WebCore::Frame::isURLAllowed const): Deleted.
        * page/Frame.h: Ditto.

        * page/FrameView.cpp:
        (WebCore::FrameView::init): Removed code to initialize m_margins, since nothing
        was looking at it after that.
        (WebCore::FrameView::setMarginWidth): Deleted.
        (WebCore::FrameView::setMarginHeight): Deleted.

        * page/FrameView.h: Removed marginWidth, marginHeight, setMarginWidth,
        setMarginHeight, and m_margins because there was no code anywhere calling
        marginWidth or marginHeight, and no other side effects of these functions.

2019-07-17  Alex Christensen  <achristensen@webkit.org>

        Add a runtime-disabled dialog element skeleton
        https://bugs.webkit.org/show_bug.cgi?id=199839

        Reviewed by Ryosuke Niwa.

        Beginning implementation of https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element
        Covered by rebaselining WPT tests.

        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:
        * html/HTMLDialogElement.cpp: Added.
        (WebCore::HTMLDialogElement::HTMLDialogElement):
        (WebCore::HTMLDialogElement::open):
        (WebCore::HTMLDialogElement::setOpen):
        (WebCore::HTMLDialogElement::returnValue):
        (WebCore::HTMLDialogElement::setReturnValue):
        (WebCore::HTMLDialogElement::show):
        (WebCore::HTMLDialogElement::showModal):
        (WebCore::HTMLDialogElement::close):
        * html/HTMLDialogElement.h: Added.
        * html/HTMLDialogElement.idl: Added.
        * html/HTMLTagNames.in:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled):
        (WebCore::RuntimeEnabledFeatures::dialogElementEnabled const):

2019-07-17  Youenn Fablet  <youenn@apple.com>

        Hop to the main thread when doing logging in RealtimeIncomingVideoSourceCocoa
        https://bugs.webkit.org/show_bug.cgi?id=199865

        Reviewed by Darin Adler.

        LoggerHelper routines allow logging messages in system console and inspector console.
        These routines iterate through a Vector of log observers which is not thread safe.
        Document, the main log observer, also expects to be called on the main thread.
        Manually tested (writing a layout test for this would require more than 2 seconds).

        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
        (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):

2019-07-17  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r247505.
        https://bugs.webkit.org/show_bug.cgi?id=199871

        "Caused failed ASSERT in stress test" (Requested by creid on
        #webkit).

        Reverted changeset:

        "Bytecode cache should use FileSystem"
        https://bugs.webkit.org/show_bug.cgi?id=199759
        https://trac.webkit.org/changeset/247505

2019-07-17  Youenn Fablet  <youenn@apple.com>

        Add release logging to AudioSampleDataSource
        https://bugs.webkit.org/show_bug.cgi?id=199814
        <rdar://problem/53128140>

        Reviewed by Eric Carlson.

        Use release logging for AudioSampleDataSource in case of errors.
        This requires passing a logger and a logger identifier.
        For that purpose, pass a MediaStreamTrackPrivate to it constructor
        and reuse its logger and log identifier.

        For each log, hop to the main thread as release logging requires to be done in the main thread.
        Add specific handling for RealtimeOutgoingAudioSource as its MediaStreamTrack can change in case of replaceTrack.
        In that case, we change of logger when changing the MediaStreamTrackPrivate.

        No observable change of behavior, covered by existing tests.

        * platform/audio/mac/AudioSampleDataSource.h:
        * platform/audio/mac/AudioSampleDataSource.mm:
        (WebCore::AudioSampleDataSource::create):
        (WebCore::AudioSampleDataSource::AudioSampleDataSource):
        (WebCore::AudioSampleDataSource::setupConverter):
        (WebCore::AudioSampleDataSource::pushSamplesInternal):
        (WebCore::AudioSampleDataSource::pullSamplesInternal):
        (WebCore::AudioSampleDataSource::setLogger):
        (WebCore::AudioSampleDataSource::logChannel const):
        * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
        (WebCore::RealtimeOutgoingAudioSource::setSource):
        * platform/mediastream/RealtimeOutgoingAudioSource.h:
        (WebCore::RealtimeOutgoingAudioSource::sourceUpdated):
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
        (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
        * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
        Instead of using its own logger/identifier member field, reuse its MediaStreamTrackPrivate.
        * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
        (WebCore::RealtimeOutgoingAudioSourceCocoa::RealtimeOutgoingAudioSourceCocoa):
        (WebCore::RealtimeOutgoingAudioSourceCocoa::sourceUpdated):
        * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:
        * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
        (WebCore::WebAudioSourceProviderAVFObjC::prepare):

2019-07-17  Kenneth Russell  <kbr@chromium.org>

        Make ANGLE work inside WebKit2's sandbox
        https://bugs.webkit.org/show_bug.cgi?id=199844

        Reviewed by Alex Christensen.

        Fix missing #import introduced at the last minute while removing
        some debugging code in the last patch.

        Tested with San Angeles WebGL demo and some conformance tests.

        * platform/graphics/cocoa/WebGLLayer.mm:

2019-07-17  Andres Gonzalez  <andresg_22@apple.com>

        Hang in WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
        https://bugs.webkit.org/show_bug.cgi?id=199845
        <rdar://problem/53121017>

        Reviewed by Chris Fleizach.

        - Added check for upper bound NSNotFound for parameter to visiblePositionRangeForLine.
        - Fixed signed/unsigned issue for AXTextMarkerRangeForLine attribute.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine const):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

2019-07-17  Rob Buis  <rbuis@igalia.com>

        Add referrerpolicy attribute support for <script> elements
        https://bugs.webkit.org/show_bug.cgi?id=185550

        Reviewed by Youenn Fablet.

        This patch adds 'referrerpolicy' attribute support for script elements.
        If set, the value is restricted to the ReferrerPolicy enum, and
        if valid it is used for the script fetch.
        If not set or invalid, the current behavior is kept.

        Tests: http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http-http.html
               http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http.https.html
               http/tests/referrer-policy-script/no-referrer-when-downgrade/same-origin.html
               http/tests/referrer-policy-script/no-referrer/cross-origin-http-http.html
               http/tests/referrer-policy-script/no-referrer/cross-origin-http.https.html
               http/tests/referrer-policy-script/no-referrer/same-origin.html
               http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http-http.html
               http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html
               http/tests/referrer-policy-script/origin-when-cross-origin/same-origin.html
               http/tests/referrer-policy-script/origin/cross-origin-http-http.html
               http/tests/referrer-policy-script/origin/cross-origin-http.https.html
               http/tests/referrer-policy-script/origin/same-origin.html
               http/tests/referrer-policy-script/same-origin/cross-origin-http-http.html
               http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html
               http/tests/referrer-policy-script/same-origin/same-origin.html
               http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http-http.html
               http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http.https.html
               http/tests/referrer-policy-script/strict-origin-when-cross-origin/same-origin.html
               http/tests/referrer-policy-script/strict-origin/cross-origin-http-http.html
               http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html
               http/tests/referrer-policy-script/strict-origin/same-origin.html
               http/tests/referrer-policy-script/unsafe-url/cross-origin-http-http.html
               http/tests/referrer-policy-script/unsafe-url/cross-origin-http.https.html
               http/tests/referrer-policy-script/unsafe-url/same-origin.html

        * bindings/js/CachedScriptFetcher.cpp:
        (WebCore::CachedScriptFetcher::requestScriptWithCache const):
        * bindings/js/CachedScriptFetcher.h:
        (WebCore::CachedScriptFetcher::CachedScriptFetcher):
        * dom/InlineClassicScript.h:
        * dom/LoadableClassicScript.cpp:
        (WebCore::LoadableClassicScript::create):
        * dom/LoadableClassicScript.h:
        * dom/LoadableModuleScript.cpp:
        (WebCore::LoadableModuleScript::create):
        (WebCore::LoadableModuleScript::LoadableModuleScript):
        * dom/LoadableModuleScript.h:
        * dom/LoadableScript.h:
        (WebCore::LoadableScript::LoadableScript):
        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::requestClassicScript):
        (WebCore::ScriptElement::requestModuleScript):
        * dom/ScriptElement.h:
        * dom/ScriptElementCachedScriptFetcher.h:
        (WebCore::ScriptElementCachedScriptFetcher::ScriptElementCachedScriptFetcher):
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::referrerPolicyForBindings const):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::setReferrerPolicyForBindings):
        (WebCore::HTMLScriptElement::referrerPolicyForBindings const):
        (WebCore::HTMLScriptElement::referrerPolicy const):
        * html/HTMLScriptElement.h:
        * html/HTMLScriptElement.idl:
        * html/parser/CSSPreloadScanner.cpp:
        (WebCore::CSSPreloadScanner::emitRule):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
        * html/parser/HTMLResourcePreloader.cpp:
        (WebCore::PreloadRequest::resourceRequest):
        * html/parser/HTMLResourcePreloader.h:
        (WebCore::PreloadRequest::PreloadRequest):
        * platform/ReferrerPolicy.cpp:
        (WebCore::referrerPolicyToString):
        * platform/ReferrerPolicy.h:
        * svg/SVGScriptElement.h:

2019-07-16  Christopher Reid  <chris.reid@sony.com>

        Bytecode cache should use FileSystem
        https://bugs.webkit.org/show_bug.cgi?id=199759

        Reviewed by Yusuke Suzuki.

        * platform/SharedBuffer.cpp:

2019-07-16  Simon Fraser  <simon.fraser@apple.com>

        Fix includes and make a constructor explicit to avoid unified-sources-triggered test failures
        https://bugs.webkit.org/show_bug.cgi?id=199849

        Reviewed by Wenson Hsieh.
        
        webkit.org/b/199587 triggered some unexpected test failures because of unified sources include
        order. The TextStream operator in ScrollingTreeOverflowScrollingNode::dumpProperties() was invoking
        the implicit constructor of TransformOperations.

        * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp: Include TextStream.h
        * platform/graphics/transforms/TransformOperations.h: Make ctor explicit.

2019-07-16  Antoine Quint  <graouts@apple.com>

        REGRESSION: fast/events/watchos/double-tap-to-zoom* tests crashing in com.apple.WebKit: -[WKContentView(WKInteraction) _singleTapDidReset:]
        https://bugs.webkit.org/show_bug.cgi?id=199840
        <rdar://problem/52856531>

        Reviewed by Wenson Hsieh.

        Fix a build error that occured when building for the watchOS Simulator in the debug configuration.

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

2019-07-16  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Convert GPUComputePipeline LOG statements to generate GPUErrors
        https://bugs.webkit.org/show_bug.cgi?id=199773

        Reviewed by Myles C. Maxfield.

        Generate a GPUError if GPUComputePipeline creation fails.
        Rework the WHLSL test harness to take advantage of this.

        Test: webgpu/compute-pipeline-errors.html

        * Modules/webgpu/WebGPUComputePipelineDescriptor.cpp:
        (WebCore::WebGPUComputePipelineDescriptor::tryCreateGPUComputePipelineDescriptor const):
        * Modules/webgpu/WebGPUComputePipelineDescriptor.h:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createComputePipeline const):
        * platform/graphics/gpu/GPUBuffer.h:
        * platform/graphics/gpu/GPUComputePipeline.h: 
                Now inherits from GPUObjectBase, though this isn't super useful yet
                since GPUComputePipeline itself does not expose any operations that can error. 
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateComputePipeline const):
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::validateBufferUsage):
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):
        (WebCore::convertComputePipelineDescriptor):
        (WebCore::tryCreateMTLComputePipelineState):
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):

2019-07-11  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Move error scopes out of GPUDevice for more portable error generation
        https://bugs.webkit.org/show_bug.cgi?id=199740

        Reviewed by Myles C. Maxfield.

        Move error generation into a separate RefCounted class to allow GPU objects to generate 
        errors independent of any GPUDevice.
        Create GPUObjectBase to delegate error generation and refactor GPUBuffer to inherit from GPUObjectBase.

        No behavior change or new tests. Error scopes covered by error-scopes-test.html.

        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::WebGPUDevice): Now creates a GPUErrorGenerator.
        (WebCore::WebGPUDevice::createBuffer const): Pass the GPUErrorGenerator to any created GPUBuffer.
        (WebCore::WebGPUDevice::createBufferMapped const): Ditto.
        (WebCore::WebGPUDevice::popErrorScope): Shouldn't be const. Can just ask for the GPUError rather than passing a lambda.
        (WebCore::WebGPUDevice::pushErrorScope const): Deleted.
        (WebCore::WebGPUDevice::popErrorScope const): Deleted.
        * Modules/webgpu/WebGPUDevice.h:
        (WebCore::WebGPUDevice::pushErrorScope):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUBuffer.h: Now inherits from GPUObjectBase for error generation ease.
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateBuffer): Ensure GPUBuffers reference the GPUErrorGenerator.
        (WebCore::GPUDevice::pushErrorScope): Deleted. No longer needed here.
        (WebCore::GPUDevice::popErrorScope): Deleted.
        (WebCore::GPUDevice::registerError): Deleted.
        * platform/graphics/gpu/GPUDevice.h: Move error scope logic out.
        * platform/graphics/gpu/GPUErrorGenerator.cpp: Added.
        (WebCore::GPUErrorGenerator::pushErrorScope):
        (WebCore::GPUErrorGenerator::popErrorScope):
        (WebCore::GPUErrorGenerator::generateError):
        * platform/graphics/gpu/GPUErrorGenerator.h: Added.
        (WebCore::GPUErrorGenerator::create):
        * platform/graphics/gpu/GPUObjectBase.h: Added.
        (WebCore::GPUObjectBase::generateError):
        (WebCore::GPUObjectBase::GPUObjectBase):
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Use the GPUErrorGenerator directly during buffer creation.
        (WebCore::GPUBuffer::validateBufferUsage):
        (WebCore::GPUBuffer::tryCreate):
        (WebCore::GPUBuffer::GPUBuffer):
        * platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
        (WebCore::GPUQueue::submit): Prevent possible null dereference.

2019-07-10  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Implement GPUError and error scopes
        https://bugs.webkit.org/show_bug.cgi?id=199655

        Reviewed by Myles C. Maxfield.

        Add GPUErrorFilter, GPUError, and the ability to push and pop error scopes on a GPUDevice.
        This will allow us to check for WebGPU errors from JavaScript.
        Currently, only some GPUBuffer creation errors are reported for testing; more errors will follow in later patches.

        Test: webgpu/error-scopes-test.html

        * Modules/webgpu/GPUErrorFilter.idl: Added.
        * Modules/webgpu/GPUOutOfMemoryError.idl: Added.
        * Modules/webgpu/GPUValidationError.idl: Added.
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::pushErrorScope):
        (WebCore::WebGPUDevice::popErrorScope): Resolve the Promise here, since GPUDevice shouldn't worry about DOM layer.
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDeviceErrorScopes.cpp: Added.
        (WebCore::WebGPUDeviceErrorScopes::pushErrorScope): Delegates to WebGPUDevice.
        (WebCore::WebGPUDeviceErrorScopes::popErrorScope): Ditto.
        * Modules/webgpu/WebGPUDeviceErrorScopes.h: Added.
        * Modules/webgpu/WebGPUDeviceErrorScopes.idl: Added.
        * platform/graphics/gpu/GPUBuffer.h:
        * platform/graphics/gpu/GPUDevice.cpp: The actual error stack lives here.
        (WebCore::GPUDevice::pushErrorScope):
        (WebCore::GPUDevice::popErrorScope): Calls a callback with a GPUError, if any.
        (WebCore::GPUDevice::registerError): Actually creates GPUErrors.
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUError.cpp: Added.
        (WebCore::createError): Factory function for various error types.
        * platform/graphics/gpu/GPUError.h: Added.
        * platform/graphics/gpu/GPUErrorFilter.h: Added.
        * platform/graphics/gpu/GPUOutOfMemoryError.h: Added.
        (WebCore::GPUOutOfMemoryError::create):
        * platform/graphics/gpu/GPUValidationError.cpp: Added.
        (WebCore::GPUValidationError::create):
        (WebCore::GPUValidationError::GPUValidationError):
        * platform/graphics/gpu/GPUValidationError.h: Added.
        (WebCore::GPUValidationError::message const):
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::validateBufferUsage): Create an actual GPUValidationError :)
        (WebCore::GPUBuffer::tryCreate): Create GPUOutOfMemoryErrors where appropriate.

        Add file/name references:
        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:

        Missing includes:
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:

2019-07-16  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r247493.
        https://bugs.webkit.org/show_bug.cgi?id=199841

        "The new whlsl-for-loop.html test is failing on the bots"
        (Requested by rmorisset on #webkit).

        Reverted changeset:

        "[WHLSL] Desugar for loops and while loops"
        https://bugs.webkit.org/show_bug.cgi?id=199726
        https://trac.webkit.org/changeset/247493

2019-07-16  Per Arne Vollan  <pvollan@apple.com>

        Prewarm font cache with more fonts
        https://bugs.webkit.org/show_bug.cgi?id=199283

        Reviewed by Myles C. Maxfield.

        Use the existing prewarm method in FontCache to prewarm the cache with a set of font family names.
        The font list consists of some of the fonts used by the 10 most popular sites on Alexa top sites.
        This is a confirmed improvement in page load time.

        No new tests, covered by existing tests.

        * page/ProcessWarming.cpp:
        (WebCore::ProcessWarming::prewarmGlobally):
        * platform/graphics/FontCache.cpp:
        (WebCore::FontCache::prewarmGlobally):
        * platform/graphics/FontCache.h:
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontCache::prewarmGlobally):

2019-07-16  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Desugar for loops and while loops
        https://bugs.webkit.org/show_bug.cgi?id=199726

        Reviewed by Myles C. Maxfield.

        This patch makes loops behave a lot more similarly to the spec.
        In particular, while loops are just degenerate for loops, so they can be desugared in the parser.
        And for loops can themselves be heavily desugared, into having no initializer, one condition and one increment
        by putting any initializer in a block around the loop, putting true in the condition if there is none, and putting any litteral in the increment if there is none.

        Debugging this patch revealed an unrelated bug where the parser would generate an empty comma expression on ";", which the checker would then choke on.
        The parser now generates an empty block in that case (as specified in the spec), which fixes the problem.

        Finally, while updating the NameResolver for the new structure of loops I realized that it was needlessly generating extra NameContext.
        They are not expected by the spec, that forbids naked variable declarations outside of blocks anyway.
        So I removed this unnecessary work, and fixed the parser to correctly forbid such naked variable declarations.

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        (WebCore::WHLSL::AST::ForLoop::ForLoop):
        (WebCore::WHLSL::AST::ForLoop::condition):
        (WebCore::WHLSL::AST::ForLoop::increment):
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::isVariableDeclarationsStatement const):
        * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h: Removed.
        * 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:
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseBlockBody):
        (WebCore::WHLSL::Parser::parseForLoop):
        (WebCore::WHLSL::Parser::parseWhileLoop):
        (WebCore::WHLSL::Parser::parseStatement):
        (WebCore::WHLSL::Parser::parseEffectfulExpression):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.h:
        * WebCore.xcodeproj/project.pbxproj:

2019-07-16  Tim Horton  <timothy_horton@apple.com>

        NSTextFinder holes don't scroll with the page
        https://bugs.webkit.org/show_bug.cgi?id=199815
        <rdar://problem/52280514>

        Reviewed by Simon Fraser.

        * rendering/ScrollAlignment.h:

2019-07-16  Youenn Fablet  <youenn@apple.com>

        [iOS] Make sure the first camera device in the list is the front camera
        https://bugs.webkit.org/show_bug.cgi?id=199811
        <rdar://problem/53125157>

        Reviewed by Jer Noble.

        Some websites call getUserMedia with a deviceId constraint and theey pick the
        first deviceId in the list provided by enumerateDevices.
        On iOS, this is the back camera which is often not what is expected by WebRTC applications.
        Instead, make sure the first camera device is the front camera.

        Manually tested.

        * platform/mediastream/mac/AVCaptureDeviceManager.mm:

2019-07-16  Chris Dumez  <cdumez@apple.com>

        Speed up StorageManager::getValues()
        https://bugs.webkit.org/show_bug.cgi?id=199812

        Reviewed by Alex Christensen.

        * storage/StorageMap.cpp:
        (WebCore::StorageMap::importItems):
        * storage/StorageMap.h:

2019-07-16  Simon Fraser  <simon.fraser@apple.com>

        Remove "GraphicsContext 0x7ffd8765f6b0 stack changed by" logging
        https://bugs.webkit.org/show_bug.cgi?id=199834

        Reviewed by Dean Jackson.

        I inadvertently left in a couple of GraphicsContextStateStackChecker (used to detect mismatched
        GraphicsContext save/restore) in r246725, so remove them.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayerContents):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintIntoLayer):

2019-07-16  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Text autosizing] [iPadOS] Paragraph text on the front page of LinkedIn.com is not boosted
        https://bugs.webkit.org/show_bug.cgi?id=199827
        <rdar://problem/53152660>

        Reviewed by Zalan Bujtas.

        After r247467, we try to avoid boosting some text that might cause vertical overflow due to line height
        increasing inside a container that expects a fixed integer number of lines. However, in the case of
        linkedin.com, the line height specified is a fixed value of 26px, which greatly exceeds the specified font size
        of 14px. In this case, it's safe to boost font size, since doing so would not affect the line height at all.

        To handle this case, don't avoid text autosizing due to the "fixed number of lines" heuristic if the line height
        is fixed, and is much larger than the font size.

        Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html

        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::updateStatus):

2019-07-16  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Cancel ongoing content observation when tap is failed/cancelled
        https://bugs.webkit.org/show_bug.cgi?id=199828
        <rdar://problem/53152696>

        Reviewed by Wenson Hsieh.

        This patch ensures that we stop the content observation (initiated by touch start) when the tap
        is cancelled/failed.

        Not testable.

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::didCancelPotentialTap):
        * page/ios/ContentChangeObserver.h:

2019-07-16  Rob Buis  <rbuis@igalia.com>

        Remove support for beforeload on link=prefetch
        https://bugs.webkit.org/show_bug.cgi?id=199632

        Reviewed by Youenn Fablet.

        Remove support for beforeload on link=prefetch
        by not calling shouldLoadLink for prefetch.
        Also make loadLink return void since it always
        succeeds.

        Tests: http/wpt/prefetch/beforeload-dynamic.html
               http/wpt/prefetch/beforeload.html

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::prefetchIfNeeded):
        (WebCore::LinkLoader::loadLink):
        * loader/LinkLoader.h:

2019-07-16  Youenn Fablet  <youenn@apple.com>

        Hop to main thread for release logging in RealtimeIncomingAudioSource
        https://bugs.webkit.org/show_bug.cgi?id=199813

        Reviewed by Eric Carlson.

        LoggerHelper routines allow logging messages in system console and inspector console.
        These routines iterate through a Vector of log observers which is not thread safe.
        Document, the main log observer, also expects to be called on the main thread.
        Manually tested (writing a layout test for this would require more than 2 seconds).

        * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
        (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

2019-07-15  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r247444.

        Caused two scrolling tests to fail on iOS Simulator

        Reverted changeset:

        "Typing into a cell in a Google Sheet lags behind by one
        character"
        https://bugs.webkit.org/show_bug.cgi?id=199587
        https://trac.webkit.org/changeset/247444

2019-07-15  Zalan Bujtas  <zalan@apple.com>

        outlook.live.com has odd viewport with edge gap
        https://bugs.webkit.org/show_bug.cgi?id=199822
        <rdar://problem/53029072>

        Reviewed by Wenson Hsieh.

        r244944 introduced a viewport width quirk because at certain screen size outlook.live.com's flex setup produced a slighly broken layout.
        We don't seem to need this quirk anymore (composed column's min-width is removed.)

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldIgnoreShrinkToFitContent const): Deleted.
        (WebCore::Quirks::overriddenViewLayoutWidth const): Deleted.
        * page/Quirks.h:

2019-07-15  Saam Barati  <sbarati@apple.com>

        [WHLSL] Matrix memory layout should match HLSL by laying out columns linearly
        https://bugs.webkit.org/show_bug.cgi?id=199215

        Reviewed by Myles C. Maxfield.

        This patch makes it so that we lay out matrices in memory in the same
        way HLSL does. This is by laying out columns linearly in memory. So a float4x4
        composed by this series of floats in memory:
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
        
        composes this logical matrix:
        [[ 0,  4,  8, 12]
         [ 1,  5,  9, 13]
         [ 2,  6, 10, 14]
         [ 3,  7, 11, 15]]
        
        To implement this, we switch to using an array to represent the memory
        contents linear memory layout of a matrix. So the matrix float4x3 will now
        be an array<float, 12> in metal. Then, we change the indexed getter and
        setter methods for matrices to load and store from and to the correct
        memory locations. The memory layout of matrices is observable to WHLSL
        when using a matrix as an input/output to a shader.

        Test: webgpu/whlsl-matrix-memory-layout.html

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeType):

2019-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Text autosizing] [iPadOS] Product label text is clipped in portrait mode on the front page of sephora.com
        https://bugs.webkit.org/show_bug.cgi?id=199806
        <rdar://problem/52902482>

        Reviewed by Zalan Bujtas.

        On sephora.com, some product label text is currently boosted by idempotent text autosizing, which causes the
        labels be vertically clipped. This patch augments the idempotent text autosizing heuristic to avoid this case by
        checking if the element to be boosted has a fixed height or max height, whose value is very close to a small
        integer multiple of the line height. In this case, it's likely that the website expects the text to be no more
        than a few lines' worth of height, so boosting the text is likely to break the page.

        Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):
        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::updateStatus):
        * rendering/style/TextSizeAdjustment.h:

        Rename Fields::DisplayNone to Fields::AvoidSubtree to avoid introducing another bit in RenderStyle's inherited
        flags.

2019-07-15  Myles C. Maxfield  <mmaxfield@apple.com>

        New York font erroneously gets synthetic bold
        https://bugs.webkit.org/show_bug.cgi?id=199653

        Unreviewed watchOS build fix.

        * page/ProcessWarming.cpp:
        (WebCore::ProcessWarming::prewarmGlobally):
        * page/cocoa/MemoryReleaseCocoa.mm:
        (WebCore::platformReleaseMemory):
        * platform/graphics/FontCascadeDescription.cpp:
        * platform/graphics/FontDescription.h:
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::invalidateFontCache):
        (WebCore::lookupFallbackFont):
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::FontCascadeDescription::effectiveFamilyAt const):
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

2019-07-15  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r247462.
        https://bugs.webkit.org/show_bug.cgi?id=199816

        completely messed up the patch (Requested by litherum on
        #webkit).

        Reverted changeset:

        "New York font erroneously gets synthetic bold"
        https://bugs.webkit.org/show_bug.cgi?id=199653
        https://trac.webkit.org/changeset/247462

2019-07-11  Simon Fraser  <simon.fraser@apple.com>

        Fix builds where HAVE_DESIGN_SYSTEM_UI_FONTS is not defined.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::fontWithFamilySpecialCase):

2019-07-11  Justin Fan  <justin_fan@apple.com>

        Unreviewed build fix.

        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp: Missing include.

2019-07-11  Myles C. Maxfield  <mmaxfield@apple.com>

        New York font erroneously gets synthetic bold
        https://bugs.webkit.org/show_bug.cgi?id=199653
        <rdar://problem/51692592>

        Reviewed by Simon Fraser.

        This patch adds support for -apple-system-ui-serif, -apple-system-ui-monospaced,
        and -apple-system-ui-rounded, behind an SPI that is off-by-default. We don't want
        to expose these fonts to the web because we don't a standardization story for them
        yet, but we do want some apps to be able to use them.

        WebKit clients who want to use these fonts can set
        -[WKPreferences _shouldAllowDesignSystemUIFonts] = YES.

        The patch generalizes our existing system-ui infrastructure to handle these three
        additional fonts. It also explicitly disables the unsupported dot-prefixed names
        so they don't leak out into Web content.

        Tests: fast/text/design-system-ui-10.html
               fast/text/design-system-ui-11.html
               fast/text/design-system-ui-12.html
               fast/text/design-system-ui-13.html
               fast/text/design-system-ui-14.html
               fast/text/design-system-ui-15.html
               fast/text/design-system-ui-16.html
               fast/text/design-system-ui-2.html
               fast/text/design-system-ui-3.html
               fast/text/design-system-ui-4.html
               fast/text/design-system-ui-5.html
               fast/text/design-system-ui-6.html
               fast/text/design-system-ui-7.html
               fast/text/design-system-ui-8.html
               fast/text/design-system-ui-9.html
               fast/text/design-system-ui.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const):
        * css/CSSFontFace.h:
        * css/CSSFontFaceSource.cpp:
        (WebCore::CSSFontFaceSource::load):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::initializeFontStyle):
        * page/Settings.yaml:
        * platform/graphics/FontDescription.cpp:
        (WebCore::m_shouldAllowDesignSystemUIFonts):
        (WebCore::m_shouldAllowUserInstalledFonts): Deleted.
        * platform/graphics/FontDescription.h:
        (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const):
        (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts):
        (WebCore::FontDescription::operator== const):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::platformFontLookupWithFamily):
        (WebCore::fontWithFamily):
        * platform/graphics/cocoa/FontCacheCoreText.h:
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::systemFontUse):
        (WebCore::systemFontCascadeList):
        (WebCore::FontCascadeDescription::effectiveFamilyCount const):
        (WebCore::FontCascadeDescription::effectiveFamilyAt const):
        (WebCore::isSystemFontString): Deleted.
        (WebCore::isUIFontTextStyle): Deleted.
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::ctFont const):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::createSystemUI):
        (WebCore::SystemFontDatabaseCoreText::createDesignSystemUI):
        (WebCore::SystemFontDatabaseCoreText::createTextStyle):
        (WebCore::SystemFontDatabaseCoreText::cascadeList):
        (WebCore::SystemFontDatabaseCoreText::applyWeightItalicsAndFallbackBehavior):
        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.h:
        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::platformFontWithFamilySpecialCase):
        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::platformFontWithFamilySpecialCase):
        * style/StyleResolveForDocument.cpp:
        (WebCore::Style::resolveForDocument):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setShouldAllowDesignSystemUIFonts):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-07-15  Chris Dumez  <cdumez@apple.com>

        Crash under DisplayRefreshMonitorManager::displayWasUpdated()
        https://bugs.webkit.org/show_bug.cgi?id=199808
        <rdar://problem/53070144>

        Reviewed by Geoffrey Garen.

        Copy m_monitors before iterating over it because the calling displayLinkFired() on the
        monitor may end up calling DisplayRefreshMonitorManager::displayDidRefresh() synchronously,
        which removes the monitor from m_monitors.

        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):

2019-07-15  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Improve wasm wpt test results by fixing miscellaneous issues
        https://bugs.webkit.org/show_bug.cgi?id=199783

        Reviewed by Mark Lam.

        Remove WebAssemblyPrototype.

        Tests: imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/valueOf.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/valueOf.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/exports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/exports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/interface.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/buffer.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/buffer.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/customSections.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/customSections.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/get-set.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/get-set.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/grow.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/grow.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/length.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/length.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/toString.any.worker.html

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::compileStreaming):
        (WebCore::JSDOMWindowBase::instantiateStreaming):

2019-07-15  Dean Jackson  <dino@apple.com>

        [WebGL] Remove software rendering and simplify context creation on macOS
        https://bugs.webkit.org/show_bug.cgi?id=199789

        Reviewed by Sam Weinig.

        We don't ever want to fall-back to the software renderer. We'd be better
        off failing to create the context completely.

        Also, the number of fall-back attempts we were making before hitting
        the software renderer was overkill. All hardware we support should
        handle a 32bpp buffer.

        Lastly, we don't want to support supersampling - multisampling only.

        I lied… there is one more thing - failing to create the context
        was causing an ASSERT trying to remove the GC3D from the global list.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::create):
        * page/Settings.yaml: Remove forceSoftwareWebGL setting.
        * platform/graphics/GraphicsContext3DAttributes.h:
        * platform/graphics/GraphicsContext3DManager.cpp:
        (WebCore::GraphicsContext3DManager::addContext):
        (WebCore::GraphicsContext3DManager::removeContext):
        (WebCore::GraphicsContext3DManager::removeContextRequiringHighPerformance):
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::setPixelFormat): Deleted.

2019-07-14  Dean Jackson  <dino@apple.com>

        Move more WebGL things into unified builds
        https://bugs.webkit.org/show_bug.cgi?id=199787

        Reviewed by Wenson Hsieh.

        Unify as many WebGL files as possible.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * html/canvas/WebGLFramebuffer.cpp:
        * html/canvas/WebGLObject.h: Move a helper function into an inline.
        (WebCore::objectOrZero):
        * html/canvas/WebGLRenderingContextBase.cpp:
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        * platform/mediastream/MediaStreamTrackPrivate.cpp:

2019-07-15  Keith Rollin  <krollin@apple.com>

        Add missing webgpu includes
        https://bugs.webkit.org/show_bug.cgi?id=199802
        <rdar://problem/53119120>

        Reviewed by Myles C. Maxfield.

        WHLSLFunctionWriter.cpp fails to compile on tvOS and watchOS due to
        missing includes. This file likely compiles on other platforms due to
        the Unified Sources facility that clumps several implementation files
        together, exposing those implementation files to the others' includes.
        It fails on tvOS and watchOS due to the different ways these
        implementation files can get clumped together on different platforms.

        No new tests as there is no functional change.

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

2019-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>

        Unreviewed, rolling out r247440.

        Broke builds

        Reverted changeset:

        "[JSC] Improve wasm wpt test results by fixing miscellaneous
        issues"
        https://bugs.webkit.org/show_bug.cgi?id=199783
        https://trac.webkit.org/changeset/247440

2019-07-15  Daniel Bates  <dabates@apple.com>

        Typing into a cell in a Google Sheet lags behind by one character
        https://bugs.webkit.org/show_bug.cgi?id=199587
        <rdar://problem/51616845>

        Reviewed by Brent Fulgham.

        Add a Google Sheets quirk. Put all DOM timers scheduled from keydown and keypress event listeners
        into a holding tank. The timers continue to tick, but are barred from executing their action until
        the next text insertion or deletion or 32 ms (on device) have elapsed, whichever is sooner. We only
        allocate a holding tank once per document, only if the quirk is active, and this allocation is done
        when the document schedules a timer on keydown or keypress. The holding tank lives for the lifetime
        of the document.

        The story behind the quirk:

        On keypress Google Sheets schedules timers and expects that a DOM update will occur (i.e. text
        will be inserted or deleted) within the same event loop iteration as the dispatched keypress. The
        UI Events spec. [1] makes no such guarantee of when a DOM update must occur in relation to the keypress
        event. It could happen in the same event loop iteration as the key press (as Google expects), the
        next iteration, 500ms later, 2 minutes later, etc. What the spec does guarantee is that by the time
        a DOM input event is dispatched that the DOM will be updated. And this is the solution to the problem
        Google Sheets is trying to solve, but is doing so using pre-IE 9 technology (though similar
        functionality was available via onpropertychange in IE < 9).

        See also <https://github.com/w3c/uievents/issues/238>, which is tracking a spec. text update for
        this quirk.

        Test: fast/events/ios/dom-update-on-keydown-quirk.html

        [1] <https://w3c.github.io/uievents/> (Editor's Draft, 14 October 2018)

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        Add some files to the project.

        * dom/Document.cpp:
        (WebCore::Document::domTimerHoldingTank): Added.
        * dom/Document.h:
        (WebCore::Document::domTimerHoldingTankIfExists): Added.

        * page/DOMTimer.cpp:
        (WebCore::DOMTimer::install): Put the newly instantiated timer into the holding tank.
        (WebCore::DOMTimer::removeById): Remove the timer from the holding tank.
        (WebCore::DOMTimer::fired): Check if the timer is in the holding tank. If it is and it is a one-
        shot timer then schedule it for the next event loop iteration. If it's a repeating timer just
        let it continue ticking. Otherwise, do what we no now and execute the timer's action. The reason
        we do not suspend timers in the holding tank is because:
            1. Far out timers (Google Sheets registers timers as far out as 5 minutes!) are not penalized.
            Though smart supension logic could avoid this. See (3).

            2. Empirical observations indicate that the keyboard will perform the insertion or deletion
            reasonably quickly (not the same event loop iteration as the keydown, but within two iterations out).
            So, the timers in the holding tank are short-lived.

            3. Simplifies the code. There is no need to keep additional bookkeeping to track multiple timer
            suspension reasons (timers currently can only have one suspension reason) or alternatively defer
            scheduling a timer until a later time and computing a new "fair" firing time when scheduled.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::internalKeyEvent): Place a token on the stack to put all DOM timers
        scheduled on keydown and keypress into the holding tank if the quirk is enabled.
        * page/Quirks.cpp:
        (WebCore::Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand const): Added.
        * page/Quirks.h:
        * page/Settings.yaml: Added setting so that this quirk can be enabled from a layout test. This setting
        also lets us enable the quirk for all sites or for certain third-party apps if desired.
        * page/ios/DOMTimerHoldingTank.cpp: Added.
        (WebCore::DOMTimerHoldingTank::DOMTimerHoldingTank):
        (WebCore::DOMTimerHoldingTank::add):
        (WebCore::DOMTimerHoldingTank::remove):
        (WebCore::DOMTimerHoldingTank::contains):
        (WebCore::DOMTimerHoldingTank::removeAll):
        (WebCore::DOMTimerHoldingTank::stopExceededMaximumHoldTimer):
        * page/ios/DOMTimerHoldingTank.h: Added.
        (WebCore::DeferDOMTimersForScope::DeferDOMTimersForScope):
        (WebCore::DeferDOMTimersForScope::~DeferDOMTimersForScope):
        (WebCore::DeferDOMTimersForScope::isDeferring):

2019-07-15  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r247397, r247378, r247366.

        Broke watchOS builds.

        Reverted changesets:

        "[WebGPU] Implement GPUError and error scopes"
        https://bugs.webkit.org/show_bug.cgi?id=199655
        https://trac.webkit.org/changeset/247366/webkit

        "[WebGPU] Move error scopes out of GPUDevice for more portable error generation"
        https://bugs.webkit.org/show_bug.cgi?id=199740
        https://trac.webkit.org/changeset/247397/webkit

2019-07-15  Rob Buis  <rbuis@igalia.com>

        MathML WPT test for RadicalDegreeBottomRaisePercent fails
        https://bugs.webkit.org/show_bug.cgi?id=183631

        Reviewed by Frédéric Wang.

        When stretching the radical operator also take thickness
        and radical gap into account:
        https://mathml-refresh.github.io/mathml-core/#radicals-msqrt-mroot

        Test: imported/w3c/web-platform-tests/mathml/presentation-markup/radicals/root-parameters-1.html

        * rendering/mathml/RenderMathMLRoot.cpp:
        (WebCore::RenderMathMLRoot::layoutBlock):

2019-07-15  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] Improve wasm wpt test results by fixing miscellaneous issues
        https://bugs.webkit.org/show_bug.cgi?id=199783

        Reviewed by Mark Lam.

        Remove WebAssemblyPrototype.

        Tests: imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/value-set.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/valueOf.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/global/valueOf.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/exports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/exports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/instance/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/interface.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/buffer.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/buffer.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/memory/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/customSections.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/customSections.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/exports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/imports.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/module/toString.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/get-set.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/get-set.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/grow.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/grow.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/length.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/length.any.worker.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/toString.any.html
               imported/w3c/web-platform-tests/wasm/jsapi/table/toString.any.worker.html

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::compileStreaming):
        (WebCore::JSDOMWindowBase::instantiateStreaming):

2019-07-15  Youenn Fablet  <youenn@apple.com>

        Enable a debug WebRTC mode without any encryption
        https://bugs.webkit.org/show_bug.cgi?id=199177
        <rdar://problem/52074986>

        Reviewed by Eric Carlson.

        For every RTCPeerConnection, first set whether to use encryption or not
        based on page settings.
        If encryption is disabled, log it.
        Add internals API to toggle the switch from tests.
        Test: webrtc/disable-encryption.html

        * Modules/mediastream/RTCPeerConnection.cpp:
        (WebCore::RTCPeerConnection::RTCPeerConnection):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::createLibWebRTCPeerConnectionBackend):
        * inspector/agents/InspectorPageAgent.cpp:
        * page/Settings.yaml:
        * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
        (WebCore::LibWebRTCProvider::setEnableWebRTCEncryption):
        * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):
        (WebCore::Internals::setEnableWebRTCEncryption):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-07-15  Sihui Liu  <sihui_liu@apple.com>

        window.openDatabase is not writable
        https://bugs.webkit.org/show_bug.cgi?id=199737
        <rdar://problem/52551332>

        Reviewed by Chris Dumez.

        In r246707 we made openDatabase an undetectable attribute of window, and it was set to be read-only. This broke 
        some sites which replace window.openDatabase with their own implementation when window.openDatabase does not 
        exists or WebSQL is not implemented. 

        This patch removes the readonly property and adds a setter for openDatabase.

        * Modules/webdatabase/DOMWindowWebDatabase.idl:
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::setOpenDatabase):

2019-07-15  Youenn Fablet  <youenn@apple.com>

        Filter SDP c lines
        https://bugs.webkit.org/show_bug.cgi?id=199791

        Reviewed by Eric Carlson.

        As discussed in https://github.com/rtcweb-wg/mdns-ice-candidates/issues/91,
        use 0.0.0.0 for c lines when filtering the SDP.
        Covered by updated test.

        * Modules/mediastream/PeerConnectionBackend.cpp:
        (WebCore::PeerConnectionBackend::filterSDP const):

2019-07-15  Zalan Bujtas  <zalan@apple.com>

        naver.com: Video stops when tapping on the video to use buttons
        https://bugs.webkit.org/show_bug.cgi?id=199784
        <rdar://problem/48068610>

        Reviewed by Maciej Stachowiak.

        Opt out of simulated mouse event sending for tv.naver.com.
        When tv.naver.com receives the simulated mouseUp at touchEnd, it pauses the video right away and calls preventDefault()
        which prevents us from running the hover heuristics.

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

2019-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>

        [GTK] GitHub breaks on FreeBSD because of "unsupported browser"
        https://bugs.webkit.org/show_bug.cgi?id=199745

        Reviewed by Carlos Garcia Campos.

        It's been a while since I last updated the fake version numbers in our user agent, both for
        the user agent quirks for naughty websites and also the Safari version in our standard user
        agent. Update them. This should fix github.com on FreeBSD at least. I also noticed some
        wonkiness on Google Docs recently that I thought required this update, but I didn't do
        anything about it at the time because I wasn't able to reproduce the issue when I tried
        again later.

        This could absolutely break websites, because the web is awful, but that's calculated risk.

        * platform/UserAgentQuirks.cpp:
        (WebCore::UserAgentQuirks::stringForQuirk):
        * platform/glib/UserAgentGLib.cpp:
        (WebCore::buildUserAgentString):

2019-07-14  Chris Dumez  <cdumez@apple.com>

        Add threading assertion to WeakPtrFactory::createWeakPtr()
        https://bugs.webkit.org/show_bug.cgi?id=199639

        Reviewed by Ryosuke Niwa.

        * platform/ScrollableArea.cpp:
        * rendering/RenderObject.cpp:

2019-07-14  Dean Jackson  <dino@apple.com>

        WebGL not supported on WKWebView on UIKit for Mac
        https://bugs.webkit.org/show_bug.cgi?id=199785
        <rdar://problem/52911449>

        Reviewed by Antoine Quint.

        UIKit for Mac was not creating a CGLPixelFormatObj because
        it wasn't using the code hidden in PLATFORM(MAC). Instead
        we should be guarding for USE(OPENGL).

        There are still some inconsistencies: <rdar://53062794>

        Test: webgl/smell-test.html

        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::allowOfflineRenderers const): We have to return
        true for this, since we don't have access to the Window Server.

2019-07-13  Wenson Hsieh  <wenson_hsieh@apple.com>

        [Text autosizing] [iPadOS] Further adjust our heuristics to determine text autosizing candidates
        https://bugs.webkit.org/show_bug.cgi?id=199780
        <rdar://problem/52289088>

        Reviewed by Simon Fraser.

        Our current idempotent text autosizing candidate heuristic makes the right judgment call most of the time, but
        there is still a large batch of text autosizing bugs left unfixed by the first iteration of the heuristic added
        in r246781. This patch attempts to address most of these bugs by adjusting the decision-tree-based heuristic
        once again, mostly with improvements to the model generation pipeline.

        During the first iteration, I placed emphasis on tuning the max tree depth and min leaf size hyperparameters
        when coming up with my decision tree, and didn't consider the inclusion or exclusion of each feature as a
        hyperparameters. As such, the trees generated using the pipeline tended to use too many features, and as a
        result, tended to have cross-validation overall accuracy scores hovering around 73%.

        In this revised model generation pipeline, I now consider the inclusion of each feature (along with max depth
        and min leaf size, as before) as a hyperparameter. Since this increases the number of hyperparameters by many
        orders of magnitude, a naive grid search (as described in the prior ChangeLog entry) is no longer a tractible
        procedure for tuning hyperparameters to the training algorithm.

        Instead, I now use a stochastic greedy algorithm to search for good sets of hyperparameters; this process begins
        with seeding some number (usually 20-24) of "searchers" with completely randomized sets of hyperparameters (i.e.
        random max depth, random leaf size, and random subsets of features). I then evaluate the average performance of
        each set of hyperparameters by using them to generate 2000 decision trees over 90% of the training data, and
        then cross-validating these trees against the remaining 10%. These cross-validation scores are aggregated into a
        single confusion matrix, which is then passed into a loss function that computes a single value indicating how
        well training with the set of hyperparameters generalized to cross-validation data. After experimenting with
        various loss functions, I settled on the following:

        `k(false positive rate)^2 + (false negative rate)^2`

        ...where a constant k is chosen to penalize false positives (i.e. broken layout) more harshly than false
        negatives (small text). Additionally, squaring the false negative and false positive rates seems to help avoid
        converging on solutions that heavily favor reducing only false positives or false negatives, or vice versa.

        The stochastic algorithm starts by computing a loss value for the randomly generated configuration. Then, for
        an indefinite number of iterations, it randomly mutates the configuration (e.g. by adding or removing features,
        or changing min leaf size or max tree depth) and computes a new loss value for the mutated configuration. If the
        mutated configuration performs better (i.e. achieves lower loss) than the current configuration, I set the
        current configuration to be the mutated configuration. Otherwise, I keep the current (non-mutated) configuration
        as-is. The stochastic algorithm then proceeds, ad-infinitum, with this current configuration.

        Of course, since each mutation is small, this strategy so far is prone to leaving each searcher stuck in local
        optima. To mitigate this, for each searcher, I keep track of a side-table of configurations that have already
        been tested; when random mutations would normally lead to testing a configuration that has already been tested,
        each searcher instead increases the chance of applying additional mutations. This has the effect of searchers
        initially exhausting similar configurations, and expanding to test more and more dissimilar configurations as
        the local alternatives all turn out to be worse. This allows searchers to effectively jump out of local optima
        after being stuck for a long time.

        So, using these strategies, I simultaneously ran a handful of searchers until they all appeared to converge
        (a process that takes 8-12 hours on my current dataset). Many of the searchers achieved configurations with
        cross-validation scores of 81% and above, up from the 73% of the previous attempt. These additionally have the
        added bonus of reducing the number of features, often making the final trees themselves shallower and simpler to
        understand than before.

        This patch introduces one such decision tree generated using a set of hyperparameters acquired via this
        stochasic search algorithm; it appears to simultaneously use fewer features, and achieve better cross-validation
        performance.

        Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

        Adjust the early return to bail if either (1) the element is a candidate and the computed size is already equal
        to the boosted size, or (2) the element is not a candidate and the computed size is already equal to the
        specified size. Since the autosizing candidate heuristic depends on styles specified on the element itself (as
        opposed to styles on any element in the ancestor chain), a parent may be an autosizing candidate, but a child of
        it may not.

        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):

        Revamp the idempotent text autosizing candidate heuristic. See the explanation above for more details.

        * rendering/style/RenderStyle.h:

        Remove some bits from RenderStyle's autosizeStatus, now that we care about fewer bits of information from the
        inherited flags.

        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::updateStatus):
        * rendering/style/TextSizeAdjustment.h:

2019-07-13  Simon Fraser  <simon.fraser@apple.com>

        Don't do async overflow scrolling for visibility:hidden scrollers
        https://bugs.webkit.org/show_bug.cgi?id=199779

        Reviewed by Dean Jackson.
        
        An overflow:scroll with visibility:hidden is not scrollable on macOS, even if it has visible
        content. So disable async overflow:scroll when the scroller has non-visible visibility (this also
        takes visibility on ancestors into account).
        
        visibility:hidden overflow:scroll can be common because some JS libraries use it
        (https://github.com/wnr/element-resize-detector).

        Test: compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::canUseCompositedScrolling const): Don't use hasVisibleContent() because
        that's affected by  visible children.

2019-07-13  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Return statements don't need to keep track of the function they're in
        https://bugs.webkit.org/show_bug.cgi?id=199763

        Reviewed by Myles C. Maxfield.

        Return::m_function is only used in the Checker, and it can easily enough keep track of the current function.
        This means we no longer need to keep track of the current function in the NameResolver, and we can save 8 bytes per Return

        Since I was touching the NameResolver I also removed a few pointless overrides of Visitor::visit().

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::NameResolver):
        (WebCore::WHLSL::resolveTypeNamesInFunctions):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:

2019-07-13  Andres Gonzalez  <andresg_22@apple.com>

        Add accessibility support to WKDataListSuggestionsView.
        https://bugs.webkit.org/show_bug.cgi?id=199772
        <rdar://problem/47095851>

        Reviewed by Chris Fleizach.

        Localizable strings for accessibility announcements.

        * en.lproj/Localizable.strings:

2019-07-13  Chris Dumez  <cdumez@apple.com>

        Drop non thread-safe usage of WeakPtr in VideoFullscreenInterfaceAVKit
        https://bugs.webkit.org/show_bug.cgi?id=199775

        Reviewed by Eric Carlson.

        The VideoFullscreenInterfaceAVKit constructor was making a weakPtr on the UI Thread
        of an WebThread object. The WeakPtr would then be used as a data member throughout
        the class on the UIThread. This is not thread-safe.

        This patch switches to using a raw pointer instead of a WeakPtr. This is a partial
        rollout of r243298, which turned the raw pointer into a WeakPtr for hardening
        purposes. For extra safety, this patch updates the VideoFullscreenControllerContext
        so that it notifies its clients (i.e. PlaybackSessionInterfaceAVKit) that it is
        getting destroyed, so that they can null-out their m_videoFullscreenModel &
        m_fullscreenChangeObserver data members. This gives the sames guarantees as WeakPtr
        but in a thread-safe way.

        This is very similar to the fix that was done for PlaybackSessionInterfaceAVKit in
        r247380.

        * platform/cocoa/VideoFullscreenModel.h:
        (WebCore::VideoFullscreenModelClient::modelDestroyed):
        * platform/ios/VideoFullscreenInterfaceAVKit.h:
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (VideoFullscreenInterfaceAVKit::setVideoFullscreenModel):
        (VideoFullscreenInterfaceAVKit::setVideoFullscreenChangeObserver):
        (VideoFullscreenInterfaceAVKit::modelDestroyed):
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (VideoFullscreenControllerContext::~VideoFullscreenControllerContext):

2019-07-13  Zalan Bujtas  <zalan@apple.com>

        Cannot bring up custom media controls at all on v.youku.com
        https://bugs.webkit.org/show_bug.cgi?id=199699
        <rdar://problem/51835327>

        Reviewed by Simon Fraser.

        The "find the node under the finger" heuristic should only find nodes that are visible to hit-testing.

        When the user taps on the screen, we run a "find the best node under the finger" heuristic and use the node's location
        to dispatch the associated event (e.g. mousePressed).
        Ideally the "best node under the finger" and the final target node for the associated event are the same.
        However these two methods configure the hit-testing process differently which could lead to node mismatch.
        The "best node" heuristic calls hit-testing with AllowChildFrameContent. This flag allows hit-testing to descend into
        subframes even if the subframe is not visible to hit-testing (visibility: hidden).
        While event dispatching never descends into subfames through hit-testing, but instead it forwards the dispatching to subframes that are visible to hit-testing.

        This patch addresses the mismatching node issue by calling the descending version of hit-testing with a flag that enforces visiblity check before descending into a subframe.

        Tests: fast/events/touch/ios/visibility-hidden-iframe-click.html
               fast/events/touch/ios/visibility-hidden-nested-iframe-click.html

        * page/ios/FrameIOS.mm:
        (WebCore::Frame::hitTestResultAtViewportLocation):
        * rendering/HitTestRequest.h:
        (WebCore::HitTestRequest::skipsChildFrameContentInvisibleToHitTest const):
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::nodeAtPoint):

2019-07-13  Chris Dumez  <cdumez@apple.com>

        Fix non thread-safe usage of makeWeakPtr() in MediaPlayerPrivateAVFoundation
        https://bugs.webkit.org/show_bug.cgi?id=199777

        Reviewed by Eric Carlson.

        The code was calling makeWeakPtr() on a main-thread object, from a background thread.
        This is not thread safe. To address the issue, this patches creates the WeakPtr ahead
        of time, on the main thread.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
        (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
        (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

2019-07-12  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer] Mock GStreamer realtime sources should keep a Ref of their mock realtime media sources
        https://bugs.webkit.org/show_bug.cgi?id=194326

        WrappedMockRealtimeVideoSource is a subclass of RealtimeMediaSource which is refcounted, we can't
        use a unique_ptr on those.

        Also changed m_wrappedSource type to its actual type so it is cleaner even if needed
        to upcast it to RealtimeMediaSource so some method that are made private in the mock
        can still be called.

        Reviewed by Youenn Fablet.

        This fixes MediaStream tests

        * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeAudioSource::create):
        (WebCore::WrappedMockRealtimeAudioSource::asRealtimeMediaSource):
        (WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource):
        (WebCore::m_wrappedSource):
        (WebCore::MockGStreamerAudioCaptureSource::startProducingData):
        (WebCore::MockGStreamerAudioCaptureSource::settings):
        (WebCore::MockGStreamerAudioCaptureSource::capabilities):
        * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h:
        * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp:
        (WebCore::WrappedMockRealtimeVideoSource::create):
        (WebCore::WrappedMockRealtimeVideoSource::asRealtimeMediaSource):
        (WebCore::WrappedMockRealtimeVideoSource::WrappedMockRealtimeVideoSource):
        (WebCore::m_wrappedSource):
        (WebCore::MockGStreamerVideoCaptureSource::settings):
        (WebCore::MockGStreamerVideoCaptureSource::capabilities):
        * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h:

2019-07-12  Alex Christensen  <achristensen@webkit.org>

        Change RELEASE_ASSERT in DocumentWriter::addData to ASSERT and early return
        https://bugs.webkit.org/show_bug.cgi?id=199756
        <rdar://problem/51554775>

        Reviewed by Brady Eidson.

        Attempts to reach this assertion were unsuccessful, but sometimes this assertion crashes.
        Let's change it to an early return to prevent crashes.

        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::addData):

2019-07-12  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Move error scopes out of GPUDevice for more portable error generation
        https://bugs.webkit.org/show_bug.cgi?id=199740

        Reviewed by Myles C. Maxfield.

        Move error generation into a separate RefCounted class to allow GPU objects to generate 
        errors independent of any GPUDevice.
        Create GPUObjectBase to delegate error generation and refactor GPUBuffer to inherit from GPUObjectBase.

        No behavior change or new tests. Error scopes covered by error-scopes-test.html.

        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::WebGPUDevice): Now creates a GPUErrorGenerator.
        (WebCore::WebGPUDevice::createBuffer const): Pass the GPUErrorGenerator to any created GPUBuffer.
        (WebCore::WebGPUDevice::createBufferMapped const): Ditto.
        (WebCore::WebGPUDevice::popErrorScope): Shouldn't be const. Can just ask for the GPUError rather than passing a lambda.
        (WebCore::WebGPUDevice::pushErrorScope const): Deleted.
        (WebCore::WebGPUDevice::popErrorScope const): Deleted.
        * Modules/webgpu/WebGPUDevice.h:
        (WebCore::WebGPUDevice::pushErrorScope):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUBuffer.h: Now inherits from GPUObjectBase for error generation ease.
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateBuffer): Ensure GPUBuffers reference the GPUErrorGenerator.
        (WebCore::GPUDevice::pushErrorScope): Deleted. No longer needed here.
        (WebCore::GPUDevice::popErrorScope): Deleted.
        (WebCore::GPUDevice::registerError): Deleted.
        * platform/graphics/gpu/GPUDevice.h: Move error scope logic out.
        * platform/graphics/gpu/GPUErrorGenerator.cpp: Added.
        (WebCore::GPUErrorGenerator::pushErrorScope):
        (WebCore::GPUErrorGenerator::popErrorScope):
        (WebCore::GPUErrorGenerator::generateError):
        * platform/graphics/gpu/GPUErrorGenerator.h: Added.
        (WebCore::GPUErrorGenerator::create):
        * platform/graphics/gpu/GPUObjectBase.h: Added.
        (WebCore::GPUObjectBase::generateError):
        (WebCore::GPUObjectBase::GPUObjectBase):
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Use the GPUErrorGenerator directly during buffer creation.
        (WebCore::GPUBuffer::validateBufferUsage):
        (WebCore::GPUBuffer::tryCreate):
        (WebCore::GPUBuffer::GPUBuffer):
        * platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
        (WebCore::GPUQueue::submit): Prevent possible null dereference.

2019-07-12  Youenn Fablet  <youenn@apple.com>

        Add release logging for quota checks
        https://bugs.webkit.org/show_bug.cgi?id=199697

        Reviewed by Alex Christensen.

        Log whether a request to extend quota is made and the result of the request.
        This logging should happen in the networking process.
        No change of behavior.

        * platform/Logging.h:
        * storage/StorageQuotaManager.cpp:
        (WebCore::StorageQuotaManager::askForMoreSpace):
        (WebCore::StorageQuotaManager::processPendingRequests):

2019-07-12  Youenn Fablet  <youenn@apple.com>

        Stopping a cloned MediaStream video track should not stop any other video track
        https://bugs.webkit.org/show_bug.cgi?id=199635

        Reviewed by Eric Carlson.

        In case a track is requesting its source to end, the
        RealtimeVideoSource should request its own source to end and not stop it directly.

        Also, if a track is removing itself as an observer to a RealtimeVideoSource, we should
        stop the underlying source only if this one does not have any other observer.
        Covered by updated test.

        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::removeObserver):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::RealtimeVideoSource::requestToEnd):
        (WebCore::RealtimeVideoSource::stopBeingObserved):
        * platform/mediastream/RealtimeVideoSource.h:

2019-07-12  Timothy Hatcher  <timothy@apple.com>

        Drop DarkModeCSSEnabled as an experimental feature and always enable it.
        https://bugs.webkit.org/show_bug.cgi?id=199725
        rdar://problem/52970972

        Reviewed by Megan Gardner.

        Tests: css-dark-mode

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/MediaQueryEvaluator.cpp:
        (WebCore::prefersColorSchemeEvaluate):
        * css/MediaQueryExpression.cpp:
        (WebCore::featureWithValidIdent):
        (WebCore::isFeatureValidWithoutValue):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        * html/HTMLMetaElement.cpp:
        (WebCore::HTMLMetaElement::process):
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setDarkModeCSSEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::darkModeCSSEnabled const): Deleted.

2019-07-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>

        Refactor ShadowBlur: remove some class variables and use function parameters instead.
        https://bugs.webkit.org/show_bug.cgi?id=199511

        Reviewed by Said Abou-Hallawa.

        On the ShadowBlur class it is confusing to know if the status of the m_layerImage buffer or the
        values calculated by calculateLayerBoundingRect() are valid between the different function calls.

        To avoid this problem, pass this values as function parameters instead of storing them in the class.

        No new tests, no intended behaviour change.

        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ShadowBlur::ShadowBlur):
        (WebCore::ShadowBlur::calculateLayerBoundingRect):
        (WebCore::ShadowBlur::drawShadowBuffer):
        (WebCore::ShadowBlur::drawRectShadow): Pass the parameters from the callback.
        (WebCore::ShadowBlur::drawInsetShadow): Ditto.
        (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
        (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
        (WebCore::ShadowBlur::drawRectShadowWithTiling):
        (WebCore::ShadowBlur::drawInsetShadowWithTiling):
        (WebCore::ShadowBlur::drawLayerPieces):
        (WebCore::ShadowBlur::drawLayerPiecesAndFillCenter):
        (WebCore::ShadowBlur::blurShadowBuffer):
        (WebCore::ShadowBlur::blurAndColorShadowBuffer):
        (WebCore::ShadowBlur::drawShadowLayer):
        * platform/graphics/ShadowBlur.h: Use a struct to pass the values calculated on calculateLayerBoundingRect().

2019-07-12  Adrian Perez de Castro  <aperez@igalia.com>

        [ATK] Avoid unneeded call to to core(selection) in listObjectForSelection()
        https://bugs.webkit.org/show_bug.cgi?id=199748
        <rdar://problem/52995908>

        Reviewed by Konstantin Tokarev.

        No new tests needed.

        * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
        (listObjectForCoreSelection): Renamed from listObjectForSelection() and remove the
        unneeded call to core() now that coreSelection is passed directly to the function.
        (optionFromList): Change to pass coreSelection directly to listObjectForCoreSelection().

2019-07-11  Chris Dumez  <cdumez@apple.com>

        Fix non-thread safe use of makeWeakPtr() under MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify()
        https://bugs.webkit.org/show_bug.cgi?id=199727

        Reviewed by Eric Carlson.

        Stop calling makeWeakPtr() on a main thread object from a background thread.

        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify):

2019-07-11  Youenn Fablet  <youenn@apple.com>

        Register a MediaStreamTrack as media producer only if it is a capture track
        https://bugs.webkit.org/show_bug.cgi?id=199566
        <rdar://problem/52761361>

        Addressing post-landing comment to simplify setMuted call.
        Unreviewed.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):

2019-07-11  Youenn Fablet  <youenn@apple.com>

        Protect CoreAudioSharedUnit::m_clients for accessing in different threads simultaneously
        https://bugs.webkit.org/show_bug.cgi?id=199717

        Reviewed by Eric Carlson.

        Add a lock whenever accessing to m_clients.
        Manual tests show that audio capture still works.

        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
        (WebCore::CoreAudioSharedUnit::addClient):
        (WebCore::CoreAudioSharedUnit::removeClient):
        (WebCore::CoreAudioSharedUnit::forEachClient const):
        (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
        (WebCore::CoreAudioSharedUnit::captureFailed):

2019-07-11  Chris Dumez  <cdumez@apple.com>

        Drop non thread-safe usage of WeakPtr in PlaybackSessionInterfaceAVKit
        https://bugs.webkit.org/show_bug.cgi?id=199698

        Reviewed by Eric Carlson.

        The PlaybackSessionInterfaceAVKit constructor was making a weakPtr on the UI Thread
        of an WebThread object. The WeakPtr would then be used as a data member throughout
        the class on the UIThread. This is not thread-safe.

        This patch switches to using a raw pointer instead of a WeakPtr. This is a partial
        rollout of r243337, which turned the raw pointer into a WeakPtr for hardening
        purposes. For extra safety, this patch updates the VideoFullscreenControllerContext
        so that it notifies its clients (i.e. PlaybackSessionInterfaceAVKit) that it is
        getting destroyed, so that they can null-out their m_playbackSessionModel data
        member. This gives the sames guarantees than WeakPtr but in a thread-safe way.

        * platform/cocoa/PlaybackSessionModel.h:
        (WebCore::PlaybackSessionModelClient::modelDestroyed):
        * platform/ios/PlaybackSessionInterfaceAVKit.h:
        * platform/ios/PlaybackSessionInterfaceAVKit.mm:
        (WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
        (WebCore::PlaybackSessionInterfaceAVKit::~PlaybackSessionInterfaceAVKit):
        (WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const):
        (WebCore::PlaybackSessionInterfaceAVKit::modelDestroyed):
        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
        (VideoFullscreenControllerContext::~VideoFullscreenControllerContext):
        (VideoFullscreenControllerContext::addClient):
        (VideoFullscreenControllerContext::removeClient):

2019-07-11  Simon Fraser  <simon.fraser@apple.com>

        Fix builds where HAVE_DESIGN_SYSTEM_UI_FONTS is not defined.

        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::fontWithFamilySpecialCase):

2019-07-11  Justin Fan  <justin_fan@apple.com>

        Unreviewed build fix.

        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp: Missing include.

2019-07-11  Myles C. Maxfield  <mmaxfield@apple.com>

        New York font erroneously gets synthetic bold
        https://bugs.webkit.org/show_bug.cgi?id=199653
        <rdar://problem/51692592>

        Reviewed by Simon Fraser.

        This patch adds support for -apple-system-ui-serif, -apple-system-ui-monospaced,
        and -apple-system-ui-rounded, behind an SPI that is off-by-default. We don't want
        to expose these fonts to the web because we don't a standardization story for them
        yet, but we do want some apps to be able to use them.

        WebKit clients who want to use these fonts can set
        -[WKPreferences _shouldAllowDesignSystemUIFonts] = YES.

        The patch generalizes our existing system-ui infrastructure to handle these three
        additional fonts. It also explicitly disables the unsupported dot-prefixed names
        so they don't leak out into Web content.

        Tests: fast/text/design-system-ui-10.html
               fast/text/design-system-ui-11.html
               fast/text/design-system-ui-12.html
               fast/text/design-system-ui-13.html
               fast/text/design-system-ui-14.html
               fast/text/design-system-ui-15.html
               fast/text/design-system-ui-16.html
               fast/text/design-system-ui-2.html
               fast/text/design-system-ui-3.html
               fast/text/design-system-ui-4.html
               fast/text/design-system-ui-5.html
               fast/text/design-system-ui-6.html
               fast/text/design-system-ui-7.html
               fast/text/design-system-ui-8.html
               fast/text/design-system-ui-9.html
               fast/text/design-system-ui.html

        * css/CSSFontFace.cpp:
        (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const):
        * css/CSSFontFace.h:
        * css/CSSFontFaceSource.cpp:
        (WebCore::CSSFontFaceSource::load):
        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::initializeFontStyle):
        * page/Settings.yaml:
        * platform/graphics/FontDescription.cpp:
        (WebCore::m_shouldAllowDesignSystemUIFonts):
        (WebCore::m_shouldAllowUserInstalledFonts): Deleted.
        * platform/graphics/FontDescription.h:
        (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const):
        (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts):
        (WebCore::FontDescription::operator== const):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::platformFontLookupWithFamily):
        (WebCore::fontWithFamily):
        * platform/graphics/cocoa/FontCacheCoreText.h:
        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
        (WebCore::systemFontUse):
        (WebCore::systemFontCascadeList):
        (WebCore::FontCascadeDescription::effectiveFamilyCount const):
        (WebCore::FontCascadeDescription::effectiveFamilyAt const):
        (WebCore::isSystemFontString): Deleted.
        (WebCore::isUIFontTextStyle): Deleted.
        * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
        (WebCore::FontPlatformData::ctFont const):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
        (WebCore::SystemFontDatabaseCoreText::createSystemUI):
        (WebCore::SystemFontDatabaseCoreText::createDesignSystemUI):
        (WebCore::SystemFontDatabaseCoreText::createTextStyle):
        (WebCore::SystemFontDatabaseCoreText::cascadeList):
        (WebCore::SystemFontDatabaseCoreText::applyWeightItalicsAndFallbackBehavior):
        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
        * platform/graphics/cocoa/SystemFontDatabaseCoreText.h:
        * platform/graphics/ios/FontCacheIOS.mm:
        (WebCore::platformFontWithFamilySpecialCase):
        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::platformFontWithFamilySpecialCase):
        * style/StyleResolveForDocument.cpp:
        (WebCore::Style::resolveForDocument):
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setShouldAllowDesignSystemUIFonts):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-07-11  Pablo Saavedra  <psaavedra@igalia.com>

        [WPE][GTK] Build failure with ENABLE_ACCESSIBILITY=OFF
        https://bugs.webkit.org/show_bug.cgi?id=199625

        Added ENABLE(ACCESSIBILITY) and replaced HAVE(ACCESSIBILITY)
        with ENABLE(ACCESSIBILITY) in the code.

        Additionally, the TestRunner code generator now honors the
        Conditional IDL format.

        No new tests as there is no intended functional change

        Reviewed by Konstantin Tokarev.

        * accessibility/AXObjectCache.cpp:
        * accessibility/AXObjectCache.h:
        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::detach):
        (WebCore::AccessibilityObject::isDetached const):
        * accessibility/AccessibilityObject.h:
        * accessibility/atk/AXObjectCacheAtk.cpp:
        * accessibility/atk/AccessibilityObjectAtk.cpp:
        * accessibility/atk/WebKitAccessible.cpp:
        * accessibility/atk/WebKitAccessible.h:
        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
        * accessibility/atk/WebKitAccessibleHyperlink.h:
        * accessibility/atk/WebKitAccessibleInterfaceAction.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceAction.h:
        * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceComponent.h:
        * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceDocument.h:
        * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceEditableText.h:
        * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h:
        * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceHypertext.h:
        * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceImage.h:
        * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceSelection.h:
        * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceTable.h:
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.h:
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceText.h:
        * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceValue.h:
        * accessibility/atk/WebKitAccessibleUtil.cpp:
        * accessibility/atk/WebKitAccessibleUtil.h:
        * accessibility/ios/AXObjectCacheIOS.mm:
        * accessibility/ios/AccessibilityObjectIOS.mm:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        * accessibility/mac/AXObjectCacheMac.mm:
        * accessibility/mac/AccessibilityObjectBase.mm:
        * accessibility/mac/AccessibilityObjectMac.mm:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        * accessibility/win/AccessibilityObjectWin.cpp:
        * accessibility/win/AccessibilityObjectWrapperWin.cpp:
        * dom/Document.cpp:
        (WebCore::Document::prepareForDestruction):
        * editing/FrameSelection.h:
        * editing/atk/FrameSelectionAtk.cpp:
        * html/HTMLTextFormControlElement.cpp:
        (WebCore::HTMLTextFormControlElement::setInnerTextValue):
        * testing/Internals.cpp:
        (WebCore::Internals::resetToConsistentState):

2019-07-11  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Implement GPUError and error scopes
        https://bugs.webkit.org/show_bug.cgi?id=199655

        Reviewed by Myles C. Maxfield.

        Add GPUErrorFilter, GPUError, and the ability to push and pop error scopes on a GPUDevice.
        This will allow us to check for WebGPU errors from JavaScript.
        Currently, only some GPUBuffer creation errors are reported for testing; more errors will follow in later patches.

        Test: webgpu/error-scopes-test.html

        * Modules/webgpu/GPUErrorFilter.idl: Added.
        * Modules/webgpu/GPUOutOfMemoryError.idl: Added.
        * Modules/webgpu/GPUValidationError.idl: Added.
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::pushErrorScope):
        (WebCore::WebGPUDevice::popErrorScope): Resolve the Promise here, since GPUDevice shouldn't worry about DOM layer.
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDeviceErrorScopes.cpp: Added.
        (WebCore::WebGPUDeviceErrorScopes::pushErrorScope): Delegates to WebGPUDevice.
        (WebCore::WebGPUDeviceErrorScopes::popErrorScope): Ditto.
        * Modules/webgpu/WebGPUDeviceErrorScopes.h: Added.
        * Modules/webgpu/WebGPUDeviceErrorScopes.idl: Added.
        * platform/graphics/gpu/GPUBuffer.h:
        * platform/graphics/gpu/GPUDevice.cpp: The actual error stack lives here.
        (WebCore::GPUDevice::pushErrorScope):
        (WebCore::GPUDevice::popErrorScope): Calls a callback with a GPUError, if any.
        (WebCore::GPUDevice::registerError): Actually creates GPUErrors.
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/GPUError.cpp: Added.
        (WebCore::createError): Factory function for various error types.
        * platform/graphics/gpu/GPUError.h: Added.
        * platform/graphics/gpu/GPUErrorFilter.h: Added.
        * platform/graphics/gpu/GPUOutOfMemoryError.h: Added.
        (WebCore::GPUOutOfMemoryError::create):
        * platform/graphics/gpu/GPUValidationError.cpp: Added.
        (WebCore::GPUValidationError::create):
        (WebCore::GPUValidationError::GPUValidationError):
        * platform/graphics/gpu/GPUValidationError.h: Added.
        (WebCore::GPUValidationError::message const):
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::validateBufferUsage): Create an actual GPUValidationError :)
        (WebCore::GPUBuffer::tryCreate): Create GPUOutOfMemoryErrors where appropriate.

        Add file/name references:
        * CMakeLists.txt:
        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/WebCoreBuiltinNames.h:

        Missing includes:
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:

2019-07-11  Tim Horton  <timothy_horton@apple.com>

        Null deref of RenderView under FrameView::setNeedsCompositingConfigurationUpdate
        https://bugs.webkit.org/show_bug.cgi?id=199723
        <rdar://problem/51554747>

        Reviewed by Simon Fraser.

        * page/FrameView.cpp:
        (WebCore::FrameView::setNeedsCompositingConfigurationUpdate):
        Add a null-check; it looks like it is possible to get here by dismissing
        the find overlay (or other page overlay) at an inopportune time.

2019-07-11  Chris Dumez  <cdumez@apple.com>

        Pages using Google Tag Manager Google's anti-flicker optimization may take ~5 seconds to do initial paint
        https://bugs.webkit.org/show_bug.cgi?id=199704
        <rdar://problem/52966461>

        Reviewed by Geoffrey Garen.

        Apply the same fix as r246764 for when "https://www.googletagmanager.com/gtm.js" load is blocked by a content
        extension to avoid delaying initial paint by ~5 seconds. This was tested on https://www.formula1.com/en.html.

        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):

2019-07-11  Chris Dumez  <cdumez@apple.com>

        Disable RGB10 IOSurface pixel format for Mac Catalyst
        https://bugs.webkit.org/show_bug.cgi?id=199712
        <rdar://problem/52793584>

        Reviewed by Beth Dakin.

        Disable RGB10 IOSurface pixel format for Mac Catalyst. This format is not supported
        on Mac Catalyst and causes us not to render anything.

        * platform/graphics/cocoa/IOSurface.h:

2019-07-11  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] Can't place caret or select in content that overflows a contenteditable element
        https://bugs.webkit.org/show_bug.cgi?id=199741
        rdar://problem/50545233

        Reviewed by Wenson Hsieh.

        Various code paths for editing used renderer->absoluteBoundingBoxRect(), which is the border
        box of the element (or a set of line boxes for inline elements) converted to absolute
        coordinates. This excludes overflow content, but contenteditable needs to be able to
        place the caret in overflow content, and allow selection rects to be in the overflow area
        (if the element has visible overflow).

        Try to clean this up by adding some static helpers on WebPage for accessing the relevant
        rects, and use them in code call from visiblePositionInFocusedNodeForPoint(), and
        code that is input to selectionClipRect.
        
        This changes selectionClipRect to use the padding box (excluding borders), which is a progression.

        Tests: editing/caret/ios/caret-in-overflow-area.html
               editing/selection/ios/place-selection-in-overflow-area.html
               editing/selection/ios/selection-extends-into-overflow-area.html

        * editing/FrameSelection.cpp:
        (WebCore::DragCaretController::editableElementRectInRootViewCoordinates const):

2019-07-11  Jonathan Bedard  <jbedard@apple.com>

        [iOS 13] Enable WebKit build
        https://bugs.webkit.org/show_bug.cgi?id=199481
        <rdar://problem/52619048>

        Reviewed by Tim Horton.

        No new tests, iOS 13 test expectations will be migrated in the near future.

        * platform/ios/LocalCurrentTraitCollection.mm:
        (WebCore::LocalCurrentTraitCollection::LocalCurrentTraitCollection): Remove underscore from currentTraitCollection.
        (WebCore::LocalCurrentTraitCollection::~LocalCurrentTraitCollection): Remove underscore from setCurrentTraitCollection.

2019-07-11  Chris Dumez  <cdumez@apple.com>

        Fix non thread-safe usage of makeWeakPtr() in MediaPlayerPrivateMediaFoundation
        https://bugs.webkit.org/show_bug.cgi?id=199700

        Reviewed by Eric Carlson.

        The code was calling makeWeakPtr() on a main-thread object, from a background thread.
        This is not thread safe. To address the issue, this patches creates the WeakPtr ahead
        of time, on the main thread. 

        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
        (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
        (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
        (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify):
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
        (WebCore::MediaPlayerPrivateMediaFoundation::ThreadSafeWrapper::create):
        (WebCore::MediaPlayerPrivateMediaFoundation::ThreadSafeWrapper::wrapped):
        (WebCore::MediaPlayerPrivateMediaFoundation::ThreadSafeWrapper::ThreadSafeWrapper):

2019-07-11  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Cleanup InlineFormattingContext::LineLayout class.
        https://bugs.webkit.org/show_bug.cgi?id=199702
        <rdar://problem/52931733>

        Reviewed by Sam Weinig.

        Move some structs to .cpp. They don't need to pollute the class declaration. 

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

2019-07-11  Joanmarie Diggs  <jdiggs@igalia.com>

        AX: Implement support for ARIA roles insertion, deletion, subscript, superscript, and time
        https://bugs.webkit.org/show_bug.cgi?id=199692

        Reviewed by Chris Fleizach.

        Create new AccessibilityRole types which correspond to the new ARIA roles and
        update AccessibilityRenderObject::determineAccessibilityRole() to assign these
        internal roles to the related HTML elements.

        Update both ATK and Mac to recognize these new internal roles. In addition, update
        the ATK mappings for the ins and del elements to ATK_ROLE_CONTENT_INSERTION and
        ATK_ROLE_CONTENT_DELETION respectively. Also expose "insertion" and "deletion" via
        the AtkObject xml-roles attribute so that this information is not completely absent
        for GTK or WPE built against earlier versions of ATK.

        Remove AccessibilityObject's isSubscriptStyleGroup() and isSuperscriptStyleGroup().
        These two methods were only being used by ATK and are no longer needed for platform
        role mapping.

        No new tests. Instead add the roles to the existing role-exposure tests.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::initializeRoleMap):
        (WebCore::AccessibilityObject::isSubscriptStyleGroup const): Deleted.
        (WebCore::AccessibilityObject::isSuperscriptStyleGroup const): Deleted.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityObjectInterface.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
        * accessibility/atk/WebKitAccessible.cpp:
        (webkitAccessibleGetAttributes):
        (atkRole):
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (createAccessibilityRoleMap):
        (-[WebAccessibilityObjectWrapper subrole]):

2019-07-11  Thibault Saunier  <tsaunier@igalia.com>

        [GStreamer][MediaStream] Use the new dispatchMediaSampleToObservers to dispatch new buffers
        https://bugs.webkit.org/show_bug.cgi?id=199689

        Reviewed by Philippe Normand.

        We already have tests for this.

        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
        (WebCore::GStreamerVideoCaptureSource::processNewFrame):
        (WebCore::GStreamerVideoCaptureSource::newSampleCallback):
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:

2019-07-10  Simon Fraser  <simon.fraser@apple.com>

        [iOS WK2] With modal overlay and body overflow:hidden, can't access all the content
        https://bugs.webkit.org/show_bug.cgi?id=199693
        rdar://problem/51930364

        Reviewed by Tim Horton.

        A page with overflow:hidden on the root needs to be scrollable if:
        * it's zoomed
        * the visual viewport is smaller than the layout viewport (including visible keyboard)
        * scrolling is required to hide MobileSafari's squishy bars

        This patch does the last two, plumbing a "visual viewport is smaller than layout viewport"
        bit up from WebCore via the scrolling tree (that way, when it changes we automatically trigger
        a commit), and checking for squished bars in WKWebView.

        Tested by new API tests.

        * page/FrameView.cpp:
        (WebCore::FrameView::updateLayoutViewport):
        (WebCore::FrameView::layoutOrVisualViewportChanged): Make this not iOS-specific. It's not yet called
        in all the right places (doing so has risk because it's exposed via VisualViewport resize events).
        (WebCore::FrameView::didUpdateViewportOverrideRects): Deleted.
        * page/FrameView.h:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::frameViewVisualViewportChanged):
        (WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::frameViewVisualViewportChanged):
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
        (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateFrameScrollingNode::setVisualViewportIsSmallerThanLayoutViewport):
        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
        (WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
        * page/scrolling/ScrollingTreeFrameScrollingNode.h:

2019-07-10  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Optional<UniqueRef<T>> -> std::unique_ptr in Return/IfStatement/ForLoop
        https://bugs.webkit.org/show_bug.cgi?id=199695

        Reviewed by Dean Jackson.

        Trivial patch that saves 8 bytes per Return/If, and 16 bytes per For loop.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        (WebCore::WHLSL::AST::ForLoop::ForLoop):
        (WebCore::WHLSL::AST::ForLoop::condition):
        (WebCore::WHLSL::AST::ForLoop::increment):
        * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
        (WebCore::WHLSL::AST::IfStatement::IfStatement):
        (WebCore::WHLSL::AST::IfStatement::elseBody):
        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        (WebCore::WHLSL::AST::Return::Return):
        (WebCore::WHLSL::AST::Return::value):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseIfStatement):
        (WebCore::WHLSL::Parser::parseForLoop):
        (WebCore::WHLSL::Parser::parseStatement):

2019-07-10  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] The recursion checker should not have quadratic complexity
        https://bugs.webkit.org/show_bug.cgi?id=199688

        Reviewed by Saam Barati.

        I fix it by using two different hash sets, tracking which functions we have started visiting, and which we have finished visiting.
        The difference are those that are currently "on the stack", and calling any of those is an error.
        As a bonus, I also overrode visit(Program&), so that we only bother visiting function definitions.

        On whlsl-compute.html ran 5 times, this patch reduces the time spent in the recursion checker from 26ms to 12ms.
        It is likely to be a much bigger win on larger programs (since it took the complexity from quadratic to linear).

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:

2019-07-10  Sihui Liu  <sihui_liu@apple.com>

        Crash at WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator
        https://bugs.webkit.org/show_bug.cgi?id=199677
        <rdar://problem/52334665>

        Reviewed by Alex Christensen.

        Add an early return in incrementReverseIterator when setFirstInRemainingRange fails to set m_iterator. This is 
        in line with what we did in incrementForwardIterator.

        * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
        (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):

2019-07-10  Chris Dumez  <cdumez@apple.com>

        Stop using GenericTaskQueue from multiple threads
        https://bugs.webkit.org/show_bug.cgi?id=199652

        Reviewed by Eric Carlson and Geoffrey Garen.

        WebCoreAVFLoaderDelegate was calling GenericTaskQueue::enqueueTask() from a background thread,
        which is not safe because the implementation of enqueueTask() calls makeWeakPtr() on the
        GenericTaskQueue (a main thread object).

        Update WebCoreAVFLoaderDelegate to make sure it is on the main thread before it calls
        GenericTaskQueue::enqueueTask().

        * platform/GenericTaskQueue.h:
        Remove last template parameter which was used exclusively by WebCoreAVFLoaderDelegate to try and
        make GenericTaskQueue thread-safe.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (-[WebCoreAVFMovieObserver metadataLoaded]):
        (-[WebCoreAVFMovieObserver didEnd:]):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
        (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
        (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
        (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):

2019-07-10  Chris Fleizach  <cfleizach@apple.com>

        AX: VoiceOver ignored role="presentation" on <table> HTML elements
        https://bugs.webkit.org/show_bug.cgi?id=199659

        Reviewed by Zalan Bujtas.

        Only include a table ancestor if it's a table we care about for accessibility.

        Modified Test: accessibility/ios-simulator/tables-lists.html

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):

2019-07-10  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Track code locations correctly throughout the compiler to get good error messages
        https://bugs.webkit.org/show_bug.cgi?id=199675

        Reviewed by Myles Maxfield.

        The basic idea is to go from having each AST node contain its own token to having each AST node contain a pair of offsets into the source,
        the offset before its start and the offset after its end. This will let us get good error messages.
        As a bonus, it saves a bit of memory as Tokens are larger (one extra word for their type).

        The new CodeLocation class is put in Lexer.h, because it has a cyclic dependency on Token, which also has a cyclic dependency on Lexer.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        (WebCore::WHLSL::AST::ArrayReferenceType::ArrayReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        (WebCore::WHLSL::AST::ArrayType::ArrayType):
        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        (WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
        (WebCore::WHLSL::AST::BaseFunctionAttribute::BaseFunctionAttribute):
        * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
        (WebCore::WHLSL::AST::BaseSemantic::BaseSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
        (WebCore::WHLSL::AST::Block::Block):
        * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
        (WebCore::WHLSL::AST::BooleanLiteral::BooleanLiteral):
        (WebCore::WHLSL::AST::BooleanLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
        (WebCore::WHLSL::AST::Break::Break):
        * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
        (WebCore::WHLSL::AST::BuiltInSemantic::BuiltInSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::CallExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
        (WebCore::WHLSL::AST::CommaExpression::CommaExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
        (WebCore::WHLSL::AST::Continue::Continue):
        * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
        (WebCore::WHLSL::AST::DereferenceExpression::DereferenceExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
        (WebCore::WHLSL::AST::DoWhileLoop::DoWhileLoop):
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        (WebCore::WHLSL::AST::DotExpression::DotExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
        (WebCore::WHLSL::AST::EffectfulExpressionStatement::EffectfulExpressionStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        (WebCore::WHLSL::AST::EnumerationMember::EnumerationMember):
        (WebCore::WHLSL::AST::EnumerationMember::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral):
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap):
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::Expression):
        (WebCore::WHLSL::AST::Expression::codeLocation const):
        (WebCore::WHLSL::AST::Expression::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
        (WebCore::WHLSL::AST::Fallthrough::Fallthrough):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        (WebCore::WHLSL::AST::FloatLiteral::FloatLiteral):
        (WebCore::WHLSL::AST::FloatLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
        (WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
        (WebCore::WHLSL::AST::FloatLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        (WebCore::WHLSL::AST::ForLoop::ForLoop):
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
        (WebCore::WHLSL::AST::FunctionDeclaration::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
        (WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference):
        * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
        (WebCore::WHLSL::AST::IfStatement::IfStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        (WebCore::WHLSL::AST::IndexExpression::IndexExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        (WebCore::WHLSL::AST::IntegerLiteral::IntegerLiteral):
        (WebCore::WHLSL::AST::IntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
        (WebCore::WHLSL::AST::IntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
        (WebCore::WHLSL::AST::LogicalExpression::LogicalExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
        (WebCore::WHLSL::AST::LogicalNotExpression::LogicalNotExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        (WebCore::WHLSL::AST::NamedType::NamedType):
        (WebCore::WHLSL::AST::NamedType::codeLocation const):
        (WebCore::WHLSL::AST::NamedType::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        (WebCore::WHLSL::AST::NativeTypeDeclaration::NativeTypeDeclaration):
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        (WebCore::WHLSL::AST::NullLiteral::NullLiteral):
        (WebCore::WHLSL::AST::NullLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLNumThreadsFunctionAttribute.h:
        (WebCore::WHLSL::AST::NumThreadsFunctionAttribute::NumThreadsFunctionAttribute):
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        (WebCore::WHLSL::AST::PointerType::PointerType):
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        (WebCore::WHLSL::AST::PropertyAccessExpression::PropertyAccessExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::create):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        (WebCore::WHLSL::AST::ReferenceType::ReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
        (WebCore::WHLSL::AST::ResourceSemantic::ResourceSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        (WebCore::WHLSL::AST::Return::Return):
        * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
        (WebCore::WHLSL::AST::SpecializationConstantSemantic::SpecializationConstantSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
        (WebCore::WHLSL::AST::StageInOutSemantic::StageInOutSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::Statement):
        (WebCore::WHLSL::AST::Statement::codeLocation const):
        (WebCore::WHLSL::AST::Statement::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
        (WebCore::WHLSL::AST::StatementList::StatementList):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        (WebCore::WHLSL::AST::StructureDefinition::StructureDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        (WebCore::WHLSL::AST::StructureElement::StructureElement):
        (WebCore::WHLSL::AST::StructureElement::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
        (WebCore::WHLSL::AST::SwitchCase::SwitchCase):
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
        (WebCore::WHLSL::AST::SwitchStatement::SwitchStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
        (WebCore::WHLSL::AST::TernaryExpression::TernaryExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLTrap.h:
        (WebCore::WHLSL::AST::Trap::Trap):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        (WebCore::WHLSL::AST::TypeDefinition::TypeDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.cpp:
        (WebCore::WHLSL::AST::TypeReference::wrap):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        (WebCore::WHLSL::AST::TypeReference::TypeReference):
        (WebCore::WHLSL::AST::TypeReference::cloneTypeReference const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        (WebCore::WHLSL::AST::UnnamedType::UnnamedType):
        (WebCore::WHLSL::AST::UnnamedType::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::UnsignedIntegerLiteral):
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
        (WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
        (WebCore::WHLSL::AST::VariableReference::VariableReference):
        (WebCore::WHLSL::AST::VariableReference::wrap):
        * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
        (WebCore::WHLSL::AST::WhileLoop::WhileLoop):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        (WebCore::WHLSL::resolveByInstantiation):
        (WebCore::WHLSL::resolveFunction):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::argumentTypeForAndOverload):
        (WebCore::WHLSL::Checker::finishVisiting):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matchAndCommit):
        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Token::typeName):
        (WebCore::WHLSL::Lexer::consumeTokenFromStream):
        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::AST::CodeLocation::CodeLocation):
        (WebCore::WHLSL::AST::CodeLocation::startOffset const):
        (WebCore::WHLSL::AST::CodeLocation::endOffset const):
        (WebCore::WHLSL::Token::startOffset const):
        (WebCore::WHLSL::Lexer::errorString):
        (WebCore::WHLSL::Token::stringView const):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::peek):
        (WebCore::WHLSL::Parser::peekFurther):
        (WebCore::WHLSL::Types::includes):
        (WebCore::WHLSL::Types::appendNameTo):
        (WebCore::WHLSL::Types<t>::includes):
        (WebCore::WHLSL::Types<t>::appendNameTo):
        (WebCore::WHLSL::Parser::peekType):
        (WebCore::WHLSL::Parser::tryType):
        (WebCore::WHLSL::Parser::tryTypes):
        (WebCore::WHLSL::Parser::consumeType):
        (WebCore::WHLSL::Parser::consumeTypes):
        (WebCore::WHLSL::Parser::consumeIntegralLiteral):
        (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::parseBuiltInSemantic):
        (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::parseComputeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseFunctionDeclaration):
        (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::parseLimitedSuffixOperator):
        (WebCore::WHLSL::Parser::parseSuffixOperator):
        (WebCore::WHLSL::Parser::parseExpression):
        (WebCore::WHLSL::Parser::completeTernaryConditional):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        (WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleShift):
        (WebCore::WHLSL::Parser::completePossibleAdd):
        (WebCore::WHLSL::Parser::completePossibleMultiply):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        (WebCore::WHLSL::Parser::parsePossibleSuffix):
        (WebCore::WHLSL::Parser::parseCallExpression):
        (WebCore::WHLSL::Parser::parseTerm):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::anonymousToken):
        (WebCore::WHLSL::PreserveLifetimes::PreserveLifetimes):
        (WebCore::WHLSL::PreserveLifetimes::assignVariableIntoStruct):
        (WebCore::WHLSL::preserveVariableLifetimes):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):

2019-07-10  Ryosuke Niwa  <rniwa@webkit.org>

        [iOS] REGRESSION(r244851): Revealing caret sometimes fails when content inset is used
        https://bugs.webkit.org/show_bug.cgi?id=199662

        Reviewed by Simon Fraser.

        The bug was caused by ScrollableArea::maximumScrollPosition using ScrollableArea::visibleSize, which does not
        take the content insets into account correctly, rather than FrameView::visualViewportRectExpandedByContentInsets,
        which does, and is used for "viewRect" in RenderLayer::scrollRectToVisible.

        Override the maximum scroll position using visualViewportRectExpandedByContentInsets in iOS to fix the issue.

        Test: editing/selection/ios/autoscroll-with-top-content-inset-2.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible): Fixed the bug.

2019-07-10  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r247316.

        Broke Mojave build

        Reverted changeset:

        "[WHLSL] Track code locations correctly throughout the
        compiler to get good error messages"
        https://bugs.webkit.org/show_bug.cgi?id=199675
        https://trac.webkit.org/changeset/247316

2019-07-10  Alex Christensen  <achristensen@webkit.org>

        Allow CMake to build WebCore on Mac
        https://bugs.webkit.org/show_bug.cgi?id=198979

        Reviewed by Don Olmstead.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::validateURL):
        * PlatformMac.cmake:
        * platform/cocoa/VideoFullscreenModelVideoElement.mm:
        * platform/ios/WebItemProviderPasteboard.h:

2019-07-10  Chris Dumez  <cdumez@apple.com>

        Unreviewed, rolling out r247292.

        Caused CloseWebViewDuringEnterFullscreen.VideoFullscreen API
        test to time out on Mojave bots

        Reverted changeset:

        "Stop using GenericTaskQueue from multiple threads"
        https://bugs.webkit.org/show_bug.cgi?id=199652
        https://trac.webkit.org/changeset/247292

2019-07-10  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] Track code locations correctly throughout the compiler to get good error messages
        https://bugs.webkit.org/show_bug.cgi?id=199675

        Reviewed by Myles Maxfield.

        The basic idea is to go from having each AST node contain its own token to having each AST node contain a pair of offsets into the source,
        the offset before its start and the offset after its end. This will let us get good error messages.
        As a bonus, it saves a bit of memory as Tokens are larger (one extra word for their type).

        The new CodeLocation class is put in Lexer.h, because it has a cyclic dependency on Token, which also has a cyclic dependency on Lexer.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        (WebCore::WHLSL::AST::ArrayReferenceType::ArrayReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        (WebCore::WHLSL::AST::ArrayType::ArrayType):
        * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
        (WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
        (WebCore::WHLSL::AST::BaseFunctionAttribute::BaseFunctionAttribute):
        * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
        (WebCore::WHLSL::AST::BaseSemantic::BaseSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
        (WebCore::WHLSL::AST::Block::Block):
        * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
        (WebCore::WHLSL::AST::BooleanLiteral::BooleanLiteral):
        (WebCore::WHLSL::AST::BooleanLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
        (WebCore::WHLSL::AST::Break::Break):
        * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
        (WebCore::WHLSL::AST::BuiltInSemantic::BuiltInSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::CallExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
        (WebCore::WHLSL::AST::CommaExpression::CommaExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
        (WebCore::WHLSL::AST::Continue::Continue):
        * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
        (WebCore::WHLSL::AST::DereferenceExpression::DereferenceExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
        (WebCore::WHLSL::AST::DoWhileLoop::DoWhileLoop):
        * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
        (WebCore::WHLSL::AST::DotExpression::DotExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
        (WebCore::WHLSL::AST::EffectfulExpressionStatement::EffectfulExpressionStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
        (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        (WebCore::WHLSL::AST::EnumerationMember::EnumerationMember):
        (WebCore::WHLSL::AST::EnumerationMember::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral):
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap):
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::Expression):
        (WebCore::WHLSL::AST::Expression::codeLocation const):
        (WebCore::WHLSL::AST::Expression::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
        (WebCore::WHLSL::AST::Fallthrough::Fallthrough):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        (WebCore::WHLSL::AST::FloatLiteral::FloatLiteral):
        (WebCore::WHLSL::AST::FloatLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
        (WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
        (WebCore::WHLSL::AST::FloatLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
        (WebCore::WHLSL::AST::ForLoop::ForLoop):
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
        (WebCore::WHLSL::AST::FunctionDeclaration::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
        (WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference):
        * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
        (WebCore::WHLSL::AST::IfStatement::IfStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        (WebCore::WHLSL::AST::IndexExpression::IndexExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        (WebCore::WHLSL::AST::IntegerLiteral::IntegerLiteral):
        (WebCore::WHLSL::AST::IntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
        (WebCore::WHLSL::AST::IntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
        (WebCore::WHLSL::AST::LogicalExpression::LogicalExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
        (WebCore::WHLSL::AST::LogicalNotExpression::LogicalNotExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
        (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
        (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        (WebCore::WHLSL::AST::NamedType::NamedType):
        (WebCore::WHLSL::AST::NamedType::codeLocation const):
        (WebCore::WHLSL::AST::NamedType::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
        (WebCore::WHLSL::AST::NativeTypeDeclaration::NativeTypeDeclaration):
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        (WebCore::WHLSL::AST::NullLiteral::NullLiteral):
        (WebCore::WHLSL::AST::NullLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLNumThreadsFunctionAttribute.h:
        (WebCore::WHLSL::AST::NumThreadsFunctionAttribute::NumThreadsFunctionAttribute):
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        (WebCore::WHLSL::AST::PointerType::PointerType):
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        (WebCore::WHLSL::AST::PropertyAccessExpression::PropertyAccessExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::create):
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        (WebCore::WHLSL::AST::ReferenceType::ReferenceType):
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
        (WebCore::WHLSL::AST::ResourceSemantic::ResourceSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
        (WebCore::WHLSL::AST::Return::Return):
        * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h:
        (WebCore::WHLSL::AST::SpecializationConstantSemantic::SpecializationConstantSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h:
        (WebCore::WHLSL::AST::StageInOutSemantic::StageInOutSemantic):
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::Statement):
        (WebCore::WHLSL::AST::Statement::codeLocation const):
        (WebCore::WHLSL::AST::Statement::updateCodeLocation):
        * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
        (WebCore::WHLSL::AST::StatementList::StatementList):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
        (WebCore::WHLSL::AST::StructureDefinition::StructureDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        (WebCore::WHLSL::AST::StructureElement::StructureElement):
        (WebCore::WHLSL::AST::StructureElement::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
        (WebCore::WHLSL::AST::SwitchCase::SwitchCase):
        * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
        (WebCore::WHLSL::AST::SwitchStatement::SwitchStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
        (WebCore::WHLSL::AST::TernaryExpression::TernaryExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLTrap.h:
        (WebCore::WHLSL::AST::Trap::Trap):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        (WebCore::WHLSL::AST::TypeDefinition::TypeDefinition):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.cpp:
        (WebCore::WHLSL::AST::TypeReference::wrap):
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        (WebCore::WHLSL::AST::TypeReference::TypeReference):
        (WebCore::WHLSL::AST::TypeReference::cloneTypeReference const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        (WebCore::WHLSL::AST::UnnamedType::UnnamedType):
        (WebCore::WHLSL::AST::UnnamedType::codeLocation const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::UnsignedIntegerLiteral):
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
        (WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement):
        * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
        (WebCore::WHLSL::AST::VariableReference::VariableReference):
        (WebCore::WHLSL::AST::VariableReference::wrap):
        * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
        (WebCore::WHLSL::AST::WhileLoop::WhileLoop):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        (WebCore::WHLSL::resolveByInstantiation):
        (WebCore::WHLSL::resolveFunction):
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::argumentTypeForAndOverload):
        (WebCore::WHLSL::Checker::finishVisiting):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matchAndCommit):
        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Token::typeName):
        (WebCore::WHLSL::Lexer::consumeTokenFromStream):
        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::AST::CodeLocation::CodeLocation):
        (WebCore::WHLSL::AST::CodeLocation::startOffset const):
        (WebCore::WHLSL::AST::CodeLocation::endOffset const):
        (WebCore::WHLSL::Token::startOffset const):
        (WebCore::WHLSL::Lexer::errorString):
        (WebCore::WHLSL::Token::stringView const):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::peek):
        (WebCore::WHLSL::Parser::peekFurther):
        (WebCore::WHLSL::Types::includes):
        (WebCore::WHLSL::Types::appendNameTo):
        (WebCore::WHLSL::Types<t>::includes):
        (WebCore::WHLSL::Types<t>::appendNameTo):
        (WebCore::WHLSL::Parser::peekType):
        (WebCore::WHLSL::Parser::tryType):
        (WebCore::WHLSL::Parser::tryTypes):
        (WebCore::WHLSL::Parser::consumeType):
        (WebCore::WHLSL::Parser::consumeTypes):
        (WebCore::WHLSL::Parser::consumeIntegralLiteral):
        (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::parseBuiltInSemantic):
        (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::parseComputeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseFunctionDeclaration):
        (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::parseLimitedSuffixOperator):
        (WebCore::WHLSL::Parser::parseSuffixOperator):
        (WebCore::WHLSL::Parser::parseExpression):
        (WebCore::WHLSL::Parser::completeTernaryConditional):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        (WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleShift):
        (WebCore::WHLSL::Parser::completePossibleAdd):
        (WebCore::WHLSL::Parser::completePossibleMultiply):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        (WebCore::WHLSL::Parser::parsePossibleSuffix):
        (WebCore::WHLSL::Parser::parseCallExpression):
        (WebCore::WHLSL::Parser::parseTerm):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::anonymousToken):
        (WebCore::WHLSL::PreserveLifetimes::PreserveLifetimes):
        (WebCore::WHLSL::PreserveLifetimes::assignVariableIntoStruct):
        (WebCore::WHLSL::preserveVariableLifetimes):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):

2019-07-10  Kenneth Russell  <kbr@chromium.org>

        Hook up WebGL's back buffer in ANGLE backend on macOS
        https://bugs.webkit.org/show_bug.cgi?id=198982

        Reviewed by Alex Christensen.

        Fix a few places which were accidentally calling desktop OpenGL rather
        than ANGLE. Fix some calls which were using ANGLE's OpenGL ES 3.0
        entry points rather than the OpenGL ES 2.0 extension APIs, causing
        them to generate errors in WebGL 1.0's backend. Change
        Extensions3DANGLE to use ANGLE's requestable extension mechanism.

        Fix framebuffer setup when using ANGLE for WebGL 1.0 contexts, for
        both antialias:true and false.

        Remove ANGLEWebKitBridge in ANGLE backend. It interfered with the
        correct operation of ANGLE's internal shader compiler, and was
        unnecessary given the use of ANGLE. Remove all manual shader name
        hashing and mapping in ANGLE backend.

        Tested with parts of the WebGL conformance suite and the San
        Angeles demo, which now runs properly with WebKit's ANGLE backend
        for WebGL.

        * html/canvas/WebGLRenderingContextBase.cpp:
        (WebCore::WebGLRenderingContextBase::getProgramParameter):
        (WebCore::WebGLRenderingContextBase::getUniformLocation):
        (WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations):
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/angle/Extensions3DANGLE.cpp:
        (WebCore::Extensions3DANGLE::Extensions3DANGLE):
        (WebCore::Extensions3DANGLE::supports):
        (WebCore::Extensions3DANGLE::ensureEnabled):
        (WebCore::Extensions3DANGLE::isEnabled):
        (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
        (WebCore::Extensions3DANGLE::initializeAvailableExtensions):
        (WebCore::Extensions3DANGLE::blitFramebuffer):
        (WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
        (WebCore::Extensions3DANGLE::createVertexArrayOES):
        (WebCore::Extensions3DANGLE::deleteVertexArrayOES):
        (WebCore::Extensions3DANGLE::isVertexArrayOES):
        (WebCore::Extensions3DANGLE::bindVertexArrayOES):
        (WebCore::Extensions3DANGLE::supportsExtension):
        (WebCore::Extensions3DANGLE::drawBuffersEXT):
        (WebCore::Extensions3DANGLE::drawArraysInstanced):
        (WebCore::Extensions3DANGLE::drawElementsInstanced):
        (WebCore::Extensions3DANGLE::vertexAttribDivisor):
        * platform/graphics/angle/Extensions3DANGLE.h:
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp:
        (WebCore::GraphicsContext3D::validateAttributes):
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
        (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
        (WebCore::GraphicsContext3D::validateDepthStencil):
        (WebCore::GraphicsContext3D::prepareTexture):
        (WebCore::GraphicsContext3D::attachShader):
        (WebCore::GraphicsContext3D::bindAttribLocation):
        (WebCore::GraphicsContext3D::compileShader):
        (WebCore::GraphicsContext3D::compileShaderDirect):
        (WebCore::GraphicsContext3D::detachShader):
        (WebCore::GraphicsContext3D::getActiveAttribImpl):
        (WebCore::GraphicsContext3D::getActiveAttrib):
        (WebCore::GraphicsContext3D::getActiveUniformImpl):
        (WebCore::GraphicsContext3D::getActiveUniform):
        (WebCore::GraphicsContext3D::getAttribLocation):
        (WebCore::GraphicsContext3D::getAttribLocationDirect):
        (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
        (WebCore::GraphicsContext3D::linkProgram):
        (WebCore::GraphicsContext3D::shaderSource):
        (WebCore::GraphicsContext3D::getUnmangledInfoLog):
        (WebCore::GraphicsContext3D::getShaderiv):
        (WebCore::GraphicsContext3D::getShaderInfoLog):
        (WebCore::GraphicsContext3D::getUniformLocation):
        (WebCore::GraphicsContext3D::createBuffer):
        (WebCore::GraphicsContext3D::createFramebuffer):
        (WebCore::GraphicsContext3D::createProgram):
        (WebCore::GraphicsContext3D::createRenderbuffer):
        (WebCore::GraphicsContext3D::createShader):
        (WebCore::GraphicsContext3D::createTexture):
        (WebCore::GraphicsContext3D::deleteBuffer):
        (WebCore::GraphicsContext3D::deleteFramebuffer):
        (WebCore::GraphicsContext3D::deleteProgram):
        (WebCore::GraphicsContext3D::deleteRenderbuffer):
        (WebCore::GraphicsContext3D::deleteShader):
        (WebCore::GraphicsContext3D::deleteTexture):
        (WebCore::GraphicsContext3D::synthesizeGLError):
        (): Deleted.
        (WebCore::setCurrentNameHashMapForShader): Deleted.
        (WebCore::nameHashForShader): Deleted.
        (WebCore::GraphicsContext3D::checkVaryingsPacking const): Deleted.
        (WebCore::GraphicsContext3D::precisionsMatch const): Deleted.
        (WebCore::generateHashedName): Deleted.
        (WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap): Deleted.
        (WebCore::GraphicsContext3D::mappedSymbolName): Deleted.
        (WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap): Deleted.
        (WebCore::GraphicsContext3D::originalSymbolName): Deleted.
        (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount): Deleted.
        (WebCore::GraphicsContext3D::getShaderSource): Deleted.
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        (WebCore::GraphicsContext3D::makeContextCurrent):
        (WebCore::GraphicsContext3D::checkGPUStatus):
        (WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore):
        (WebCore::GraphicsContext3D::updateFramebufferTextureBackingStoreFromLayer):
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer initWithGraphicsContext3D:]):
        (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
        (-[WebGLLayer display]):
        (-[WebGLLayer setEGLDisplay:andConfig:]):
        (-[WebGLLayer dealloc]):
        (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
        (-[WebGLLayer bindFramebufferToNextAvailableSurface]):

2019-07-10  Youenn Fablet  <youenn@apple.com>

        openDatabase property should not be enumerable on DOMWindow
        https://bugs.webkit.org/show_bug.cgi?id=199672
        <rdar://problem/52809000>

        Reviewed by Chris Dumez.

        Test: storage/websql/openDatabase-deprecation.html

        * Modules/webdatabase/DOMWindowWebDatabase.idl:

2019-07-10  Chris Dumez  <cdumez@apple.com>

        Fix unsafe usage of makeWeakPtr() in CMTimebaseEffectiveRateChangedCallback()
        https://bugs.webkit.org/show_bug.cgi?id=199656

        Reviewed by Eric Carlson.

        CMTimebaseEffectiveRateChangedCallback() is getting called on a background thread and would call
        makeWeakPtr() on the MediaPlayerPrivateMediaSourceAVFObjC object, which is not safe because
        MediaPlayerPrivateMediaSourceAVFObjC is a main thread object.

        To address the issue, move the logic for listening to effective rate changes to its own
        Listener class which is ThreadSafeRefCounted. Instead of using makeWeakPtr() on the background
        thread, we now merely ref the thread-safe listener.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::EffectiveRateChangedListener::create):
        (WebCore::EffectiveRateChangedListener::effectiveRateChanged):
        (WebCore::CMTimebaseEffectiveRateChangedCallback):
        (WebCore::EffectiveRateChangedListener::stop):
        (WebCore::EffectiveRateChangedListener::EffectiveRateChangedListener):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):

2019-07-10  Antti Koivisto  <antti@apple.com>

        Remove TouchActionData
        https://bugs.webkit.org/show_bug.cgi?id=199668

        Reviewed by Simon Fraser.

        TouchActionData structure has been superseded by touch-action regions in EventRegion and is unused.
        Remove it and the supporting code.

        No functional changes.

        * dom/Document.cpp:
        (WebCore::Document::nodeWillBeRemoved):
        (WebCore::Document::updateTouchActionElements): Deleted.
        * dom/Document.h:
        (WebCore::Document::mayHaveElementsWithNonAutoTouchAction const):
        (WebCore::Document::setMayHaveElementsWithNonAutoTouchAction):

        Replace touchActionElements set with a bit that covers the only remaining clients (optimizations).
        Note that touchActionElements was not deleted when emptied, it had the same "may have" behavior (which
        is currently needed).

        (WebCore::Document::touchActionElements const): Deleted.
        * dom/Element.cpp:
        (WebCore::Element::computedTouchActions const): Deleted.
        * dom/Element.h:
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::touchActionDataAtPoint const): Deleted.
        * page/scrolling/ScrollingTree.h:
        * platform/EventTrackingRegions.cpp:
        (WebCore::operator==):
        * platform/EventTrackingRegions.h:
        (): Deleted.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        * style/StyleTreeResolver.cpp:
        (WebCore::Style::TreeResolver::resolveElement):

2019-07-10  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Remove redundant InlineFormattingContext::LineLayout members.
        https://bugs.webkit.org/show_bug.cgi?id=199654
        <rdar://problem/52869206>

        Reviewed by Antti Koivisto.

        Some of the members are actually only needed in selected functions.

        * layout/inlineformatting/InlineFormattingContext.cpp:
        (WebCore::Layout::InlineFormattingContext::layout const):
        (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
        * layout/inlineformatting/InlineFormattingContext.h:
        (WebCore::Layout::InlineFormattingContext::LineLayout::layoutState const):
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineLayout):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::alignRuns const):
        * layout/inlineformatting/InlineFormattingState.h:
        (WebCore::Layout::InlineFormattingState::inlineItems):
        (WebCore::Layout::InlineFormattingState::inlineRuns):
        (WebCore::Layout::InlineFormattingState::lineBoxes):

2019-07-10  Enrique Ocaña González  <eocanha@igalia.com>

        [GStreamer] Protect against null samples and samples with null buffers
        https://bugs.webkit.org/show_bug.cgi?id=199619

        Reviewed by Philippe Normand.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder): Assert to enforce non-null samples.
        (WebCore::GstVideoFrameHolder::updateTexture): Protect against null m_buffer and improperly mapped video frame.

2019-07-09  Andres Gonzalez  <andresg_22@apple.com>

        AX: HTML datalist accessibility is not exposed by WebKit
        https://bugs.webkit.org/show_bug.cgi?id=196998
        <rdar://problem/49962521>

        Reviewed by Chris Fleizach.

        Input fields with datalist are exposed as having a listbox popup.

        Test: accessibility/datalist.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::popupValue const):
        (WebCore::AccessibilityObject::hasDatalist const):
        * accessibility/AccessibilityObject.h:

2019-07-09  Justin Fan  <justin_fan@apple.com>

        Replace old, broken WebGPU IDL spec link with the new one in IDL comments.

        Rubber-stamped by Myles C. Maxfield.

        No test changes or change in behavior.

        * Modules/webgpu/GPUBindGroupLayoutBinding.idl:
        * Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
        * Modules/webgpu/GPUBlendDescriptor.idl:
        * Modules/webgpu/GPUBufferDescriptor.idl:
        * Modules/webgpu/GPUBufferUsage.idl:
        * Modules/webgpu/GPUCanvasContext.idl:
        * Modules/webgpu/GPUColor.idl:
        * Modules/webgpu/GPUColorStateDescriptor.idl:
        * Modules/webgpu/GPUColorWriteBits.idl:
        * Modules/webgpu/GPUCompareFunction.idl:
        * Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
        * Modules/webgpu/GPUExtent3D.idl:
        * Modules/webgpu/GPULoadOp.idl:
        * Modules/webgpu/GPUOrigin3D.idl:
        * Modules/webgpu/GPURequestAdapterOptions.idl:
        * Modules/webgpu/GPUSamplerDescriptor.idl:
        * Modules/webgpu/GPUShaderStageBit.idl:
        * Modules/webgpu/GPUStoreOp.idl:
        * Modules/webgpu/GPUTextureDescriptor.idl:
        * Modules/webgpu/GPUTextureUsage.idl:
        * Modules/webgpu/GPUVertexAttributeDescriptor.idl:
        * Modules/webgpu/GPUVertexBufferDescriptor.idl:
        * Modules/webgpu/GPUVertexInputDescriptor.idl:
        * Modules/webgpu/WebGPU.idl:
        * Modules/webgpu/WebGPUAdapter.idl:
        * Modules/webgpu/WebGPUBindGroup.idl:
        * Modules/webgpu/WebGPUBindGroupBinding.idl:
        * Modules/webgpu/WebGPUBindGroupDescriptor.idl:
        * Modules/webgpu/WebGPUBindGroupLayout.idl:
        * Modules/webgpu/WebGPUBuffer.idl:
        * Modules/webgpu/WebGPUBufferBinding.idl:
        * Modules/webgpu/WebGPUCommandBuffer.idl:
        * Modules/webgpu/WebGPUCommandEncoder.idl:
        * Modules/webgpu/WebGPUComputePassEncoder.idl:
        * Modules/webgpu/WebGPUComputePipeline.idl:
        * Modules/webgpu/WebGPUComputePipelineDescriptor.idl:
        * Modules/webgpu/WebGPUDevice.idl:
        * Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
        * Modules/webgpu/WebGPUPipelineLayout.idl:
        * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
        * Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
        * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
        * Modules/webgpu/WebGPUQueue.idl:
        * Modules/webgpu/WebGPURenderPassDescriptor.idl:
        * Modules/webgpu/WebGPURenderPassEncoder.idl:
        * Modules/webgpu/WebGPURenderPipeline.idl:
        * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
        * Modules/webgpu/WebGPUSampler.idl:
        * Modules/webgpu/WebGPUShaderModule.idl:
        * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
        * Modules/webgpu/WebGPUSwapChain.idl:
        * Modules/webgpu/WebGPUTexture.idl:
        * Modules/webgpu/WebGPUTextureView.idl:

2019-07-09  Chris Dumez  <cdumez@apple.com>

        Stop using GenericTaskQueue from multiple threads
        https://bugs.webkit.org/show_bug.cgi?id=199652

        Reviewed by Geoffrey Garen.

        WebCoreAVFLoaderDelegate was calling GenericTaskQueue::enqueueTask() from a background thread,
        which is not safe because the implementation of enqueueTask() calls makeWeakPtr() on the
        GenericTaskQueue (a main thread object).

        Update WebCoreAVFLoaderDelegate to use callOnMainThread() instead.

        * platform/GenericTaskQueue.h:
        Stop last template parameter which was used exclusively by WebCoreAVFLoaderDelegate to try and
        make GenericTaskQueue thread-safe.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (-[WebCoreAVFMovieObserver metadataLoaded]):
        (-[WebCoreAVFMovieObserver didEnd:]):
        (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
        (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
        (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
        (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
        (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):

2019-07-09  Tim Horton  <timothy_horton@apple.com>

        Fixed elements appear in the middle of full page screenshots taken when scrolled
        https://bugs.webkit.org/show_bug.cgi?id=199649
        <rdar://problem/52476226>

        Reviewed by Simon Fraser.

        * page/FrameView.h:
        Expose a getter for the layout viewport override rect.

2019-07-09  Alex Christensen  <achristensen@webkit.org>

        Fix build after r247279
        https://bugs.webkit.org/show_bug.cgi?id=199640

        * WebCore.xcodeproj/project.pbxproj:

2019-07-09  Alex Christensen  <achristensen@webkit.org>

        Move AutofillElements.{h,cpp} from editing/ios to editing/cocoa since they're used on macOS
        https://bugs.webkit.org/show_bug.cgi?id=199640

        Reviewed by Chris Dumez.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/cocoa/AutofillElements.cpp: Copied from Source/WebCore/editing/ios/AutofillElements.cpp.
        * editing/cocoa/AutofillElements.h: Copied from Source/WebCore/editing/ios/AutofillElements.h.
        * editing/ios/AutofillElements.cpp: Removed.
        * editing/ios/AutofillElements.h: Removed.

2019-07-09  Devin Rousso  <drousso@apple.com>

        Web Inspector: Canvas: replace WTF::Vector with std::initializer_list in CallTracer to avoid dynamic allocations
        https://bugs.webkit.org/show_bug.cgi?id=199611

        Reviewed by Joseph Pecoraro.

        The number of arguments for each member function is known at build time, so there's no need
        to dynamically allocate a `WTF::Vector` when capturing the arguments. One downside to using
        a `std::initializer_list` is that we can no longer "flatten" `WTF::Variant` arguments into
        a `RecordCanvasActionVariant`, but this is acceptable because `WTF::Variant` supports having
        yet another `WTF::Variant` as one of it's types, which the `InspectorCanvas` can then figure
        out when it finally gets the data. The same applies to `nullptr`/`Optional` checks as well.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateAttributeSetterBodyDefinition):
        (GenerateImplementationFunctionCall):
        (GenerateCallTracer):
        (GenerateCallTracerParameter): Deleted.
        * bindings/scripts/test/JS/JSTestCallTracer.cpp:

        * bindings/js/CallTracerTypes.h:
        * bindings/js/CallTracer.h:
        * bindings/js/CallTracer.cpp:
        (WebCore::CallTracer::recordCanvasAction):

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::recordCanvasAction):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::recordCanvasActionImpl):

        * inspector/agents/InspectorCanvasAgent.h:
        * inspector/agents/InspectorCanvasAgent.cpp:
        (WebCore::InspectorCanvasAgent::recordCanvasAction):

        * inspector/InspectorCanvas.h:
        * inspector/InspectorCanvas.cpp:
        (WebCore::InspectorCanvas::recordAction):
        (WebCore::InspectorCanvas::buildAction):
        Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
                  would otherwise be treated as an array of numbers.

2019-07-09  Chris Dumez  <cdumez@apple.com>

        Fix non thread-safe use of WeakPtr in DisplayRefreshMonitorMac::displayLinkFired()
        https://bugs.webkit.org/show_bug.cgi?id=199626

        Reviewed by Ryosuke Niwa.

        Fix non thread-safe use of WeakPtr in DisplayRefreshMonitorMac::displayLinkFired().
        DisplayRefreshMonitorMac gets constructed / destroyed on the main thread, it is
        not thread-safe to call makeWeakPtr() on a DisplayRefreshMonitorMac object like it
        was done before.

        To address the issue, mark the object as ThreadSafeRefCounted and ref the object
        in the lambda instead.

        * platform/graphics/DisplayRefreshMonitor.h:
        (WebCore::DisplayRefreshMonitor::stop):
        * platform/graphics/DisplayRefreshMonitorManager.cpp:
        (WebCore::DisplayRefreshMonitorManager::unregisterClient):
        * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
        (WebCore::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
        (WebCore::DisplayRefreshMonitorMac::stop):
        (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
        * platform/graphics/mac/DisplayRefreshMonitorMac.h:

2019-07-09  Sihui Liu  <sihui_liu@apple.com>

        Only allow fetching and removing session credentials from WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=199385
        <rdar://problem/52622080>

        Reviewed by Alex Christensen.

        Fetch and remove only session credentials from NSURLCredentialStorage.

        Modified existing API tests: WKWebsiteDataStore.FetchPersistentCredentials

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::originsWithCredentials const):
        (WebCore::CredentialStorage::originsWithSessionCredentials):
        (WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
        (WebCore::CredentialStorage::clearSessionCredentials):
        (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace):
        * platform/network/CredentialStorage.h:
        * platform/network/mac/CredentialStorageMac.mm:
        (WebCore::CredentialStorage::originsWithSessionCredentials):
        (WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
        (WebCore::CredentialStorage::clearSessionCredentials):
        (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace):
        (WebCore::CredentialStorage::originsWithPersistentCredentials): Deleted.

2019-07-09  Alex Christensen  <achristensen@webkit.org>

        Null check HistoryItems given to loadDifferentDocumentItem
        https://bugs.webkit.org/show_bug.cgi?id=199596
        <rdar://problem/49884391>

        Reviewed by Ryosuke Niwa.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
        Under some rare and mysterious conditions we can have a null provisionalItem when loading from the cache.

2019-07-09  Zalan Bujtas  <zalan@apple.com>

        Fix LOG_DISABLED and TREE_DEBUGGING enabled build.
        https://bugs.webkit.org/show_bug.cgi?id=199623
        <rdar://problem/52837648>

        Reviewed by Simon Fraser.

        * rendering/RenderLayerCompositor.cpp:

2019-07-09  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Remove InlineItem references from inline runs.
        https://bugs.webkit.org/show_bug.cgi?id=199608
        <rdar://problem/52812775>

        Reviewed by Antti Koivisto.

        Constructing the inline runs is where we stop using InlineItems in the process of processing the inline content.
        InlineItems are redundant in the context of Display::Runs.
        It also enables us to create temporary InlineItems to process split content.  

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Content::Run::Run):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::Run::layoutBox const):
        (WebCore::Layout::Line::Content::Run::logicalRect const):
        (WebCore::Layout::Line::Content::Run::textContext const):
        (WebCore::Layout::Line::Content::Run::type const):
        (WebCore::Layout::Line::Content::Run::isText const):
        (WebCore::Layout::Line::Content::Run::isBox const):
        (WebCore::Layout::Line::Content::Run::isLineBreak const):
        (WebCore::Layout::Line::Content::Run::isContainerStart const):
        (WebCore::Layout::Line::Content::Run::isContainerEnd const):
        (WebCore::Layout::Line::Content::Run::adjustLogicalTop):
        (WebCore::Layout::Line::Content::Run::moveVertically):
        (WebCore::Layout::Line::Content::Run::moveHorizontally):
        (WebCore::Layout::Line::Content::Run::setTextIsCollapsed):

2019-07-09  Antti Koivisto  <antti@apple.com>

        REGRESSION(r244906): Crash in WebCore::positionOffsetValue
        https://bugs.webkit.org/show_bug.cgi?id=199613
        <rdar://problem/51518172>

        Reviewed by Zalan Bujtas.

        Test: fast/css/getComputedStyle/sticky-scroll-container-crash.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::positionOffsetValue):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::enclosingScrollportBox const): Deleted.

        The client trivally hits nullptr when this is called for element without overflow scroll parent.

        Fix by removing the whole function and using shared enclosingClippingBoxForStickyPosition instead.
        It does the same ancestor walk more efficiently via layer tree.

        * rendering/RenderBox.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::enclosingClippingBoxForStickyPosition const):

        Factor into function.

        (WebCore::RenderBoxModelObject::computeStickyPositionConstraints const):
        * rendering/RenderBoxModelObject.h:

2019-07-09  Cathie Chen  <cathiechen@igalia.com>

        Support writing-mode and direction for scrollIntoViewOptions.
        https://bugs.webkit.org/show_bug.cgi?id=161611

        Reviewed by Frédéric Wang and Simon Fraser.

        To determine which physical side to align we need to transform ScrollIntoViewOptions to scrollAlignment.
        We'll translate the inline and block direction separately. The writing-mode will affect the block scrollAlignment.
        While both writing-mode and CSS direction will affect the inline scrollAlignment. The argument for scrollRectToVisible
        should be physical, so if !isHorizontalWritingMode(), we need to switch alignX and alignY.

        For direction: rtl and writing-mode: horizontal-tb box, WebKit puts the scrollbar on the left side. The visible rect
        starts from the right side of the scroll bar, so localExposeRect should also start from the right side of
        scroll bar.

        * dom/Element.cpp:
        (WebCore::toScrollAlignmentForInlineDirection):
        (WebCore::toScrollAlignmentForBlockDirection):
        (WebCore::Element::scrollIntoView):
        (WebCore::toScrollAlignment): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):

2019-07-08  Saam Barati  <sbarati@apple.com>

        [WHLSL Import 23 new JS reference spec tests
        https://bugs.webkit.org/show_bug.cgi?id=199604

        Reviewed by Myles C. Maxfield.

        This patch imports a bunch of JS reference spec tests on our way to
        completing https://bugs.webkit.org/show_bug.cgi?id=199595
        
        It also fixes the recursion checker phase. That phase had two bugs:
        1. We'd assert after visiting the function declaration that it was
        still in the set. However, it will not be in the set when we actually
        detect recursion.
        2. We would not visit the arguments to a call, so if they contained other
        calls which were recursive, we would not detect such recursive calls.

        Tests: webgpu/whlsl-int-literal-compare.html
               webgpu/whlsl-simple-tests.html
               webgpu/whlsl-type-mismatch.html
               webgpu/whlsl-uint-bitwise.html

        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:

2019-07-08  Chris Dumez  <cdumez@apple.com>

        Make Document::postTask() safe to call from a background thread
        https://bugs.webkit.org/show_bug.cgi?id=199585

        Reviewed by Alex Christensen.

        Make Document::postTask() safe to call from a background thread by not calling makeWeakPtr() on the Document.
        Calling makeWeakPtr() on a document from a background thread is not safe since Document is a main thread
        object. Instead, capture Document::identifier() in the lambda and lookup the document from its identifier
        once we're on the main thread.

        * dom/Document.cpp:
        (WebCore::Document::postTask):

2019-07-08  Youenn Fablet  <youenn@apple.com>

        Hop explicitly to the main thread after generating a frame in ScreenDisplayCaptureSourceMac
        https://bugs.webkit.org/show_bug.cgi?id=199581

        Reviewed by Eric Carlson.

        Instead of locking and setting the current frame from a background thread, hop to the main thread.
        This also makes sure the weakThis check is done in the main thread.
        Manually tested.

        * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
        (WebCore::ScreenDisplayCaptureSourceMac::DisplaySurface::DisplaySurface):
        * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
        (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
        (WebCore::ScreenDisplayCaptureSourceMac::generateFrame):
        (WebCore::ScreenDisplayCaptureSourceMac::newFrame):
        (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable): Deleted.

2019-07-08  Daniel Bates  <dabates@apple.com>

        Command + . generates Escape with key identifier Period, should be Escape
        https://bugs.webkit.org/show_bug.cgi?id=199393
        <rdar://problem/52498001>

        Reviewed by Wenson Hsieh.

        Remap the key code for Command + . before we compute the Windows virtual key code.
        Otherwise, the Windows virtual key code reveals the pre-mapped key code.

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

2019-07-08  Alex Christensen  <achristensen@webkit.org>

        Prevent null dereferencing in SubresourceLoader::init's lambda
        https://bugs.webkit.org/show_bug.cgi?id=199580

        Reviewed by Ryosuke Niwa.

        Crash logs indicate that sometimes m_documentLoader is null.
        This is similar to https://bugs.webkit.org/show_bug.cgi?id=187360

        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::init):

2019-07-08  Wenson Hsieh  <wenson_hsieh@apple.com>

        Unable to paste from Notes into Excel 365 spreadsheet
        https://bugs.webkit.org/show_bug.cgi?id=199565
        <rdar://problem/43615497>

        Reviewed by Chris Dumez.

        When pasting into Microsoft Excel 365, the copied data is all inserted into a single cell, even when copying a
        table. To understand why this happens, we first need to understand how Excel's logic for handling paste works.
        When tapping on the "Paste" button, Excel performs and expects the following:

        1.  Before triggering programmatic paste, move focus into a hidden contenteditable area specifically intended to
            capture pasted content.
        2.  Run a promise that resolves immediately; the promise callback restores focus to the originally focused
            element prior to (1).
        3.  Invoke programmatic paste using `document.execCommand("Paste")`.
        4.  The callback scheduled in step (2) then runs, restoring focus to the main editable element representing a
            table cell.

        However, what ends up happening is this:

        Steps (1)-(3): same as before.
        4.  We (WebKit) create a temporary Page for the purposes of sanitizing copied web content before exposing it to
            the paste handler. This involves creating and loading a document; when this is finished, we call into
            Document::finishedParsing which flushes the microtask queue.
        5.  This causes us to immediately run the microtask enqueued in step (2), which restores focus to the previously
            focused element (importantly, this is not the element that was focused in step (1)).
        6.  The paste commences, and inserts the sanitized fragment into the originally focused element rather than the
            content editable area intended to capture pasted content.

        Excel's script then gets confused, and does not end up using their special paste logic to handle the paste. The
        pasted content is instead just inserted as plain text in a cell. To address this, we simply prevent document
        load in the Page for web content sanitization from triggering a microtask checkpoint; this allows any scheduled
        main thread microtasks to be deferred until the next turn of the runloop.

        Test: editing/pasteboard/paste-does-not-fire-promises-while-sanitizing-web-content.html

        * dom/Document.cpp:
        (WebCore::Document::finishedParsing):

        Don't immediately dispatch microtasks when we finish document parsing, in the case where the page is intended
        only for web content sanitization, since this may end up executing script in the original document. As explained
        above, this causes compatibility issues when pasting in Excel.

        * editing/markup.cpp:
        (WebCore::createPageForSanitizingWebContent):

        When creating a page for sanitizing web content, mark it as such.

        * page/Page.h:

        Add a new flag to indicate that a Page is only intended for sanitizing web content.

        (WebCore::Page::setIsForSanitizingWebContent):
        (WebCore::Page::isForSanitizingWebContent const):

2019-07-08  Konstantin Tokarev  <annulen@yandex.ru>

        Remove unused #include "ImageBufferData.h"
        https://bugs.webkit.org/show_bug.cgi?id=199574

        Reviewed by Michael Catanzaro.

        * html/canvas/ImageBitmapRenderingContext.h:

2019-07-08  Chris Dumez  <cdumez@apple.com>

        Fix thread safety issue in Database::scheduleTransactionCallback()
        https://bugs.webkit.org/show_bug.cgi?id=199557

        Reviewed by Alex Christensen.

        I am working on adding threading assertions to WeakPtr and found a potentially
        unsafe call to makeWeakPtr() on a Document from Database::scheduleTransactionCallback()
        via Document::postTask(), on a background database thread. Document is a main thread
        object and we should therefore not be interacting with it from a background thread.

        For clarity, this patch also switches the webdatabase code to use Document instead
        of ScriptExecution as type since it is only exposed to Window contexts, not workers.

        * Modules/webdatabase/Database.cpp:
        (WebCore::Database::Database):
        (WebCore::Database::~Database):
        (WebCore::Database::runTransaction):
        (WebCore::Database::scheduleTransactionCallback):
        (WebCore::Database::logErrorMessage):
        (WebCore::Database::securityOrigin):
        (WebCore::Database::didExceedQuota):
        * Modules/webdatabase/Database.h:
        (WebCore::Database::document):
        * Modules/webdatabase/DatabaseContext.cpp:
        (WebCore::DatabaseContext::DatabaseContext):
        * Modules/webdatabase/DatabaseContext.h:
        * Modules/webdatabase/DatabaseManager.cpp:
        (WebCore::DatabaseManager::databaseContext):
        (WebCore::logOpenDatabaseError):
        (WebCore::DatabaseManager::openDatabaseBackend):
        (WebCore::DatabaseManager::tryToOpenDatabaseBackend):
        (WebCore::DatabaseManager::openDatabase):
        (WebCore::DatabaseManager::hasOpenDatabases):
        (WebCore::DatabaseManager::stopDatabases):
        (WebCore::DatabaseManager::logErrorMessage):
        * Modules/webdatabase/DatabaseManager.h:
        * Modules/webdatabase/SQLStatement.cpp:
        (WebCore::SQLStatement::SQLStatement):
        * Modules/webdatabase/SQLTransaction.cpp:
        (WebCore::SQLTransaction::SQLTransaction):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::didOpenDatabase):
        * inspector/agents/InspectorDatabaseAgent.cpp:
        (WebCore::InspectorDatabaseAgent::executeSQL):

2019-07-08  Chris Dumez  <cdumez@apple.com>

        Add threading assertion to WTF::CompletionHandler
        https://bugs.webkit.org/show_bug.cgi?id=199516

        Reviewed by Alex Christensen.

        Update some MessagePort-related code to use WTF::Function instead of WTF::CompletionHandler
        since the callback is always called on the main thread, even when it was created on a
        worker thread. Ideally, this code would be refactored so that the callback gets called on
        the worker thread directly.

        * dom/messageports/MessagePortChannel.cpp:
        (WebCore::MessagePortChannel::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannel.h:
        * dom/messageports/MessagePortChannelProvider.h:
        * dom/messageports/MessagePortChannelProviderImpl.cpp:
        (WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannelProviderImpl.h:
        * dom/messageports/MessagePortChannelRegistry.cpp:
        (WebCore::MessagePortChannelRegistry::checkRemotePortForActivity):
        * dom/messageports/MessagePortChannelRegistry.h:

2019-07-08  Charlie Turner  <cturner@igalia.com>

        REGRESSION(r243197): [GStreamer] Web process hangs when scrolling twitter timeline which contains HLS videos
        https://bugs.webkit.org/show_bug.cgi?id=197558

        Reviewed by Xabier Rodriguez-Calvar.

        Not covered, I have a test locally that would probably trigger the
        deadlock if the network requests took a realistic amount of time,
        but from a local webserver the window of time to hit this deadlock
        is too narrow.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webkit_web_src_init): Make the websrc start asynchronously, this
        allows the main thread to be free to complete resource loader
        setup.
        (webKitWebSrcCreate): Calling start() from the create() vfunc is a
        recipe for deadlock, since BaseSrc holds the streaming lock during
        seeks, and then calls create(). In these cases, we do not want to
        notify async-completion, since we've already completed from the
        necessarily preceeding start() vfunc, and calling it again would
        require the stream-lock and deadlock us.
        (webKitWebSrcStart): Refactor to use webKitWebSrcMakeRequest, but
        ensuring that we do perform an async-complete notification.
        (webKitWebSrcMakeRequest): What Start() used to be, but now can be
        toggled when to notify of async-completion. Start() no longer
        blocks, since the return value of initiating a resource loader is
        of no interest to the callers.
        (webKitWebSrcCloseSession): Similarly to Start(), we do not need
        to wait for the completion of cancelled net requests.

2019-07-08  Chris Dumez  <cdumez@apple.com>

        Unable to play videos on xfinity.com/stream on macOS Catalina
        https://bugs.webkit.org/show_bug.cgi?id=199576
        <rdar://problem/50101264>

        Reviewed by Alex Christensen.

        Enable invalidate Fetch signal quirk for all sites as the blacklist is getting too large and
        we are finding too much breakage too late in the release cycle.

        * Modules/fetch/FetchRequest.cpp:
        (WebCore::processInvalidSignal):
        * page/Quirks.cpp:
        (WebCore::Quirks::shouldIgnoreInvalidSignal const):

2019-07-08  Youenn Fablet  <youenn@apple.com>

        MediaStreamTrackPrivate should always call readyStateChanged on the main thread
        https://bugs.webkit.org/show_bug.cgi?id=199538
        <rdar://problem/52709106>

        Reviewed by Eric Carlson.

        MediaStreamTrackPrivate is sometimes calling readyStateChanged in a
        background thread inside its audioSamplesAvailable method.
        Instead of doing that, we hop to the main thread to call readyStateChanged.
        Once the call is made in the main thread, MediaStreamTrackPrivate will
        send the audio samples to its observers.

        To make mock audio source closer to real capture audio sources,
        audioSamplesAvailable is called on a background thread.
        RealtimeMediaSource is updated to always be destroyed in the main
        run loop since it is WebKit2 only.

        Covered by existing tests and making sure the mock audio source calls
        the audioSamplesAvailable method on a background thread.

        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::videoSampleAvailable):
        (WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/RealtimeMediaSource.cpp:
        (WebCore::RealtimeMediaSource::scheduleDeferredTask):
        scheduleDeferredTask may be called from a background thread.
        It is thus safer to ref the source instead of creating a weak pointer.
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
        (WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac):
        (WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
        (WebCore::MockRealtimeAudioSourceMac::reconfigure):
        (WebCore::MockRealtimeAudioSourceMac::render):
        (WebCore::MockRealtimeAudioSourceMac::settingsDidChange):
        * platform/mock/MockRealtimeAudioSource.cpp:
        (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
        (WebCore::MockRealtimeAudioSource::tick):
        * platform/mock/MockRealtimeAudioSource.h:

2019-07-08  Youenn Fablet  <youenn@apple.com>

        Register a MediaStreamTrack as media producer only if it is a capture track
        https://bugs.webkit.org/show_bug.cgi?id=199566

        Reviewed by Eric Carlson.

        MediaStreamTrack registration as a media producer is only useful for capture tracks.
        Otherwise, the audio/video playing state is computed through HTMLMediaElement.
        Do not register MediaStreamTrack as a media producer if it is not a capture track.

        Set the muted state of the track before registering it as an audio
        producer. Otherwise, it might create unnecessary small change of playing state.
        Covered by existing tests.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        (WebCore::MediaStreamTrack::~MediaStreamTrack):
        * Modules/mediastream/MediaStreamTrack.h:

2019-07-08  Simon Fraser  <simon.fraser@apple.com>

        YouTube embedding iframes in WebView sometimes go blank when the video starts playing
        https://bugs.webkit.org/show_bug.cgi?id=199600
        rdar://problem/47806012

        Reviewed by Tim Horton.

        With some combinations of nested iframes that are being resized from empty, and toggling into
        compositing mode, we'd fail to update compositing in the iframe's enclosing document, so never
        host the iframes's layers.

        Fix by moving some widget-resize-related code into RenderLayerCompositor::widgetDidChangeSize(),
        and adding code to schedule a compositing update.

        I was unable to come up with a layout test for this.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::widgetDidChangeSize):
        * rendering/RenderLayerCompositor.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::setWidgetGeometry):

2019-07-08  Antoine Quint  <graouts@apple.com>

        [Pointer Events] Enable only on the most recent version of the supported iOS family
        https://bugs.webkit.org/show_bug.cgi?id=199562
        <rdar://problem/52766511>

        Reviewed by Dean Jackson.

        * Configurations/FeatureDefines.xcconfig:

2019-07-08  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] The CREATE_TRACK macro is messed up
        https://bugs.webkit.org/show_bug.cgi?id=199356

        Reviewed by Xabier Rodriguez-Calvar.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix the
        CREATE_TRACK macro for !VIDEO_TRACK builds.

2019-07-07  Zalan Bujtas  <zalan@apple.com>

        [ContentChangeObserver] Difficult to control videos on iqiyi.com as the actions are mouse hover
        https://bugs.webkit.org/show_bug.cgi?id=199542
        <rdar://problem/51886813>

        Reviewed by Simon Fraser.

        Decouple isVisuallyHidden and isConsideredVisible. Just because an element is not visually hidden (1px wide content)
        it is not necessarily qualified to be visible in the context of hover heuristic (e.g. iqiyi.com brings up a 1px wide
        clickable element when hovering over the scrubber. This element is clearly not designed to be actionable.)

        Tests: fast/events/touch/ios/content-observation/tap-on-1px-height-content.html
               fast/events/touch/ios/content-observation/tap-on-1px-width-content.html

        * dom/Node.cpp:
        (WebCore::Node::defaultEventHandler):
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::isVisuallyHidden):
        (WebCore::ContentChangeObserver::isConsideredVisible):
        (WebCore::ContentChangeObserver::didAddTransition):
        (WebCore::ContentChangeObserver::didFinishTransition):
        (WebCore::ContentChangeObserver::willDestroyRenderer):
        (WebCore::ContentChangeObserver::StyleChangeScope::StyleChangeScope):
        (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope):
        (WebCore::ContentChangeObserver::isConsideredHidden): Deleted.
        * page/ios/ContentChangeObserver.h:

2019-07-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Introduce splitPosition to LineLayout
        https://bugs.webkit.org/show_bug.cgi?id=199558
        <rdar://problem/52737649>

        Reviewed by Antti Koivisto.

        This is in preparation for breaking runs at line end.

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

2019-07-07  Zalan Bujtas  <zalan@apple.com>

        [LFC] Fix formatting context root for inflow positioned inline containers
        https://bugs.webkit.org/show_bug.cgi?id=199551
        <rdar://problem/52728868>

        Reviewed by Antti Koivisto.

        Relatively positioned (inflow) inline container lives in the formatting context where its parent lives unless
        the parent establishes a formatting context. This is slightly different from the usual behavior which is containing block driven.

        div id=outer style="position: absolute">><div id=inner><span style="position: relative">content</span></div></div>

        While the relatively positioned inline container (span) is placed relative to its containing block "outer", it lives in the inline formatting context established by "inner".

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::formattingContextRoot const):
        * layout/layouttree/LayoutBox.h:
        * layout/layouttree/LayoutInlineContainer.cpp:
        (WebCore::Layout::InlineContainer::formattingContextRoot const):
        * layout/layouttree/LayoutInlineContainer.h:

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

        Long hang when loading a cnn.com page on iOS
        https://bugs.webkit.org/show_bug.cgi?id=199556

        Reviewed by Zalan Bujtas.
        
        Loading https://edition.cnn.com/travel/article/brussels-airlines-flight-to-nowhere/index.html in the iOS 13 sim
        results in a long hang under OverlapMapContainer::append(). We were creating pathological clipping scopes with
        thousands of entries, because OverlapMapContainer::mergeClippingScopesRecursive() had a logic error where
        it added 'sourceScope' to the child instead of 'sourceChildScope'. Add a new assertion to detect that case.
        
        I wasn't able to create a testcase that caused a hang, but a number of existing tests would have
        hit the assertion.

        * rendering/LayerOverlapMap.cpp:
        (WebCore::OverlapMapContainer::ClippingScope::addChild):
        (WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Drive-by fix: m_overflowControlsHostLayer is null on iOS, so use rootGraphicsLayer().

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

        Carvana.com needs the fetch AbortSignal quirk
        https://bugs.webkit.org/show_bug.cgi?id=199540

        Reviewed by Chris Dumez.

        Manually tested.

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

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

        [WHLSL] The checker does not need to keep a separate m_typeAnnotations map
        https://bugs.webkit.org/show_bug.cgi?id=199537

        Reviewed by Myles C. Maxfield.

        Nothing is ever deleted from it, and all of its contents are eventually copied into the expressions.
        We might as well put the type annotations directly into the expressions in the first place.
        It is about a 5% speedup of the checker.

        No new test as there is no inteded functional change.

        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::assignTypes):
        (WebCore::WHLSL::Checker::getInfo):
        (WebCore::WHLSL::Checker::assignType):
        (WebCore::WHLSL::Checker::forwardType):
        (WebCore::WHLSL::Checker::visit):

2019-07-05  Youenn Fablet  <youenn@apple.com> and Simon Fraser  <simon.fraser@apple.com>

        Trigger a compositing update when video element is changing
        https://bugs.webkit.org/show_bug.cgi?id=199522
        <rdar://problem/47297159>

        Reviewed by Simon Fraser.

        Test: compositing/video/video-update-rendering.html

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

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

        Unreviewed, fix -Wmisleading-indentation warning introduced in r246764
        https://bugs.webkit.org/show_bug.cgi?id=199173
        <rdar://problem/45968770>

        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):

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

        Mail's use of punchOutWhiteBackgroundsInDarkMode not working on iOS.
        https://bugs.webkit.org/show_bug.cgi?id=199534
        rdar://problem/52586836

        Reviewed by Simon Fraser.

        Tests: css3/color-filters/punch-out-white-backgrounds.html

        * dom/Document.cpp:
        (WebCore::Document::compositeOperatorForBackgroundColor const): Added.
        Use CompositeDestinationOut for transparent frames, otherwise CompositeDestinationIn.
        * dom/Document.h:
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintBoxDecorations): Use compositeOperatorForBackgroundColor.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintRootBoxFillLayers): Ditto.
        (WebCore::RenderBox::paintBackground): Ditto.
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintBackgroundsBehindCell): Ditto.

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

        Revert change to block playback when process is ostensibly "suspended".
        https://bugs.webkit.org/show_bug.cgi?id=199530

        Reviewed by Eric Carlson.

        In r243958, a drive-by-fix was added that blocked playback when the WebProcess thought it
        was susposed to be suspended. The intent was to keep the AVAudioSession for the process
        from being activated just before the process was suspended, and thus avoid receiving an
        "interruption" and having the AVAudioSession deactivated out from under us upon resuming.

        Unfortunately, this caused problems when another process resumes the WebContent process
        in order to start playback; namely the Now Playing UI's play button. Because we may receive
        the play command long before whe notice that we've been resumed, the WebContent process
        may refuse to honor the play command because it thinks its supposed to be suspended.

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

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

        [iOS] Crash in WebKit::WebPage::positionInformation via Range::startPosition
        https://bugs.webkit.org/show_bug.cgi?id=199503

        Reviewed by Wenson Hsieh.

        * editing/Editor.cpp:
        (WebCore::Editor::compositionRange const): Added a FIXME.

2019-07-02  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Standard library is too big to directly include in WebCore
        https://bugs.webkit.org/show_bug.cgi?id=198186
        <rdar://problem/51288898>

        Reviewed by Saam Barati.

        This patch adds almost the entire remainder of the standard library. There are a few
        pieces missing:
        - step() because of https://bugs.webkit.org/show_bug.cgi?id=199289
        - sign() also because of https://bugs.webkit.org/show_bug.cgi?id=199289
        - faceforward() because it calls sign()
        - Some of the more rarely-used texturing functions (e.g. Gather()) https://bugs.webkit.org/show_bug.cgi?id=195813
        - RWTextures https://bugs.webkit.org/show_bug.cgi?id=198985

        There were two problems with adding so many standard library functions:
        - We didn't want to increase the WebCore binary size that much
        - Compiling all the functions at runtime took 7 seconds, which is much too long

        This patch addresses the first problem by gzipping the standard library before including it in the binary.
        At runtime, we use libcompression to unzip it.

        To address the second problem, we did some analysis and found that 14% of that 7 seconds was simply
        destroying all the AST nodes. Even if we eliminated all processing of the AST, simply having the AST
        of the entire standard library built and destroyed would still be too slow. Therefore, this patch limits
        which parts of the standard library get parsed in the first place. All the functions in the standard library
        file are sorted by name, and each group of functions with the same name are preceeded by a comment of the
        form /* Functions named xyz */. At build time, a Python script looks for all these comments, and builds a
        map from function name to character offset inside the file where those functions begin. At run time, we
        parse the user program first, look for all function calls within it, and look up those function call names
        in the map to see which part of the standard library holds those functions. We then parse just that part.
        Because the standard library can call other functions in the standard library, we do this in a loop until
        we have exhausted all the functions.

        Covered by existing tests.

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make: gzip the standard library, and add a build step to generate the offset map.
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::setOverloads):
        (WebCore::WHLSL::AST::CallExpression::function): Every caller of this ASSERT()s the result. Might as well
        move the ASSERT() into the function.
        (WebCore::WHLSL::AST::CallExpression::setFunction):
        * Modules/webgpu/WHLSL/Cocoa/WHLSLStandardLibraryUtilities.cpp: Added.
        (WebCore::WHLSL::decompressStandardLibrary): Use libcompression. This is why this file is in a Cocoa/
        subfolder, and is listed in SourcesCocoa.txt instead of Sources.txt.
        (WebCore::WHLSL::decompressAndDecodeStandardLibrary):
        (WebCore::WHLSL::NameFinder::takeFunctionNames):
        (WebCore::WHLSL::includeStandardLibrary): Include only the bits of the standard library which are relevant,
        as described above.
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Only emit MSL code for functions which are actually
        reached. The MSL compiler is a significant amount of our compile time, so reducing the size of the emitted
        program can significantly improve compile times.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::sharedMetalFunctions):
        (WebCore::WHLSL::Metal::metalFunctions):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        - Change how load() and store() are written. We need explicit functions because we have explicit atomic
          types, which HLSL doesn't have. load() and store() aren't present in HLSL.
        - Delete f16tof32 because they're probably not important and are not obvious how to implement. We can re-add
          them again later if necessary.
        - Various fixes to make us generate the correct MSL code for each standard library function.
        * Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py: Added. Build the function map as described
        above.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveByInstantiation): Previously, the standard library included an operator== for two
        pointers. However, that function should be generated by the compiler instead. This fixes the bug in the
        compiler which allows the compiler to correctly generate the right function. This also prompted me to file
        https://bugs.webkit.org/show_bug.cgi?id=199335
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp: Update to the new function() signature.
        * Modules/webgpu/WHLSL/WHLSLLexer.h: Add a new position() method to the lexer. This isn't actually used
        in this patch, but it's useful when doing some analysis during parsing. 
        (WebCore::WHLSL::Lexer::Lexer):
        (WebCore::WHLSL::Lexer::consumeToken):
        (WebCore::WHLSL::Lexer::peek const):
        (WebCore::WHLSL::Lexer::peekFurther const):
        (WebCore::WHLSL::Lexer::position const):
        (WebCore::WHLSL::Lexer::state const):
        (WebCore::WHLSL::Lexer::setState):
        (WebCore::WHLSL::Lexer::isFullyConsumed const): Fixes a bug where isFullyConsumed() might return true even
        when there is a token in the ring buffer.
        (WebCore::WHLSL::Lexer::peek): Deleted.
        (WebCore::WHLSL::Lexer::peekFurther): Deleted.
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit): Drive-by partial fix of https://bugs.webkit.org/show_bug.cgi?id=199347
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: Call includeStandardLibrary().
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryFunctionMap.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp.
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp.
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:

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

        Add fetch quirk for www.bnz.co.nz
        https://bugs.webkit.org/show_bug.cgi?id=199518
        rdar://problem/52230914

        Reviewed by Chris Dumez.

        Use fetch quirk to make bnz main page load properly.
        Manually tested.

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

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

        [WHLSL] Optimize the lexer
        https://bugs.webkit.org/show_bug.cgi?id=199520

        Reviewed by Myles Maxfield.

        This patch includes a number of small optimizations to the lexer:
        - By creating two new types of Token (Invalid and EOF), we can avoid having to manipulate Optional<Token> everywhere
        - By combining the lexing of identifiers, keywords and operator names, we can avoid re-reading them several times
        - By storing mere offsets in the tokens instead of string views, we save space in the common case where the string view is unused (e.g. for keywords)
        - By storing mere offsets in the tokens instead of line numbers, we can simplify the whitespace and comment lexing; and we can easily recompute the line number on demand
        - By using templates we can avoid constructing and destructing vectors at runtime every time we call tryTypes, consumeTypes or peekTypes; as well as avoiding a call to find().
        - I also hoisted the length check out of the loop in Lexer::string()
        All of this combined brought the time spent in the parser when running LayoutTests/webgpu/whlsl-test-harness-test.html 5 times on my machine from 612ms to 462ms.

        I also removed the 'anyCharacter' method since it was dead code.
        I also removed Lexer::position(), but it is directly equivalent now to peek().startOffset.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
        (WebCore::WHLSL::Lexer::Token::typeName):
        (WebCore::WHLSL::Lexer::consumeTokenFromStream):
        (WebCore::WHLSL::Lexer::lineNumberFromOffset):
        (WebCore::WHLSL::isWhitespace):
        (WebCore::WHLSL::isNewline):
        (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
        (WebCore::WHLSL::Lexer::digitStar const):
        (WebCore::WHLSL::Lexer::completeOperatorName const):
        * Modules/webgpu/WHLSL/WHLSLLexer.h:
        (WebCore::WHLSL::Lexer::Lexer):
        (WebCore::WHLSL::Lexer::Token::stringView):
        (WebCore::WHLSL::Lexer::consumeToken):
        (WebCore::WHLSL::Lexer::peek const):
        (WebCore::WHLSL::Lexer::peekFurther const):
        (WebCore::WHLSL::Lexer::state const):
        (WebCore::WHLSL::Lexer::setState):
        (WebCore::WHLSL::Lexer::isFullyConsumed const):
        (WebCore::WHLSL::Lexer::errorString):
        (WebCore::WHLSL::Lexer::string const):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parse):
        (WebCore::WHLSL::Parser::peek):
        (WebCore::WHLSL::Parser::peekFurther):
        (WebCore::WHLSL::Types::includes):
        (WebCore::WHLSL::Types::appendNameTo):
        (WebCore::WHLSL::Types<t>::includes):
        (WebCore::WHLSL::Types<t>::appendNameTo):
        (WebCore::WHLSL::Parser::peekTypes):
        (WebCore::WHLSL::Parser::tryType):
        (WebCore::WHLSL::Parser::tryTypes):
        (WebCore::WHLSL::Parser::consumeType):
        (WebCore::WHLSL::Parser::consumeTypes):
        (WebCore::WHLSL::Parser::consumeIntegralLiteral):
        (WebCore::WHLSL::Parser::parseConstantExpression):
        (WebCore::WHLSL::Parser::parseTypeArgument):
        (WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
        (WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
        (WebCore::WHLSL::Parser::parseType):
        (WebCore::WHLSL::Parser::parseTypeDefinition):
        (WebCore::WHLSL::Parser::parseBuiltInSemantic):
        (WebCore::WHLSL::Parser::parseResourceSemantic):
        (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::parseParameter):
        (WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
        (WebCore::WHLSL::Parser::parseBlockBody):
        (WebCore::WHLSL::Parser::parseSwitchCase):
        (WebCore::WHLSL::Parser::parseVariableDeclaration):
        (WebCore::WHLSL::Parser::parseStatement):
        (WebCore::WHLSL::Parser::parseEffectfulAssignment):
        (WebCore::WHLSL::Parser::parseLimitedSuffixOperator):
        (WebCore::WHLSL::Parser::parseSuffixOperator):
        (WebCore::WHLSL::Parser::completeAssignment):
        (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
        (WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
        (WebCore::WHLSL::Parser::completePossibleShift):
        (WebCore::WHLSL::Parser::completePossibleAdd):
        (WebCore::WHLSL::Parser::completePossibleMultiply):
        (WebCore::WHLSL::Parser::parsePossiblePrefix):
        (WebCore::WHLSL::Parser::parseCallExpression):
        (WebCore::WHLSL::Parser::parseTerm):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::anonymousToken):

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

        [WHLSL] Remove the phase resolveCallsInFunctions
        https://bugs.webkit.org/show_bug.cgi?id=199474

        Reviewed by Myles Maxfield.

        This pass only stores into each property access and call expression vectors of all the functions it might be calling, for use by the Checker afterwards.
        But the checker is perfectly able to compute a pointer to these vectors by itself.
        So by removing this pass, we gain the following:
        - One less pass over the AST
        - No need to copy these vectors (which can be large for heavily overloaded functions, of which there are quite a few in the stdlib)
        - No need to have these vectors in the expressions, saving 24 bytes per CallExpression and 72 bytes per PropertyAccessExpression
        - No need to allocate and then destroy these vectors.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::castReturnType):
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveFunction):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::NameResolver):
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):

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

        [iOS] Local capture MediaStreamTrack does not render in portrait mode
        https://bugs.webkit.org/show_bug.cgi?id=199519
        <rdar://problem/52689720>

        Reviewed by Eric Carlson.

        RealtimeVideoSource was badly computing its size in case of rotation.
        Whenever its underlying source is notifying of settings change,
        compute the size and transpose it only in left/right case.

        Update mock video source to cover that case.
        Covered by updated test.

        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::RealtimeVideoSource::sourceSettingsChanged):
        * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
        * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
        (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::settings):
        (WebCore::MockRealtimeVideoSource::orientationChanged):
        (WebCore::MockRealtimeVideoSource::monitorOrientation):
        * platform/mock/MockRealtimeVideoSource.h:

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

        Unreviewed, rolling out r247115.

        Breaks lldbWebKitTester (and by extension, test-webkitpy)

        Reverted changeset:

        "[WHLSL] Standard library is too big to directly include in
        WebCore"
        https://bugs.webkit.org/show_bug.cgi?id=198186
        https://trac.webkit.org/changeset/247115

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

        Unreviewed, rolling out r247159.

        IndexedDB layout tests are failing the new assert.

        Reverted changeset:

        "ASSERT that a sessionID is valid when encoding it"
        https://bugs.webkit.org/show_bug.cgi?id=199302
        https://trac.webkit.org/changeset/247159

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

        Unreviewed, rolling out r247123.

        Caused TestWebKitAPI.Challenge.BasicProposedCredential to
        fail.

        Reverted changeset:

        "Only allow fetching and removing session credentials from
        WebsiteDataStore"
        https://bugs.webkit.org/show_bug.cgi?id=199385
        https://trac.webkit.org/changeset/247123

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

        ASSERT that a sessionID is valid when encoding it
        https://bugs.webkit.org/show_bug.cgi?id=199302

        Reviewed by Darin Adler.

        For IDBValue, instead of encoding an invalid session ID, encode a boolean that tells there is no sessionID.
        For IDBRequestData, keep track of whether there is an IDBDatabaseIdentifier
        and encode/decode accordingly to not encode an invalid sessionID.
        No observable change of behavior.

        * Modules/indexeddb/IDBValue.h:
        (WebCore::IDBValue::sessionID const):
        (WebCore::IDBValue::encode const):
        (WebCore::IDBValue::decode):
        * Modules/indexeddb/shared/IDBRequestData.cpp:
        (WebCore::IDBRequestData::isolatedCopy):
        * Modules/indexeddb/shared/IDBRequestData.h:
        (WebCore::IDBRequestData::databaseIdentifier const):
        (WebCore::IDBRequestData::decode):

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

        [LFC][IFC] Inline runs should be relative to the line's top/left initially
        https://bugs.webkit.org/show_bug.cgi?id=199157
        <rdar://problem/52053415>

        Reviewed by Antti Koivisto.

        Let's construct the runs relative to the line's top/left and convert them relative to the formatting root's border box top/left
        when the line is being closed. When the line moves (floats etc) we don't have to move each runs individually.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):

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

        REGRESSION(r244218): desmos.com: Cannot scroll formulas region when region is scrollable
        https://bugs.webkit.org/show_bug.cgi?id=199508
        <rdar://problem/50925173>

        Reviewed by Zalan Bujtas.

        The page invokes preventDefault on simulated mouse events which stops scrolling.
        To fix, add a quirk that turns simulated mouse events non-cancelable.

        * dom/MouseEvent.h:
        * dom/ios/MouseEventIOS.cpp:
        (WebCore::MouseEvent::create):
        * page/Quirks.cpp:
        (WebCore::Quirks::simulatedMouseEventTypeForTarget const):
        (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const): Deleted.

        To avoid adding more similar functions, and for future flexibility, make this one return the type too.

        * page/Quirks.h:

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

        [LFC][IFC] Empty text node should generate empty InlineTextItem
        https://bugs.webkit.org/show_bug.cgi?id=199495
        <rdar://problem/52643225>

        Reviewed by Antti Koivisto.

        Empty text nodes generate empty RenderText renderers but they don't generate inline boxes.
        This patch aligns LFC with the current rendering code.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendTextContent):
        * layout/inlineformatting/InlineTextItem.cpp:
        (WebCore::Layout::InlineTextItem::createAndAppendTextItems):

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

        [ATK] Do not use C linkage for functions using C++ features
        https://bugs.webkit.org/show_bug.cgi?id=199510
        <rdar://problem/52674702>

        Reviewed by Carlos Garcia Campos.

        No new tests needed.

        * accessibility/atk/WebKitAccessible.h: Move function and type declarations involving
        C++ features outside of the block delimited by the G_BEGIN_DECLS and G_END_DECLS macros,
        which were setting the C linkage.

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999
        <rdar://problem/51979477>

        Reviewed by Dean Jackson.

        Up until now, we would not account for pointer capture (see ​https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
        mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
        for it when updating :hover styles.

        Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
        that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
        boundary mouse events. Additionally, when calling Document::prepareMouseEvent(), we also use the pointer capture element to
        pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.

        * dom/Document.cpp:
        (WebCore::Document::prepareMouseEvent): When a new event is going to be dispatched, we must run the Process Pending Capture Element
        steps as mandated by the Pointer Events spec. Calling this will dispatch the appropriate pointer capture change events and also
        required boundary events since EventHandler::setCapturingMouseEventsElement() calls into EventHandler::updateMouseEventTargetNode().
        Since this may update the capturing mouse events element, we ensure that we call updateHoverActiveState() with a flag that indicates that.
        Finally, we use the capturing mouse events element instead of the hit-testing element to pass to updateHoverActiveState() to ensure
        that is has :hover styles applied.
        (WebCore::Document::updateHoverActiveState): Account for the new CaptureChange flag to force the invalidation of the :hover and :active
        elements chain at all times when the capturing mouse events element changed.
        * dom/Document.h:
        * dom/PointerEvent.h: Update PointerEvent::createForPointerCapture() to take specific parameters rather than a single PointerEvent to
        set the pointerId, isPrimary and pointerType properties of the generated event. This is required to call processPendingPointerCapture()
        outside of PointerEvent dispatch logic since we now call it from Document::prepareMouseEvent() where we haven't yet generated such an
        event.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::pointerCaptureElementDidChange): When a new pointer capture element is set, call updateMouseEventTargetNode()
        to ensure that boundary events are fired to indicate the pointer capture state change.
        (WebCore::EventHandler::prepareMouseEvent): Keep track of the last PlatformMouseEvent used to prepare a mouse event so that we can use
        it when setCapturingMouseEventsElement() is called.
        * page/EventHandler.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::pointerCaptureElement): Since Document::prepareMouseEvent() needs to know the current pointer capture
        element, add a new public method that indicates the pointer capture element if that element is contained in the provided document. We need
        to provide the document since PointerCaptureController is owned by the Page and may manage several documents.
        (WebCore::PointerCaptureController::dispatchEvent): Only run the Process Pending Capture Element steps when dealing with a touch or pen
        event since those steps are already ran for mouse events in Document::prepareMouseEvent(). Additionally, since the element target is already
        set to be the pointer capture element with the changes made to processPendingPointerCapture(), and because on iOS pointer capture is always
        active, we can remove the code that would retarget the event to the pointer capture element.
        (WebCore::PointerCaptureController::pointerEventWasDispatched):
        (WebCore::PointerCaptureController::cancelPointer):
        (WebCore::PointerCaptureController::processPendingPointerCapture): We now call into EventHandler::setCapturingMouseEventsElement() when the
        capture target element changes. We must be careful to call this method prior to dispatching the "gotpointercapture" event and after dispatching
        the "lostpointercapture" event so that boundary events are fired at the right time.
        * page/PointerCaptureController.h:

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

        [ContentChangeObserver] didFinishTransition triggers a nested style recalc via isConsideredClickable
        https://bugs.webkit.org/show_bug.cgi?id=199506
        <rdar://problem/52656221>

        Reviewed by Ryosuke Niwa.

        isConsideredClickable() may trigger style update through Node::computeEditability. Let's adjust the observer state in the next runloop. 

        Test: fast/events/touch/ios/content-observation/animation-end-with-visiblity-change-and-recursive-update-style.html

        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::didFinishTransition):
        * page/ios/ContentChangeObserver.h:

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

        [ContentChangeObserver] Limit mouseOut dispatching after synthetic click to YouTube.com
        https://bugs.webkit.org/show_bug.cgi?id=199497
        <rdar://problem/52361019>

        Reviewed by Wenson Hsieh.

        r242798 introduced synthetic mouseOut dispatching soon after sythentic click to dismiss certain type of content (e.g. video control bar on YouTube).
        However on many sites, it resulted in dismissing useful content, like menu panes and other, non-clickable but informative content.
        This patch limits the mouseOut dispatching to YouTube.com.

        Test: fast/events/touch/ios/content-observation/mouse-out-event-should-not-fire-on-click.html

        * page/Quirks.cpp:
        (WebCore::Quirks::needsYouTubeMouseOutQuirk const):
        * page/Quirks.h:
        * page/Settings.yaml:
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::Backup::Backup):
        (WebCore::InternalSettings::Backup::restoreTo):
        (WebCore::InternalSettings::setShouldDispatchSyntheticMouseOutAfterSyntheticClick):
        * testing/InternalSettings.h:
        * testing/InternalSettings.idl:

2019-07-04  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r247127.

        Broke the watchOS build.

        Reverted changeset:

        "[WHLSL] Remove the phase resolveCallsInFunctions"
        https://bugs.webkit.org/show_bug.cgi?id=199474
        https://trac.webkit.org/changeset/247127

2019-07-03  Simon Fraser  <simon.fraser@apple.com>

        Some layers inside overflow:scroll don't move back to correct positions when the contents are shrunk
        https://bugs.webkit.org/show_bug.cgi?id=199464
        rdar://problem/52613285

        Reviewed by Sam Weinig.
        
        When an overflow scroller's content shrink and it becomes non-scrollable, the 'boundsOrigin' in
        the ancestor clipping stacks of related layers wouldn't get reset to zero, leaving layers in
        the wrong place, so always set boundsOrigin to zero on the clipping layers of non-overflow entries
        in the ancestor clipping stack.

        Test: compositing/scrolling/async-overflow-scrolling/become-non-scrollable-with-child.html

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

2019-07-04  Konstantin Tokarev  <annulen@yandex.ru>

        HyphenationLibHyphen: Include GLib-related headers only for PLATFORM(GTK)
        https://bugs.webkit.org/show_bug.cgi?id=199469

        Reviewed by Michael Catanzaro.

        Also added compile guard for a couple of functions used only in GTK port.

        * platform/text/hyphen/HyphenationLibHyphen.cpp:

2019-07-03  Eric Carlson  <eric.carlson@apple.com>

        [MSE] Add more debug and error logging
        https://bugs.webkit.org/show_bug.cgi?id=199473
        <rdar://problem/52615882>

        Reviewed by Jer Noble.

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::provideMediaData): Log if we don't enqueue every buffer.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Log if we return
        without starting playback.

        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
        (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Log if 
        prerollDecodeWithCompletionHandler fails.

2019-07-03  Simon Fraser  <simon.fraser@apple.com>

        RELEASE_ASSERT in WebCore: WebCore::ScrollingStateTree::insertNode()
        https://bugs.webkit.org/show_bug.cgi?id=199479
        rdar://problem/52392556

        Reviewed by Zalan Bujtas.
        
        Certain compositing tree updates could leave a layer with a ScrollingProxy role, but having an
        AncestorClippingStack with no overflow scrolling layers - for example, a related scroller could become
        scrollable, but we failed to mark the layer with the ancestor clippings stack as needing a geometry update.

        When this happened updateScrollingNodeForScrollingProxyRole() would return 0, causing the next child to be
        inserted with a parent of 0 (which should only happen for the root), and triggering a release assert in
        ScrollingStateTree::insertNode().

        Fix by ensuring that updateScrollingNodeForScrollingProxyRole() always returns the existing parentNodeID if we
        don't have a new node to insert.

        Test: scrollingcoordinator/scrolling-tree/scrolling-proxy-with-no-scrolling-layer.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateAncestorClippingStack):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):

2019-07-03  Konstantin Tokarev  <annulen@yandex.ru>

        RenderLayerCompositor.cpp should include RenderImage.h
        https://bugs.webkit.org/show_bug.cgi?id=199478

        Reviewed by Michael Catanzaro.

        * rendering/RenderLayerCompositor.cpp:

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

        [WHLSL] Remove the phase resolveCallsInFunctions
        https://bugs.webkit.org/show_bug.cgi?id=199474

        Reviewed by Myles C. Maxfield.

        This pass only stores into each property access and call expression vectors of all the functions it might be calling, for use by the Checker afterwards.
        But the checker is perfectly able to compute a pointer to these vectors by itself.
        So by removing this pass, we gain the following:
        - One less pass over the AST
        - No need to copy these vectors (which can be large for heavily overloaded functions, of which there are quite a few in the stdlib)
        - No need to have these vectors in the expressions, saving 24 bytes per CallExpression and 72 bytes per PropertyAccessExpression
        - No need to allocate and then destroy these vectors.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::castReturnType):
        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveFunction):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::NameResolver):
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):

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

        [WHLSL] Make the destructor of VariableDeclaration non-virtual
        https://bugs.webkit.org/show_bug.cgi?id=199460

        Reviewed by Myles C. Maxfield.

        Three steps:
        - Remove WHLSL::AST::Value, inlining it into its children (it is trivial, it just has one field m_origin with a getter and nothing else)
        - Mark WHLSL::AST::VariableDeclaration final
        - Now that it inherits from nothing and nothing can inherit from it, there is no reason for it to have any virtual method, including its destructor.

        This not only saves 8 bytes from every variable declaration (for the virtual table pointer), it also should make destructing the AST at the end of compilation a bit faster by removing the virtual destructor call.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::Expression):
        (WebCore::WHLSL::AST::Expression::origin const):
        * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
        (WebCore::WHLSL::AST::Statement::Statement):
        (WebCore::WHLSL::AST::Statement::origin const):
        * Modules/webgpu/WHLSL/AST/WHLSLValue.h: Removed.
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * WebCore.xcodeproj/project.pbxproj:

2019-07-03  Sihui Liu  <sihui_liu@apple.com>

        Only allow fetching and removing session credentials from WebsiteDataStore
        https://bugs.webkit.org/show_bug.cgi?id=199385

        Reviewed by Alex Christensen.

        Fetch and remove only session credentials from NSURLCredentialStorage.

        Modified existing API tests: WKWebsiteDataStore.FetchPersistentCredentials

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::originsWithCredentials const):
        (WebCore::CredentialStorage::originsWithSessionCredentials):
        (WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
        (WebCore::CredentialStorage::clearSessionCredentials):
        * platform/network/CredentialStorage.h:
        * platform/network/mac/CredentialStorageMac.mm:
        (WebCore::CredentialStorage::originsWithSessionCredentials):
        (WebCore::CredentialStorage::removeSessionCredentialsWithOrigins):
        (WebCore::CredentialStorage::clearSessionCredentials):
        (WebCore::CredentialStorage::originsWithPersistentCredentials): Deleted.

2019-07-03  Said Abou-Hallawa  <sabouhallawa@apple.com>

        The destructor of CSSAnimationControllerPrivate must explicitly clear the composite animations
        https://bugs.webkit.org/show_bug.cgi?id=199415

        Reviewed by Simon Fraser.

        After the destructor of CSSAnimationControllerPrivate exists, the non
        static members are deleted. When the HashMap m_compositeAnimations is
        deleted, its entries are deleted. The destructor of CompositeAnimation
        calls the method CSSAnimationControllerPrivate::animationWillBeRemoved()
        back through its back reference m_animationController. The non static
        members of CSSAnimationControllerPrivate are being deleted and it is
        incorrect to try to use any of these members after exiting the destructor.

        We need to explicitly clear the composite animations before exiting the 
        destructor of CSSAnimationControllerPrivate.

        * page/animation/CSSAnimationController.cpp:
        (WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):

2019-07-03  Jer Noble  <jer.noble@apple.com>

        HTMLMediaElement can hold onto display sleep assertion while process is suspended.
        https://bugs.webkit.org/show_bug.cgi?id=199471
        <rdar://problem/52124320>

        If the WebContent process is suspended before HTMLMediaElement gets a callback telling it
        that the MediaPlayer has stopped playing, the SleepDisabler may stay set (and hold a display
        or system sleep assertion) for the entire duration the process is suspended, causing excess
        power drain.

        Add a PlatformMediaSessionClient method (and an implementation in HTMLMediaElement) which will
        be called during the preperation for process suspension, and in this callback, clear the
        SleepDisabler token.

        Reviewed by Eric Carlson.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::shouldDisableSleep const):
        (WebCore::HTMLMediaElement::processIsSuspendedChanged):
        * html/HTMLMediaElement.h:
        * platform/audio/PlatformMediaSession.h:
        (WebCore::PlatformMediaSessionClient::processIsSuspendedChanged):
        * platform/audio/PlatformMediaSessionManager.cpp:
        (WebCore::PlatformMediaSessionManager::processWillSuspend):
        (WebCore::PlatformMediaSessionManager::processDidResume):
        * platform/audio/PlatformMediaSessionManager.h:
        (WebCore::PlatformMediaSessionManager::processIsSuspended const):

2019-07-03  Jonathan Bedard  <jbedard@apple.com>

        [Catalina] Enable WebKit build
        https://bugs.webkit.org/show_bug.cgi?id=199209

        Reviewed by Darin Adler.

        No new tests, Catalina test expectations will be migrated in the near future.

        * WebCorePrefix.h: Exclude the header which declares SecTrustedApplicationCreateFromPath unavailable on Mac.
        * crypto/mac/SerializedCryptoKeyWrapMac.mm: Ensure that we define SecTrustedApplicationCreateFromPath
        before other headers declare it unavailable on Mac.

2019-07-02  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Standard library is too big to directly include in WebCore
        https://bugs.webkit.org/show_bug.cgi?id=198186
        <rdar://problem/51288898>

        Reviewed by Saam Barati.

        This patch adds almost the entire remainder of the standard library. There are a few
        pieces missing:
        - step() because of https://bugs.webkit.org/show_bug.cgi?id=199289
        - sign() also because of https://bugs.webkit.org/show_bug.cgi?id=199289
        - faceforward() because it calls sign()
        - Some of the more rarely-used texturing functions (e.g. Gather()) https://bugs.webkit.org/show_bug.cgi?id=195813
        - RWTextures https://bugs.webkit.org/show_bug.cgi?id=198985

        There were two problems with adding so many standard library functions:
        - We didn't want to increase the WebCore binary size that much
        - Compiling all the functions at runtime took 7 seconds, which is much too long

        This patch addresses the first problem by gzipping the standard library before including it in the binary.
        At runtime, we use libcompression to unzip it.

        To address the second problem, we did some analysis and found that 14% of that 7 seconds was simply
        destroying all the AST nodes. Even if we eliminated all processing of the AST, simply having the AST
        of the entire standard library built and destroyed would still be too slow. Therefore, this patch limits
        which parts of the standard library get parsed in the first place. All the functions in the standard library
        file are sorted by name, and each group of functions with the same name are preceeded by a comment of the
        form /* Functions named xyz */. At build time, a Python script looks for all these comments, and builds a
        map from function name to character offset inside the file where those functions begin. At run time, we
        parse the user program first, look for all function calls within it, and look up those function call names
        in the map to see which part of the standard library holds those functions. We then parse just that part.
        Because the standard library can call other functions in the standard library, we do this in a loop until
        we have exhausted all the functions.

        Covered by existing tests.

        * DerivedSources-input.xcfilelist:
        * DerivedSources-output.xcfilelist:
        * DerivedSources.make: gzip the standard library, and add a build step to generate the offset map.
        * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
        (WebCore::WHLSL::AST::CallExpression::setOverloads):
        (WebCore::WHLSL::AST::CallExpression::function): Every caller of this ASSERT()s the result. Might as well
        move the ASSERT() into the function.
        (WebCore::WHLSL::AST::CallExpression::setFunction):
        * Modules/webgpu/WHLSL/Cocoa/WHLSLStandardLibraryUtilities.cpp: Added.
        (WebCore::WHLSL::decompressStandardLibrary): Use libcompression. This is why this file is in a Cocoa/
        subfolder, and is listed in SourcesCocoa.txt instead of Sources.txt.
        (WebCore::WHLSL::decompressAndDecodeStandardLibrary):
        (WebCore::WHLSL::NameFinder::takeFunctionNames):
        (WebCore::WHLSL::includeStandardLibrary): Include only the bits of the standard library which are relevant,
        as described above.
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Only emit MSL code for functions which are actually
        reached. The MSL compiler is a significant amount of our compile time, so reducing the size of the emitted
        program can significantly improve compile times.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::sharedMetalFunctions):
        (WebCore::WHLSL::Metal::metalFunctions):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        - Change how load() and store() are written. We need explicit functions because we have explicit atomic
          types, which HLSL doesn't have. load() and store() aren't present in HLSL.
        - Delete f16tof32 because they're probably not important and are not obvious how to implement. We can re-add
          them again later if necessary.
        - Various fixes to make us generate the correct MSL code for each standard library function.
        * Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py: Added. Build the function map as described
        above.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveByInstantiation): Previously, the standard library included an operator== for two
        pointers. However, that function should be generated by the compiler instead. This fixes the bug in the
        compiler which allows the compiler to correctly generate the right function. This also prompted me to file
        https://bugs.webkit.org/show_bug.cgi?id=199335
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp: Update to the new function() signature.
        * Modules/webgpu/WHLSL/WHLSLLexer.h: Add a new position() method to the lexer. This isn't actually used
        in this patch, but it's useful when doing some analysis during parsing. 
        (WebCore::WHLSL::Lexer::Lexer):
        (WebCore::WHLSL::Lexer::consumeToken):
        (WebCore::WHLSL::Lexer::peek const):
        (WebCore::WHLSL::Lexer::peekFurther const):
        (WebCore::WHLSL::Lexer::position const):
        (WebCore::WHLSL::Lexer::state const):
        (WebCore::WHLSL::Lexer::setState):
        (WebCore::WHLSL::Lexer::isFullyConsumed const): Fixes a bug where isFullyConsumed() might return true even
        when there is a token in the ring buffer.
        (WebCore::WHLSL::Lexer::peek): Deleted.
        (WebCore::WHLSL::Lexer::peekFurther): Deleted.
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit): Drive-by partial fix of https://bugs.webkit.org/show_bug.cgi?id=199347
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: Call includeStandardLibrary().
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryFunctionMap.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp.
        * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp.
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:

2019-07-03  Jer Noble  <jer.noble@apple.com>

        Exception thrown from -[AVSampleBufferRenderSynchronizer addRenderer:], not a valid renderer.
        https://bugs.webkit.org/show_bug.cgi?id=199419
        <rdar://problem/52141139>

        Reviewed by Eric Carlson.

        Sometimes, -[AVSampleBufferDisplayLayer init] will return nil. When that happens, passing a nil
        pointer to -addRenderer: will throw an exception.

        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):

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

        [WHLSL] "Semantic" should be held by a unique_ptr, not an Optional
        https://bugs.webkit.org/show_bug.cgi?id=199462

        Reviewed by Myles C. Maxfield.

        Most StructureElement, FunctionDeclaration and (especially) VariableDeclaration don't have a 'Semantic' field.
        Using an Optional<Semantic> to represent this is a major memory waste, as Semantic is 56 bytes, so Optional<Semantic> is 64 bytes!
        Putting one level of indirection through a unique_ptr thus saves 56 bytes for each VariableDeclaration (and FunctionDeclaration and StructureElement) that does not have a Semantic,
        at the low cost of one pointer dereference when accessing the field for those that have one.

        This patch also reorders the fields of FunctionDefinition to save another 8 bytes.

        No new tests as there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
        (WebCore::WHLSL::AST::FunctionDeclaration::semantic):
        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        (WebCore::WHLSL::AST::StructureElement::StructureElement):
        (WebCore::WHLSL::AST::StructureElement::semantic):
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        (WebCore::WHLSL::AST::VariableDeclaration::VariableDeclaration):
        (WebCore::WHLSL::AST::VariableDeclaration::semantic):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
        (WebCore::WHLSL::Gatherer::visit):
        (WebCore::WHLSL::gatherEntryPointItems):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseSemantic):
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::preserveVariableLifetimes):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):

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

        [WHLSL] WHLSL::AST::Node is useless
        https://bugs.webkit.org/show_bug.cgi?id=199391

        Reviewed by Dean Jackson.

        It has no member, no non-trivial method, and we never access an AST node completely generically.
        So WHLSL::AST::Node can be removed, as a first step towards removing the virtual table pointer from most AST nodes (and avoiding a virtual destructor call at the end of the compiler).

        No new test because there is no functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLAST.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h:
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h:
        * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLReplaceWith.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNode.h.
        (WebCore::WHLSL::AST::replaceWith):
        * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
        * Modules/webgpu/WHLSL/AST/WHLSLType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLValue.h:
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        * Modules/webgpu/WHLSL/WHLSLParser.h:
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        * WebCore.xcodeproj/project.pbxproj:

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

        Strengthen updating/removing of registrations from the database
        https://bugs.webkit.org/show_bug.cgi?id=199450
        rdar://problem/51891395

        Reviewed by Chris Dumez.

        SWServerWorker is ref counted and has a ref to its SWServer.
        There is thus a possibility for SWServerWorker to live longer than its SWServer.
        To mitigate this, have SWServerWorker use a WeakPtr<SWServer> and
        check whether SWServer is null when receiving messages from WebProcess.
        Make also sure that RegistrationStore updated registration map does not get corrupted by checking
        the registration keys explicitly.

        Covered by existing tests.

        * workers/service/ServiceWorkerRegistrationKey.h:
        (WebCore::ServiceWorkerRegistrationKey::operator!= const):
        (WebCore::ServiceWorkerRegistrationKey::isEmpty const):
        * workers/service/server/RegistrationStore.cpp:
        (WebCore::RegistrationStore::updateRegistration):
        (WebCore::RegistrationStore::removeRegistration):
        (WebCore::RegistrationStore::addRegistrationFromDatabase):
        * workers/service/server/RegistrationStore.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::workerByID const):
        (WebCore::SWServer::removeRegistration):
        * workers/service/server/SWServer.h:
        * workers/service/server/SWServerWorker.cpp:
        (WebCore::SWServerWorker::SWServerWorker):
        (WebCore::m_scriptResourceMap):
        (WebCore::SWServerWorker::contextData const):
        (WebCore::SWServerWorker::terminate):
        (WebCore::SWServerWorker::scriptContextFailedToStart):
        (WebCore::SWServerWorker::scriptContextStarted):
        (WebCore::SWServerWorker::didFinishInstall):
        (WebCore::SWServerWorker::didFinishActivation):
        (WebCore::SWServerWorker::contextTerminated):
        (WebCore::SWServerWorker::findClientByIdentifier const):
        (WebCore::SWServerWorker::matchAll):
        (WebCore::SWServerWorker::userAgent const):
        (WebCore::SWServerWorker::claim):
        (WebCore::SWServerWorker::skipWaiting):
        (WebCore::SWServerWorker::setHasPendingEvents):
        (WebCore::SWServerWorker::setState):
        * workers/service/server/SWServerWorker.h:
        (WebCore::SWServerWorker::server):

2019-07-03  Sam Weinig  <weinig@apple.com>

        Adopt simple structured bindings in more places
        https://bugs.webkit.org/show_bug.cgi?id=199247

        Reviewed by Alex Christensen.

        Replaces simple uses of std::tie() with structured bindings. Does not touch
        uses of std::tie() that are not initial declarations, use std::ignore or in
        case where the binding is captured by a lambda, as structured bindings don't
        work for those cases yet.

        * css/StyleResolver.cpp:
        (WebCore::checkForOrientationChange):
        * page/csp/ContentSecurityPolicy.cpp:
        (WebCore::ContentSecurityPolicy::allowInlineScript const):
        (WebCore::ContentSecurityPolicy::allowInlineStyle const):
        * platform/graphics/ComplexTextController.cpp:
        (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
        * platform/graphics/PathUtilities.cpp:
        (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::advanceInternal):
        * platform/graphics/cocoa/FontCacheCoreText.cpp:
        (WebCore::FontCache::createFontPlatformData):
        (WebCore::FontCache::systemFallbackForCharacters):
        (WebCore::FontCache::lastResortFallbackFont):
        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
        * platform/network/SocketStreamHandleImpl.cpp:
        (WebCore::cookieDataForHandshake):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::selectionState):
        (WebCore::createMarkedTextFromSelectionInBox):
        * rendering/svg/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::paintSelectionBackground):
        * style/StyleResolveForDocument.cpp:
        (WebCore::Style::resolveForDocument):
        * svg/animation/SVGSMILElement.cpp:
        (WebCore::SVGSMILElement::constructAttributeName const):

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

        REGRESSION (iOS 13): Tapping an element with a click event handler no longer clears the selection
        https://bugs.webkit.org/show_bug.cgi?id=199430

        Reviewed by Tim Horton.

        After <trac.webkit.org/r245067>, we no longer immediately clear the text selection when recognizing a single tap
        in WKContentView, and instead only clear it out in the case where the single tap didn't result in a click event
        in the web process. This fixed an issue wherein the text selection would be prematurely cleared when tapping,
        but also made it such that tapping on an element with a click event handler would not cause the selection to
        change, even if preventDefault() is not called on mousedown. On web pages that add a click event listener to
        `document.body`, it's nearly impossible to dismiss text selections by tapping elsewhere in the body.

        On macOS, this works because EventHandler::handleMousePressEventSingleClick contains logic to modify the
        selection when handling a mousedown, as a part of default behavior. However, there is platform-specific logic
        added in <trac.webkit.org/r233311> that avoids changing the selection when handling a synthetic mousedown on
        iOS; this is because we defer to the single tap text interaction gesture on iOS, which (among other things)
        provides additional support for moving the selection to word boundaries, instead of the editing position
        directly under the click.

        However, no such platform-specific text interaction single tap gesture exists for non-editable text, so there's
        no reason we need to bail in the case where the root editable element is null. We can fix this bug without
        breaking the fix in r233311 by matching macOS behavior and not bailing via early return in the case where the
        single tap would move selection into non-editable text.

        Tests: editing/selection/ios/clear-selection-after-tapping-on-element-with-click-handler.html
               editing/selection/ios/persist-selection-after-tapping-on-element-with-mousedown-handler.html

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEventSingleClick):

2019-07-03  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r246616.

        Caused http/tests/inspector/network/har/har-page.html to fail
        on Catalina.

        Reverted changeset:

        "Web Inspector: Network: replace CFNetwork SPI with new API
        where able"
        https://bugs.webkit.org/show_bug.cgi?id=198762
        https://trac.webkit.org/changeset/246616

2019-07-03  Andres Gonzalez  <andresg_22@apple.com>

        Safari hanging while loading pages - WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
        https://bugs.webkit.org/show_bug.cgi?id=199434
        <rdar://problem/52475140>

        Reviewed by Chris Fleizach.

        Tests were disabled until underlying bug is fixed.

        Rolling out a workaround for CharacterIterator::advance bug because it
        seems to be causing a hang in Safari.
        * editing/Editing.cpp:
        (WebCore::visiblePositionForIndexUsingCharacterIterator):

2019-07-02  Simon Fraser  <simon.fraser@apple.com>

        REGRESSION (r246723): ScrollingTreeOverflowScrollProxyNode::m_overflowScrollingNodeID is uninitialized sometimes
        https://bugs.webkit.org/show_bug.cgi?id=199432

        Reviewed by Antti Koivisto.
        
        I noticed while debugging rdar://problem/52291642 that m_overflowScrollingNodeID was uninitialized in
        ScrollingTreeOverflowScrollProxyNode. This could lead to the wrong node being found by m_scrollingTree->nodeForID(),
        which could result in type confusion bugs.
        
        This can happen with negative z-order layers when we fail to find their related scrolling tree node
        on the first pass.

        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h:

2019-07-02  Zan Dobersek  <zdobersek@igalia.com>

        FetchResponse::BodyLoader should not be movable
        https://bugs.webkit.org/show_bug.cgi?id=199380

        Reviewed by Youenn Fablet.

        The FetchResponse::BodyLoader class has a FetchLoader member that is
        initialized in the start() method with the reference of the owning
        FetchResponse::BodyLoader object. This reference doesn't change when
        the FetchResponse::BodyLoader object is moved into a different object
        and the FetchLoader unique_ptr along with it, leading to problems when
        that FetchLoader tries to invoke the FetchLoaderClient methods on the
        FetchResponse::BodyLoader object that's been moved from and is possibly
        already destroyed.

        To avoid this, the FetchResponse::BodyLoader has the move constructor
        removed and is now managed through std::unique_ptr instead of Optional,
        ensuring the FetchResponse::BodyLoader object itself isn't moved around.

        * Modules/fetch/FetchResponse.cpp:
        (WebCore::FetchResponse::fetch):
        (WebCore::FetchResponse::BodyLoader::didSucceed):
        (WebCore::FetchResponse::BodyLoader::didFail):
        * Modules/fetch/FetchResponse.h:

2019-07-02  Said Abou-Hallawa  <sabouhallawa@apple.com>

        Assertion fires when animating the 'class' attribute of an SVG element
        https://bugs.webkit.org/show_bug.cgi?id=197372

        Reviewed by Ryosuke Niwa.

        All instances of SVG animated properties have to share a single animVal
        such that once its value is progressed, all the instances will see the
        change. This was not happening for SVGAnimatedPrimitiveProperty. To do
        that we need to:

        -- Introduce the new template class SVGSharedPrimitiveProperty which is
           derived from SVGProperty. This class manages a single primitive value.
        -- Change the type of SVGAnimatedPrimitiveProperty::m_animVal to
           RefPtr<SVGSharedPrimitiveProperty<PropertyType>>. The master property
           creates it and all the instances hold references to the same pointer.
        -- Change the type of SVGAnimatedPrimitiveProperty::m_baseVal to
           Ref<SVGSharedPrimitiveProperty<PropertyType>> for simplicity and get
           rid of SVGAnimatedPrimitiveProperty::m_state.
        -- Override the virtual methods instanceStartAnimation() and
           instanceStopAnimation() of SVGAnimatedPrimitiveProperty.
        -- SVGAnimatedStringAnimator should invalidate the style of the target
           element if attribute name is 'class' and when its animVal changes.

        * WebCore.xcodeproj/project.pbxproj:
        * svg/properties/SVGAnimatedPrimitiveProperty.h:
        (WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
        (WebCore::SVGAnimatedPrimitiveProperty::setBaseValInternal):
        (WebCore::SVGAnimatedPrimitiveProperty::baseVal const):
        (WebCore::SVGAnimatedPrimitiveProperty::setAnimVal):
        (WebCore::SVGAnimatedPrimitiveProperty::animVal const):
        (WebCore::SVGAnimatedPrimitiveProperty::animVal):
        (WebCore::SVGAnimatedPrimitiveProperty::currentValue const):
        (WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty):
        (WebCore::SVGAnimatedPrimitiveProperty::ensureAnimVal):
        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
        * svg/properties/SVGAttributeAnimator.cpp:
        (WebCore::SVGAttributeAnimator::invalidateStyle):
        (WebCore::SVGAttributeAnimator::applyAnimatedStylePropertyChange):
        (WebCore::SVGAttributeAnimator::removeAnimatedStyleProperty):
        * svg/properties/SVGAttributeAnimator.h:
        * svg/properties/SVGSharedPrimitiveProperty.h: Added.
        (WebCore::SVGSharedPrimitiveProperty::create):
        (WebCore::SVGSharedPrimitiveProperty::value const):
        (WebCore::SVGSharedPrimitiveProperty::value):
        (WebCore::SVGSharedPrimitiveProperty::setValue):
        (WebCore::SVGSharedPrimitiveProperty::SVGSharedPrimitiveProperty):

2019-07-02  Andres Gonzalez  <andresg_22@apple.com>

        Enhance support of aria-haspopup per ARIA 1.1 specification.
        https://bugs.webkit.org/show_bug.cgi?id=199216
        <rdar://problem/46221342>

        Reviewed by Chris Fleizach.

        Test button-with-aria-haspopup-role.html was expanded to cover testing
        of new functionality.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::popupValue const): replaces hasPopupValue.
        (WebCore::AccessibilityObject::hasPopupValue const): Deleted.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::hasPopup const): method rename.
        * accessibility/atk/WebKitAccessible.cpp:
        (webkitAccessibleGetAttributes): method rename.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityPopupValue]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2019-07-02  Saam Barati  <sbarati@apple.com>

        [WHLSL] Import bitwise bool tests
        https://bugs.webkit.org/show_bug.cgi?id=199093

        Reviewed by Myles C. Maxfield.

        Add standard library functions for:
        - bool bit ops
        - converting from bool to number
        - converting from number to bool

        Test: webgpu/whlsl-bitwise-bool-ops.html

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-07-02  Takashi Komori  <Takashi.Komori@sony.com>

        [Curl] Fix CookieJarCurl::getRawCookie.
        https://bugs.webkit.org/show_bug.cgi?id=199300

        Reviewed by Fujii Hironori.

        On wincairo some cookie information was not displayed in WebInspector's storage tab as
        CookieJarCurl::getRawCookies was calling CookieJarDB::searchCookies with wrong arguments.
        This patch fixes it.

        Test: http/tests/inspector/page/get-cookies.html

        * platform/network/curl/CookieJarCurl.cpp:
        (WebCore::CookieJarCurl::getRawCookies const):

2019-07-02  Robin Morisset  <rmorisset@apple.com>

        [WHLSL] the initializer in VariableDeclaration should be a std::unique_ptr, not Optional<UniqueRef<..>>
        https://bugs.webkit.org/show_bug.cgi?id=199389

        Reviewed by Sam Weinig.

        Optional<UniqueRef<..>> is not only semantically weird (UniqueRef is basically a unique_ptr that promises not to be null), but also inefficient, wasting 8 bytes for the boolean in Optional.
        It is a pattern that appears throughout the AST. In this patch I start by removing it in a fairly simple spot: the initializer for VariableDeclaration.

        No test because there is no intended functional change.

        * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
        (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        (WebCore::WHLSL::AST::VariableDeclaration::VariableDeclaration):
        (WebCore::WHLSL::AST::VariableDeclaration::initializer):
        (WebCore::WHLSL::AST::VariableDeclaration::takeInitializer):
        (WebCore::WHLSL::AST::VariableDeclaration::setInitializer):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
        (WebCore::WHLSL::AutoInitialize::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
        (WebCore::WHLSL::resolveWithOperatorLength):
        (WebCore::WHLSL::resolveWithReferenceComparator):
        * Modules/webgpu/WHLSL/WHLSLParser.cpp:
        (WebCore::WHLSL::Parser::parseParameter):
        (WebCore::WHLSL::Parser::parseVariableDeclaration):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        (WebCore::WHLSL::synthesizeArrayOperatorLength):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::synthesizeConstructors):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
        (WebCore::WHLSL::synthesizeEnumerationFunctions):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):

2019-07-02  Jer Noble  <jer.noble@apple.com>

        Pipe suport for 'cenc' init data type into CDMFairPlayStreaming
        https://bugs.webkit.org/show_bug.cgi?id=199381

        Reviewed by Eric Carlson.

        Expose the parsing of 'cenc' init data from InitDataRegistry, so it can be used in the
        evaluation steps inside CDMFairPlayStreaming.

        + Add a new method, extractPsshBoxesFromCenc() which returns an optional array of
          unique_ptrs to different types of ISOPSSHBoxes.
        + Add a peekScheme() method to ISOPSSHBox so that we can create the correct subclass
          of ISOPSSHBox from the above method.
        + Remove an extra definition of fairPlaySystemID() from CDMFairPlayStreaming.
        + Add 'cenc' to the list of supported types in CDMPrivateFairPlayStreaming::vaildInitDataTypes().
        + Add support for 'cenc' in CDMPrivateFairPlayStreaming::supportsInitData().
        + Format the 'cenc' init data as an encodec-JSON structure for AVContentKeySession.
        + Update the ISOFairPlayStreamingKeyRequestInfoBox to be a ISOFullBox.
        + Update the box name of ISOFairPlayStreamingInitDataBox.

        * Modules/encryptedmedia/InitDataRegistry.cpp:
        (WebCore::InitDataRegistry::extractPsshBoxesFromCenc):
        (WebCore::InitDataRegistry::extractKeyIDsCenc):
        (WebCore::InitDataRegistry::sanitizeCenc):
        (WebCore::InitDataRegistry::cencName):
        (WebCore::InitDataRegistry::keyidsName):
        (WebCore::InitDataRegistry::webmName):
        (WebCore::extractKeyIDsCenc): Deleted.
        (WebCore::sanitizeCenc): Deleted.
        * Modules/encryptedmedia/InitDataRegistry.h:
        (WebCore::SourceBuffer::changeType):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::validInitDataTypes):
        (WebCore::CDMPrivateFairPlayStreaming::supportsInitData const):
        (WebCore::CDMPrivateFairPlayStreaming::fairPlaySystemID): Deleted.
        * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
        * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:
        (isType):
        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
        * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
        (WebCore::ISOProtectionSystemSpecificHeaderBox::peekSystemID):
        * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h:

2019-07-02  Daniel Bates  <dabates@apple.com>

        [iOS] Cannot tab cycle through credit card fields on antonsvpatisserie.com checkout page
        https://bugs.webkit.org/show_bug.cgi?id=196053
        <rdar://problem/49093034>

        Reviewed by Wenson Hsieh.

        Remove the iOS override for isKeyboardFocusable() so that the focus controller allows
        iframes to be keyboard focusable.

        Tests: fast/events/ios/tab-cycle.html
               fast/events/ios/tab-into-text-field-inside-iframe.html

        * html/HTMLIFrameElement.h:

2019-07-02  Daniel Bates  <dabates@apple.com>

        Left and right option key has Unidentified key identifier
        https://bugs.webkit.org/show_bug.cgi?id=199392
        <rdar://problem/52497604>

        Reviewed by Wenson Hsieh.

        Fix up switch case for left Option key and add a case statement for the right Option key.

        * platform/ios/PlatformEventFactoryIOS.mm:
        (WebCore::codeForKeyEvent):

2019-07-02  Antti Koivisto  <antti@apple.com>

        Crash when adding inline stylesheet to shadow tree in document with null base URL
        https://bugs.webkit.org/show_bug.cgi?id=199400

        Reviewed by Zalan Bujtas.

        We compute CSSParserContextHash for the inline stylesheet cache but that hits a nullptr crash
        if the document happens to have null base URL (which is uncommon but possible).

        Test: fast/shadow-dom/stylesheet-in-shadow-without-base-url-crash.html

        * css/parser/CSSParserContext.h:
        (WebCore::CSSParserContextHash::hash):

        Null check the base URL (like other strings), it is a valid case.

2019-07-02  Devin Rousso  <drousso@apple.com>

        Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side
        https://bugs.webkit.org/show_bug.cgi?id=198956

        Reviewed by Matt Baker.

        * inspector/InspectorFrontendClient.h:

        * inspector/InspectorFrontendClientLocal.h:
        * inspector/InspectorFrontendClientLocal.cpp:
        (WebCore::InspectorFrontendClientLocal::Settings::deleteProperty): Added.
        (WebCore::InspectorFrontendClientLocal::resetWindowState): Added.

        * inspector/InspectorFrontendHost.idl:
        * inspector/InspectorFrontendHost.h:
        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::reset): Added.

2019-07-01  Zalan Bujtas  <zalan@apple.com>

        [Text autosizing] [iPadOS] AutosizeStatus::idempotentTextSize returns the computed font size in certain cases.
        https://bugs.webkit.org/show_bug.cgi?id=199382
        <rdar://problem/52483097>

        Reviewed by Wenson Hsieh.

        Adjust the font size on the style only when the autosized value is different from the computed value. 

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

2019-07-01  Chris Dumez  <cdumez@apple.com>

        It should not be possible to trigger a load while in the middle of restoring a page in PageCache
        https://bugs.webkit.org/show_bug.cgi?id=199190
        <rdar://problem/52114552>

        Reviewed by Brady Eidson.

        Test: http/tests/security/navigate-when-restoring-cached-page.html

        * history/CachedFrame.cpp:
        (WebCore::CachedFrame::open):
        Stop attaching the cached document before calling FrameLoader::open() given that the previous document
        is still attached to the frame at this point. This avoids having 2 documents attached to the same frame
        during a short period of time.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::open):
        We now attach the cached document to the frame *after* calling FrameLoader::clear(), which means that
        the previous document now has been detached from this frame.

        (WebCore::FrameLoader::detachChildren):
        As per the HTML specification [1], an attempt to navigate should fail if the prompt to unload algorithm
        is being run for the active document of browsingContext. Note that the "prompt to unload" algorithm [2]
        includes firing the 'unload' event in the current document and in all the documents in the subframes.
        As a result, FrameLoader::detachChildren() is the right prevent such navigations. We were actually trying
        to do this via the SubframeLoadingDisabler stack variable inside detachChildren(). The issue is that this
        only prevents navigation in the subframes (i.e. <iframe> elements), not the main frame. As a result,
        script would be able to navigate the top-frame even though detachChildren() is being called on the top
        frame. To address the issue, I now create a NavigationDisabler variable in the scope of detachChildren()
        when detachChildren() is called on the top frame. NavigationDisabler prevents all navigations within the
        page, including navigations on the main/top frame.

        [1] https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate
        [2] https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document

2019-07-01  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r246844.

        Broke 12 tests in imported/w3c/web-platform-
        tests/pointerevents/

        Reverted changeset:

        "[Pointer Events] Respect pointer capture when dispatching
        mouse boundary events and updating :hover"
        https://bugs.webkit.org/show_bug.cgi?id=198999
        https://trac.webkit.org/changeset/246844

2019-07-01  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r246849.

        12 tests broken in r246844 require this to be rolled out.

        Reverted changeset:

        "[Pointer Events] Respect pointer capture when dispatching
        mouse boundary events and updating :hover"
        https://bugs.webkit.org/show_bug.cgi?id=198999
        https://trac.webkit.org/changeset/246849

2019-07-01  Alex Christensen  <achristensen@webkit.org>

        Null check provisionalItem in FrameLoader::continueLoadAfterNavigationPolicy
        https://bugs.webkit.org/show_bug.cgi?id=199327
        <rdar://problem/48262384>

        Reviewed by Darin Adler.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        Sometimes provisionalItem is null.  Let's not crash.

2019-07-01  Truitt Savell  <tsavell@apple.com>

        Unreviewed, rolling out r246958.

        Broke inspector/dom/getAccessibilityPropertiesForNode.html

        Reverted changeset:

        "Enhance support of aria-haspopup per ARIA 1.1 specification."
        https://bugs.webkit.org/show_bug.cgi?id=199216
        https://trac.webkit.org/changeset/246958

2019-07-01  Brady Eidson  <beidson@apple.com>

        More judiciously handle clearing/creation of DOMWindows for new Documents.
        <rdar://problem/51665406> and https://bugs.webkit.org/show_bug.cgi?id=198786

        Reviewed by Chris Dumez.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::executeIfJavaScriptURL):

        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::replaceDocumentWithResultOfExecutingJavascriptURL): Rename for clarity.
        (WebCore::DocumentWriter::begin): Handle DOMWindow taking/creation inside FrameLoader::clear via a lambda. 
        (WebCore::DocumentWriter::replaceDocument): Deleted.
        * loader/DocumentWriter.h:

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::clear): Take a "handleDOMWindowCreation" lambda to run after clearing the previous document.
        * loader/FrameLoader.h:

2019-07-01  Zalan Bujtas  <zalan@apple.com>

        [iPadOS] Tapping on the bottom part of youtube video behaves as if controls were visible
        https://bugs.webkit.org/show_bug.cgi?id=199349
        <rdar://problem/51955744>

        Reviewed by Simon Fraser.

        Synthetic click event should not be dispatched to a node that is initially hidden (by opacity: 0) and becomes visible by the touchStart event.
        While this behaves different from macOS where opacity: 0; content is "clickable", it impoves usability on certain sites like YouTube.com. 

        Test: fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition2.html

        * dom/Node.cpp:
        (WebCore::Node::defaultEventHandler):
        * page/ios/ContentChangeObserver.cpp:
        (WebCore::ContentChangeObserver::isConsideredHidden):
        (WebCore::ContentChangeObserver::reset):
        (WebCore::isConsideredHidden): Deleted.
        * page/ios/ContentChangeObserver.h:
        (WebCore::ContentChangeObserver::setHiddenTouchTarget):
        (WebCore::ContentChangeObserver::resetHiddenTouchTarget):
        (WebCore::ContentChangeObserver::hiddenTouchTarget const):

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

        [FTW] Build WebCore
        https://bugs.webkit.org/show_bug.cgi?id=199199

        Reviewed by Don Olmstead.

        Make some minor corrections needed to get FTW WebCore to build and link.

        * PlatformFTW.cmake: Added.
        * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
        (WebCore::GlyphPage::fill):
        * platform/graphics/win/GraphicsContextDirect2D.cpp:
        (WebCore::GraphicsContext::setURLForRect):
        * platform/graphics/win/PatternDirect2D.cpp:
        * platform/graphics/win/SimpleFontDataDirect2D.cpp:
        * platform/image-decoders/ScalableImageDecoder.cpp:
        (WebCore::ScalableImageDecoder::setTargetContext): Added stub.
        * platform/image-decoders/ScalableImageDecoder.h:
        * platform/network/curl/CookieJarDB.cpp:
        (WebCore::CookieJarDB::hasCookies):
        (WebCore::CookieJarDB::canAcceptCookie):

2019-07-01  Wenson Hsieh  <wenson_hsieh@apple.com>

        iOS: REGRESSION(async scroll): Caret doesn't scroll when scrolling textarea
        https://bugs.webkit.org/show_bug.cgi?id=198217
        <rdar://problem/51097296>

        Reviewed by Simon Fraser.

        Add a ScrollingLayerPositionAction argument to ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling, and
        avoid bailing early in the case where ScrollingLayerPositionAction::Set is used. See the WebKit ChangeLog for
        more detail.

        Test: editing/selection/ios/update-selection-after-overflow-scroll.html

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling):
        * page/scrolling/ScrollingTreeScrollingNode.h:

2019-07-01  Antti Koivisto  <antti@apple.com>

        REGRESSION(r240047): Overflow scrollers on WK1 fail to update their content size when it changes
        https://bugs.webkit.org/show_bug.cgi?id=199360
        <rdar://problem/51643386>

        Reviewed by Simon Fraser.

        r240047 replaced didCommitChangesForLayer() mechanism by a more narrow didChangePlatformLayerForLayer.
        Unfortunately on WK1 we relied on scroll layers being invalidated after every size (and scrollbar) change.
        Without this invalidation we don't call WebChromeClientIOS::addOrUpdateScrollingLayer and the UIKit delegate
        that resizes the UIScrollView content.

        Fix by removing the scroll layer invalidation mechanism from LegacyWebKitScrollingLayerCoordinator completely and instead
        simply update all scroll layers after commit. The UIKit delegate doesn't do any significant work if nothing changes,
        this was not a very meaninful optimization.

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

        Update all scroll layers after flush (similar to viewport constrained layers).

        (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
        (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
        (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
        (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
        (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate): Deleted.
        (WebCore::LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-07-01  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Cannot play Bert's Bytes radio stream from http://radio.dos.nl/
        https://bugs.webkit.org/show_bug.cgi?id=198376

        Reviewed by Xabier Rodriguez-Calvar.

        The delayed startup was due to a mix of buffering feedback
        messages not handled correctly by the player. We were handling
        download and streaming buffering metrics without distinction.
        Range requests (used for seeking) were also triggering on-disk
        buffering in some cases. The buffering percentage estimation based
        on network read position was not working either because uint64_t
        division doesn't return a floating point value.

        No new tests, existing media tests cover this patch.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
        (WebCore::MediaPlayerPrivateGStreamer::play):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
        (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus):
        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
        (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
        (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
        (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag):
        (WebCore::MediaPlayerPrivateGStreamer::setPreload):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webkitWebSrcReset):
        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

2019-07-01  Miguel Gomez  <magomez@igalia.com>

        REGRESSION(r246963) GTK's debug build is broken
        https://bugs.webkit.org/show_bug.cgi?id=199358

        Reviewed by Michael Catanzaro.

        Add traits to be able to downcast AnimatedBackingStoreClient.

        * platform/graphics/nicosia/NicosiaAnimatedBackingStoreClient.h:
        (Nicosia::AnimatedBackingStoreClient::AnimatedBackingStoreClient):
        (Nicosia::AnimatedBackingStoreClient::type const):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):

2019-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix GTK build with GSTREAMER_GL disabled after r246710

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

2019-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>

        WebSockets: add support for sending blob messages when using web sockets platform APIs
        https://bugs.webkit.org/show_bug.cgi?id=199189

        Reviewed by Youenn Fablet.

        * Headers.cmake: Add missing headers.

2019-07-01  Miguel Gomez  <magomez@igalia.com>

        [WPE][GTK] Content disappearing when using CSS transforms
        https://bugs.webkit.org/show_bug.cgi?id=181757

        Reviewed by Žan Doberšek.

        During each layer flush, create an AnimatedBackingStoreClient instance for each layer that
        has a backingStore and is to be animated, and send that client to the appropriate
        TextureMapperLayer on the compositor thread. During each frame rendering, the client will
        use the future layer position (currently 50ms in the future) to check whether new tiles are
        required to keep the animation ongoing, and notify the appropriate CoordinatedGraphicsLayer so
        it can perform a layer flush and provide new tiles.

        * platform/TextureMapper.cmake:
        * platform/graphics/nicosia/NicosiaAnimatedBackingStoreClient.h: Added.
        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
        (Nicosia::CompositionLayer::flushState):
        * platform/graphics/texmap/TextureMapperAnimation.cpp:
        (WebCore::TextureMapperAnimation::applyKeepingInternalState):
        (WebCore::TextureMapperAnimations::applyKeepingInternalState):
        * platform/graphics/texmap/TextureMapperAnimation.h:
        * platform/graphics/texmap/TextureMapperLayer.cpp:
        (WebCore::TextureMapperLayer::computeTransformsRecursive):
        (WebCore::TextureMapperLayer::setAnimatedBackingStoreClient):
        (WebCore::TextureMapperLayer::syncAnimations):
        * platform/graphics/texmap/TextureMapperLayer.h:
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
        (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
        (WebCore::clampToContentsRectIfRectIsInfinite):
        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
        (WebCore::CoordinatedGraphicsLayer::requestBackingStoreUpdate):
        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

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

        Use separate variables for moving and stationary scrolling relationships in RemoteLayerTreeNode
        https://bugs.webkit.org/show_bug.cgi?id=199348

        Reviewed by Darin Adler.

        * page/scrolling/ScrollingStateStickyNode.cpp:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitTreeState):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::activeOverflowScrollProxyNodes):
        (WebCore::ScrollingTree::activePositionedNodes):
        (WebCore::ScrollingTree::nodesWithRelatedOverflow): Deleted.

        Use separate sets for overflow proxies and positioned nodes.
        Use Refs to nodes instead of ids to simplify client code. This doesn't affect lifetimes, these sets are cleared
        at the beginning of each commit.

        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):

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

        Enhance support of aria-haspopup per ARIA 1.1 specification.
        https://bugs.webkit.org/show_bug.cgi?id=199216
        <rdar://problem/46221342>

        Reviewed by Chris Fleizach.

        Test button-with-aria-haspopup-role.html was expanded to cover testing
        of new functionality.

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::popupValue const): replaces hasPopupValue.
        (WebCore::AccessibilityObject::hasPopupValue const): Deleted.
        * accessibility/AccessibilityObject.h:
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::hasPopup const): method rename.
        * accessibility/atk/WebKitAccessible.cpp:
        (webkitAccessibleGetAttributes): method rename.
        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityPopupValue]):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

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

        [LFC] Implement Layout::printLayoutTreeForLiveDocuments
        https://bugs.webkit.org/show_bug.cgi?id=199343
        <rdar://problem/52393047>

        Reviewed by Antti Koivisto.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::printLayoutTreeForLiveDocuments):
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        Streamline some string code, focusing on functions that were using substringSharingImpl
        https://bugs.webkit.org/show_bug.cgi?id=198898

        Reviewed by Daniel Bates.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration): Take a StringView
        instead of a String argument for the pseudo-element name. This prevents us from having
        to use substringSharingImpl to strip off leading colons.
        (WebCore::CSSComputedStyleDeclaration::create): Moved this function in here since it's
        no longer being inlined.

        * css/CSSComputedStyleDeclaration.h: Moved the create function to no longer be inlined,
        since it's better to have the constructor be inlined in the create function instead.
        Changed the pseudo-element name argument to be a StringView rather than a String.
        Also initialize m_refCount in the class definition.

        * css/CSSSelector.cpp:
        (WebCore::CSSSelector::parsePseudoElementType): Take a StringView instead of a String.
        * css/CSSSelector.h: Updated for the above change.

        * css/SelectorPseudoTypeMap.h: Change both parse functions to take StringView. Before
        one took a StringImpl and the other used const StringView&, which is not as good as
        StringView.

        * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Use StringView, not
        const StringView&.

        * css/makeSelectorPseudoElementsMap.py: Use StringView rather than StringImpl.

        * css/parser/CSSParserImpl.cpp:
        (WebCore::CSSParserImpl::parsePageSelector): Use a StringView for the pseudo-element
        name. It was already computed as a StringView, but the old code converted it to
        an AtomicString.

        * css/parser/CSSParserSelector.cpp:
        (WebCore::CSSParserSelector::parsePagePseudoSelector): Take a StringView, and
        return a std::unique_ptr.
        (WebCore::CSSParserSelector::parsePseudoElementSelector): Renamed to not mention
        StringView in function name. Take a StringView, not a StringView&. Do the lowercasing
        inside this function rather than having it be a caller responsibility. Don't convert
        from a StringView to an AtomicString before starting to parse; only do it in the
        "unknown/custom" case. Return a std::unique_ptr.
        (WebCore::CSSParserSelector::parsePseudoClassSelector): Ditto.
        * css/parser/CSSParserSelector.h: Make the three parse functions all take a StringView
        and all return a std::unique_ptr. They were already creating objects, but before
        callers just had to know to adopt.
        * css/parser/CSSSelectorParser.cpp:
        (WebCore::CSSSelectorParser::consumePseudo): Updated to use improved parse
        functions above.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::getMatchedCSSRules const): Updated to use the new
        parsePseudoElementType above and use StringView::substring instead of
        String::substringSharingImpl.

        * platform/Length.cpp:
        (WebCore::newCoordsArray): Local string that is "spacified" can't have any non-Latin-1
        characters, so use LChar instead of UChar.

        * rendering/RenderText.cpp:
        (WebCore::convertNoBreakSpaceToSpace): Renamed for clarity. Also use constexpr
        instead of inline since this is a pure function.
        (WebCore::capitalize): Tighten up logic a bit.

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

        Remove a PLATFORM(IOS_FAMILY) related to repaint offsets in composited scrolling layers
        https://bugs.webkit.org/show_bug.cgi?id=199342

        Reviewed by Zalan Bujtas.

        Code in RenderObject::shouldApplyCompositedContainerScrollsForRepaint() adds VisibleRectContextOption::ApplyCompositedContainerScrolls
        only for iOS, and RenderLayerBacking::setContentsNeedDisplayInRect() subtracts out scroll position for only iOS,
        so remove this iOS-specific code.

        Blame for this code mentions touch event regions, so I tested these but they use absoluteBoundingBoxRect()
        which doesn't hit this code. Still, I added a layout test for touch regions inside scrolled overflow.

        Existing tests exist for repaint inside scrolled overflow.

        Test: fast/events/touch/ios/touch-event-regions/scrolled-overflow.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::shouldApplyCompositedContainerScrollsForRepaint): Deleted.
        (WebCore::RenderObject::visibleRectContextForRepaint): Deleted.
        * rendering/RenderObject.h:
        (WebCore::RenderObject::visibleRectContextForRepaint):

2019-06-28  Tim Horton  <timothy_horton@apple.com>

        iOS WebKit2 find-in-page indicator doesn't move with 'overflow: scroll'
        https://bugs.webkit.org/show_bug.cgi?id=175032
        <rdar://problem/29346482>

        Reviewed by Wenson Hsieh.

        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectionBounds const):
        (WebCore::FrameSelection::revealSelection):
        * editing/FrameSelection.h:
        Make selectionBounds' clipToVisibleContent param an enum class.

        * page/TextIndicator.cpp:
        (WebCore::initializeIndicator):
        Save the un-clipped selection rect; otherwise we'll frequently save 0, 0
        here when finding a match that is off-screen.

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

        [Text autosizing][iPadOS] bing.com is hard to read even with boosted text because of the line height
        https://bugs.webkit.org/show_bug.cgi?id=199318
        <rdar://problem/51826096>

        Reviewed by Wenson Hsieh.

        Initial implementation of line height boosting on iPadOs. It enlarges line height in certain cases to improve readability when the text content feels too dense.
        It kicks in only for relatively small text (12px) where it slightly (1.25x) changes the line height to widen the gap between lines.

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

2019-06-28  Alex Christensen  <achristensen@webkit.org>

        Make getHostnamesWithCookies more robust
        https://bugs.webkit.org/show_bug.cgi?id=199334
        <rdar://problem/51860593>

        Reviewed by Brent Fulgham.

        Crash logs suggest either httpCookies is returning a nil cookie or a cookie without a domain.
        This should not happen, but if it does we shouldn't crash.

        * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
        (WebCore::NetworkStorageSession::getHostnamesWithCookies):

2019-06-28  chris fleizach  <cfleizach@apple.com>

        AX: Both convertToNSArray() functions in WebAccessibilityObjectWrapperBase.mm leak every NSMutableArray returned
        https://bugs.webkit.org/show_bug.cgi?id=199306

        Reviewed by David Kilzer.

        Stop leaking every instance of convertToNSArray and return an autoreleased version.
        Remove unneeded casts.

        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
        (-[WebAccessibilityObjectWrapper accessibilityFindMatchingObjects:]):
        * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
        (convertToNSArray):
        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
        (-[WebAccessibilityObjectWrapper childrenVectorArray]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

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

        Followup to r246931
        https://bugs.webkit.org/show_bug.cgi?id=199331

        Reviewed by Tim Horton.

        Extend the site-specific quirk added in r246931 to *.sharepoint.com, so that it fixes Word for enterprise
        customers as well.

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

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

        Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel.
        https://bugs.webkit.org/show_bug.cgi?id=199336
        rdar://problem/52348938

        Reviewed by Tim Horton.

        * css/StyleColor.h:
        * dom/Document.cpp:
        (WebCore::Document::useElevatedUserInterfaceLevel const):
        (WebCore::Document::styleColorOptions const):
        (WebCore::Document::useInactiveAppearance const): Deleted.
        * dom/Document.h:
        * page/Page.cpp:
        (WebCore::Page::effectiveAppearanceDidChange):
        * page/Page.h:
        (WebCore::Page::useElevatedUserInterfaceLevel const):
        (WebCore::Page::useInactiveAppearance const): Deleted.
        * platform/ios/LocalCurrentTraitCollection.h:
        (WebCore::LocalCurrentTraitCollection::usingElevatedUserInterfaceLevel const):
        (WebCore::LocalCurrentTraitCollection::usingBaseLevelAppearance const): Deleted.
        * platform/ios/LocalCurrentTraitCollection.mm:
        (WebCore::LocalCurrentTraitCollection::LocalCurrentTraitCollection):
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::systemColor const):
        * testing/InternalSettings.cpp:
        (WebCore::InternalSettings::setUseDarkAppearanceInternal):

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

        REGRESSION (r239984): pages with custom scrollbars also show normal scrollbars
        https://bugs.webkit.org/show_bug.cgi?id=199321
        <rdar://problem/52308095>

        Reviewed by Timothy Hatcher.

        Revert the part of r239984 that made isCustomScrollbar() virtual, since theme().registerScrollbar()
        calls it from the base class constructor.

        I wasn't able to make a test that tests rendering of overlay scrollbars (webkit.org/b/199323).

        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::Scrollbar):
        * platform/Scrollbar.h:
        (WebCore::Scrollbar::isCustomScrollbar const):
        * rendering/RenderScrollbar.cpp:
        (WebCore::RenderScrollbar::RenderScrollbar):
        * rendering/RenderScrollbar.h:

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

        Need a way for SPI clients to know when to avoid resizing to accommodate for the input view bounds
        https://bugs.webkit.org/show_bug.cgi?id=199331
        <rdar://problem/52116170>

        Reviewed by Tim Horton.

        Add a new quirk to avoid resizing the web view when input view bounds change.

        * page/Quirks.cpp:
        (WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
        * page/Quirks.h:

2019-06-28  Konstantin Tokarev  <annulen@yandex.ru>

        Remove traces of ENABLE_ICONDATABASE remaining after its removal in 219733
        https://bugs.webkit.org/show_bug.cgi?id=199317

        Reviewed by Michael Catanzaro.

        While IconDatabase and all code using it was removed,
        ENABLE_ICONDATABASE still exists as build option and C++ macro.

        * Configurations/FeatureDefines.xcconfig:
        * Resources/urlIcon.png: Removed file which was only used in
        IconDatabase.cpp.

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

        [Win] unresolved external symbol "JSC::JSObject::didBecomePrototype(void)" referenced in function "JSC::Structure::create(...)"
        https://bugs.webkit.org/show_bug.cgi?id=199312

        Reviewed by Keith Miller.

        WinCairo port, clang-cl Release builds reported a following linkage error:

        > WebCore.lib(UnifiedSource-4babe430-10.cpp.obj) : error LNK2019: unresolved external symbol "public: void __cdecl JSC::JSObject::didBecomePrototype(void)" (?didBecomePrototype@JSObject@JSC@@QEAAXXZ) referenced in function "public: static class JSC::Structure * __cdecl JSC::Structure::create(class JSC::VM &,class JSC::JSGlobalObject *,class JSC::JSValue,class JSC::TypeInfo const &,struct JSC::ClassInfo const *,unsigned char,unsigned int)" (?create@Structure@JSC@@SAPEAV12@AEAVVM@2@PEAVJSGlobalObject@2@VJSValue@2@AEBVTypeInfo@2@PEBUClassInfo@2@EI@Z)

        No new tests because there is no behavior change.

        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Include <JavaScriptCore/JSCInlines.h>,
        and do not include headers which is included by it.

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

        REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout.
        https://bugs.webkit.org/show_bug.cgi?id=199303
        <rdar://problem/51340927>

        Reviewed by Tim Horton.

        This patch restores the previous behavior (pre r244633) where we intentionally reported stale content size value to
        avoid unstable layout for content like height: 100px.

        * page/FrameView.cpp:
        (WebCore::FrameView::autoSizeIfEnabled):

2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][MediaFoundation] Stop using soft linking for Media Foundation
        https://bugs.webkit.org/show_bug.cgi?id=198783
        <rdar://problem/52301843>

        Unreviewed compilation warning fix. clang-cl reports:

        ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp(526,10): warning: address of function 'MFCreateTopology' will always evaluate to 'true' [-Wpointer-bool-conversion]
            if (!MFCreateTopology)
                ~^~~~~~~~~~~~~~~~
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource): Removed the pointer check of MFCreateTopology.

2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][MediaFoundation] Stop using soft linking for Media Foundation
        https://bugs.webkit.org/show_bug.cgi?id=198783

        Reviewed by Alex Christensen.

        WinCairo is supporting Windows 7 or newer. It doesn't need soft
        linking anymore.

        No new tests because there is no behavior change.

        * PlatformWinCairo.cmake: Added libraries to WebCore_LIBRARIES.
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::mimeTypeCache):
        (WebCore::MediaPlayerPrivateMediaFoundation::setRate):
        (WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes):
        (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
        (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
        (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
        (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
        (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
        (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
        (WebCore::MediaPlayerPrivateMediaFoundation::updateReadyState):
        (WebCore::MediaPlayerPrivateMediaFoundation::videoDisplay):
        (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
        (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setFrameRate):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::initializeD3D):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DSample):

2019-06-27  Basuke Suzuki  <Basuke.Suzuki@sony.com>

         Fix build error on WebCore when disabling ENABLE_INDEXED_DATABASE.
        https://bugs.webkit.org/show_bug.cgi?id=199286

         Unreviewed build fix.

         * testing/Internals.cpp: Make method conditional.
         * testing/Internals.h: Ditto.
         * testing/Internals.idl: Ditto.

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

        Fix crash in ScrollingStateNode::insertChild()
        https://bugs.webkit.org/show_bug.cgi?id=199297
        rdar://problem/49415136

        Reviewed by Tim Horton.

        Crash data suggest that 'parent' can be deleted in ScrollingStateTree::insertNode(). To avoid this,
        have ScrollingStateTree::m_stateNodeMap store RefPts, and do the same for ScrollingTree::m_nodeMap.

        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::ScrollingStateNode): The relaxAdoptionRequirement() is required
        to avoid ASSERT(!m_adoptionIsRequired) when the node is added to the tree in its constructor.
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::unparentNode):
        (WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode):
        (WebCore::ScrollingStateTree::detachAndDestroySubtree):
        (WebCore::ScrollingStateTree::stateNodeForID const):
        * page/scrolling/ScrollingStateTree.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::updateTreeFromStateNode):
        * page/scrolling/ScrollingTree.h:

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

        REGRESSION (r246869): ASSERTION FAILED: !renderer().hasRepaintLayoutRects() || renderer().repaintLayoutRects().m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint())
        https://bugs.webkit.org/show_bug.cgi?id=199274

        Reviewed by Zalan Bujtas.

        When layer backing sharing changes, we need to clear cached repaint rects, since they
        painting root changes.

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

2019-06-27  Beth Dakin  <bdakin@apple.com>

        Upstream use of MACCATALYST
        https://bugs.webkit.org/show_bug.cgi?id=199245
        rdar://problem/51687723

        Reviewed by Tim Horton.

        * Configurations/Base.xcconfig:
        * Configurations/FeatureDefines.xcconfig:
        * Configurations/SDKVariant.xcconfig:
        * Configurations/WebCore.xcconfig:
        * Modules/geolocation/ios/GeolocationPositionIOS.mm:
        (WebCore::GeolocationPosition::GeolocationPosition):
        * editing/cocoa/DictionaryLookup.mm:
        (-[WebRevealHighlight drawHighlightContentForItem:context:]):
        (WebCore::showPopupOrCreateAnimationController):
        * editing/cocoa/WebContentReaderCocoa.mm:
        * page/Navigator.h:
        * page/SettingsBase.cpp:
        (WebCore::SettingsBase::defaultContentChangeObserverEnabled):
        * page/cocoa/MemoryReleaseCocoa.mm:
        (WebCore::platformReleaseMemory):
        * platform/audio/ios/AudioSessionIOS.mm:
        (WebCore::AudioSession::setCategory):
        (WebCore::AudioSession::routingContextUID const):
        * platform/cocoa/ParentalControlsContentFilter.mm:
        (WebCore::canHandleResponse):
        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
        (WebCore::AVAssetMIMETypeCache::isAvailable const):
        * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm:
        (WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
        * platform/graphics/cv/ImageTransferSessionVT.h:
        * platform/graphics/cv/ImageTransferSessionVT.mm:
        (WebCore::cvPixelFormatOpenGLKey):
        (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
        * platform/ios/PasteboardIOS.mm:
        (WebCore::Pasteboard::readPasteboardWebContentDataForType):
        (WebCore::Pasteboard::supportedWebContentPasteboardTypes):
        * platform/ios/PlatformPasteboardIOS.mm:
        (WebCore::registerItemToPasteboard):
        (WebCore::PlatformPasteboard::write):
        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
        (-[WebAVPlayerLayer setVideoGravity:]):
        * platform/ios/WebItemProviderPasteboard.mm:
        (-[WebItemProviderRegistrationInfoList itemProvider]):
        (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
        (-[WebItemProviderPasteboard numberOfFiles]):
        * platform/network/cf/CertificateInfoCFNet.cpp:
        (WebCore::CertificateInfo::summaryInfo const):

2019-06-27  Brent Fulgham  <bfulgham@apple.com>

        Correct document lifecycle while processing commands
        https://bugs.webkit.org/show_bug.cgi?id=199146
        <rdar://problem/52047462>

        Reviewed by Darin Adler.

        Protect the document while commands are being processed since script may run
        during the style resolution. We should protect against this.

        * dom/Document.cpp:
        (WebCore::command):

2019-06-27  Jon Davis  <jond@apple.com>

        Add status for Web Bluetooth Scanning standards specification.
        https://bugs.webkit.org/show_bug.cgi?id=199235

        Reviewed by Joseph Pecoraro.

        * features.json:

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

        Make WEBGPU enabled only on Mojave and later.

        Rubber-stamped by Myles C. Maxfield.

        We're going to look into re-enabling it on High Sierra in:
        https://bugs.webkit.org/show_bug.cgi?id=199275

        * Configurations/FeatureDefines.xcconfig:

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

        REGRESSION (touch-action): Can't scroll vertically when touching a horizontally-scrollable element on instagram.com
        https://bugs.webkit.org/show_bug.cgi?id=199268
        <rdar://problem/52246473>

        Reviewed by Antoine Quint.

        Test: pointerevents/ios/touch-action-region-manipulation.html

        Having a restrictive touch-action value like 'pan-y' on on element and then having a descendant with
        'touch-action: manipulation' computes to 'none'.

        * css/StyleResolver.cpp:
        (WebCore::computeEffectiveTouchActions):

        For value 'manipulation' return the current effective value, similar to the reverse case above.
        Set intersection should only be computed out of restrictive values (pan-x/pan-y/pinch-zoom/none).

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

        [SOUP] Use libsoup WebSockets API
        https://bugs.webkit.org/show_bug.cgi?id=199151

        Reviewed by Michael Catanzaro.

        Use createWebSocketChannel() from the provider also for libsoup when WEBKIT_USE_SOUP_WEBSOCKETS env var is set.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create):

2019-06-27  Devin Rousso  <drousso@apple.com>

        Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString
        https://bugs.webkit.org/show_bug.cgi?id=199252

        Reviewed by Joseph Pecoraro.

        Parse the arguments passed to `console.count` and `console.countReset` before sending it to
        the `ConsoleClient` so that an error can be thrown if the first argument doesn't `toString`
        nicely (e.g. without throwing an error).

        Generate call stacks for `console.countReset` to match other `console` methods. Also do this
        for `console.time`, `console.timeLog`, and `console.timeEnd`. Limit the call stack to only
        have the top frame, so no unnecessary/extra data is sent to the frontend (right now, only
        the call location is displayed).

        Rename `title` to `label` for `console.time`, `console.timeLog`, and `console.timeEnd` to
        better match the spec.

        Updated existing LayoutTests:
         - inspector/console/console-count.html
         - inspector/console/console-api.html

        Also covered by existing WPT tests.

        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::consoleCount):
        (WebCore::InspectorInstrumentation::consoleCountReset):
        (WebCore::InspectorInstrumentation::startConsoleTiming):
        (WebCore::InspectorInstrumentation::logConsoleTiming):
        (WebCore::InspectorInstrumentation::stopConsoleTiming):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::consoleCountImpl):
        (WebCore::InspectorInstrumentation::consoleCountResetImpl):
        (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
        (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):

        * page/PageConsoleClient.h:
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::count):
        (WebCore::PageConsoleClient::countReset):
        (WebCore::PageConsoleClient::time):
        (WebCore::PageConsoleClient::timeLog):
        (WebCore::PageConsoleClient::timeEnd):

        * workers/WorkerConsoleClient.h:
        * workers/WorkerConsoleClient.cpp:
        (WebCore::WorkerConsoleClient::count):
        (WebCore::WorkerConsoleClient::countReset):
        (WebCore::WorkerConsoleClient::time):
        (WebCore::WorkerConsoleClient::timeLog):
        (WebCore::WorkerConsoleClient::timeEnd):

        * worklets/WorkletConsoleClient.h:
        * worklets/WorkletConsoleClient.cpp:
        (WebCore::WorkletConsoleClient::count):
        (WebCore::WorkletConsoleClient::countReset):

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

        [WHLSL] Implement arrays and MakeArrayReference
        https://bugs.webkit.org/show_bug.cgi?id=198414

        Reviewed by Myles C. Maxfield.

        This patch implements WHLSL arrays. The main implementation detail is that
        arrays get compiled to use Metal's array type. To make everything work, this
        patch also fixes a few bugs:
        - The checker now allows "operator.length" to be called on arrays. Prior to
        this patch, it was just allowed on array references.
        
        - The preserve variable lifetimes pass now looks at MakeArrayReference nodes.
        Prior to this patch, it just looked at MakePointerExpression.
        
        - We were producing the wrong type for ander arguments for indexed accesses
        on array types. We were saying the argument that was produced was a reference
        to an array instead of an array reference to the element type.
        
        - The trie we compose for the reverse type hierarchy was inserting elements
        into the wrong "children" vector. We were always inserting things into the
        top level vector. This is wrong when we have a nesting of types > 1.
        
        I also found a bug with having arrays of pointers when writing this patch.
        Work on this will take place in a follow up: https://bugs.webkit.org/show_bug.cgi?id=199197

        Tests: webgpu/whlsl-huge-array.html
               webgpu/whlsl-make-array-reference.html
               webgpu/whlsl-simple-arrays.html
               webgpu/whlsl-two-dimensional-array.html

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::insert):
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveByInstantiation):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::EscapedVariableCollector::escapeVariableUse):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::wrapAnderCallArgument):
        (WebCore::WHLSL::anderCallArgument):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>

        [CMake] Bump cmake_minimum_required version to 3.10
        https://bugs.webkit.org/show_bug.cgi?id=199181

        Reviewed by Don Olmstead.

        No new tests because there is no behavior change.

        * CMakeLists.txt:

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

        [Async overflow scrolling] Fix missing or misplaced content inside overflow:scroll
        https://bugs.webkit.org/show_bug.cgi?id=199253
        rdar://problem/51855156, rdar://problem/51934514

        Reviewed by Zalan Bujtas.

        This patch fixes a couple of related issues triggered by failing to composite layers inside non-stacking-context
        overflow scroll.

        First, we relied on overlap testing to composite position:relative layers inside overflow:scroll, but this only
        worked when they came later in z-order, so didn't work for layers with negative z-index.
        RenderLayerCompositor::requiresCompositingForIndirectReason() was intended to trigger compositing in such cases,
        but it only did so for position:absolute inside stacking-context scroller, because
        isNonScrolledLayerInsideScrolledCompositedAncestor() tested ancestorMovedByScroller && !layerMovedByScroller.

        I fixed this by sharing code between the three places that ask whether compositing crosses a containing-block
        boundary to call a single function, RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor(),
        that returns a ScrollPositioningBehavior. We now do compositing for both "moves" and "stationary" behaviors (but
        not "none"), ensuring that position:relative inside non-stacking scroller is always composited.

        However, this would trigger compositing on layers that should be using backing sharing; if they were outside the
        visible part of the scroller, the overlap code would not trigger, but the
        "IndirectCompositingReason::OverflowScrollPositioning" code would. This is undesirable; any layer that can use
        backing sharing should, because that's fewer composited layers, so smaller layer trees and less backing store.
        To fix this, I moved the backing-sharing check before the overlap check in
        RenderLayerCompositor::computeCompositingRequirements().

        The "layer.setHasCompositingDescendant(currentState.subtreeIsCompositing)" line was in the wrong place,
        triggering assertions on some content; "subtreeIsCompositing" only refers to child layers, so this bit needs to
        be set right after we've traversed the z-order lists.

        Tests: compositing/scrolling/async-overflow-scrolling/hidden-relative-layer-content-in-scroller.html
               compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller.html
               compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
        (WebCore::isScrolledByOverflowScrollLayer):
        (WebCore::enclosingCompositedScrollingLayer):
        (WebCore::RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor):
        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
        (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor): Deleted.
        (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary): Deleted.
        * rendering/RenderLayerCompositor.h:

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

        ReplacementFragment should not have script observable side effects
        https://bugs.webkit.org/show_bug.cgi?id=199147

        Reviewed by Wenson Hsieh.

        Fixed the bug that ReplacementFragment has script observable side effects.

        Use a brand new document for sanitization where the script is disabled for test rendering,
        and remove style and script elements as well as event handlers before the test rendering
        and the actual pasting.

        Test: editing/pasteboard/paste-contents-with-side-effects.html

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::document): Deleted.
        (WebCore::ReplacementFragment::ReplacementFragment): Use createPageForSanitizingWebContent
        to create our own document for test rendering. We need to copy over the computed style
        from the root editable element (editing host) to respect whitespace treatment, etc...
        (WebCore::ReplacementFragment::removeContentsWithSideEffects): Moved from removeHeadContents.
        Now removes event handlers and JavaScript URLs.
        (WebCore::ReplacementFragment::insertFragmentForTestRendering): Renamed variable names.
        (WebCore::ReplaceSelectionCommand::willApplyCommand): Create the plain text and HTML markup
        for beforeinput and input events before ReplacementFragment removes contents with side effects.
        (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): The removal of head elements
        is now done in ReplacementFragment's constructor.

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

        [Payment Request] Set state to Closed when show() is called during an active session
        https://bugs.webkit.org/show_bug.cgi?id=199239

        Reviewed by Alex Christensen.

        According to step 7 of https://w3c.github.io/payment-request/#show-method (as of 26 June
        2019), when another payment request is showing, calling show() should set the [[state]]
        internal slot to Closed in addition to rejecting the show promise with an AbortError. WebKit
        was only doing the latter. Let's do both.

        Test: http/tests/paymentrequest/payment-is-showing.https.html

        * Modules/paymentrequest/PaymentRequest.cpp:
        (WebCore::PaymentRequest::show):

2019-06-26  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Implement console.countReset
        https://bugs.webkit.org/show_bug.cgi?id=199200

        Reviewed by Devin Rousso.

        Updated existing tests.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::consoleCountImpl):
        (WebCore::InspectorInstrumentation::consoleCountResetImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::consoleCountReset):
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::countReset):
        * page/PageConsoleClient.h:
        * workers/WorkerConsoleClient.cpp:
        (WebCore::WorkerConsoleClient::countReset):
        * workers/WorkerConsoleClient.h:
        * worklets/WorkletConsoleClient.cpp:
        (WebCore::WorkletConsoleClient::countReset):
        * worklets/WorkletConsoleClient.h:

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999
        <rdar://problem/51979477>

        Reviewed by Dean Jackson.

        Make sure we don't return early prior to setting the flag that prevents re-entrancy, or else we would never
        enter this function again. No new tests, this was caught because Pointer Events WPT tests on iOS tests regressed.

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

2019-06-26  Myles C. Maxfield  <mmaxfield@apple.com>

        REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
        https://bugs.webkit.org/show_bug.cgi?id=199012

        Reviewed by Saam Barati.

        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
        (WebCore::isAcceptableDevice):
        (WebCore::GPUDevice::tryCreate):

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

        Incorrect clippping with overflow:scroll inside oveflow:hidden with border-radius
        https://bugs.webkit.org/show_bug.cgi?id=199135
        rdar://problem/51882383

        Reviewed by Zalan Bujtas.
        
        In some cases the geometry of the shape mask layer added to m_childContainmentLayer, for
        border-radius, was incorrect. GraphicsLayerCA::updateClippingStrategy() treated
        the rounded rect as if it were in renderer coordinates, but to match the other geometry
        on GraphicsLayer, it should in GraphicsLayer coordinates, so we need to offset by
        clipLayer->offsetFromRenderer().
        
        In addition, RenderLayerBacking::updateChildClippingStrategy() is called from
        the updateConfiguration(), which is before we've set offsetFromRenderer() on the clipLayer.
        This first call is really to find out whether the platform supports this rounded rect
        as a shape mask.
        
        So we need to call setMasksToBoundsRect() a second time in RenderLayerBacking::updateGeometry()
        after clipLayers's offsetFromRenderer() has been computed.

        Test: compositing/scrolling/async-overflow-scrolling/border-radius-on-scroll-container.html

        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::updateClippingStrategy):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
        (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
        (WebCore::RenderLayerBacking::updateChildClippingStrategy):

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999
        <rdar://problem/51979477>

        Reviewed by Dean Jackson.

        Up until now, we would not account for pointer capture (see ​https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
        mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
        for it when updating :hover styles.

        Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
        that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
        boundary mouse events. Additionally, when calling Document::prepareMouseEvent(), we also use the pointer capture element to
        pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.

        * dom/Document.cpp:
        (WebCore::Document::prepareMouseEvent): When a new event is going to be dispatched, we must run the Process Pending Capture Element
        steps as mandated by the Pointer Events spec. Calling this will dispatch the appropriate pointer capture change events and also
        required boundary events since EventHandler::setCapturingMouseEventsElement() calls into EventHandler::updateMouseEventTargetNode().
        Since this may update the capturing mouse events element, we ensure that we call updateHoverActiveState() with a flag that indicates that.
        Finally, we use the capturing mouse events element instead of the hit-testing element to pass to updateHoverActiveState() to ensure
        that is has :hover styles applied.
        (WebCore::Document::updateHoverActiveState): Account for the new CaptureChange flag to force the invalidation of the :hover and :active
        elements chain at all times when the capturing mouse events element changed.
        * dom/Document.h:
        * dom/PointerEvent.h: Update PointerEvent::createForPointerCapture() to take specific parameters rather than a single PointerEvent to
        set the pointerId, isPrimary and pointerType properties of the generated event. This is required to call processPendingPointerCapture()
        outside of PointerEvent dispatch logic since we now call it from Document::prepareMouseEvent() where we haven't yet generated such an
        event.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::pointerCaptureElementDidChange): When a new pointer capture element is set, call updateMouseEventTargetNode()
        to ensure that boundary events are fired to indicate the pointer capture state change.
        (WebCore::EventHandler::prepareMouseEvent): Keep track of the last PlatformMouseEvent used to prepare a mouse event so that we can use
        it when setCapturingMouseEventsElement() is called.
        * page/EventHandler.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::pointerCaptureElement): Since Document::prepareMouseEvent() needs to know the current pointer capture
        element, add a new public method that indicates the pointer capture element if that element is contained in the provided document. We need
        to provide the document since PointerCaptureController is owned by the Page and may manage several documents.
        (WebCore::PointerCaptureController::dispatchEvent): Only run the Process Pending Capture Element steps when dealing with a touch or pen
        event since those steps are already ran for mouse events in Document::prepareMouseEvent(). Additionally, since the element target is already
        set to be the pointer capture element with the changes made to processPendingPointerCapture(), and because on iOS pointer capture is always
        active, we can remove the code that would retarget the event to the pointer capture element.
        (WebCore::PointerCaptureController::pointerEventWasDispatched):
        (WebCore::PointerCaptureController::cancelPointer):
        (WebCore::PointerCaptureController::processPendingPointerCapture): We now call into EventHandler::setCapturingMouseEventsElement() when the
        capture target element changes. We must be careful to call this method prior to dispatching the "gotpointercapture" event and after dispatching
        the "lostpointercapture" event so that boundary events are fired at the right time.
        * page/PointerCaptureController.h:

2019-06-25  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo] incorrect font height for 'Google Sans Display' font
        https://bugs.webkit.org/show_bug.cgi?id=198909

        Reviewed by Frédéric Wang.

        r191893 changed to use OS/2 typo metrics, but its calculation
        wasn't correct. And, there is no reliable way to get OS/2 table by
        using Windows API. Revert the part of r191893 change at the
        moment.

        * platform/graphics/win/SimpleFontDataCairoWin.cpp:
        (WebCore::Font::platformInit):
        * platform/graphics/win/SimpleFontDataWin.cpp:
        (WebCore::Font::initGDIFont):
        Reverted the part of r191893 change, and added FIXME comments.

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

        Clicking the up/down spin buttons for a number input increments/decrements by 2.
        https://bugs.webkit.org/show_bug.cgi?id=198809

        Reviewed by Tim Horton.

        AppKit no longer registers NSScrollerButtonDelay and NSScrollerButtonPeriod in the base
        NSUserDefaults for an app. This caused our use to always get 0s when setting the click
        and hold timer, causing the value to increment quickly for a single press.

        * platform/mac/ScrollbarThemeMac.h:
        (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Added. Hardcode 500ms.
        (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Added. Hardcode 50ms.
        * platform/mac/ScrollbarThemeMac.mm:
        (WebCore::ScrollbarThemeMac::preferencesChanged): Removed use of old user defaults.
        (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Deleted.
        (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Deleted.

2019-06-25  Keith Miller  <keith_miller@apple.com>

        Unreviewed, windows build fix.

        * bindings/js/JSDOMGlobalObject.h:

2019-06-25  Keith Miller  <keith_miller@apple.com>

        Add didBecomePrototype() calls to global context prototypes
        https://bugs.webkit.org/show_bug.cgi?id=199202

        Reviewed by Mark Lam.

        This fixes some crashes related to asserting that all prototypes
        have been marked as such in JSC from
        https://trac.webkit.org/changeset/246801. It's ok to call
        didBecomePrototype here as we setting up the world state right now
        so we won't be having a bad time.

        We don't automatically call didBecomePrototype() for
        setPrototypeWithoutTransition because existing objects may already
        have this structure so it seems more reasonable to be explicit
        there.

        * bindings/js/JSWindowProxy.cpp:
        (WebCore::JSWindowProxy::setWindow):
        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::initScript):
        * worklets/WorkletScriptController.cpp:
        (WebCore::WorkletScriptController::initScriptWithSubclass):

2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>

        Web Inspector: Implement console.timeLog
        https://bugs.webkit.org/show_bug.cgi?id=199184

        Reviewed by Devin Rousso.

        Updated existing tests.

        * inspector/InspectorInstrumentation.cpp:
        (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::logConsoleTiming):
        * page/PageConsoleClient.cpp:
        (WebCore::PageConsoleClient::timeLog):
        * page/PageConsoleClient.h:
        * workers/WorkerConsoleClient.cpp:
        (WebCore::WorkerConsoleClient::timeLog):
        * workers/WorkerConsoleClient.h:
        * worklets/WorkletConsoleClient.cpp:
        (WebCore::WorkletConsoleClient::timeLog):
        * worklets/WorkletConsoleClient.h:

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

        Add user agent quirk for bankofamerica.com
        https://bugs.webkit.org/show_bug.cgi?id=199154

        Reviewed by Carlos Garcia Campos.

        This suppresses an unsupported browser warning.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresMacintoshPlatform):

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

        Fully rename WebKitGTK+ -> WebKitGTK everywhere
        https://bugs.webkit.org/show_bug.cgi?id=199159

        Reviewed by Carlos Garcia Campos.

        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (webkitAccessibleTextGetStringAtOffset):
        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresMacintoshPlatform):
        * platform/network/soup/NetworkStorageSessionSoup.cpp:
        (WebCore::NetworkStorageSession::saveCredentialToPersistentStorage):
        * rendering/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::adjustTextFieldStyle const):

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

        Introduce LinkLoadParameters
        https://bugs.webkit.org/show_bug.cgi?id=198960

        Reviewed by Frédéric Wang.

        Avoid the long parameters lists in LinkLoader by moving them
        to LinkLoadParameters.

        No new tests because there is no behavior change.

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        * loader/LinkLoader.cpp:
        (WebCore::LinkLoader::loadLinksFromHeader):
        (WebCore::LinkLoader::preconnectIfNeeded):
        (WebCore::LinkLoader::preloadIfNeeded):
        (WebCore::LinkLoader::prefetchIfNeeded):
        (WebCore::LinkLoader::loadLink):
        * loader/LinkLoader.h:

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

        [Text autosizing] [iPadOS] Revise our heuristics to determine idempotent text autosizing candidates
        https://bugs.webkit.org/show_bug.cgi?id=198763
        <rdar://problem/51826266>

        Reviewed by Simon Fraser.

        This patch adjusts existing text autosizing heuristics, based on a survey of text on websites in the Alexa top
        500 that shrink down to fit the viewport when requesting the desktop version of the site. The new heuristic is
        derived from training decision trees against the dataset obtained from this survey, and balances false positives
        (cases where layout is broken due to autosizing) against overall accuracy (measured using cross-validation).

        See below for more details. Additionally, please refer to the link in the radar for more details, as well as
        resources used to generate, validate, and analyze these decision trees.

        Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
        * rendering/style/RenderStyle.cpp:
        (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):

        Rename AutosizeStatus::shouldSkipSubtree to RenderStyle::isIdempotentTextAutosizingCandidate. We relocate this
        logic to RenderStyle, such that we're able to ask the element's RenderStyle questions when determining whether
        the element should be autosized.

        Of course, this patch additionally revamps the heuristic used to determine whether it is safe to autosize an
        element. Our current heuristic in trunk simply checks for the presence of inline block display, out of flow
        positioning and a fixed height ancestor; if any of these conditions are satisfied, we opt the element out of
        text autosizing. This is an excellent strategy for boosting some runs of text while avoiding autosizing in the
        vast majority of cases where increasing font size may lead to layout breakage (e.g. overlapping or clipped text,
        content unexpectedly flowing to the next line, etc.). However, it also avoids boosting font sizes in many
        scenarios where boosting font sizes is desired; for concrete examples, see the (currently 24) radars about small
        font sizes that are duped to <rdar://problem/51826266>.

        To help analyze and identify trends in autosizable and non-autosizable text, we assembled a dataset of elements
        with text from the Alexa top 500 that either: (1) were too small and could be boosted safely, or (2) would break
        layout if boosted. With this labeled dataset, we then trained binary decision trees to classify the data. Each
        decision tree was trained with a number of hyperparameters: namely, maximum depth, minimum leaf size, and the
        amount of bias towards negative samples (i.e. the ratio of the weight of a non-autosizable sample relative to
        the weight of an autosizable sample).

        For each 3-tuple of these hyperparameters (800 in total: max depth between 3 and 10, min leaf size between 1 and
        10 and bias between 1 and 10), for 5000 iterations each, we split the full dataset into a training dataset and
        a cross-validation dataset, trained a decision tree using the training set, and tested against the cross-
        validation set to compute average precision, recall, and overall accuracy for each tuple of hyperparameters.

        The decision tree introduced in this patch was generated using a hand-picked set of hyperparameters (max depth
        10, min leaf size 4, and negative bias 2) to provide a balance between precision scores (limiting layout
        breakage) and recall score (ensuring that small text is mostly autosized), while optimizing for overall
        accuracy. Cross-validation scores predict that the overall accuracy of this classifier is approximately 70%, up
        from the current accuracy in trunk (~53%).

        * rendering/style/RenderStyle.h:

        Grow the width of `autosizeStatus` from 4 to 8 (notably, this does not increase the size of RenderStyle).

        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::updateStatus):
        (WebCore::AutosizeStatus::shouldSkipSubtree const): Deleted.
        * rendering/style/TextSizeAdjustment.h:

        Introduce new text autosizing state flags, and remove some existing ones.

2019-06-24  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r246714.
        https://bugs.webkit.org/show_bug.cgi?id=199179

        revert to do patch in a different way. (Requested by keith_mi_
        on #webkit).

        Reverted changeset:

        "All prototypes should call didBecomePrototype()"
        https://bugs.webkit.org/show_bug.cgi?id=196315
        https://trac.webkit.org/changeset/246714

2019-06-24  Sihui Liu  <sihui_liu@apple.com>

        REGRESSION (r244436): IndexedDB Uint8Array returned as ArrayBuffer
        https://bugs.webkit.org/show_bug.cgi?id=198738
        <rdar://problem/51614053>

        Reviewed by Brady Eidson.

        In InexedDB, two binary keys are the same as long as their data is the same.

        Modified tests: storage/indexeddb/key-type-binary.html
                        storage/indexeddb/key-type-binary-private.html

        * bindings/js/IDBBindingUtilities.cpp:
        (WebCore::injectIDBKeyIntoScriptValue):
        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneDeserializer::readArrayBufferView):

2019-06-24  Sihui Liu  <sihui_liu@apple.com>

        Remove WebSQL quirk for nytimes.com
        https://bugs.webkit.org/show_bug.cgi?id=199175

        Reviewed by Geoffrey Garen.

        Removed unused code.

        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateRuntimeEnableConditionalString):
        * bindings/scripts/IDLAttributes.json:
        * page/Quirks.cpp:
        (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
        (WebCore::Quirks::hasWebSQLSupportQuirk const): Deleted.
        * page/Quirks.h:

2019-06-24  Brady Eidson  <beidson@apple.com>

        Null deref in WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad.
        <rdar://problem/51535942> and https://bugs.webkit.org/show_bug.cgi?id=199123

        Reviewed by Andy Estes.

        * loader/FrameLoaderStateMachine.h:
        (WebCore::FrameLoaderStateMachine::stateForDebugging const):

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

        REGRESSION (r246725 ): Crashes on twitch.tv
        https://bugs.webkit.org/show_bug.cgi?id=199176
        rdar://problem/52071249

        Reviewed by Zalan Bujtas.
        
        With a composited negative z-index child inside a scroller, we can register the overflow scroll
        proxy node before we've traversed the overflow layer, so it that layer hasn't got its OverflowScrollingNode
        yet. Thus, AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes() can be called with an empty vector.
        Avoid crashing when this happens.

        Test: scrollingcoordinator/scrolling-tree/scroller-with-negative-z-child.html

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):

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

        Pages using Google's anti-flicker optimization may take ~5 seconds to do initial paint
        https://bugs.webkit.org/show_bug.cgi?id=199173
        <rdar://problem/45968770>

        Reviewed by Geoffrey Garen.

        Pages using Google's anti-flicker optimization [1] take ~5 seconds to do initial paint when
        analytics.js load is blocked by a content blocker.

        To address the issue, this patch introduces a quirk behind an experimental feature flag that
        calls window.dataLayer.hide.end() on the page when the load of https://www.google-analytics.com/analytics.js
        is blocked by a content blocker. Note that this is more robust than dropping the 'async-hide'
        class from document.documentElement since the class name is customizable by the caller.
        A message is logged in the console when the quirk causes window.dataLayer.hide.end() to get called
        early.

        [1] https://developers.google.com/optimize/

        * contentextensions/ContentExtensionsBackend.cpp:
        (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
        * page/Settings.yaml:

2019-06-24  John Wilander  <wilander@apple.com>

        Remove IsITPFirstPartyWebsiteDataRemovalEnabled as runtime check
        https://bugs.webkit.org/show_bug.cgi?id=199164
        <rdar://problem/52061147>

        Reviewed by Brent Fulgham.

        No new tests. Just a removal of a runtime feature check. The functionality
        already has a layout test.

        We've had this toggle as a safety thing since mid-March. No need for it any longer.

        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::isITPDatabaseEnabled const):
        (WebCore::RuntimeEnabledFeatures::setIsITPFirstPartyWebsiteDataRemovalEnabled): Deleted.
        (WebCore::RuntimeEnabledFeatures::isITPFirstPartyWebsiteDataRemovalEnabled const): Deleted.

2019-06-24  Jer Noble  <jer.noble@apple.com>

        iOS 12.2 Drawing portrait video to canvas is sideways
        https://bugs.webkit.org/show_bug.cgi?id=196772
        <rdar://problem/49781802>

        Reviewed by Eric Carlson.

        Test: media/video-orientation-canvas.html

        Move rotation code into its own ImageRotationSessionVT class for re-use across
        all existing classes with rotation operations. Should slightly increase performance
        for painting rotated media files, as the rotation only occurs once per frame, rather
        than once per drawing operation.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
        (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
        (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
        (WebCore::ImageDecoderAVFObjC::setTrack):
        (WebCore::transformToRotationProperties): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
        * platform/graphics/cv/ImageRotationSessionVT.h: Added.
        (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
        (WebCore::ImageRotationSessionVT::rotationProperties const):
        (WebCore::ImageRotationSessionVT::rotatedSize):
        * platform/graphics/cv/ImageRotationSessionVT.mm: Added.
        (WebCore::transformToRotationProperties):
        (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
        (WebCore::ImageRotationSessionVT::rotate):
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
        (WebCore::rotationToAngle):
        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
        (WebCore::computeRotatedWidthAndHeight): Deleted.

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

        [StyleResolver] Pass RenderStyle& instead of RenderStyle* to updateFont() related functions.
        https://bugs.webkit.org/show_bug.cgi?id=199167
        <rdar://problem/52062669>

        Reviewed by Antti Koivisto.

        It is expected to have a valid RenderStyle object here (and existing code relies on it).

        * css/StyleResolver.cpp:
        (WebCore::checkForOrientationChange):
        (WebCore::StyleResolver::updateFont):
        (WebCore::StyleResolver::checkForTextSizeAdjust):
        (WebCore::StyleResolver::checkForZoomChange):
        (WebCore::StyleResolver::checkForGenericFamilyChange):
        * css/StyleResolver.h:

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

        [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html
        https://bugs.webkit.org/show_bug.cgi?id=197005

        Reviewed by Dean Jackson.

        We were calling processPendingPointerCapture() at the wrong time, calling in after dispatching a PointerEvent rather than before.
        We now do this correctly in the consolidated PointerCaptureController::dispatchEvent() method, which we call for dispatching all
        PointerEvents, save for gotpointercapture and lostpointercapture since these should not yield the processing of the pending pointer
        capture per the spec.

        This uncovered a couple of new issues. First, since we would now call processPendingPointerCapture() and dispatch a lostpointercapture
        event earlier, the alternative lostpointercapture dispatch when an element is removed (which is dispatched asynchronously on the
        document) would be dispatched *after* dispatching the event in processPendingPointerCapture(). We now check in processPendingPointerCapture()
        whether the event target is connected to fix this. This makes sure pointerevent_lostpointercapture_for_disconnected_node.html doesn't regress.

        Finally, we must also call processPendingPointerCapture() when implicitly releasing pointer capture during handling of a "pointerup" event.
        This ensures that pointerevent_releasepointercapture_invalid_pointerid.html doesn't regress.

        As a result of all these changes, we now pass imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html reliably.

        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
        (WebCore::PointerCaptureController::dispatchEvent): We now more closely adhere to the spec when determining what the pointer capture target is by
        only checking for the target override. We can now do this safely since we call processPendingPointerCapture() before and not after event dispatch.
        (WebCore::PointerCaptureController::pointerEventWasDispatched):
        (WebCore::PointerCaptureController::processPendingPointerCapture): Cache the pending target override to make sure that dispatching a "gotpointercapture"
        or "lostpointercapture" event during this function does not alter it until the next call is made when the next event is dispatched.

2019-06-24  Greg Doolittle  <gr3g@apple.com>

        Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
        https://bugs.webkit.org/show_bug.cgi?id=194754

        Reviewed by Chris Fleizach.

        Test: accessibility/img-alt-attribute-unassigned-value.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::computedRoleString const):

2019-06-24  Adrian Perez de Castro  <aperez@igalia.com>

        [WPE][GTK] Fixes for compilation with unified builds disabled
        https://bugs.webkit.org/show_bug.cgi?id=199155

        Reviewed by Michael Catanzaro.

        No new tests needed.

        * rendering/LayerAncestorClippingStack.h: Add missing inclusion of RenderLayer.h

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

        Add user agent quirk for Google Drive
        https://bugs.webkit.org/show_bug.cgi?id=199153

        Reviewed by Carlos Garcia Campos.

        This suppresses an unsupported browser warning.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresMacintoshPlatform):
        (WebCore::urlRequiresLinuxDesktopPlatform):

2019-06-24  Charlie Turner  <cturner@igalia.com>

        [GStreamer][MSE] Pausing video sometimes causes skip to finish
        https://bugs.webkit.org/show_bug.cgi?id=197355

        Reviewed by Philippe Normand.

        Covered by existing tests.

        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
        (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
        Assuming that when m_eosPending is on and we're paused() that the
        network resource is fully loaded and the end is reached is clearly
        wrong. Whether this is now correct is unclear...

2019-06-24  Charlie Turner  <cturner@igalia.com>

        [GStreamer] Volume level sometimes changes inappropriately
        https://bugs.webkit.org/show_bug.cgi?id=197358

        Reviewed by Xabier Rodriguez-Calvar.

        Be consistent with our application of volume scaling. We were
        setting volumes using cubic interpolation in setVolume() and using
        the inverse in volume(); however setting initial volumes was done
        linearly in setStreamVolumeElement, which was causing strange
        jumps in the volume level at non-deterministic times. The fix
        looks to be that we should use linear interpolation consistently,
        since PulseAudio already applies cubic scaling to software
        volumes.

        Covered by existing tests.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::paused const): Bump the
        logging here to LOG level, it's very spammy at DEBUG.
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Switch to
        linear interpolation.
        (WebCore::MediaPlayerPrivateGStreamerBase::volume const): Ditto.
        (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange):
        Ditto.
        (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
        Ditto, and be consistent here with the API, do not set the raw
        volume managed by MediaElement.

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999
        <rdar://problem/51979477>

        Unreviewed.

        Rolling back all changes made for this bug (r246728 + r246716 + r246674) as it regressed one test
        (imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_pointercapture_in_frame.html).

        * dom/Document.cpp:
        (WebCore::Document::prepareMouseEvent):
        (WebCore::Document::updateHoverActiveState):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        (WebCore::EventHandler::setCapturingMouseEventsElement):
        * page/EventHandler.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::releasePointerCapture):
        (WebCore::PointerCaptureController::hasPointerCapture):
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
        (WebCore::PointerCaptureController::dispatchEvent):
        (WebCore::PointerCaptureController::processPendingPointerCapture):
        (WebCore::PointerCaptureController::pointerCaptureElement): Deleted.
        * page/PointerCaptureController.h:
        * rendering/HitTestRequest.h:
        (WebCore::HitTestRequest::includesAllElementsUnderPoint const):
        (WebCore::HitTestRequest::pointerCaptureElementChanged const): Deleted.

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999
        <rdar://problem/52005663>

        Reviewed by Dean Jackson.

        We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events (part 2).

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

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

        [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped
        https://bugs.webkit.org/show_bug.cgi?id=199133
        rdar://problem/43614439

        Reviewed by Antti Koivisto.

        Currently a composited layer with an overflow:scroll ancestor (which is not a paint-order
        ancestor) gets a single "ancestor clip layer" that represents the intersection of all the
        clips provided by its containing-block ancestors with non-visible overflow (both scrolling
        and non-scrolling ones).

        To correctly update clips with async overflow scroll, this single clip layer needs to be
        broken up into multiple clipping ancestors. We need a separate layer, and scrolling tree
        node for each ancestor that is an overflow scroll, and layers that represent non-moving
        clips (i.e. overflow:hidden and 'clip') between them. This patch adds
        LayerAncestorClippingStack to represent this stack of clipping layers. For example with the
        following content:
        
        <div style="overflow:hidden"> <--- A
            <div style="overflow:scroll"> <--- B
                <div style="overflow:hidden"> <--- C
                    <div style="overflow:hidden"> <--- D
                        <div style="overflow:scroll">  <--- E
                            <div style="overflow:hidden"> <--- F
                                <div style="overflow:hidden"> <--- G
                                    <div></div> <--- H
                                <div>
                            <div>
                        <div>
                    <div>
                <div>
            <div>
        <div>
        
        the composited RenderLayer for H owns a LayerAncestorClippingStack with the following contents:
            [clip - A]
            [scroller - B]
            [clip - intersection of C and D]
            [scroller - E]
            [clip - intersection of F and G]

        Each stack entry has a 'masksToBounds' GraphicsLayer for clipping. Entries representing
        overflow:scroll clips have a ScrollingNodeID for their OverflowScrollProxy scrolling tree
        node (which references the actual OverflowScrollingNode). The non-scroller clips in this
        stack are computed unconstrained by the enclosing overflow:scroll.

        When the OverflowScrollingNode is scrolled, the boundsOrigin of related OverflowScrollProxy nodes
        is adjusted to move the descendant layers (other clipping layers, or composited layers).

        OverflowScrollProxy nodes thus take over the role that "Moves" ScrollingTreePositionedNode had.
        With this patch, ScrollingTreePositionedNode are purely for absolute position inside non-containing-block
        stacking context overflow scroll. LayoutConstraints is renamed to AbsolutePositionConstraints accordingly.

        Tests: compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html
               compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html
               compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html
               compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html
               compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html
               compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html
               compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html
               compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html
               compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html
               scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html
               scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setPositionedNodeConstraints):
        (WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry): Deleted.
        * page/scrolling/AsyncScrollingCoordinator.h:
        * page/scrolling/ScrollingConstraints.cpp:
        (WebCore::operator<<):
        * page/scrolling/ScrollingConstraints.h:
        (WebCore::AbsolutePositionConstraints::operator== const):
        (WebCore::AbsolutePositionConstraints::operator!= const):
        (WebCore::LayoutConstraints::operator== const): Deleted.
        (WebCore::LayoutConstraints::operator!= const): Deleted.
        (WebCore::LayoutConstraints::alignmentOffset const): Deleted.
        (WebCore::LayoutConstraints::setAlignmentOffset): Deleted.
        (WebCore::LayoutConstraints::layerPositionAtLastLayout const): Deleted.
        (WebCore::LayoutConstraints::setLayerPositionAtLastLayout): Deleted.
        (WebCore::LayoutConstraints::scrollPositioningBehavior const): Deleted.
        (WebCore::LayoutConstraints::setScrollPositioningBehavior): Deleted.
        * page/scrolling/ScrollingCoordinator.h:
        (WebCore::ScrollingCoordinator::setPositionedNodeConstraints):
        (WebCore::ScrollingCoordinator::setPositionedNodeGeometry): Deleted.
        * page/scrolling/ScrollingStatePositionedNode.cpp:
        (WebCore::ScrollingStatePositionedNode::updateConstraints):
        * page/scrolling/ScrollingStatePositionedNode.h:
        * page/scrolling/ScrollingTree.cpp:
        (WebCore::ScrollingTree::commitTreeState):
        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::nodesWithRelatedOverflow):
        (WebCore::ScrollingTree::positionedNodesWithRelatedOverflow): Deleted.
        * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
        (WebCore::ScrollingTreePositionedNode::scrollPositioningBehavior const): Deleted.
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const):
        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
        * rendering/LayerAncestorClippingStack.cpp: Added.
        (WebCore::LayerAncestorClippingStack::LayerAncestorClippingStack):
        (WebCore::LayerAncestorClippingStack::equalToClipData const):
        (WebCore::LayerAncestorClippingStack::hasAnyScrollingLayers const):
        (WebCore::LayerAncestorClippingStack::clear):
        (WebCore::LayerAncestorClippingStack::detachFromScrollingCoordinator):
        (WebCore::LayerAncestorClippingStack::firstClippingLayer const):
        (WebCore::LayerAncestorClippingStack::lastClippingLayer const):
        (WebCore::LayerAncestorClippingStack::lastOverflowScrollProxyNodeID const):
        (WebCore::LayerAncestorClippingStack::updateScrollingNodeLayers):
        (WebCore::LayerAncestorClippingStack::updateWithClipData):
        (WebCore::operator<<):
        * rendering/LayerAncestorClippingStack.h: Added.
        (WebCore::CompositedClipData::CompositedClipData):
        (WebCore::CompositedClipData::operator== const):
        (WebCore::CompositedClipData::operator!= const):
        (WebCore::LayerAncestorClippingStack::stack):
        (WebCore::LayerAncestorClippingStack::stack const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::~RenderLayerBacking):
        (WebCore::RenderLayerBacking::updateDebugIndicators):
        (WebCore::RenderLayerBacking::destroyGraphicsLayers):
        (WebCore::RenderLayerBacking::updateTransform):
        (WebCore::RenderLayerBacking::updateBlendMode):
        (WebCore::RenderLayerBacking::updateAfterLayout):
        (WebCore::RenderLayerBacking::updateConfiguration):
        (WebCore::computeOffsetFromAncestorGraphicsLayer):
        (WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const):
        (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
        (WebCore::RenderLayerBacking::updateGeometry):
        (WebCore::RenderLayerBacking::updateInternalHierarchy):
        (WebCore::RenderLayerBacking::updateAncestorClippingStack):
        (WebCore::RenderLayerBacking::updateAncestorClipping):
        (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
        (WebCore::RenderLayerBacking::scrollingNodeIDForChildren const):
        (WebCore::RenderLayerBacking::childForSuperlayers const):
        (WebCore::RenderLayerBacking::backingStoreMemoryEstimate const):
        (WebCore::operator<<):
        (WebCore::RenderLayerBacking::updateAncestorClippingLayer): Deleted.
        (WebCore::RenderLayerBacking::coordinatedScrollingRoles const): Deleted.
        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
        (WebCore::RenderLayerCompositor::layerStyleChanged): We need to run the checks for changed
        clipping whether or not this layer has backing, because a non-composited layer with clipping can be
        represented in the clipping stack of some other layer.
        (WebCore::RenderLayerCompositor::clippedByAncestor const):
        (WebCore::RenderLayerCompositor::updateAncestorClippingStack const):
        (WebCore::RenderLayerCompositor::computeAncestorClippingStack const): The output of this function
        is a Vector<CompositedClipData> which represents the ancestor clipping stack, but without the proxy node
        and GraphicsLayer information. It's input to LayerAncestorClippingStack::updateWithClipData() which does
        the merging of old and new states.
        (WebCore::collectRelatedCoordinatedScrollingNodes):
        (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
        (WebCore::scrollCoordinationRoleForNodeType):
        (WebCore::RenderLayerCompositor::attachScrollingNode):
        (WebCore::RenderLayerCompositor::registerScrollingNodeID):
        (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
        (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
        (WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const): Code moved from RenderLayerBacking.
        (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
        (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):
        (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
        * rendering/RenderLayerCompositor.h:
        (WebCore::allScrollCoordinationRoles):

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

        Add OverflowScrollProxyNodes to the scrolling tree
        https://bugs.webkit.org/show_bug.cgi?id=199132

        Reviewed by Antti Koivisto.

        Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
        nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
        but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
        rects for composited layers in non-stacking-context scrollers, and in a future patch will
        replace the functionality of "Moves" positioned nodes.

        An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
        and we use the existing "related overflow nodes" to create the back references in the scrolling tree.

        These nodes are not instantiated yet; a future patch will hook them up.

        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::operator<<):
        * page/scrolling/ScrollingCoordinatorTypes.h:
        * page/scrolling/ScrollingStateNode.h:
        (WebCore::ScrollingStateNode::isOverflowScrollProxyNode const):
        * page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp: Added.
        (WebCore::ScrollingStateOverflowScrollProxyNode::create):
        (WebCore::ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode):
        (WebCore::ScrollingStateOverflowScrollProxyNode::clone):
        (WebCore::ScrollingStateOverflowScrollProxyNode::setOverflowScrollingNode):
        (WebCore::ScrollingStateOverflowScrollProxyNode::dumpProperties const):
        * page/scrolling/ScrollingStateOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
        (WebCore::ScrollingStateOverflowScrollProxyNode::overflowScrollingNode const):
        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::createNode):
        * page/scrolling/ScrollingTreeNode.h:
        (WebCore::ScrollingTreeNode::isOverflowScrollProxyNode const):
        * page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
        (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
        * page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
        (WebCore::ScrollingTreeOverflowScrollProxyNode::overflowScrollingNodeID const):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::layer const):
        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: Added.
        (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::scrollDeltaSinceLastCommit const):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
        (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        * page/scrolling/mac/ScrollingTreeMac.cpp:
        (ScrollingTreeMac::createScrollingTreeNode):
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::scrollCoordinationRoleForNodeType):

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

        [LFC][IFC] Non-baseline aligned inline container should not mutate the baseline
        https://bugs.webkit.org/show_bug.cgi?id=199129
        <rdar://problem/52022533>

        Reviewed by Antti Koivisto.

        Only baseline aligned inline container (<span style="vertical-aligned: baseline">) should adjust line's baseline.
        This patch also fixes m_baselineTop's value when we apply the initial strut.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::isInlineContainerConsideredEmpty):
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):

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

        [LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style.
        https://bugs.webkit.org/show_bug.cgi?id=199127
        <rdar://problem/52017744>

        Reviewed by Antti Koivisto.

        <span style="vertical-align: bottom">bottom aligned text</span>
        The InlineBox wrapper for the "bottom aligned text" content should take the parent span's style.

        * layout/layouttree/LayoutTreeBuilder.cpp:
        (WebCore::Layout::TreeBuilder::createSubTree):

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999
        <rdar://problem/52005663>

        Reviewed by Dean Jackson.

        We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events.

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

2019-06-22  Andres Gonzalez  <andresg_22@apple.com>

        Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link.
        https://bugs.webkit.org/show_bug.cgi?id=199107
        <rdar://problem/43663611>

        Reviewed by Chris Fleizach.

        Tests: accessibility/ios-simulator/button-with-aria-haspopup-role.html
               accessibility/ios-simulator/element-haspopup.html

        If an accessibility object is contained within an <a>, we should check
        the aria-haspopup attribute on the ancestor <a> element. This was done
        before in the iOS WebKit accessibility bunddle override.
        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::hasPopup const):

2019-06-22  Robin Morisset  <rmorisset@apple.com> and Yusuke Suzuki  <ysuzuki@apple.com>

        All prototypes should call didBecomePrototype()
        https://bugs.webkit.org/show_bug.cgi?id=196315

        Reviewed by Saam Barati.

        * bindings/js/JSDOMIterator.h:
        (WebCore::IteratorTraits>::finishCreation):
        * bindings/js/JSDOMWindowProperties.h:
        (WebCore::JSDOMWindowProperties::create): Deleted.
        (WebCore::JSDOMWindowProperties::createStructure): Deleted.
        (WebCore::JSDOMWindowProperties::JSDOMWindowProperties): Deleted.
        * 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/JSTestEnabledForContext.cpp:
        (WebCore::JSTestEnabledForContextPrototype::JSTestEnabledForContextPrototype):
        * 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-06-22  Mike Gorse  <mgorse@suse.com>

        webkitgtk 2.24.2 fails to build w/gstreamer 1.12.5
        https://bugs.webkit.org/show_bug.cgi?id=198080

        Reviewed by Philippe Normand.

        No new tests (build fix only).

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        Move includes of gst/gl/gl.h and epoxy/gl.h into
        MediaPlayerPrivateGStreamerBase.h.

2019-06-21  Sihui Liu  <sihui_liu@apple.com>

        openDatabase should return an empty object when WebSQL is disabled
        https://bugs.webkit.org/show_bug.cgi?id=198805

        Reviewed by Geoffrey Garen.

        Some websites rely on calling openDatabase with null parameters to check for private browsing. To not break 
        those sites, we now expose openDatabase interface even if Web SQL is disabled. When Web SQL is disabled, 
        window.openDatabase returns false, but it is callable and returns empty object.

        Test: WebSQL.OpenDatabaseAlwaysExists

        * Modules/webdatabase/DOMWindowWebDatabase.idl:
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody):
        (WebCore::IDLOperation<JSDOMWindow>::cast):
        (WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
        (WebCore::JSDOMWindow::openDatabase const):

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

        Nullptr crash in DeleteSelectionCommand::handleGeneralDelete
        https://bugs.webkit.org/show_bug.cgi?id=199126

        Reviewed by Wenson Hsieh.

        Added null checks to handleGeneralDelete as well as mergeParagraphs which runs after handleGeneralDelete to be defensive.

        Unfortunately no new tests since there is no reproducible test case.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        (WebCore::DeleteSelectionCommand::mergeParagraphs):

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

        ResourceLoadNotifier should check whether its frame document loader is null
        https://bugs.webkit.org/show_bug.cgi?id=199118

        Reviewed by Geoffrey Garen.

        * loader/ResourceLoadNotifier.cpp:
        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

2019-06-21  Jiewen Tan  <jiewen_tan@apple.com>

        WebPageProxy::loadData should accept ShouldOpenExternalURLsPolicy
        https://bugs.webkit.org/show_bug.cgi?id=199114
        <rdar://problem/51671674>

        Reviewed by Youenn Fablet.

        Covered by new test content within existing tests.

        * loader/FrameLoaderTypes.h:
        Adds an EnumTraits for ShouldOpenExternalURLsPolicy.

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

        [WHLSL] Code that accesses an undefined variable crashes
        https://bugs.webkit.org/show_bug.cgi?id=198775

        Reviewed by Myles C. Maxfield.

        Myles mostly fixed this in r246631 when he made NameResolver propagate
        its error to its parent NameResolver. However, there was still one bug
        where we ended up calling setError twice for an if statement. This patch
        fixes that and adds tests.

        Tests: webgpu/whlsl-use-undefined-variable-2.html
               webgpu/whlsl-use-undefined-variable.html

        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):

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

        Unreviewed, rolling out r246611.

        Introduced a flakey test.

        Reverted changeset:

        "iOS 12.2 Drawing portrait video to canvas is sideways"
        https://bugs.webkit.org/show_bug.cgi?id=196772
        https://trac.webkit.org/changeset/246611

2019-06-21  Tim Horton  <timothy_horton@apple.com>

        Preview of <picture> element doesn't match element bounds
        https://bugs.webkit.org/show_bug.cgi?id=199049
        <rdar://problem/51474402>

        Reviewed by Simon Fraser.

        Test: fast/text-indicator/text-indicator-uses-img-size-inside-picture.html

        * dom/DOMRectReadOnly.idl:
        * dom/Range.cpp:
        (WebCore::Range::absoluteRectsForRangeInText const):
        (WebCore::Range::absoluteTextRects const):
        (WebCore::Range::borderAndTextRects const):
        (WebCore::Range::boundingRect const):
        (WebCore::Range::absoluteBoundingRect const):
        * dom/Range.h:
        (WebCore::Range::absoluteTextRects):
        (WebCore::Range::absoluteBoundingRect):
        (WebCore::Range::borderAndTextRects):
        (WebCore::Range::boundingRect):
        * page/TextIndicator.cpp:
        (WebCore::absoluteBoundingRectForRange):
        (WebCore::estimatedBackgroundColorForRange):
        (WebCore::initializeIndicator):
        * rendering/RenderBlock.h:
        * testing/Internals.cpp:
        (WebCore::Internals::TextIndicatorData::TextIndicatorData):
        (WebCore::Internals::TextIndicatorData::~TextIndicatorData):
        (WebCore::Internals::textIndicatorForRange):
        * testing/Internals.h:
        * testing/Internals.idl:

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

        Safari crashes after ~2028 OfflineAudioContext objects are created (they never get garbage collected, consuming a thread each)
        https://bugs.webkit.org/show_bug.cgi?id=198964
        <rdar://problem/51891520>

        Reviewed by Jer Noble.

        Move from setPendingActivity/unsetPendingActivity to an
        m_pendingActivity member which is easier to manage.

        Keep setting a pending activity for AudioContext at construction time
        but do not do that for Offline contexts.
        Instead, set the pending activity when startRendering is called.
        Unset the pending activity when the rendering activity is finished.

        Make m_audioDecoder a unique pointer so that it can lazily be initialized.
        This removes the burden of creating an audio decoder thread for each context.

        Test: webaudio/offlineaudiocontext-gc.html

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::AudioContext):
        (WebCore::AudioContext::constructCommon):
        (WebCore::AudioContext::clear):
        (WebCore::AudioContext::decodeAudioData):
        (WebCore::AudioContext::startRendering):
        (WebCore::AudioContext::finishedRendering):
        (WebCore::AudioContext::dispatchEvent):
        (WebCore::AudioContext::clearPendingActivity):
        (WebCore::AudioContext::makePendingActivity):
        To keep it consistent with setPendingActivity/unsetPendingActivity, we
        explicitly ref/unref the AudioContext. We should try to remove this ref/unref.
        * Modules/webaudio/AudioContext.h:
        * Modules/webaudio/OfflineAudioDestinationNode.cpp:
        (WebCore::OfflineAudioDestinationNode::startRendering):

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

        Unreviewed, rolling out r246655.

        Introduced a failing test

        Reverted changeset:

        "Web Inspector: AXI: Audit: image label test is throwing
        spurious errors on elements with existing alt attr, but no
        value: <img alt>"
        https://bugs.webkit.org/show_bug.cgi?id=194754
        https://trac.webkit.org/changeset/246655

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

        [WHLSL] read modify write expressions do no work as expected
        https://bugs.webkit.org/show_bug.cgi?id=195864

        Reviewed by Saam Barati.

        Turns out https://bugs.webkit.org/show_bug.cgi?id=199037 already fixed everything.
        This patch just adds a test.

        Test: webgpu/whlsl-read-modify-write.html

        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

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

        [LFC][IFC] Adjust baseline top when the baseline moves.
        https://bugs.webkit.org/show_bug.cgi?id=199091
        <rdar://problem/51966257>

        Reviewed by Antti Koivisto.

        Currently only "text-align: bottom" adjusts the baseline top. This patch fixes the "text-align: baseline" case when
        the growing ascent pushes the baseline top closer to the line top.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):

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

        [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
        https://bugs.webkit.org/show_bug.cgi?id=199100
        <rdar://problem/51973614>

        Reviewed by Antti Koivisto.

        m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::logicalHeight const):

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

        [LFC][IFC] LineBox::Baseline should have a height getter.
        https://bugs.webkit.org/show_bug.cgi?id=199092
        <rdar://problem/51966958>

        Reviewed by Antti Koivisto.

        The baseline height does not need to be a getter on the Line (no one calls it).

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::contentLogicalWidth const):
        (WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted.
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::Baseline::height const):

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

        [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
        https://bugs.webkit.org/show_bug.cgi?id=199094

        Reviewed by Carlos Garcia Campos.

        * accessibility/atk/AXObjectCacheAtk.cpp:
        (WebCore::AXObjectCache::postPlatformNotification):
        * accessibility/atk/WebKitAccessible.cpp:
        (atkRole):
        (setAtkStateSetFromCoreObject):
        (interfaceMaskFromObject):
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
        * accessibility/atk/WebKitAccessibleInterfaceTableCell.h:
        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
        (webkitAccessibleTextGetStringAtOffset):
        (webkitAccessibleTextInterfaceInit):
        * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
        (webkitAccessibleValueInterfaceInit):
        * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
        (WebCore::AudioTrackPrivateGStreamer::kind const):
        * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
        * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
        (WTF::derefGPtr<GstStreamCollection>):
        * platform/graphics/gstreamer/GRefPtrGStreamer.h:
        * platform/graphics/gstreamer/GStreamerCommon.cpp:
        (WebCore::initializeGStreamerAndRegisterWebKitElements):
        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
        (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
        (WebCore::InbandTextTrackPrivateGStreamer::create):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::load):
        (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
        (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
        (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
        (WebCore::MediaPlayerPrivateGStreamer::supportsType):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
        (WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext):
        (WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):
        (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
        (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
        (WebCore::TrackPrivateBaseGStreamer::disconnect):
        (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
        (WebCore::TrackPrivateBaseGStreamer::stream):
        * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
        (WebCore::VideoTrackPrivateGStreamer::kind const):
        * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::eventTypeForGdkKeyEvent):
        * platform/gtk/PlatformMouseEventGtk.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/gtk/PlatformScreenGtk.cpp:
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):
        (WebCore::screenHasTouchDevice):
        (WebCore::screenIsTouchPrimaryInputDevice):
        (): Deleted.
        (WebCore::isTouchDevice): Deleted.
        (WebCore::deviceAddedCallback): Deleted.
        (WebCore::deviceRemovedCallback): Deleted.
        * platform/gtk/PlatformWheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
        * platform/gtk/RenderThemeGadget.cpp:
        * platform/gtk/RenderThemeGadget.h:
        * platform/gtk/RenderThemeWidget.cpp:
        * platform/gtk/RenderThemeWidget.h:
        * platform/gtk/ScrollbarThemeGtk.cpp:
        (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk):
        (WebCore::ScrollbarThemeGtk::themeChanged):
        (WebCore::ScrollbarThemeGtk::updateThemeProperties):
        (WebCore::ScrollbarThemeGtk::trackRect):
        (WebCore::ScrollbarThemeGtk::forwardButtonRect):
        (WebCore::ScrollbarThemeGtk::paint):
        (WebCore::ScrollbarThemeGtk::scrollbarThickness):
        (WebCore::createStyleContext): Deleted.
        (WebCore::createChildStyleContext): Deleted.
        (WebCore::paintStepper): Deleted.
        (WebCore::adjustRectAccordingToMargin): Deleted.
        * platform/mediastream/gstreamer/GStreamerCapturer.cpp:
        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
        * platform/network/soup/ResourceRequest.h:
        (WebCore::toSoupMessagePriority):
        * platform/network/soup/SoupNetworkSession.cpp:
        (WebCore::SoupNetworkSession::SoupNetworkSession):
        * rendering/RenderThemeGtk.cpp:
        (WebCore::themePartStateFlags):
        (WebCore::paintToggle):
        (WebCore::RenderThemeGtk::paintButton):
        (WebCore::menuListColor):
        (WebCore::RenderThemeGtk::paintMenuList):
        (WebCore::RenderThemeGtk::paintTextField):
        (WebCore::adjustSearchFieldIconStyle):
        (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
        (WebCore::RenderThemeGtk::paintSliderThumb):
        (WebCore::RenderThemeGtk::paintProgressBar):
        (WebCore::RenderThemeGtk::paintInnerSpinButton):
        (WebCore::styleColor):
        (WebCore::RenderThemeGtk::systemColor const):
        (WebCore::RenderThemeGtk::paintMediaButton):
        (WebCore::createStyleContext): Deleted.
        (WebCore::loadThemedIcon): Deleted.
        (WebCore::gtkTextDirection): Deleted.
        (WebCore::gtkIconStateFlags): Deleted.
        (WebCore::adjustRectForFocus): Deleted.
        (WebCore::renderButton): Deleted.
        (WebCore::getIconSizeForPixelSize): Deleted.
        (WebCore::paintIcon): Deleted.
        (WebCore::paintEntryIcon): Deleted.
        (WebCore::centerRectVerticallyInParentInputElement): Deleted.
        (WebCore::spinButtonArrowSize): Deleted.
        (WebCore::paintSpinArrowButton): Deleted.

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

        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
        https://bugs.webkit.org/show_bug.cgi?id=198999

        Reviewed by Dean Jackson.

        Up until now, we would not account for pointer capture (see https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
        mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
        for it when updating :hover styles.

        Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
        that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
        boundary mouse events. Additionally, when calling EventHandler::prepareMouseEvent(), we also use the pointer capture element to
        eventually pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.

        This also means that we need to re-run EventHandler::prepareMouseEvent() during mouse state changes to ensure that the :hover styles
        are applied correctly should the pointer capture element change during dispatch of boundary mouse events.

        * dom/Document.cpp:
        (WebCore::Document::prepareMouseEvent): If there is one, use the pointer capture element instead of the hit-test target.
        (WebCore::Document::updateHoverActiveState): Relax the mustBeInActiveChain condition in case the pointer capture element changed when
        updating the :hover/:active chains.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
        (WebCore::EventHandler::handleMouseMoveEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
        (WebCore::EventHandler::handleMouseReleaseEvent): As we know the pointer capture element will be reset as part of the mouse being
        released, we reset the pointer capture element and EventHandler's capture element prior to invalidating hover styles and boundary events.
        (WebCore::EventHandler::setCapturingMouseEventsElement): Dispatch boundary events when a new element is set.
        (WebCore::EventHandler::dispatchMouseEvent): New dispatchMouseEvent() variant that re-processes the provided MouseEventWithHitTestResults
        in case the pointer capture element changes during event dispatch, as called by handleMousePressEvent() and handleMouseMoveEvent().
        * page/EventHandler.h:
        * page/PointerCaptureController.cpp:
        (WebCore::PointerCaptureController::pointerCaptureElement): We now need to query whay the pointer capture element might be from EventHandler,
        so expose a new method to access it.
        (WebCore::PointerCaptureController::releasePointerCapture): Since we may not call processPendingPointerCapture() until the dispatch of the
        next event, we must reset EventHandler's capturing mouse element right now so that the next event processed does not use it as an overriding target.
        (WebCore::PointerCaptureController::hasPointerCapture): We would mistakenly return true if the provided element was null, which could be the
        case of EventHandler's capturing element. Rather than changing call sites to check that the provided value exists, we change the method to
        return false when the provided element is null. Note that this does not affect the API since it's exposed on Element itself.
        (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex): Call dispatchEvent() instead of calling pointerEventWillBeDispatched() and
        pointerEventWasDispatched().
        (WebCore::PointerCaptureController::dispatchEvent): Remove all code specific to pointer capture since now the events will be dispatched on the
        pointer capture element by EventHandler.
        (WebCore::PointerCaptureController::processPendingPointerCapture): Make sure this method is not re-entrant since it dispatches events.
        * page/PointerCaptureController.h:
        * rendering/HitTestRequest.h:
        (WebCore::HitTestRequest::pointerCaptureElementChanged const): Add a new HitTestRequestType bit such that we can indicate to Document::updateHoverActiveState()
        that it must be update the :hover/:active chains when the pointer capture element has just changed.

2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Stop pretending WebCore::Widget can have a platform widget
        https://bugs.webkit.org/show_bug.cgi?id=199066

        Reviewed by Michael Catanzaro.

        That was only possible in legacy WebKit that we no longer support. The code can be simplified a bit.

        * platform/Widget.cpp:
        (WebCore::Widget::init):
        * platform/Widget.h:
        (WebCore::Widget::setPlatformWidget):
        (WebCore::Widget::releasePlatformWidget): Deleted.
        (WebCore::Widget::retainPlatformWidget): Deleted.
        * platform/gtk/PlatformScreenGtk.cpp:
        (WebCore::systemVisual):
        (WebCore::screenDepth):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):
        (WebCore::getToplevel): Deleted.
        (WebCore::getVisual): Deleted.
        (WebCore::getScreen): Deleted.
        * platform/gtk/WidgetGtk.cpp:
        (WebCore::Widget::~Widget):
        (WebCore::Widget::show):
        (WebCore::Widget::hide):
        (WebCore::Widget::setIsSelected):
        (WebCore::Widget::setFrameRect):
        (WebCore::Widget::releasePlatformWidget): Deleted.
        (WebCore::Widget::retainPlatformWidget): Deleted.
        * platform/ios/WidgetIOS.mm:
        (WebCore::Widget::~Widget):

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

        Make it possible to include clipping in GraphicsLayer tree dumps
        https://bugs.webkit.org/show_bug.cgi?id=199096

        Reviewed by Zalan Bujtas.

        Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning
        it on for a couple of tests.

        * page/Frame.h:
        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties const):
        * platform/graphics/GraphicsLayerClient.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::layerTreeAsText):
        * testing/Internals.cpp:
        (WebCore::toLayerTreeFlags):
        * testing/Internals.h:
        * testing/Internals.idl:

2019-06-20  Daniel Bates  <dabates@apple.com>

        [iOS] Evernote crashes when creating a note
        https://bugs.webkit.org/show_bug.cgi?id=199083
        <rdar://problem/51759247>

        Reviewed by Brent Fulgham.

        Add runtime check whether WebKit is being used in Evernote. Evernote's bundle ID
        references iPhone, but they use the same ID for their iPad app as well.

        * platform/RuntimeApplicationChecks.h:
        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
        (WebCore::IOSApplication::isEvernote): Added.

2019-06-20  Greg Doolittle  <gr3g@apple.com>

        Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
        https://bugs.webkit.org/show_bug.cgi?id=194754

        Reviewed by Chris Fleizach.

        Test: accessibility/img-alt-attribute-unassigned-value.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::computedRoleString const):

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

        REGRESSION(r245912): Crash in TextIterator::range via visiblePositionForIndexUsingCharacterIterator
        https://bugs.webkit.org/show_bug.cgi?id=199061

        Reviewed by Wenson Hsieh.

        Avoid calling CharacterIterator::range when it's at the end. Otherwise, we'd crash with null pointer dereferencing.

        Unfortunately no new tests since we don't have any reproducible test case.

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

2019-06-20  Brent Fulgham  <bfulgham@apple.com>

        Resolve frequent crashes in topPrivatelyControlledDomain
        https://bugs.webkit.org/show_bug.cgi?id=199072
        <rdar://problem/51428162>

        Reviewed by Youenn Fablet.

        Crash data indicates that we are frequently crashing when multiple threads call
        WebCore::topPrivatelyControlledDomain. 

        Code review showed the potential for a thread contention issue, since WebKit builds
        with '--fno-threadsafe-statics'.

        This patch corrects the thread safety issue in WebCore::topPrivatelyControlledDomain.

        * platform/mac/PublicSuffixMac.mm:
        (WebCore::topPrivatelyControlledDomain): Only instantiate the static cache after the
        current thread has achieved its lock.

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

        [WHLSL] Property resolver needs to recurse on newValueExpression for RMW operations
        https://bugs.webkit.org/show_bug.cgi?id=199037

        Reviewed by Myles C. Maxfield.

        When we had an expression like `<e1> += <e2>`, we weren't running the property
        resolver on <e2>. If <e2> was something like `mat[1][2]`, we wouldn't end up
        simplifying that into the needed getter calls. This patch fixes this by having
        the property resolver recurse on <e2>.
        
        This patch also fixes a bug in the property resolver where we weren't marking some
        dereference expressions as LValues. This was causing bugs in the metal code generator.
        
        This patch also adds a way to dump the AST between passes that are
        guaranteed to not fail.

        Test: webgpu/whlsl-read-modify-write-high-zombies.html

        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-06-20  John Wilander  <wilander@apple.com>

        Storage Access API: Cap the number of times an iframe document can request access
        https://bugs.webkit.org/show_bug.cgi?id=199074
        <rdar://problem/51857195>

        Reviewed by Brent Fulgham.

        Tested manually.

        This change just adds a counter to the number of times the user explicitly
        denies storage access and returns early if the counter has reached the limit
        of 2.

        We hoped that iframes that request storage access would count the number
        of times the user has been asked and not repeat the request over and over.
        However, we're seeing pretty aggressive use of the API and users are
        complaining. Therefore, we need a cap on how many times an iframed
        document can ask if it is explicitly denied access by the user.

        This is a first measure. If we see continued aggressive use of the API,
        we'll have to consider more drastic measures.

        * dom/DocumentStorageAccess.cpp:
        (WebCore::DocumentStorageAccess::requestStorageAccess):
        * dom/DocumentStorageAccess.h:

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

        Changing settings of a MediaStreamTrack clone should not alter the settings of the original track
        https://bugs.webkit.org/show_bug.cgi?id=198840

        Reviewed by Eric Carlson.

        Rename RealtimeVideoSource in RealtimeVideoCaptureSource.
        Introduce RealtimeVideoSource as a class wrapping RealtimeVideoCaptureSource.
        Its goal is to be able to have independent settings from its underlying RealtimeVideoCaptureSource.
        It can also adapt size based on its settings if different than its RealtimeVideoCaptureSource.
        Apply this wrapping for AV video sources as well as mock video sources.
        Test: fast/mediastream/mediastreamtrack-video-clone.html

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::clone):
        * platform/mediastream/RealtimeMediaSource.h:
        * platform/mediastream/RealtimeVideoCaptureSource.cpp: Added.
        (WebCore::RealtimeVideoCaptureSource::RealtimeVideoCaptureSource):
        (WebCore::RealtimeVideoCaptureSource::~RealtimeVideoCaptureSource):
        (WebCore::RealtimeVideoCaptureSource::prepareToProduceData):
        (WebCore::RealtimeVideoCaptureSource::presets):
        (WebCore::RealtimeVideoCaptureSource::setSupportedPresets):
        (WebCore::RealtimeVideoCaptureSource::standardVideoSizes):
        (WebCore::updateMinMax):
        (WebCore::RealtimeVideoCaptureSource::updateCapabilities):
        (WebCore::RealtimeVideoCaptureSource::supportsSizeAndFrameRate):
        (WebCore::RealtimeVideoCaptureSource::frameRateRangeIncludesRate):
        (WebCore::RealtimeVideoCaptureSource::presetSupportsFrameRate):
        (WebCore::RealtimeVideoCaptureSource::supportsCaptureSize):
        (WebCore::RealtimeVideoCaptureSource::shouldUsePreset):
        (WebCore::RealtimeVideoCaptureSource::bestSupportedSizeAndFrameRate):
        (WebCore::RealtimeVideoCaptureSource::setSizeAndFrameRate):
        (WebCore::RealtimeVideoCaptureSource::adaptVideoSample):
        (WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
        (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):
        (WebCore::SizeAndFrameRate::toJSONObject const):
        (WebCore::SizeAndFrameRate::toJSONString const):
        * platform/mediastream/RealtimeVideoCaptureSource.h: Added.
        (WebCore::RealtimeVideoCaptureSource::sampleRotation const):
        (WebCore::RealtimeVideoCaptureSource::prefersPreset):
        (WebCore::RealtimeVideoCaptureSource::setFrameRateWithPreset):
        (WebCore::RealtimeVideoCaptureSource::canResizeVideoFrames const):
        (WebCore::RealtimeVideoCaptureSource::setDefaultSize):
        (WebCore::RealtimeVideoCaptureSource::observedFrameRate const):
        (WTF::LogArgument<WebCore::SizeAndFrameRate>::toString):
        * platform/mediastream/RealtimeVideoSource.cpp:
        (WebCore::RealtimeVideoSource::RealtimeVideoSource):
        (WebCore::m_source):
        (WebCore::RealtimeVideoSource::~RealtimeVideoSource):
        (WebCore::RealtimeVideoSource::startProducingData):
        (WebCore::RealtimeVideoSource::stopProducingData):
        (WebCore::RealtimeVideoSource::supportsSizeAndFrameRate):
        (WebCore::RealtimeVideoSource::setSizeAndFrameRate):
        (WebCore::RealtimeVideoSource::sourceMutedChanged):
        (WebCore::RealtimeVideoSource::sourceSettingsChanged):
        (WebCore::RealtimeVideoSource::preventSourceFromStopping):
        (WebCore::RealtimeVideoSource::sourceStopped):
        (WebCore::RealtimeVideoSource::videoSampleAvailable):
        (WebCore::RealtimeVideoSource::clone):
        * platform/mediastream/RealtimeVideoSource.h:
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
        (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
        * platform/mediastream/mac/AVVideoCaptureSource.h:
        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::create):
        (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
        * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
        * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
        (WebCore::MockRealtimeVideoSource::create):
        * platform/mock/MockRealtimeVideoSource.cpp:
        (WebCore::MockRealtimeVideoSource::create):
        (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
        (WebCore::MockRealtimeVideoSource::supportsSizeAndFrameRate):
        (WebCore::MockRealtimeVideoSource::setSizeAndFrameRate):
        * platform/mock/MockRealtimeVideoSource.h:

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

        Unreviewed. More speculative build fixing for watchOS after r246631.

        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

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

        Unreviewed. Speculative build fix for watchOS after r246631.

        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:

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

        Tidy up the remaining bits of the AtomicString to AtomString rename
        https://bugs.webkit.org/show_bug.cgi?id=198990

        Reviewed by Michael Catanzaro.

        * bindings/scripts/test/JS/JSTestObj.cpp: Updated names.
        * bindings/scripts/test/TestObj.idl: Ditto.

        * css/makeprop.pl: Updated comment.
        * css/makevalues.pl: Ditto.
        * html/FormController.cpp:
        (WebCore::FormKeyGenerator::formKey): Ditto.

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

        [LFC][IFC] Make the initial strut explicit
        https://bugs.webkit.org/show_bug.cgi?id=199057
        <rdar://problem/51927864>

        Reviewed by Antti Koivisto.

        The strut always sets the initial vertical constraints on the new line in strict mode. However in quirks mode
        we can ignore it as long as there's no baseline type content on the line.  

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
        (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:

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

        [LFC][IFC] Introduce Line::InitialConstraints
        https://bugs.webkit.org/show_bug.cgi?id=199056
        <rdar://problem/51927597>

        Reviewed by Antti Koivisto.

        Line::InitialConstraints, as the name suggests, holds the initial constraint values for the new line. 

        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::m_skipVerticalAligment):
        (WebCore::Layout::m_lineLogicalWidth): Deleted.
        * layout/inlineformatting/InlineLine.h:

2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Remove support for GTK2 plugins
        https://bugs.webkit.org/show_bug.cgi?id=199065

        Reviewed by Sergio Villar Senin.

        * PlatformGTK.cmake:
        * SourcesGTK.txt:
        * SourcesWPE.txt:
        * platform/FreeType.cmake:
        * platform/SourcesGLib.txt:
        * platform/graphics/Color.h:
        * platform/graphics/PlatformDisplay.cpp:
        (WebCore::PlatformDisplay::createPlatformDisplay):
        * platform/graphics/gtk/ColorGtk.cpp:
        (WebCore::Color::operator GdkRGBA const):
        * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:
        (WebCore::onFrameClockUpdate):
        (WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback):
        * platform/graphics/gtk/DisplayRefreshMonitorGtk.h:
        (WebCore::DisplayRefreshMonitorGtk::create):
        * platform/graphics/gtk/GdkCairoUtilities.cpp:
        * platform/gtk/GRefPtrGtk.cpp:
        * platform/gtk/GRefPtrGtk.h:
        * platform/gtk/GtkVersioning.c: Removed.
        * platform/gtk/GtkVersioning.h: Removed.
        * platform/gtk/PasteboardHelper.cpp:
        (WebCore::PasteboardHelper::getClipboardContents):
        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::modifiersForGdkKeyEvent):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        * platform/gtk/PlatformMouseEventGtk.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/gtk/PlatformScreenGtk.cpp:
        (WebCore::screenIsTouchPrimaryInputDevice):
        * platform/gtk/PlatformWheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
        * platform/gtk/ScrollbarThemeGtk.cpp:
        * platform/gtk/ScrollbarThemeGtk.h:
        * platform/gtk/WidgetGtk.cpp:
        * rendering/RenderThemeGtk.cpp:
        * rendering/RenderThemeGtk.h:

2019-06-19  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Hook up common texture functions
        https://bugs.webkit.org/show_bug.cgi?id=198704
        <rdar://problem/51668841>

        Reviewed by Saam Barati.

        This patch adds the Metal implementation of the Sample(), Load(), and GetDimensions()
        texture functions. The implementation simply performs string concatenation to produce the 
        correct results, and adds many new native functions to the standard library.

        We can't zero-fill texture types or sampler types, so this patch forbids default
        constructors for those types. It also forbids those types to exist within arrays, array
        references, or pointers, becuase an out-of-bounds access may cause us to try to zero-fill
        them.

        Tests: webgpu/whlsl-textures-getdimensions.html
               webgpu/whlsl-textures-load.html
               webgpu/whlsl-textures-sample.html

        * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h: Add some more introspection functions
        so we can generate the necessary Metal functions for the appropriate texture types.
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension):
        (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtom const): Deleted.
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Native types can be passed into 
        entry points, too.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Entry points that return void don't need a
        semantic.
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Implement the functions.
        (WebCore::WHLSL::Metal::vectorLength):
        (WebCore::WHLSL::Metal::vectorInnerType):
        (WebCore::WHLSL::Metal::vectorSuffix):
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp: Textures come in two flavors: sample-able
        and read/write-able. Make sure we produce the correct Metal types for them.
        (WebCore::WHLSL::Metal::writeNativeType):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: We can't auto-initialize textures and 
        samplers. Therefore, this function needs to be able to fail.
        (WebCore::WHLSL::AutoInitialize::visit):
        (WebCore::WHLSL::autoInitializeVariables):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h:
        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: We can't auto-initialize textures, so users
        shouldn't be able to either.
        (WebCore::WHLSL::checkDuplicateFunctions):
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp: Added. Make sure textures and samplers can't
        exist inside arrays, array references, or pointers. This is because out-of-bounds accesses may cause
        us to attempt to zero-fill the inner type, but we can't zero-fill textures and samplers.
        (WebCore::WHLSL::TextureReferencesChecker::TextureReferencesChecker):
        (WebCore::WHLSL::Searcher::Searcher):
        (WebCore::WHLSL::Searcher::found const):
        (WebCore::WHLSL::Searcher::visit):
        (WebCore::WHLSL::TextureReferencesChecker::containsTextureOrSampler):
        (WebCore::WHLSL::TextureReferencesChecker::visit):
        (WebCore::WHLSL::checkTextureReferences):
        * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp: Record more detailed information about texture types,
        so we can emit correct Metal code.
        (WebCore::WHLSL::Intrinsics::addFullTexture):
        (WebCore::WHLSL::Intrinsics::addDepthTexture):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
        (WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: Nested NameResolvers need to propagate their error. Also,
        native functions with named arguments shouldn't be adding their arguments to the global scope.
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLProgram.h:
        (WebCore::WHLSL::Program::intrinsics const):
        * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: Metal doesn't have writable depth textures.
        * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Don't generate default constructors for textures
        or samplers.
        (WebCore::WHLSL::synthesizeConstructors):
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUTexture.h: Make texture usages more clear.
        (WebCore::GPUTexture::isSampled const):
        (WebCore::GPUTexture::isStorage const):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Ditto.
        (WebCore::GPUBindGroup::tryCreate):
        * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Ditto.
        (WebCore::GPUProgrammablePassEncoder::setBindGroup):
        * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Ditto.
        (WebCore::mtlTextureUsageForGPUTextureUsageFlags):

2019-06-19  Justin Fan  <justin_fan@apple.com>

        [WHLSL] Create a shading language test harness
        https://bugs.webkit.org/show_bug.cgi?id=198978

        Reviewed by Myles C. Maxfield.

        When creating MTLArgumentEncoders for argument buffers, the user's arguments
        must match the order that they are declared in the shader. Move back-end information
        such as buffer lengths to the end of the argument arrays.

        Test: webgpu/whlsl-harness-test.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
        * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
        (WebCore::GPUBindGroupLayout::tryCreate):

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

        [WHLSL] The checker needs to resolve types for the anonymous variables in ReadModifyWrite expressions
        https://bugs.webkit.org/show_bug.cgi?id=198988

        Reviewed by Dean Jackson and Myles C. Maxfield.

        This patch makes it so that the Checker assigns types to the internal variables
        in a read modify write expression. These were the only variables that didn't have
        types ascribed to them.

        This patch also does a fly by fix where we kept pointers to value types
        in a HashMap in the checker. This is wrong precisely when the HashMap gets
        resized. Instead, we now just store the value itself since we're just
        dealing with a simple Variant that wraps either an empty struct or an
        enum.

        Test: webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html

        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        (WebCore::WHLSL::AST::VariableDeclaration::setType):
        (WebCore::WHLSL::AST::VariableDeclaration::type const):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Make it obvious that read
        modify write expressions are such by prefixing them with "RMW".
        (WebCore::WHLSL::ASTDumper::visit):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):

2019-06-19  Devin Rousso  <drousso@apple.com>

        Web Inspector: Network: replace CFNetwork SPI with new API where able
        https://bugs.webkit.org/show_bug.cgi?id=198762

        Reviewed by Timothy Hatcher.

        * platform/network/NetworkLoadMetrics.h:

2019-06-19  Jer Noble  <jer.noble@apple.com>

        iOS 12.2 Drawing portrait video to canvas is sideways
        https://bugs.webkit.org/show_bug.cgi?id=196772
        <rdar://problem/49781802>

        Reviewed by Eric Carlson.

        Test: media/video-orientation-canvas.html

        Move rotation code into its own ImageRotationSessionVT class for re-use across
        all existing classes with rotation operations. Should slightly increase performance
        for painting rotated media files, as the rotation only occurs once per frame, rather
        than once per drawing operation.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
        (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.
        * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
        (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
        (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
        (WebCore::ImageDecoderAVFObjC::setTrack):
        (WebCore::transformToRotationProperties): Deleted.
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
        * platform/graphics/cv/ImageRotationSessionVT.h: Added.
        (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
        (WebCore::ImageRotationSessionVT::rotationProperties const):
        (WebCore::ImageRotationSessionVT::rotatedSize):
        * platform/graphics/cv/ImageRotationSessionVT.mm: Added.
        (WebCore::transformToRotationProperties):
        (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
        (WebCore::ImageRotationSessionVT::rotate):
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
        * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
        (WebCore::rotationToAngle):
        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
        (WebCore::computeRotatedWidthAndHeight): Deleted.

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

        REGRESSION (246538): Newyorker.com header scrolls on page
        
        Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
        Overflow scroll will still scroll by changing boundsOrigin.
        
        The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
        positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
        a simple scroll container, and this change broke positioning for fixed position layers.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
        (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
        (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
        (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
        (WebCore::RenderLayerCompositor::frameViewDidScroll):
        (WebCore::RenderLayerCompositor::updateRootLayerPosition):
        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
        (WebCore::RenderLayerCompositor::ensureRootLayer):
        (WebCore::RenderLayerCompositor::destroyRootLayer):
        (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
        (WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
        (WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>

        [WPE][GTK] Fix build with unified sources disabled
        https://bugs.webkit.org/show_bug.cgi?id=198752

        Reviewed by Michael Catanzaro.

        No new tests needed.

        * Modules/indexeddb/server/UniqueIDBDatabase.h: Add missing forward declaration for IDBGetRecordData,
        replace inclusion of UniqueIDBDatabaseConnection.h with a forward declaration.
        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: Remove unneeded inclusion of
        UniqueIDBDatabaseTransaction.h, add missing inclusion of UniqueIDBDatabase.h
        * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: Remove unneeded inclusion of
        UniqueIDBDatabaseConnection.h inclusion.
        * bridge/c/c_class.cpp: Add inclusion of JSCJSValueInlines.h to avoid linker errors due
        to missing JSValue inline functions.
        * dom/DocumentParser.h: Replace forward declaration of Document with inclusion of Document.h,
        to avoid error due to usage of incomplete type in template expansion.
        * dom/Microtasks.h: Add missing forward declaration of JSC::VM
        * editing/markup.cpp: Add missing inclusion of PasteboardItemInfo.h
        * page/Quirks.h: Add missing forward declaration of WebCore::EventTarget
        * page/RuntimeEnabledFeatures.h: Add missing inclusion of wtf/Optional.h to avoid error due to
        expansion of undefined template.
        * page/SocketProvider.h: Add missing forward declaration for Document.
        * platform/graphics/GraphicsLayerClient.h: Add missing inclusion of wtf/OptionSet.h to avoid
        error due to expansion of undefined template.
        * rendering/RenderMultiColumnSpannerPlaceholder.h: Replace forward declaration of RenderMultiColumnFlow
        with inclusion of RenderMultiColumnFlow.h to avoid error due to usage of undefined class.

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

        RequestedScrollPosition shouldn't be applied after node reattach
        https://bugs.webkit.org/show_bug.cgi?id=198994
        <rdar://problem/51439685>

        Reviewed by Simon Fraser.

        Test: scrollingcoordinator/ios/scroll-position-after-reattach.html

        If a scrolling node gets reattached, its scroll position resets to (0,0) or whatever the previous
        requestedScrollPosition was, and the current position is lost.

        * page/scrolling/ScrollingStateFixedNode.cpp:
        (WebCore::ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateFixedNode::setAllPropertiesChanged): Deleted.

        Rename to better reflect what this is for.

        * page/scrolling/ScrollingStateFixedNode.h:
        * page/scrolling/ScrollingStateFrameHostingNode.cpp:
        (WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged): Deleted.
        * page/scrolling/ScrollingStateFrameHostingNode.h:
        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
        (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): Deleted.
        * page/scrolling/ScrollingStateFrameScrollingNode.h:
        * page/scrolling/ScrollingStateNode.cpp:
        (WebCore::ScrollingStateNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateNode::setAllPropertiesChanged): Deleted.
        * page/scrolling/ScrollingStateNode.h:
        * page/scrolling/ScrollingStatePositionedNode.cpp:
        (WebCore::ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged): Deleted.
        * page/scrolling/ScrollingStatePositionedNode.h:
        * page/scrolling/ScrollingStateScrollingNode.cpp:
        (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):

        Don't set RequestedScrollPosition. It is a special property that is applied only once on request
        and shouldn't get reapplied. Nodes should keep their existing scroll position on reattach.

        (WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged): Deleted.
        * page/scrolling/ScrollingStateScrollingNode.h:
        * page/scrolling/ScrollingStateStickyNode.cpp:
        (WebCore::ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach):
        (WebCore::ScrollingStateStickyNode::setAllPropertiesChanged): Deleted.
        * page/scrolling/ScrollingStateStickyNode.h:
        * page/scrolling/ScrollingStateTree.cpp:
        (WebCore::ScrollingStateTree::nodeWasReattachedRecursive):

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

        [WHLSL] Support matrices
        https://bugs.webkit.org/show_bug.cgi?id=198876
        <rdar://problem/51768882>

        Reviewed by Dean Jackson and Myles Maxfield.

        This patch adds in support for matrices to WHLSL. Most matrix related code
        is defined by the standard library. This patch just needed to add support
        for the native functions operator[] and operator[]= on matrix types. The only
        native functions that are named operator[] and operator[]= are for matrix
        operations, so we strongly assume when generating code for native operator[] and
        operator[]= that we're dealing with matrix types.
        
        operator[]= ignores the write if the index is out of bounds. operator[]
        returns a zeroed vector if the index is out of bounds.  
        
        This patch also incorporates two bug fixes:
        1. This patch takes Robin's patch in https://bugs.webkit.org/show_bug.cgi?id=198313 to ensure
        we don't have pointers to values in a hash map. This was needed in this patch
        otherwise we'd crash parsing the standard library.
        
        2. This patch fixes how we handle "break" in metal codegen. When I first
        implemented break, I strongly assumed we were in a loop. However, break
        can be either from a loop or from switch. This patch teaches the metal code
        generator to track which context we're in and to emit code accordingly.

        Tests: webgpu/whlsl-matrix-2.html
               webgpu/whlsl-matrix.html

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
        (WebCore::WHLSL::Metal::generateMetalCodeShared):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::assignTypes):
        (WebCore::WHLSL::Checker::getInfo):
        (WebCore::WHLSL::Checker::assignType):
        (WebCore::WHLSL::Checker::forwardType):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

2019-06-18  Yusuke Suzuki  <ysuzuki@apple.com>

        [JSC] JSLock should be WebThread aware
        https://bugs.webkit.org/show_bug.cgi?id=198911

        Reviewed by Geoffrey Garen.

        * bindings/js/CommonVM.cpp:
        (WebCore::commonVMSlow):

2019-06-18  Joseph Pecoraro  <pecoraro@apple.com>

        WebSocketDeflater uses an unnecessarily constrained compression memory level
        https://bugs.webkit.org/show_bug.cgi?id=198973

        Reviewed by Alex Christensen.

        * Modules/websockets/WebSocketDeflater.cpp:
        Set the memLevel to the deflateInit2 default value, not a minimum value.

2019-06-18  Keith Miller  <keith_miller@apple.com>

        Add support for WeakRef
        https://bugs.webkit.org/show_bug.cgi?id=198710

        Reviewed by Yusuke Suzuki.

        We need to make sure the Web MicrotaskQueue notifies the JSC VM
        that it has finished performing a microtask checkpoint. This lets
        the JSC VM know it is safe to collect referenced WeakRefs. Since
        there was no way to get the VM from the MicrotaskQueue I have
        added a RefPtr to the queue's VM. For the main thread the VM lives
        forever so is fine. For workers the queue and the VM share an
        owner so this shouldn't matter either.

        Tests: js/weakref-async-is-collected.html
               js/weakref-eventually-collects-values.html
               js/weakref-microtasks-dont-collect.html
               js/weakref-weakset-consistency.html

        * dom/Microtasks.cpp:
        (WebCore::MicrotaskQueue::MicrotaskQueue):
        (WebCore::MicrotaskQueue::mainThreadQueue):
        (WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
        * dom/Microtasks.h:
        (WebCore::MicrotaskQueue::vm const):
        * workers/WorkerGlobalScope.cpp:
        (WebCore::WorkerGlobalScope::WorkerGlobalScope):

2019-06-18  Kenneth Russell  <kbr@chromium.org>

        Add preliminary ANGLE backend to WebCore
        https://bugs.webkit.org/show_bug.cgi?id=197755

        Reviewed by Dean Jackson.

        Add new files supplying an ANGLE version of GraphicsContext3D and
        Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
        build these files. This option compiles and links successfully.

        FIXMEs remain in several common files which will be addressed in
        subsequent patches.

        This work will be tested with the preexisting WebGL conformance
        suite.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/GraphicsContext3DManager.cpp:
        (WebCore::GraphicsContext3DManager::updateAllContexts):
        (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
        (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
        * platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
        (WebCore::Extensions3DANGLE::Extensions3DANGLE):
        (WebCore::Extensions3DANGLE::supports):
        (WebCore::Extensions3DANGLE::ensureEnabled):
        (WebCore::Extensions3DANGLE::isEnabled):
        (WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
        (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
        (WebCore::Extensions3DANGLE::initializeAvailableExtensions):
        (WebCore::Extensions3DANGLE::readnPixelsEXT):
        (WebCore::Extensions3DANGLE::getnUniformfvEXT):
        (WebCore::Extensions3DANGLE::getnUniformivEXT):
        (WebCore::Extensions3DANGLE::blitFramebuffer):
        (WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
        (WebCore::Extensions3DANGLE::createVertexArrayOES):
        (WebCore::Extensions3DANGLE::deleteVertexArrayOES):
        (WebCore::Extensions3DANGLE::isVertexArrayOES):
        (WebCore::Extensions3DANGLE::bindVertexArrayOES):
        (WebCore::Extensions3DANGLE::insertEventMarkerEXT):
        (WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
        (WebCore::Extensions3DANGLE::popGroupMarkerEXT):
        (WebCore::Extensions3DANGLE::supportsExtension):
        (WebCore::Extensions3DANGLE::drawBuffersEXT):
        (WebCore::Extensions3DANGLE::drawArraysInstanced):
        (WebCore::Extensions3DANGLE::drawElementsInstanced):
        (WebCore::Extensions3DANGLE::vertexAttribDivisor):
        (WebCore::Extensions3DANGLE::getExtensions):
        * platform/graphics/angle/Extensions3DANGLE.h: Added.
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
        (WebCore::GraphicsContext3D::releaseShaderCompiler):
        (WebCore::wipeAlphaChannelFromPixels):
        (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
        (WebCore::GraphicsContext3D::validateAttributes):
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
        (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
        (WebCore::GraphicsContext3D::renderbufferStorage):
        (WebCore::GraphicsContext3D::getIntegerv):
        (WebCore::GraphicsContext3D::getShaderPrecisionFormat):
        (WebCore::GraphicsContext3D::texImage2D):
        (WebCore::GraphicsContext3D::depthRange):
        (WebCore::GraphicsContext3D::clearDepth):
        (WebCore::GraphicsContext3D::getExtensions):
        (WebCore::GraphicsContext3D::readPixels):
        (WebCore::setCurrentNameHashMapForShader):
        (WebCore::nameHashForShader):
        (WebCore::GraphicsContext3D::validateDepthStencil):
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
        (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
        (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
        (WebCore::GraphicsContext3D::prepareTexture):
        (WebCore::GraphicsContext3D::readRenderingResults):
        (WebCore::GraphicsContext3D::reshape):
        (WebCore::GraphicsContext3D::checkVaryingsPacking const):
        (WebCore::GraphicsContext3D::precisionsMatch const):
        (WebCore::GraphicsContext3D::getInternalFramebufferSize const):
        (WebCore::GraphicsContext3D::activeTexture):
        (WebCore::GraphicsContext3D::attachShader):
        (WebCore::GraphicsContext3D::bindAttribLocation):
        (WebCore::GraphicsContext3D::bindBuffer):
        (WebCore::GraphicsContext3D::bindFramebuffer):
        (WebCore::GraphicsContext3D::bindRenderbuffer):
        (WebCore::GraphicsContext3D::bindTexture):
        (WebCore::GraphicsContext3D::blendColor):
        (WebCore::GraphicsContext3D::blendEquation):
        (WebCore::GraphicsContext3D::blendEquationSeparate):
        (WebCore::GraphicsContext3D::blendFunc):
        (WebCore::GraphicsContext3D::blendFuncSeparate):
        (WebCore::GraphicsContext3D::bufferData):
        (WebCore::GraphicsContext3D::bufferSubData):
        (WebCore::GraphicsContext3D::mapBufferRange):
        (WebCore::GraphicsContext3D::unmapBuffer):
        (WebCore::GraphicsContext3D::copyBufferSubData):
        (WebCore::GraphicsContext3D::getInternalformativ):
        (WebCore::GraphicsContext3D::renderbufferStorageMultisample):
        (WebCore::GraphicsContext3D::texStorage2D):
        (WebCore::GraphicsContext3D::texStorage3D):
        (WebCore::GraphicsContext3D::getActiveUniforms):
        (WebCore::GraphicsContext3D::checkFramebufferStatus):
        (WebCore::GraphicsContext3D::clearColor):
        (WebCore::GraphicsContext3D::clear):
        (WebCore::GraphicsContext3D::clearStencil):
        (WebCore::GraphicsContext3D::colorMask):
        (WebCore::GraphicsContext3D::compileShader):
        (WebCore::GraphicsContext3D::compileShaderDirect):
        (WebCore::GraphicsContext3D::copyTexImage2D):
        (WebCore::GraphicsContext3D::copyTexSubImage2D):
        (WebCore::GraphicsContext3D::cullFace):
        (WebCore::GraphicsContext3D::depthFunc):
        (WebCore::GraphicsContext3D::depthMask):
        (WebCore::GraphicsContext3D::detachShader):
        (WebCore::GraphicsContext3D::disable):
        (WebCore::GraphicsContext3D::disableVertexAttribArray):
        (WebCore::GraphicsContext3D::drawArrays):
        (WebCore::GraphicsContext3D::drawElements):
        (WebCore::GraphicsContext3D::enable):
        (WebCore::GraphicsContext3D::enableVertexAttribArray):
        (WebCore::GraphicsContext3D::finish):
        (WebCore::GraphicsContext3D::flush):
        (WebCore::GraphicsContext3D::framebufferRenderbuffer):
        (WebCore::GraphicsContext3D::framebufferTexture2D):
        (WebCore::GraphicsContext3D::frontFace):
        (WebCore::GraphicsContext3D::generateMipmap):
        (WebCore::GraphicsContext3D::getActiveAttribImpl):
        (WebCore::GraphicsContext3D::getActiveAttrib):
        (WebCore::GraphicsContext3D::getActiveUniformImpl):
        (WebCore::GraphicsContext3D::getActiveUniform):
        (WebCore::GraphicsContext3D::getAttachedShaders):
        (WebCore::generateHashedName):
        (WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
        (WebCore::GraphicsContext3D::mappedSymbolName):
        (WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
        (WebCore::GraphicsContext3D::originalSymbolName):
        (WebCore::GraphicsContext3D::getAttribLocation):
        (WebCore::GraphicsContext3D::getAttribLocationDirect):
        (WebCore::GraphicsContext3D::getContextAttributes):
        (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
        (WebCore::GraphicsContext3D::getError):
        (WebCore::GraphicsContext3D::getString):
        (WebCore::GraphicsContext3D::hint):
        (WebCore::GraphicsContext3D::isBuffer):
        (WebCore::GraphicsContext3D::isEnabled):
        (WebCore::GraphicsContext3D::isFramebuffer):
        (WebCore::GraphicsContext3D::isProgram):
        (WebCore::GraphicsContext3D::isRenderbuffer):
        (WebCore::GraphicsContext3D::isShader):
        (WebCore::GraphicsContext3D::isTexture):
        (WebCore::GraphicsContext3D::lineWidth):
        (WebCore::GraphicsContext3D::linkProgram):
        (WebCore::GraphicsContext3D::pixelStorei):
        (WebCore::GraphicsContext3D::polygonOffset):
        (WebCore::GraphicsContext3D::sampleCoverage):
        (WebCore::GraphicsContext3D::scissor):
        (WebCore::GraphicsContext3D::shaderSource):
        (WebCore::GraphicsContext3D::stencilFunc):
        (WebCore::GraphicsContext3D::stencilFuncSeparate):
        (WebCore::GraphicsContext3D::stencilMask):
        (WebCore::GraphicsContext3D::stencilMaskSeparate):
        (WebCore::GraphicsContext3D::stencilOp):
        (WebCore::GraphicsContext3D::stencilOpSeparate):
        (WebCore::GraphicsContext3D::texParameterf):
        (WebCore::GraphicsContext3D::texParameteri):
        (WebCore::GraphicsContext3D::uniform1f):
        (WebCore::GraphicsContext3D::uniform1fv):
        (WebCore::GraphicsContext3D::uniform2f):
        (WebCore::GraphicsContext3D::uniform2fv):
        (WebCore::GraphicsContext3D::uniform3f):
        (WebCore::GraphicsContext3D::uniform3fv):
        (WebCore::GraphicsContext3D::uniform4f):
        (WebCore::GraphicsContext3D::uniform4fv):
        (WebCore::GraphicsContext3D::uniform1i):
        (WebCore::GraphicsContext3D::uniform1iv):
        (WebCore::GraphicsContext3D::uniform2i):
        (WebCore::GraphicsContext3D::uniform2iv):
        (WebCore::GraphicsContext3D::uniform3i):
        (WebCore::GraphicsContext3D::uniform3iv):
        (WebCore::GraphicsContext3D::uniform4i):
        (WebCore::GraphicsContext3D::uniform4iv):
        (WebCore::GraphicsContext3D::uniformMatrix2fv):
        (WebCore::GraphicsContext3D::uniformMatrix3fv):
        (WebCore::GraphicsContext3D::uniformMatrix4fv):
        (WebCore::GraphicsContext3D::useProgram):
        (WebCore::GraphicsContext3D::validateProgram):
        (WebCore::GraphicsContext3D::vertexAttrib1f):
        (WebCore::GraphicsContext3D::vertexAttrib1fv):
        (WebCore::GraphicsContext3D::vertexAttrib2f):
        (WebCore::GraphicsContext3D::vertexAttrib2fv):
        (WebCore::GraphicsContext3D::vertexAttrib3f):
        (WebCore::GraphicsContext3D::vertexAttrib3fv):
        (WebCore::GraphicsContext3D::vertexAttrib4f):
        (WebCore::GraphicsContext3D::vertexAttrib4fv):
        (WebCore::GraphicsContext3D::vertexAttribPointer):
        (WebCore::GraphicsContext3D::viewport):
        (WebCore::GraphicsContext3D::createVertexArray):
        (WebCore::GraphicsContext3D::deleteVertexArray):
        (WebCore::GraphicsContext3D::isVertexArray):
        (WebCore::GraphicsContext3D::bindVertexArray):
        (WebCore::GraphicsContext3D::getBooleanv):
        (WebCore::GraphicsContext3D::getBufferParameteriv):
        (WebCore::GraphicsContext3D::getFloatv):
        (WebCore::GraphicsContext3D::getInteger64v):
        (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
        (WebCore::GraphicsContext3D::getProgramiv):
        (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount):
        (WebCore::GraphicsContext3D::getUnmangledInfoLog):
        (WebCore::GraphicsContext3D::getProgramInfoLog):
        (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
        (WebCore::GraphicsContext3D::getShaderiv):
        (WebCore::GraphicsContext3D::getShaderInfoLog):
        (WebCore::GraphicsContext3D::getShaderSource):
        (WebCore::GraphicsContext3D::getTexParameterfv):
        (WebCore::GraphicsContext3D::getTexParameteriv):
        (WebCore::GraphicsContext3D::getUniformfv):
        (WebCore::GraphicsContext3D::getUniformiv):
        (WebCore::GraphicsContext3D::getUniformLocation):
        (WebCore::GraphicsContext3D::getVertexAttribfv):
        (WebCore::GraphicsContext3D::getVertexAttribiv):
        (WebCore::GraphicsContext3D::getVertexAttribOffset):
        (WebCore::GraphicsContext3D::texSubImage2D):
        (WebCore::GraphicsContext3D::compressedTexImage2D):
        (WebCore::GraphicsContext3D::compressedTexSubImage2D):
        (WebCore::GraphicsContext3D::createBuffer):
        (WebCore::GraphicsContext3D::createFramebuffer):
        (WebCore::GraphicsContext3D::createProgram):
        (WebCore::GraphicsContext3D::createRenderbuffer):
        (WebCore::GraphicsContext3D::createShader):
        (WebCore::GraphicsContext3D::createTexture):
        (WebCore::GraphicsContext3D::deleteBuffer):
        (WebCore::GraphicsContext3D::deleteFramebuffer):
        (WebCore::GraphicsContext3D::deleteProgram):
        (WebCore::GraphicsContext3D::deleteRenderbuffer):
        (WebCore::GraphicsContext3D::deleteShader):
        (WebCore::GraphicsContext3D::deleteTexture):
        (WebCore::GraphicsContext3D::synthesizeGLError):
        (WebCore::GraphicsContext3D::markContextChanged):
        (WebCore::GraphicsContext3D::markLayerComposited):
        (WebCore::GraphicsContext3D::layerComposited const):
        (WebCore::GraphicsContext3D::forceContextLost):
        (WebCore::GraphicsContext3D::recycleContext):
        (WebCore::GraphicsContext3D::dispatchContextChangedNotification):
        (WebCore::GraphicsContext3D::texImage2DDirect):
        (WebCore::GraphicsContext3D::drawArraysInstanced):
        (WebCore::GraphicsContext3D::drawElementsInstanced):
        (WebCore::GraphicsContext3D::vertexAttribDivisor):
        * platform/graphics/angle/TemporaryANGLESetting.cpp: Added.
        (WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
        (WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):
        * platform/graphics/angle/TemporaryANGLESetting.h: Added.
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        (WebCore::GraphicsContext3D::makeContextCurrent):
        (WebCore::GraphicsContext3D::checkGPUStatus):
        (WebCore::GraphicsContext3D::screenDidChange):
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer display]):
        * platform/graphics/cv/TextureCacheCV.mm:
        (WebCore::TextureCacheCV::create):
        (WebCore::TextureCacheCV::textureFromImage):
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::enumToStringMap):
        (WebCore::VideoTextureCopierCV::initializeContextObjects):
        (WebCore::VideoTextureCopierCV::initializeUVContextObjects):
        (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
        (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

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

        [WHLSL] Do not generate duplicate constructors/copy constructors in synthesizeConstructors
        https://bugs.webkit.org/show_bug.cgi?id=198580

        Reviewed by Robin Morisset.

        Prior to this patch, we were generating duplicate constructors 
        for unnamed types. This is bad for two reasons:
        1. It's inefficient, since we'd generate a constructor for every place in
        the AST where we'd visit this unnamed type.
        2. It made it impossible to resolve function overloads to call
        the default constructor. This made it so that the autoInitializeVariables
        pass would crash if we ever generated more than one of these functions
        for the same type.
        
        To make this work, this patch splits up what used to be the resolveNamesInFunctions
        pass. Previously, this pass would both resolve calls and resolve type names.
        Synthesize constructors would run before this, since resolving calls meant we
        may resolve a call to one of these synthesized constructors. However, synthesize
        constructors now needs to test for the equality unnamed types, so it now requires
        running the type resolution part of resolveNamesInFunctions before it runs.
        
        This patch splits resolveNamesInFunctions into two parts:
        resolveTypeNamesInFunctions and resolveCallsInFunctions.
        
        So we used to run:
        synthesizeConstructors
        resolveNamesInFunctions
        
        And now we run:
        resolveTypeNamesInFunctions 
        synthesizeConstructors
        resolveCallsInFunctions

        Test: webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html

        * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
        (WebCore::WHLSL::AST::BooleanLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
        (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
        (WebCore::WHLSL::AST::Expression::copyTypeTo const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
        (WebCore::WHLSL::AST::FloatLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
        (WebCore::WHLSL::AST::FloatLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
        (WebCore::WHLSL::AST::IntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::IntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
        (WebCore::WHLSL::AST::NullLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
        (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):
        * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::matches):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::NameResolver):
        (WebCore::WHLSL::NameResolver::visit):
        (WebCore::WHLSL::resolveTypeNamesInFunctions):
        (WebCore::WHLSL::resolveCallsInFunctions):
        (WebCore::WHLSL::resolveNamesInFunctions): Deleted.
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
        (WebCore::WHLSL::NameResolver::setIsResolvingCalls):
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
        (WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey):
        (WebCore::WHLSL::UnnamedTypeKey::isEmptyValue const):
        (WebCore::WHLSL::UnnamedTypeKey::isHashTableDeletedValue const):
        (WebCore::WHLSL::UnnamedTypeKey::hash const):
        (WebCore::WHLSL::UnnamedTypeKey::operator== const):
        (WebCore::WHLSL::UnnamedTypeKey::unnamedType const):
        (WebCore::WHLSL::UnnamedTypeKey::Hash::hash):
        (WebCore::WHLSL::UnnamedTypeKey::Hash::equal):
        (WebCore::WHLSL::UnnamedTypeKey::Traits::isEmptyValue):
        (WebCore::WHLSL::FindAllTypes::takeUnnamedTypes):
        (WebCore::WHLSL::FindAllTypes::appendNamedType):
        (WebCore::WHLSL::synthesizeConstructors):

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

        Unreviewed, rolling out r246524.

        Caused 45 webgpu/ crashes.

        Reverted changeset:

        "[WHLSL] The name resolver does not deal with
        nativeFunctionDeclaration"
        https://bugs.webkit.org/show_bug.cgi?id=198306
        https://trac.webkit.org/changeset/246524

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

        [LFC][IFC] Inline quirks should have their dedicated class.
        https://bugs.webkit.org/show_bug.cgi?id=198962
        <rdar://problem/51848170>

        Reviewed by Antti Koivisto.

        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * layout/LayoutState.h:
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineFormattingContextQuirks.cpp: Added.
        (WebCore::Layout::InlineFormattingContext::Quirks::collapseLineDescent):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLineBreaker.cpp:
        * layout/inlineformatting/InlineLineBreaker.h:

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

        [LFC][IFC] Line::append() should take care of all the inline types.
        https://bugs.webkit.org/show_bug.cgi?id=198961
        <rdar://problem/51847712>

        Reviewed by Antti Koivisto.

        Make all the existing Line::append* functions private.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): fix a typo.
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::append):
        * layout/inlineformatting/InlineLine.h:

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

        Convert macOS to scroll by changing layer boundsOrigin
        https://bugs.webkit.org/show_bug.cgi?id=198917

        Reviewed by Antti Koivisto.

        macOS did frame and overflow scrolling by changing the position of the scrolled
        contents layer. iOS scrolls by changing the boundsOrigin of the scrollContainer layer
        (which it has to, to match how UIScrollView works).

        The iOS approach removes the need for an extra layer whose only role is for
        scroll positioning, so migrate macOS to the same approach. A later patch can remove
        m_scrolledContentsLayer.
        
        We can remove RenderLayerCompositor::m_clipLayer since m_scrollContainerLayer has exactly
        the same role now.

        * page/scrolling/AsyncScrollingCoordinator.cpp:
        (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
        * page/scrolling/ScrollingCoordinator.cpp:
        (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
        (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
        (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
        * platform/graphics/cocoa/WebCoreCALayerExtras.h:
        * platform/graphics/cocoa/WebCoreCALayerExtras.mm:
        (-[CALayer _web_setLayerBoundsOrigin:]):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGeometry):
        (WebCore::RenderLayerBacking::setLocationOfScrolledContents):
        (WebCore::RenderLayerBacking::updateScrollOffset):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
        (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
        (WebCore::RenderLayerCompositor::updateLayersForScrollPosition):
        (WebCore::RenderLayerCompositor::updateScrollContainerGeometry):
        (WebCore::RenderLayerCompositor::frameViewDidScroll):
        (WebCore::RenderLayerCompositor::updateRootLayerPosition):
        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
        (WebCore::RenderLayerCompositor::ensureRootLayer):
        (WebCore::RenderLayerCompositor::destroyRootLayer):
        (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
        (WebCore::RenderLayerCompositor::updateScrollLayerPosition): Deleted.
        (WebCore::RenderLayerCompositor::updateScrollLayerClipping): Deleted.
        * rendering/RenderLayerCompositor.h:

2019-06-18  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] Identify elements with monotonically increasing counters
        https://bugs.webkit.org/show_bug.cgi?id=198916

        Reviewed by Xabier Rodriguez-Calvar.

        Those ids tend to be shorter, easier to read for humans and for
        diff tools :) Underscores were also replaced by dashes, for
        consistency with the usual GStreamer element naming untold
        conventions.

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::load):
        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
        (WebCore::GStreamerVideoEncoder::makeElement):
        (WebCore::GStreamerVideoEncoder::InitEncode):

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

        [WebGL] Extensions3DOpenGLES::bindVertexArrayOES() should allow zero array object
        https://bugs.webkit.org/show_bug.cgi?id=198929

        Reviewed by Carlos Garcia Campos.

        A 0 object parameter for the glBindVertexArrayOES() call is a valid
        value since it binds the default vertex array object for any updates and
        draws. As such the Extensions3DOpenGLES implementation shouldn't return
        early if the object value is 0.

        No new tests -- covered by existing tests.

        * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
        (WebCore::Extensions3DOpenGLES::bindVertexArrayOES):

2019-06-17  Sihui Liu  <sihui_liu@apple.com>

        -[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't delete _WKWebsiteDataTypeCredentials
        https://bugs.webkit.org/show_bug.cgi?id=198854
        <rdar://problem/51386058>

        Reviewed by Geoffrey Garen.

        Add option NSURLCredentialStorageRemoveSynchronizableCredentials when removing persistent credential so 
        credentials from same account will be removed from all devices.

        Test: WKWebsiteDataStore.RemoveAllPersistentCredentials

        * platform/network/CredentialStorage.cpp:
        (WebCore::CredentialStorage::originsWithPersistentCredentials):
        (WebCore::CredentialStorage::removePersistentCredentialsWithOrigins):
        (WebCore::CredentialStorage::clearPersistentCredentials):
        * platform/network/CredentialStorage.h:
        * platform/network/mac/CredentialStorageMac.mm:
        (WebCore::CredentialStorage::originsWithPersistentCredentials):
        (WebCore::CredentialStorage::removePersistentCredentialsWithOrigins):
        (WebCore::CredentialStorage::clearPersistentCredentials):

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

        m_disconnectedFrame can be null in DOMWindowExtension::willDestroyGlobalObjectInCachedFrame()
        https://bugs.webkit.org/show_bug.cgi?id=198943

        Reviewed by Brady Eidson.

        Apparently it's possible for m_disconnectedFrame to be null in this function even though this should never happen.

        We've been trying to diagnose a class of issues in this area (e.g. r246187, r244971, r242797, r242677, r242676, r241848)
        but at some point, we need to stop crashing for the sake of user.

        Worked around the bug by adding a null pointer check here.

        * page/DOMWindowExtension.cpp:
        (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):

2019-06-17  Alex Christensen  <achristensen@webkit.org>

        Fix iOS crash when starting loads with no active DocumentLoader
        https://bugs.webkit.org/show_bug.cgi?id=187360
        <rdar://problem/29389084>

        Reviewed by Geoff Garen.

        When FrameLoader::activeDocumentLoader returns null in the ResourceLoader constructor,
        on iOS we will dereference it to ask if it has a frame in an early return in init.
        Let's not.  If we don't have a DocumentLoader, we don't have a frame and should fail.

        Crash reports indicate this crash is related to Beacon and other uses of LoaderStrategy::startPingLoad,
        but attempts to make a unit test to reproduce the crash were unsuccessful.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::init):

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

        [WHLSL] The name resolver does not deal with nativeFunctionDeclaration
        https://bugs.webkit.org/show_bug.cgi?id=198306

        Reviewed by Saam Barati.

        We currently have a crash in the nameResolver when trying to use the full standard library.
        What is happening is that because we don't specify anything to do to nativeFunctionDeclarations, names in their parameters
        are added to the global environment. And so as soon as we have two such parameters with the same name, the name resolver fails.

        Tested by adding two native functions that share a parameter name to the standard library.

        * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
        (WebCore::WHLSL::NameResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLNameResolver.h:

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

        [WHLSL] Remove backtracking from parseAttributeBlock
        https://bugs.webkit.org/show_bug.cgi?id=198934

        Reviewed by Myles C. Maxfield.

        No functional change intended.

        Tested by running LayoutTests/webgpu/whlsl-compute.html

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

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

        [WHLSL] Make .length work
        https://bugs.webkit.org/show_bug.cgi?id=198890

        Reviewed by Myles Maxfield.

        This patch makes accessing .length on buffers work. To make this work as
        expected, I've fixed a handful of small bugs:
        
        - The checker was not calling resolveByInstantiation for getters. This patch
          modifies the checker to do that, so we can now resolve a getter to
          "operator.length". I also refactored the checker to have a helper method
          that both does overload resolution and resolveByInstantiation to make it
          difficult to forget to call resolveByInstantiation.
        - The property resolver had a bug where it would return a non-null value
          in anderCallArgument for array references even when there was no ander and
          no thread ander function. This patch makes it now return null if there is
          neither an ander nor a thread ander.
        - The metal codegen incorrectly unpacked the length of buffers. It swapped the
          bottom four bytes and the top four bytes of the size_t value. This patch
          corrects that. This was also a cause of flakiness in various tests since
          we ended up with a length much larger than expected, leading to bounds
          checks always passing in our tests.
        - This patch also fixes our tests to specify the output buffer length
          properly for various programs.

        Test: webgpu/whlsl-buffer-length.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveFunction):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::anderCallArgument):

2019-06-17  Ryan Haddad  <ryanhaddad@apple.com>

        Unreviewed, rolling out r246501.

        Breaks Apple internal builds.

        Reverted changeset:

        "Support using ANGLE as the backend for the WebGL
        implementation"
        https://bugs.webkit.org/show_bug.cgi?id=197755
        https://trac.webkit.org/changeset/246501

2019-06-17  Kenneth Russell  <kbr@chromium.org>

        Support using ANGLE as the backend for the WebGL implementation
        https://bugs.webkit.org/show_bug.cgi?id=197755

        Reviewed by Dean Jackson.

        Add new files supplying an ANGLE version of GraphicsContext3D and
        Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
        build these files. This option compiles and links successfully.

        FIXMEs remain in several common files which will be addressed in
        subsequent patches.

        This work will be tested with the preexisting WebGL conformance
        suite.

        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/ANGLEWebKitBridge.h:
        * platform/graphics/GraphicsContext3D.h:
        * platform/graphics/GraphicsContext3DManager.cpp:
        (WebCore::GraphicsContext3DManager::updateAllContexts):
        (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
        (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
        * platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
        (WebCore::Extensions3DANGLE::Extensions3DANGLE):
        (WebCore::Extensions3DANGLE::supports):
        (WebCore::Extensions3DANGLE::ensureEnabled):
        (WebCore::Extensions3DANGLE::isEnabled):
        (WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
        (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
        (WebCore::Extensions3DANGLE::initializeAvailableExtensions):
        (WebCore::Extensions3DANGLE::readnPixelsEXT):
        (WebCore::Extensions3DANGLE::getnUniformfvEXT):
        (WebCore::Extensions3DANGLE::getnUniformivEXT):
        (WebCore::Extensions3DANGLE::blitFramebuffer):
        (WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
        (WebCore::Extensions3DANGLE::createVertexArrayOES):
        (WebCore::Extensions3DANGLE::deleteVertexArrayOES):
        (WebCore::Extensions3DANGLE::isVertexArrayOES):
        (WebCore::Extensions3DANGLE::bindVertexArrayOES):
        (WebCore::Extensions3DANGLE::insertEventMarkerEXT):
        (WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
        (WebCore::Extensions3DANGLE::popGroupMarkerEXT):
        (WebCore::Extensions3DANGLE::supportsExtension):
        (WebCore::Extensions3DANGLE::drawBuffersEXT):
        (WebCore::Extensions3DANGLE::drawArraysInstanced):
        (WebCore::Extensions3DANGLE::drawElementsInstanced):
        (WebCore::Extensions3DANGLE::vertexAttribDivisor):
        (WebCore::Extensions3DANGLE::getExtensions):
        * platform/graphics/angle/Extensions3DANGLE.h: Added.
        * platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
        (WebCore::GraphicsContext3D::releaseShaderCompiler):
        (WebCore::wipeAlphaChannelFromPixels):
        (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
        (WebCore::GraphicsContext3D::validateAttributes):
        (WebCore::GraphicsContext3D::reshapeFBOs):
        (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
        (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
        (WebCore::GraphicsContext3D::renderbufferStorage):
        (WebCore::GraphicsContext3D::getIntegerv):
        (WebCore::GraphicsContext3D::getShaderPrecisionFormat):
        (WebCore::GraphicsContext3D::texImage2D):
        (WebCore::GraphicsContext3D::depthRange):
        (WebCore::GraphicsContext3D::clearDepth):
        (WebCore::GraphicsContext3D::getExtensions):
        (WebCore::GraphicsContext3D::readPixels):
        (WebCore::setCurrentNameHashMapForShader):
        (WebCore::nameHashForShader):
        (WebCore::GraphicsContext3D::validateDepthStencil):
        (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
        (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
        (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
        (WebCore::GraphicsContext3D::prepareTexture):
        (WebCore::GraphicsContext3D::readRenderingResults):
        (WebCore::GraphicsContext3D::reshape):
        (WebCore::GraphicsContext3D::checkVaryingsPacking const):
        (WebCore::GraphicsContext3D::precisionsMatch const):
        (WebCore::GraphicsContext3D::getInternalFramebufferSize const):
        (WebCore::GraphicsContext3D::activeTexture):
        (WebCore::GraphicsContext3D::attachShader):
        (WebCore::GraphicsContext3D::bindAttribLocation):
        (WebCore::GraphicsContext3D::bindBuffer):
        (WebCore::GraphicsContext3D::bindFramebuffer):
        (WebCore::GraphicsContext3D::bindRenderbuffer):
        (WebCore::GraphicsContext3D::bindTexture):
        (WebCore::GraphicsContext3D::blendColor):
        (WebCore::GraphicsContext3D::blendEquation):
        (WebCore::GraphicsContext3D::blendEquationSeparate):
        (WebCore::GraphicsContext3D::blendFunc):
        (WebCore::GraphicsContext3D::blendFuncSeparate):
        (WebCore::GraphicsContext3D::bufferData):
        (WebCore::GraphicsContext3D::bufferSubData):
        (WebCore::GraphicsContext3D::mapBufferRange):
        (WebCore::GraphicsContext3D::unmapBuffer):
        (WebCore::GraphicsContext3D::copyBufferSubData):
        (WebCore::GraphicsContext3D::getInternalformativ):
        (WebCore::GraphicsContext3D::renderbufferStorageMultisample):
        (WebCore::GraphicsContext3D::texStorage2D):
        (WebCore::GraphicsContext3D::texStorage3D):
        (WebCore::GraphicsContext3D::getActiveUniforms):
        (WebCore::GraphicsContext3D::checkFramebufferStatus):
        (WebCore::GraphicsContext3D::clearColor):
        (WebCore::GraphicsContext3D::clear):
        (WebCore::GraphicsContext3D::clearStencil):
        (WebCore::GraphicsContext3D::colorMask):
        (WebCore::GraphicsContext3D::compileShader):
        (WebCore::GraphicsContext3D::compileShaderDirect):
        (WebCore::GraphicsContext3D::copyTexImage2D):
        (WebCore::GraphicsContext3D::copyTexSubImage2D):
        (WebCore::GraphicsContext3D::cullFace):
        (WebCore::GraphicsContext3D::depthFunc):
        (WebCore::GraphicsContext3D::depthMask):
        (WebCore::GraphicsContext3D::detachShader):
        (WebCore::GraphicsContext3D::disable):
        (WebCore::GraphicsContext3D::disableVertexAttribArray):
        (WebCore::GraphicsContext3D::drawArrays):
        (WebCore::GraphicsContext3D::drawElements):
        (WebCore::GraphicsContext3D::enable):
        (WebCore::GraphicsContext3D::enableVertexAttribArray):
        (WebCore::GraphicsContext3D::finish):
        (WebCore::GraphicsContext3D::flush):
        (WebCore::GraphicsContext3D::framebufferRenderbuffer):
        (WebCore::GraphicsContext3D::framebufferTexture2D):
        (WebCore::GraphicsContext3D::frontFace):
        (WebCore::GraphicsContext3D::generateMipmap):
        (WebCore::GraphicsContext3D::getActiveAttribImpl):
        (WebCore::GraphicsContext3D::getActiveAttrib):
        (WebCore::GraphicsContext3D::getActiveUniformImpl):
        (WebCore::GraphicsContext3D::getActiveUniform):
        (WebCore::GraphicsContext3D::getAttachedShaders):
        (WebCore::generateHashedName):
        (WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
        (WebCore::GraphicsContext3D::mappedSymbolName):
        (WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
        (WebCore::GraphicsContext3D::originalSymbolName):
        (WebCore::GraphicsContext3D::getAttribLocation):
        (WebCore::GraphicsContext3D::getAttribLocationDirect):
        (WebCore::GraphicsContext3D::getContextAttributes):
        (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
        (WebCore::GraphicsContext3D::getError):
        (WebCore::GraphicsContext3D::getString):
        (WebCore::GraphicsContext3D::hint):
        (WebCore::GraphicsContext3D::isBuffer):
        (WebCore::GraphicsContext3D::isEnabled):
        (WebCore::GraphicsContext3D::isFramebuffer):
        (WebCore::GraphicsContext3D::isProgram):
        (WebCore::GraphicsContext3D::isRenderbuffer):
        (WebCore::GraphicsContext3D::isShader):
        (WebCore::GraphicsContext3D::isTexture):
        (WebCore::GraphicsContext3D::lineWidth):
        (WebCore::GraphicsContext3D::linkProgram):
        (WebCore::GraphicsContext3D::pixelStorei):
        (WebCore::GraphicsContext3D::polygonOffset):
        (WebCore::GraphicsContext3D::sampleCoverage):
        (WebCore::GraphicsContext3D::scissor):
        (WebCore::GraphicsContext3D::shaderSource):
        (WebCore::GraphicsContext3D::stencilFunc):
        (WebCore::GraphicsContext3D::stencilFuncSeparate):
        (WebCore::GraphicsContext3D::stencilMask):
        (WebCore::GraphicsContext3D::stencilMaskSeparate):
        (WebCore::GraphicsContext3D::stencilOp):
        (WebCore::GraphicsContext3D::stencilOpSeparate):
        (WebCore::GraphicsContext3D::texParameterf):
        (WebCore::GraphicsContext3D::texParameteri):
        (WebCore::GraphicsContext3D::uniform1f):
        (WebCore::GraphicsContext3D::uniform1fv):
        (WebCore::GraphicsContext3D::uniform2f):
        (WebCore::GraphicsContext3D::uniform2fv):
        (WebCore::GraphicsContext3D::uniform3f):
        (WebCore::GraphicsContext3D::uniform3fv):
        (WebCore::GraphicsContext3D::uniform4f):
        (WebCore::GraphicsContext3D::uniform4fv):
        (WebCore::GraphicsContext3D::uniform1i):
        (WebCore::GraphicsContext3D::uniform1iv):
        (WebCore::GraphicsContext3D::uniform2i):
        (WebCore::GraphicsContext3D::uniform2iv):
        (WebCore::GraphicsContext3D::uniform3i):
        (WebCore::GraphicsContext3D::uniform3iv):
        (WebCore::GraphicsContext3D::uniform4i):
        (WebCore::GraphicsContext3D::uniform4iv):
        (WebCore::GraphicsContext3D::uniformMatrix2fv):
        (WebCore::GraphicsContext3D::uniformMatrix3fv):
        (WebCore::GraphicsContext3D::uniformMatrix4fv):
        (WebCore::GraphicsContext3D::useProgram):
        (WebCore::GraphicsContext3D::validateProgram):
        (WebCore::GraphicsContext3D::vertexAttrib1f):
        (WebCore::GraphicsContext3D::vertexAttrib1fv):
        (WebCore::GraphicsContext3D::vertexAttrib2f):
        (WebCore::GraphicsContext3D::vertexAttrib2fv):
        (WebCore::GraphicsContext3D::vertexAttrib3f):
        (WebCore::GraphicsContext3D::vertexAttrib3fv):
        (WebCore::GraphicsContext3D::vertexAttrib4f):
        (WebCore::GraphicsContext3D::vertexAttrib4fv):
        (WebCore::GraphicsContext3D::vertexAttribPointer):
        (WebCore::GraphicsContext3D::viewport):
        (WebCore::GraphicsContext3D::createVertexArray):
        (WebCore::GraphicsContext3D::deleteVertexArray):
        (WebCore::GraphicsContext3D::isVertexArray):
        (WebCore::GraphicsContext3D::bindVertexArray):
        (WebCore::GraphicsContext3D::getBooleanv):
        (WebCore::GraphicsContext3D::getBufferParameteriv):
        (WebCore::GraphicsContext3D::getFloatv):
        (WebCore::GraphicsContext3D::getInteger64v):
        (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
        (WebCore::GraphicsContext3D::getProgramiv):
        (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount):
        (WebCore::GraphicsContext3D::getUnmangledInfoLog):
        (WebCore::GraphicsContext3D::getProgramInfoLog):
        (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
        (WebCore::GraphicsContext3D::getShaderiv):
        (WebCore::GraphicsContext3D::getShaderInfoLog):
        (WebCore::GraphicsContext3D::getShaderSource):
        (WebCore::GraphicsContext3D::getTexParameterfv):
        (WebCore::GraphicsContext3D::getTexParameteriv):
        (WebCore::GraphicsContext3D::getUniformfv):
        (WebCore::GraphicsContext3D::getUniformiv):
        (WebCore::GraphicsContext3D::getUniformLocation):
        (WebCore::GraphicsContext3D::getVertexAttribfv):
        (WebCore::GraphicsContext3D::getVertexAttribiv):
        (WebCore::GraphicsContext3D::getVertexAttribOffset):
        (WebCore::GraphicsContext3D::texSubImage2D):
        (WebCore::GraphicsContext3D::compressedTexImage2D):
        (WebCore::GraphicsContext3D::compressedTexSubImage2D):
        (WebCore::GraphicsContext3D::createBuffer):
        (WebCore::GraphicsContext3D::createFramebuffer):
        (WebCore::GraphicsContext3D::createProgram):
        (WebCore::GraphicsContext3D::createRenderbuffer):
        (WebCore::GraphicsContext3D::createShader):
        (WebCore::GraphicsContext3D::createTexture):
        (WebCore::GraphicsContext3D::deleteBuffer):
        (WebCore::GraphicsContext3D::deleteFramebuffer):
        (WebCore::GraphicsContext3D::deleteProgram):
        (WebCore::GraphicsContext3D::deleteRenderbuffer):
        (WebCore::GraphicsContext3D::deleteShader):
        (WebCore::GraphicsContext3D::deleteTexture):
        (WebCore::GraphicsContext3D::synthesizeGLError):
        (WebCore::GraphicsContext3D::markContextChanged):
        (WebCore::GraphicsContext3D::markLayerComposited):
        (WebCore::GraphicsContext3D::layerComposited const):
        (WebCore::GraphicsContext3D::forceContextLost):
        (WebCore::GraphicsContext3D::recycleContext):
        (WebCore::GraphicsContext3D::dispatchContextChangedNotification):
        (WebCore::GraphicsContext3D::texImage2DDirect):
        (WebCore::GraphicsContext3D::drawArraysInstanced):
        (WebCore::GraphicsContext3D::drawElementsInstanced):
        (WebCore::GraphicsContext3D::vertexAttribDivisor):
        * platform/graphics/angle/TemporaryANGLESetting.cpp: Added.
        (WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
        (WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):
        * platform/graphics/angle/TemporaryANGLESetting.h: Added.
        * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
        (WebCore::GraphicsContext3D::GraphicsContext3D):
        (WebCore::GraphicsContext3D::~GraphicsContext3D):
        (WebCore::GraphicsContext3D::makeContextCurrent):
        (WebCore::GraphicsContext3D::checkGPUStatus):
        (WebCore::GraphicsContext3D::screenDidChange):
        * platform/graphics/cocoa/WebGLLayer.h:
        * platform/graphics/cocoa/WebGLLayer.mm:
        (-[WebGLLayer display]):
        * platform/graphics/cv/TextureCacheCV.mm:
        (WebCore::TextureCacheCV::create):
        (WebCore::TextureCacheCV::textureFromImage):
        * platform/graphics/cv/VideoTextureCopierCV.cpp:
        (WebCore::enumToStringMap):
        (WebCore::VideoTextureCopierCV::initializeContextObjects):
        (WebCore::VideoTextureCopierCV::initializeUVContextObjects):
        (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
        (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
        * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

2019-06-17  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        [GTK] Stop accessing GdkEvent fields when possible
        https://bugs.webkit.org/show_bug.cgi?id=198829

        Reviewed by Michael Catanzaro.

        Direct access to GdkEvent structs is no longer possible in GTK 4.

        No behaviour changes.

        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::eventTypeForGdkKeyEvent):
        (WebCore::modifiersForGdkKeyEvent):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        * platform/gtk/PlatformMouseEventGtk.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/gtk/PlatformWheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed, rolling out r246467.

        It broke scrolling with mouse wheel

        Reverted changeset:

        "[GTK] Stop accessing GdkEvent fields when possible"
        https://bugs.webkit.org/show_bug.cgi?id=198829
        https://trac.webkit.org/changeset/246467

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

        Convert some uses of fixed width and fixed precision floating point formatting to use shortest instead
        https://bugs.webkit.org/show_bug.cgi?id=198896

        Reviewed by Sam Weinig.

        * Modules/indexeddb/IDBKeyData.cpp:
        (WebCore::IDBKeyData::loggingString const): Removed unneeded use of
        FormattedNumber::fixedWidth to override the default shortest-form formatting.
        * page/History.cpp:
        (WebCore::History::stateObjectAdded): Ditto.

        * page/PrintContext.cpp:
        (WebCore::PrintContext::pageProperty): Use String::number instead of
        String::numberToStringFixedPrecision. Also removed some uses of
        FormattedNumber::fixedPrecision.
        * platform/graphics/FloatPolygon.cpp:
        (WebCore::FloatPolygonEdge::debugString const): Ditto.

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

        Rename AtomicString to AtomString
        https://bugs.webkit.org/show_bug.cgi?id=195276

        Reviewed by Michael Catanzaro.

        * many files: Let do-webcore-rename do the renaming.

2019-06-16  Eric Carlson  <eric.carlson@apple.com>

        [MediaStream] Avoid roundoff error when setting AVCapture min/max frame rate
        https://bugs.webkit.org/show_bug.cgi?id=198875
        <rdar://problem/51768374>

        Reviewed by Youenn Fablet.

        * platform/graphics/MediaPlayer.h:
        (WTF::LogArgument<MediaTime>::toString): Deleted, moved to MediaTime.h.
        (WTF::LogArgument<MediaTimeRange>::toString): Deleted, moved to MediaTime.h.

        * platform/mediastream/mac/AVVideoCaptureSource.mm:
        (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate): Avoid roundoff error.

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

        Implement ScrollableArea::scrollOffset()
        https://bugs.webkit.org/show_bug.cgi?id=198895

        Reviewed by Antti Koivisto.

        Remove from ScrollableArea the following:
            virtual int scrollSize(ScrollbarOrientation) const = 0;
            virtual int scrollOffset(ScrollbarOrientation) const = 0;
        and instead implement ScrollOffset scrollOffset() const.

        Also make scrollPosition() pure virtual, avoiding the reverse dependency where
        this base class implementation got values from scrollbars.
        
        scrollSize(ScrollbarOrientation) was only used by ScrollAnimatorIOS and we can
        do the same computation via min/max scroll positions.
        
        RenderListBox and PopupMenuWin need implementations of scrollPosition().
        
        Remove some PLATFORM(IOS_FAMILY) #ifdefs from ScrollableArea for code that compiles
        on all platforms.

        * page/FrameView.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::overhangAmount const):
        (WebCore::ScrollView::scrollSize const): Deleted.
        (WebCore::ScrollView::scrollOffset const): Deleted.
        * platform/ScrollView.h:
        * platform/ScrollableArea.cpp:
        (WebCore::ScrollableArea::isPinnedVerticallyInDirection const):
        (WebCore::ScrollableArea::scrollOffset const):
        (WebCore::ScrollableArea::scrollPosition const): Deleted.
        * platform/ScrollableArea.h:
        (WebCore::offsetForOrientation):
        (WebCore::ScrollableArea::isHorizontalScrollerPinnedToMinimumPosition const):
        (WebCore::ScrollableArea::isHorizontalScrollerPinnedToMaximumPosition const):
        (WebCore::ScrollableArea::isVerticalScrollerPinnedToMinimumPosition const):
        (WebCore::ScrollableArea::isVerticalScrollerPinnedToMaximumPosition const):
        (WebCore::ScrollableArea::tiledBacking const): Deleted.
        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::Scrollbar):
        (WebCore::Scrollbar::offsetDidChange):
        * platform/ios/ScrollAnimatorIOS.mm:
        (WebCore::ScrollAnimatorIOS::handleTouchEvent):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenuWin::scrollPosition const):
        (WebCore::PopupMenuWin::wndProc):
        (WebCore::PopupMenuWin::scrollSize const): Deleted.
        (WebCore::PopupMenuWin::scrollOffset const): Deleted.
        * platform/win/PopupMenuWin.h:
        (WebCore::PopupMenuWin::scrollOffset const): Deleted.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollSize const): Deleted.
        (WebCore::RenderLayer::scrollOffset const): Deleted.
        * rendering/RenderLayer.h:
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::scrollPosition const):
        (WebCore::RenderListBox::scrollSize const): Deleted.
        (WebCore::RenderListBox::scrollOffset const): Deleted.
        * rendering/RenderListBox.h:

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

        Address Sam's post-landing review of r246234.

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

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

        [LFC][IFC] Decouple baseline ascent/descent and baseline offset.
        https://bugs.webkit.org/show_bug.cgi?id=198901
        <rdar://problem/51782393>

        Reviewed by Antti Koivisto.

        Baseline offset is the baseline's distance from the line's logical top -and it is not necessarily the same as the baseline's ascent.
        It's easier to track the baseline and its top separately since certain properties only change one or the other.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::halfLeadingMetrics):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::baselineOffset const):
        (WebCore::Layout::Line::Content::setBaselineOffset):
        (WebCore::Layout::Line::baselineOffset const):
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::baselineOffset const):
        (WebCore::Layout::LineBox::LineBox):

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

        [LFC][IFC] Intruding float may prevent adding any inline box
        https://bugs.webkit.org/show_bug.cgi?id=198891
        <rdar://problem/51779956>

        Reviewed by Antti Koivisto.

        Take the intruding left/right float pair and find the vertical position where the next line might go
        if these floats prevent us from adding even one inline box to the current line.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::FormattingContext::mapPointToAncestor):
        (WebCore::Layout::FormattingContext::mapPointToDescendent):
        * layout/FormattingContext.h:
        * layout/LayoutUnits.h:
        (WebCore::Layout::Point::max):
        * layout/inlineformatting/InlineFormattingContext.h:
        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):

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

        [LFC][Floats] Add bottom value to FloatingState::Constraints
        https://bugs.webkit.org/show_bug.cgi?id=198889
        <rdar://problem/51776730>

        Reviewed by Antti Koivisto.

        Constraints::left/right->y indicates where this particular constrain ends. This is going to be used by inline layout to figure where
        the next line should go (vertical position).

        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::constraints const):
        * layout/floats/FloatingState.h:

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

        [LFC][IFC] Ignore descent when in limited/full quirks mode
        https://bugs.webkit.org/show_bug.cgi?id=198893
        <rdar://problem/51780634>

        Reviewed by Antti Koivisto.

        In limited/full quirks mode, line's descent should be ignored when computing the final line height when
        1. the line has baseline aligned content only and
        2. these baseline aligned boxes don't have descent.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):

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

        [LFC][IFC] Line::isVisuallyEmpty should check inline-block boxes.
        https://bugs.webkit.org/show_bug.cgi?id=198894
        <rdar://problem/51780886>

        Reviewed by Antti Koivisto.

        Non-zero width/height inline-block boxes make the line visually non-empty.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::isVisuallyEmpty const):

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

        [LFC] Add Layout::Box::isContainingBlockDescendantOf
        https://bugs.webkit.org/show_bug.cgi?id=198888
        <rdar://problem/51776466>

        Reviewed by Antti Koivisto.

        Box::isDescendantOf indicates simple ancestor - descendant relationship, while
        isContainingBlockDescendantOf checks the containing block chain.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::mapHorizontalPositionToAncestor):
        (WebCore::Layout::FormattingContext::mapBoxToAncestor):
        (WebCore::Layout::FormattingContext::mapTopToAncestor):
        (WebCore::Layout::FormattingContext::mapPointToAncestor):
        * layout/floats/FloatingState.h:
        (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isDescendantOf const):
        (WebCore::Layout::Box::isContainingBlockDescendantOf const):
        * layout/layouttree/LayoutBox.h:

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

        [LFC][IFC] Remove Line::Content::isVisuallyEmpty
        https://bugs.webkit.org/show_bug.cgi?id=198892
        <rdar://problem/51780345>

        Reviewed by Antti Koivisto.

        Instead of setting the isVisuallyEmpty flag, reset the line height to 0. 

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::close):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::isEmpty const):
        (WebCore::Layout::Line::Content::setBaseline):
        (WebCore::Layout::Line::Content::isVisuallyEmpty const): Deleted.
        (WebCore::Layout::Line::Content::setIsVisuallyEmpty): Deleted.

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

        [LFC] Add limited quirks mode to LayoutState.
        https://bugs.webkit.org/show_bug.cgi?id=198881
        <rdar://problem/51773229>

        Reviewed by Antti Koivisto.

        This is in preparation for introducing limited quirks mode to inline layout.

        * layout/LayoutState.h:
        (WebCore::Layout::LayoutState::setQuirksMode):
        (WebCore::Layout::LayoutState::inQuirksMode const):
        (WebCore::Layout::LayoutState::inLimitedQuirksMode const):
        (WebCore::Layout::LayoutState::inNoQuirksMode const):
        (WebCore::Layout::LayoutState::setInQuirksMode): Deleted.
        * page/FrameViewLayoutContext.cpp:
        (WebCore::layoutUsingFormattingContext):

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

        [LFC][IFC] Completely collapsed runs should not go to the trimmable run list.
        https://bugs.webkit.org/show_bug.cgi?id=198900
        <rdar://problem/51782156>

        Reviewed by Antti Koivisto.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::appendTextContent):

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

        [LFC][IFC] Use the borderBox rect consistently to size the inline box.
        https://bugs.webkit.org/show_bug.cgi?id=198899

        Reviewed by Antti Koivisto.
        <rdar://problem/51781969>

        Use the margin box height (when applicable) to adjust the line height and use the borderBox rect (or font size) height to size the inline box.

        * layout/displaytree/DisplayBox.h:
        (WebCore::Display::Box::borderBoxHeight const):
        (WebCore::Display::Box::marginBoxHeight const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::inlineItemContentHeight const):
        (WebCore::Layout::Line::inlineItemHeight const): Deleted.
        * layout/inlineformatting/InlineLine.h:

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

        Make layerTreeAsText() output a bit less verbose
        https://bugs.webkit.org/show_bug.cgi?id=198870

        Reviewed by Tim Horton.

        "accelerates drawing" was getting dumped twice for debug dumps.
        Only dump the non-default state for "uses display-list drawing".
        Use the new OptionSet<> dumping for GraphicsLayerPaintingPhases.

        * platform/graphics/GraphicsLayer.cpp:
        (WebCore::GraphicsLayer::dumpProperties const):
        (WebCore::operator<<):
        * platform/graphics/GraphicsLayer.h:
        * platform/graphics/ca/GraphicsLayerCA.cpp:
        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

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

        Make MediaStream constructor take a Document instead of a ScriptExecutionContext
        https://bugs.webkit.org/show_bug.cgi?id=198873

        Reviewed by Darin Adler.

        Update MediaStream constructors and call site to take a Document&.
        Make the same for creation of CanvasCaptureMediaStreamTrack.
        No observable change of behavior.

        * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
        (WebCore::CanvasCaptureMediaStreamTrack::create):
        (WebCore::CanvasCaptureMediaStreamTrack::CanvasCaptureMediaStreamTrack):
        (WebCore::loggerFromContext): Deleted.
        * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::MediaStream::create):
        (WebCore::MediaStream::MediaStream):
        (WebCore::MediaStream::clone):
        (WebCore::loggerFromContext): Deleted.
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStream.idl:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::captureStream):
        * html/HTMLCanvasElement.h:
        * html/HTMLCanvasElement.idl:

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

        [LFC][BFC] Fix available width for non-floating positioned float avoiders.
        https://bugs.webkit.org/show_bug.cgi?id=198886
        <rdar://problem/51773643>

        Reviewed by Antti Koivisto.

        Normally the available width for an in-flow block level box is the width of the containing block's content box.
        However a non-floating positioned float avoider box might be constrained by existing floats.
        The idea here is that we pre-compute(estimate) the vertical position and check the current floating context for
        left and right floats. These floats contrain the available width and this computed value should be used instead of the containing block's
        content box's width whe calculating the used width for width: auto.

        * layout/FormattingContext.cpp:
        (WebCore::Layout::mapHorizontalPositionToAncestor):
        (WebCore::Layout::FormattingContext::mapLeftToAncestor):
        (WebCore::Layout::FormattingContext::mapRightToAncestor):
        (WebCore::Layout::FormattingContext::mapPointToAncestor):
        (WebCore::Layout::FormattingContext::mapCoordinateToAncestor): Deleted.
        * layout/FormattingContext.h:
        * layout/blockformatting/BlockFormattingContext.cpp:
        (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const):
        (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
        (WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition const):
        (WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition const):
        (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
        (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot const):
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
        * layout/blockformatting/BlockFormattingContext.h:
        (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
        (WebCore::Layout::BlockFormattingContext::Geometry::staticVerticalPosition):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticHorizontalPosition):
        (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
        * layout/floats/FloatingState.cpp:
        (WebCore::Layout::FloatingState::constraints const):
        * layout/layouttree/LayoutBlockContainer.cpp:
        (WebCore::Layout::BlockContainer::establishesInlineFormattingContextOnly const):
        * layout/layouttree/LayoutBlockContainer.h:
        * layout/layouttree/LayoutBox.cpp:
        (WebCore::Layout::Box::isFloatAvoider const):
        * layout/layouttree/LayoutBox.h:
        (WebCore::Layout::Box::establishesInlineFormattingContextOnly const):

2019-06-15  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        [GTK] Stop accessing GdkEvent fields when possible
        https://bugs.webkit.org/show_bug.cgi?id=198829

        Reviewed by Michael Catanzaro.

        Direct access to GdkEvent structs is no longer possible in GTK 4.

        No behaviour changes.

        * platform/gtk/PlatformKeyboardEventGtk.cpp:
        (WebCore::eventTypeForGdkKeyEvent):
        (WebCore::modifiersForGdkKeyEvent):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        * platform/gtk/PlatformMouseEventGtk.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/gtk/PlatformWheelEventGtk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

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

        Add tests for prefetch redirects
        https://bugs.webkit.org/show_bug.cgi?id=197371

        Reviewed by Youenn Fablet.

        Test: http/wpt/prefetch/link-prefetch-main-resource-redirect.html

        Allow clearing of the Purpose request header field.

        * platform/network/ResourceRequestBase.cpp:
        (WebCore::ResourceRequestBase::clearPurpose):
        * platform/network/ResourceRequestBase.h:

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

        [LFC][MarginCollapsing] Remove redundant checks in MarginCollapse::marginBefore/AfterCollapsesWith*
        https://bugs.webkit.org/show_bug.cgi?id=198882
        <rdar://problem/51773334>

        Reviewed by Antti Koivisto.

        In-flow child can neither be floating nor out-of-flow positioned.

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):

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

        [LFC][MarginCollapsing] Collapsed through margin values preserve quirk state.
        https://bugs.webkit.org/show_bug.cgi?id=198885
        <rdar://problem/51773568>

        Reviewed by Antti Koivisto.

        The collapsed through margin becomes a quirk margin if either of the vertical(before/after) margins have quirk value.

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::computedPositiveAndNegativeMargin):

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

        [LFC[MarginCollapsing] Anonymous boxes never collapse their margins with siblings.
        https://bugs.webkit.org/show_bug.cgi?id=198884
        <rdar://problem/51773509>

        Reviewed by Antti Koivisto.

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter):

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

        [LFC][MarginCollapsing] Add check for computed height value in MarginCollapse::marginsCollapseThrough
        https://bugs.webkit.org/show_bug.cgi?id=198883
        <rdar://problem/51773395>

        Reviewed by Antti Koivisto.

        "A box's own margins collapse if... ...and it has a 'height' of either 0 or 'auto"
        https://www.w3.org/TR/CSS22/box.html#collapsing-margins

        * layout/blockformatting/BlockMarginCollapse.cpp:
        (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):

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

        [LFC] Fix available width for shrink-to-fit (for out-of-flow non-replaced box)
        https://bugs.webkit.org/show_bug.cgi?id=198880
        <rdar://problem/51773118>

        Reviewed by Antti Koivisto.

        This patch fixes the cases when the available width for the out-of-flow positioned box is not the same as the containing block's (padding)width.  

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):

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

        [LFC] Fix over-constrained logic for out-of-flow non-replaced horizontal geometry.
        https://bugs.webkit.org/show_bug.cgi?id=198879
        <rdar://problem/51772995>

        Reviewed by Antti Koivisto.

        The over-constrained logic applies to the case when all the horizontal properties are set.

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):

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

        [LFC] Convert both the absolutely and statically positioned out-of-flow block level boxes positions relative to the containing block's padding box
        https://bugs.webkit.org/show_bug.cgi?id=198878
        <rdar://problem/51772882>

        Reviewed by Antti Koivisto.

        This patch ensures that while we compute the vertical/horizontal geometry for an out-of-flow block level box,
        the static and the absolute positioned values are in the same coordinate system (relative to the containing block's padding box).

        * layout/FormattingContextGeometry.cpp:
        (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned):
        (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
        (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):

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

        [LFC][IFC] Add support for vertical-align: top and bottom
        https://bugs.webkit.org/show_bug.cgi?id=198697
        <rdar://problem/51556188>

        Reviewed by Antti Koivisto.

        Use the layout box's vertical alignment to adjust line baseline and height and set the run's logical top when the line is being closed.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::isVisuallyEmpty const):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::inlineItemHeight const):
        (WebCore::Layout::Line::Content::isVisuallyEmpty const): Deleted.
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::isVisuallyEmpty const):
        (WebCore::Layout::Line::Content::setIsVisuallyEmpty):
        (WebCore::Layout::Line::hasContent const):

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

        [Pointer Events] button property is -1 for pointerdown and pointerup
        https://bugs.webkit.org/show_bug.cgi?id=198868
        <rdar://problem/51758109>

        Reviewed by Dean Jackson.

        A value of -1 for "button", which means there was no change of pressed button since the last event, should only ever be used for "pointermove" events.

        Test: pointerevents/mouse/pointer-button-and-buttons.html

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

2019-06-14  Megan Gardner  <megan_gardner@apple.com>

        Move Synthetic Editing Commands to behind an experimental feature flag
        https://bugs.webkit.org/show_bug.cgi?id=198842
        <rdar://problem/50594700>

        Reviewed by Simon Fraser.

        Moving from a quirk to a feature flag.

        * page/Quirks.cpp:
        (WebCore::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreasForHost): Deleted.
        (WebCore::Quirks::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas const): Deleted.
        * page/Quirks.h:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::setSyntheticEditingCommandsEnabled):
        (WebCore::RuntimeEnabledFeatures::syntheticEditingCommandsEnabled const):

2019-06-14  Jer Noble  <jer.noble@apple.com>

        REGRESSION(244439): platform/mac/media/encrypted-media/fps-* tests are crashing
        https://bugs.webkit.org/show_bug.cgi?id=198612
        <rdar://problem/51078978>

        Reviewed by Eric Carlson.

        There are two implementations of a 'cenc' initialiation data factory; an ASSERT fires when
        the second one is added to the registry. Unify them.

        * Modules/encryptedmedia/InitDataRegistry.cpp:
        (WebCore::extractKeyIDsCenc):
        * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
        (WebCore::CDMPrivateFairPlayStreaming::validFairPlayStreamingSchemes):
        (WebCore::CDMPrivateFairPlayStreaming::fairPlaySystemID):
        (WebCore::validInitDataTypes):
        (WebCore::CDMFactory::platformRegisterFactories):
        (WebCore::validFairPlayStreamingSchemes): Deleted.
        (WebCore::CDMPrivateFairPlayStreaming::cencName): Deleted.
        (WebCore::fairPlaySystemID): Deleted.
        (WebCore::extractSchemeAndKeyIdFromCenc): Deleted.
        (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsCenc): Deleted.
        (WebCore::CDMPrivateFairPlayStreaming::sanitizeCenc): Deleted.
        * platform/graphics/avfoundation/CDMFairPlayStreaming.h:

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

        Unreviewed. Follow up to r246438. This removes a debug assert until
        we do further compiler work in: https://bugs.webkit.org/show_bug.cgi?id=198861

        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::checkDuplicateFunctions):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:

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

        [WHLSL] Implement out-of-bounds and nullptr behavior
        https://bugs.webkit.org/show_bug.cgi?id=198600
        <rdar://problem/51668853>

        Reviewed by Robin Morisset.

        The behavior we're implementing is:
        - OOB writes are ignored.
        - OOB reads return zero.
        - Writes to null are ignored.
        - Reads from null return zero.
        - &*x == x, including &*null == null.
        
        We implement this like so:
        - The value stack in FunctionWriter turns into a stack of pairs: rvalues and lvalues.
          rvalues are represented the same as before. Lvalues are always pointers.
        - Anything that produces an lvalue must push a pointer to the stack. Not
          all things produce lvalues, so that entry in the stack may be empty.
          However, all things that produce lvalues also produce rvalues. So, "*x = 42" works,
          and so does "foo(*x)". Nodes that produce lvalues are responsible for also producing
          an rvalue, which should be the value as if the lvalue was dereferenced at that point
          in program execution. So the "*x" in "thread int* x = null; *x" produces the int zero
          for its rvalue, and null for its lvalue.
        - Dereference just works, as dereference produces both an lvalue and rvalue. Dereference
          node's child must also be an lvalue. So we just forward that value along on
          the stack. For the rvalue, if we try to dereference nullptr, we just fill in
          zero bytes instead. Otherwise, the rvalue is the result of dereferencing the
          non-null pointer.
        - Assignment expressions check if the incoming lvalue is null. If it is, it
          skips the assignment.
        - operator&[] returns nullptr on an OOB access. Then, based on the above
          behavior, we get the desired OOB reads return zero, and OOB writes are
          ignored.
        - MakePointerExpression just takes the last lvalue off the stack (which must
          be a pointer) and returns it as an rvalue.
        - VariableReference will push both the variable value and a pointer to the variable
          onto the stack.

        This patch also fixes a few bugs where we weren't giving certain AST nodes the
        proper address space values.

        This patch also removes code to generate native functions for operators
        "operator[]" and "operator[]=" as we should never be generating these
        ourselves. We should only be generating the "operator&[]" ander.

        Tests: webgpu/whlsl-null-dereference.html
               webgpu/whlsl-oob-access.html

        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
        (WebCore::WHLSL::PreserveLifetimes::assignVariableIntoStruct):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
        (WebCore::trySetFunctions):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
        (WebCore::trySetFunctions):

2019-06-14  Jer Noble  <jer.noble@apple.com>

        CRASH(nullptr) in WebCore::jsAudioContextCurrentTime()
        https://bugs.webkit.org/show_bug.cgi?id=198859
        <rdar://problem/27986991>

        Reviewed by Eric Carlson.

        AudioContext's m_destinationNode can become null during iframe teardown,
        but can AudioContext methods can still be called by JavaScript. Add null-checks
        to all (remaing) unprotected dereferences of m_destinationNode.

        * Modules/webaudio/AudioContext.cpp:
        (WebCore::AudioContext::uninitialize):
        (WebCore::AudioContext::createBufferSource):
        (WebCore::AudioContext::createScriptProcessor):
        (WebCore::AudioContext::createBiquadFilter):
        (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):
        * Modules/webaudio/AudioContext.h:
        (WebCore::AudioContext::currentSampleFrame const):
        (WebCore::AudioContext::currentTime const):
        (WebCore::AudioContext::sampleRate const):

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

        Cloning a MediaStreamTrack does not clone the logger
        https://bugs.webkit.org/show_bug.cgi?id=198844

        Reviewed by Eric Carlson.

        Make MediaStream and MediaStreamTrack rely on their private versions for logging.
        Move from a RefPtr version to a Ref so as to forbid nullptr crashes.
        Make sure that RealtimeIncomingAudioSource and RealtimeIncomingVideoSource check for their logger before logging.
        Covered by existing tests and updated test.

        * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
        (WebCore::loggerFromContext):
        (WebCore::CanvasCaptureMediaStreamTrack::CanvasCaptureMediaStreamTrack):
        * Modules/mediastream/MediaStream.cpp:
        (WebCore::loggerFromContext):
        (WebCore::MediaStream::create):
        (WebCore::MediaStream::MediaStream):
        * Modules/mediastream/MediaStream.h:
        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        * Modules/mediastream/MediaStreamTrack.h:
        * Modules/mediastream/UserMediaRequest.cpp:
        (WebCore::UserMediaRequest::allow):
        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
        (WebCore::LibWebRTCMediaEndpoint::mediaStreamFromRTCStream):
        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
        (WebCore::LibWebRTCPeerConnectionBackend::createReceiverForSource):
        * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
        (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
        * platform/mediastream/MediaStreamPrivate.cpp:
        (WebCore::MediaStreamPrivate::create):
        (WebCore::MediaStreamPrivate::MediaStreamPrivate):
        (WebCore::MediaStreamPrivate::setLogger): Deleted.
        * platform/mediastream/MediaStreamPrivate.h:
        * platform/mediastream/MediaStreamTrackPrivate.cpp:
        (WebCore::MediaStreamTrackPrivate::create):
        (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
        (WebCore::MediaStreamTrackPrivate::clone):
        (WebCore::MediaStreamTrackPrivate::setLogger): Deleted.
        * platform/mediastream/MediaStreamTrackPrivate.h:
        * platform/mediastream/RealtimeMediaSourceCenter.cpp:
        (WebCore::RealtimeMediaSourceCenter::createMediaStream):
        * platform/mediastream/RealtimeMediaSourceCenter.h:
        * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
        (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
        * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
        (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
        (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):
        (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):

2019-06-14  Ali Juma  <ajuma@chromium.org>

        IntersectionObserver rootMargin detection fails when `root` is an element
        https://bugs.webkit.org/show_bug.cgi?id=198784

        Reviewed by Simon Fraser.

        When computing a target's bounds in root space, we were applying the root's
        clip rect (if any), and then intersecting with the root rect expanded by the
        root margin. This meant that if a target did not intersect the non-expanded root
        rect, we would get an empty intersection even if the target did intersect the
        expanded root rect. Fix this by not applying the root's clip rect when computing
        a target's bounds in root space. Add a new VisibleRectContextOption::ApplyContainerClip
        that determines whether RenderObject::computeVisibleRectInContainer should apply
        the container's clip.

        Test: imported/w3c/web-platform-tests/intersection-observer/root-margin-root-element.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::applyCachedClipAndScrollPosition const):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::visibleRectContextForRepaint):
        * rendering/RenderObject.h:

2019-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>

        [cairo] Entering text into forms on github.com creates a trapezoid artifact
        https://bugs.webkit.org/show_bug.cgi?id=126124

        Reviewed by Michael Catanzaro.

        Mixing antialiasing modes in the same clip is not actually supported by cairo. In the case of rectangle clips we
        are already ignoring the current antialiasing to not do any antialiasing. We could do the opposite for clips
        receiving a path, we want to enforce antialiasing in that case since the paths might contain curves. Doing that
        we ensure all calls to clip with a path use the same antialiasing, which is the case of the github bug.

        * platform/graphics/cairo/CairoOperations.cpp:
        (WebCore::Cairo::doClipWithAntialias): Helper to call cairo_clip() with the given antialising mode.
        (WebCore::Cairo::clip): Use doClipWithAntialias().
        (WebCore::Cairo::clipOut): Ditto.
        (WebCore::Cairo::clipPath): Ditto.

2019-06-13  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Remove unnecessary ASSERT()s and clean up visitor lambdas
        https://bugs.webkit.org/show_bug.cgi?id=198706

        Reviewed by Dean Jackson, Saam Barati, and Robin Morisset.

        Some minor refactoring.

        If the code is going to unconditionally downcast<Foo>(bar), there's no need
        to guard that with an ASSERT(is<Foo>(bar)) because the downcast() call will
        do that automatically.

        No new tests because there is no behavior change.

        * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
        (WebCore::WHLSL::AST::ConstantExpression::visit):
        (WebCore::WHLSL::AST::ConstantExpression::visit const):
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledOutputPath):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString):
        * 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::find):
        (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
        (WebCore::WHLSL::Metal::TypeNamer::insert):
        (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
        (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::Checker::visit):
        (WebCore::WHLSL::argumentTypeForAndOverload):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::inferTypesForTypeArguments):
        * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
        (WebCore::WHLSL::Intrinsics::addFullTexture):
        (WebCore::WHLSL::Intrinsics::addDepthTexture):
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::visit):
        * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
        (WebCore::WHLSL::Visitor::visit):

2019-06-12  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Hook up compute
        https://bugs.webkit.org/show_bug.cgi?id=198644

        Reviewed by Saam Barati.

        This patch hooks up compute shaders in exactly the same way that vertex and fragment shaders
        are hooked up. I've modified the two patchs (compute and rendering) to be almost exactly the
        same code.

        This patch also adds support for the WHLSL compiler to determine what the numthreads()
        attribute in the shader says so that it can be hooked up to Metal's threads-per-threadgroup
        argument in the dispatch call. There is some logic to make sure that there aren't two
        numthreads() attributes on the same compute shader.

        It also adds a little bit of type renaming. For built-in variables, sometimes Metal's type
        doesn't always match WHLSL's (and HLSL's type). For example, in WHLSL and HLSL,        SV_DispatchThreadID variables have to be a float3, but in Metal, they are a uint3.
        Therefore, I've added a little bit of code during each entry point's pack and unpack stages
        to handle this type conversion.

        Test: webgpu/whlsl-compute.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::internalTypeForSemantic): Determine which Metal type corresponds to
        each built-in variable.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature): Perform the type
        conversion.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns): Ditto.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding): Ditto.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes): Ditto.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): Ditto.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::FragmentEntryPointScaffolding): Ditto.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes): Ditto.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): Ditto.
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature): Ditto.
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp: Added. Add a pass to determine whether
        or not any entry point has duplicate numthreads() attribute, and to determine what the
        appropriate numthreads() values should be for the current entry point.
        (WebCore::WHLSL::ComputeDimensionsVisitor::ComputeDimensionsVisitor):
        (WebCore::WHLSL::ComputeDimensionsVisitor::computeDimensions const):
        (WebCore::WHLSL::computeDimensions):
        * Modules/webgpu/WHLSL/WHLSLComputeDimensions.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.h.
        * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
        (WebCore::WHLSL::gatherEntryPointItems): Compute shaders don't need to have a semantic for their return type.
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepare): Run the computeDimensions() pass.
        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp: In a left-value propertyAccessExpression,
        the index expression can be a right-value. Treat it as such.
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        (WebCore::WHLSL::LeftValueSimplifier::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: We need support for multiplication (for a
        test) and float3 for SV_DispatchThreadID.
        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUComputePipeline.h: Associate a compute dimensions with a particular
        compute pipeline. This is how Metal knows what values to use for a dispatch.
        (WebCore::GPUComputePipeline::computeDimensions const):
        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Use the saved compute dimensions.
        (WebCore::GPUComputePassEncoder::dispatch):
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Make the code match GPURenderPipelineMetal.
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):
        (WebCore::convertComputePipelineDescriptor):
        (WebCore::tryCreateMTLComputePipelineState):
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):
        (WebCore::tryCreateMtlComputeFunction): Deleted.
        * platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp: Added. Moved shared helper
        functions to a file where they can be accessed by multiple places.
        (WebCore::convertShaderStageFlags):
        (WebCore::convertBindingType):
        (WebCore::convertLayout):
        * platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.h.
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Delete the functions that were moved to GPUPipelineMetalConvertLayout.
        (WebCore::trySetFunctions):
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::convertShaderStageFlags): Deleted.
        (WebCore::convertBindingType): Deleted.
        (WebCore::convertLayout): Deleted.

2019-06-13  Jer Noble  <jer.noble@apple.com>

        AVKit play button bypasses MediaElementSession playbackPermitted() checks.
        https://bugs.webkit.org/show_bug.cgi?id=198813

        Reviewed by Eric Carlson.

        HTMLMediaElement::togglePlayState() is an internal-only method that doesn't
        run playbackPermitted() checks. For our imitation AVPlayerController, translate
        requests to -togglePlayback: into calls to play() and pause() depending on
        playback state.

        * platform/ios/WebAVPlayerController.mm:
        (-[WebAVPlayerController togglePlayback:]):

2019-06-13  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r246396 and r246397.
        https://bugs.webkit.org/show_bug.cgi?id=198837

        Breaks internal builds (Requested by ShawnRoberts on #webkit).

        Reverted changesets:

        "[WHLSL] Hook up compute"
        https://bugs.webkit.org/show_bug.cgi?id=198644
        https://trac.webkit.org/changeset/246396

        "[WHLSL] Hook up compute"
        https://bugs.webkit.org/show_bug.cgi?id=198644
        https://trac.webkit.org/changeset/246397

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

        twitch.tv: embedded video hovers down the screen when scrolling on iPad
        https://bugs.webkit.org/show_bug.cgi?id=198832
        <rdar://problem/51541439>

        Reviewed by Simon Fraser.

        Test: compositing/scrolling/async-overflow-scrolling/overflow-scroll-paint-order-sibling.html

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

        Overflow scroll layer may have composited descendants that are its paint order siblings. We need to invalidate
        the tree of the paint order parent for compositing update (instead of just the tree of the overflow scroll layer).

        This matches what RenderLayer::updateLayerPosition() does.

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

        SocketStreamHandle should not be destroyed in a background thread
        https://bugs.webkit.org/show_bug.cgi?id=198781

        Reviewed by Geoffrey Garen.

        Make sure to destroy SocketStreamHandle on the main thread since it owns an URL created on the main thread.
        Covered by WPT websocket tests from https://bugs.webkit.org/show_bug.cgi?id=198774.

        * platform/network/SocketStreamHandle.cpp:
        (WebCore::SocketStreamHandle::SocketStreamHandle):
        * platform/network/SocketStreamHandle.h:

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

        "display: contents" Content click does not trigger
        https://bugs.webkit.org/show_bug.cgi?id=198559
        <rdar://problem/51488524>

        Reviewed by Antti Koivisto.

        Test: fast/events/ios/click-event-and-display-contents.html

        * dom/Element.h:

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

        [curl] Remove member objects of CurlRequest not to share by different threads.
        https://bugs.webkit.org/show_bug.cgi?id=198747

        Reviewed by Fujii Hironori.

        Removed m_certificateInfo and m_networkLoadMetrics.
        Before patch those objects were updated by different threads.

        No tests needed, no functionality changes.

        * platform/network/curl/CurlDownload.cpp:
        (WebCore::CurlDownload::curlDidReceiveResponse):
        (WebCore::CurlDownload::curlDidReceiveBuffer):
        (WebCore::CurlDownload::curlDidComplete):
        (WebCore::CurlDownload::curlDidFailWithError):
        * platform/network/curl/CurlDownload.h:
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::start):
        (WebCore::CurlRequest::didReceiveHeader):
        (WebCore::CurlRequest::didCompleteTransfer):
        (WebCore::CurlRequest::invokeDidReceiveResponse):
        (WebCore::CurlRequest::networkLoadMetrics):
        (WebCore::CurlRequest::updateNetworkLoadMetrics): Deleted.
        * platform/network/curl/CurlRequest.h:
        (WebCore::CurlRequest::setStartTime):
        (WebCore::CurlRequest::certificateInfo const): Deleted.
        (WebCore::CurlRequest::networkLoadMetrics const): Deleted.
        * platform/network/curl/CurlRequestClient.h:
        * platform/network/curl/CurlResourceHandleDelegate.cpp:
        (WebCore::CurlResourceHandleDelegate::curlDidSendData):
        (WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):
        (WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer):
        (WebCore::CurlResourceHandleDelegate::curlDidComplete):
        (WebCore::CurlResourceHandleDelegate::curlDidFailWithError):
        * platform/network/curl/CurlResourceHandleDelegate.h:
        * platform/network/curl/CurlResponse.h:
        (WebCore::CurlResponse::isolatedCopy const):
        * platform/network/curl/ResourceResponseCurl.cpp:
        (WebCore::ResourceResponse::ResourceResponse):

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

        [Nicosia] Add SceneIntegration
        https://bugs.webkit.org/show_bug.cgi?id=198791

        Reviewed by Carlos Garcia Campos.

        Add the SceneIntegration class to the Nicosia namespace, primarily for
        the purpose of being able to conveniently trigger scene updates whenever
        changes are done to the state of layers that are included in that scene.
        Initially this would be used for layer changes done on a
        scrolling-dedicated thread.

        Each Nicosia::PlatformLayer can have a SceneIntegration object reference
        associated. Helper createUpdateScope() method returns a
        SceneIntegration::UpdateScope instance that triggers an update for the
        scene when that instance is destroyed (normally when it goes out of the
        scope).

        * platform/TextureMapper.cmake:
        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
        (Nicosia::PlatformLayer::setSceneIntegration):
        (Nicosia::PlatformLayer::createUpdateScope):
        * platform/graphics/nicosia/NicosiaSceneIntegration.cpp: Added.
        (Nicosia::SceneIntegration::SceneIntegration):
        (Nicosia::SceneIntegration::~SceneIntegration):
        (Nicosia::SceneIntegration::setClient):
        (Nicosia::SceneIntegration::invalidate):
        (Nicosia::SceneIntegration::requestUpdate):
        (Nicosia::SceneIntegration::createUpdateScope):
        (Nicosia::SceneIntegration::UpdateScope::UpdateScope):
        (Nicosia::SceneIntegration::UpdateScope::~UpdateScope):
        * platform/graphics/nicosia/NicosiaSceneIntegration.h: Added.

2019-06-13  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] HLS stream slow start
        https://bugs.webkit.org/show_bug.cgi?id=198377

        Reviewed by Xabier Rodriguez-Calvar.

        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webKitWebSrcCreate): Cut down the adapter condition to 200 ms to
        improve start-up times for HLS playback.

2019-06-13  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        [GTK] gdk_display_get_device_manager and gdk_screen_get_width/height are deprecated
        https://bugs.webkit.org/show_bug.cgi?id=198822

        Reviewed by Carlos Garcia Campos.

        GdkSeat and GdkRectangle should be used, respectively.

        No behaviour changes.

        * platform/gtk/GtkVersioning.c:
        (getDefaultGDKPointerDevice):
        (getScreenWorkArea):

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

        [WHLSL] Hook up compute
        https://bugs.webkit.org/show_bug.cgi?id=198644

        Unreviewed build fix. Release iOS build would complain that pipelineState was unused.

        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
        (WebCore::GPUComputePassEncoder::dispatch):

2019-06-12  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Hook up compute
        https://bugs.webkit.org/show_bug.cgi?id=198644

        Reviewed by Saam Barati.

        This patch hooks up compute shaders in exactly the same way that vertex and fragment shaders
        are hooked up. I've modified the two patchs (compute and rendering) to be almost exactly the
        same code.

        This patch also adds support for the WHLSL compiler to determine what the numthreads()
        attribute in the shader says so that it can be hooked up to Metal's threads-per-threadgroup
        argument in the dispatch call. There is some logic to make sure that there aren't two
        numthreads() attributes on the same compute shader.

        It also adds a little bit of type renaming. For built-in variables, sometimes Metal's type
        doesn't always match WHLSL's (and HLSL's type). For example, in WHLSL and HLSL,        SV_DispatchThreadID variables have to be a float3, but in Metal, they are a uint3.
        Therefore, I've added a little bit of code during each entry point's pack and unpack stages
        to handle this type conversion.

        Test: webgpu/whlsl-compute.html

        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::internalTypeForSemantic): Determine which Metal type corresponds to
        each built-in variable.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature): Perform the type
        conversion.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns): Ditto.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding): Ditto.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes): Ditto.
        (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): Ditto.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::FragmentEntryPointScaffolding): Ditto.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes): Ditto.
        (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): Ditto.
        (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature): Ditto.
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp: Added. Add a pass to determine whether
        or not any entry point has duplicate numthreads() attribute, and to determine what the
        appropriate numthreads() values should be for the current entry point.
        (WebCore::WHLSL::ComputeDimensionsVisitor::ComputeDimensionsVisitor):
        (WebCore::WHLSL::ComputeDimensionsVisitor::computeDimensions const):
        (WebCore::WHLSL::computeDimensions):
        * Modules/webgpu/WHLSL/WHLSLComputeDimensions.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.h.
        * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
        (WebCore::WHLSL::gatherEntryPointItems): Compute shaders don't need to have a semantic for their return type.
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepare): Run the computeDimensions() pass.
        * Modules/webgpu/WHLSL/WHLSLPrepare.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp: In a left-value propertyAccessExpression,
        the index expression can be a right-value. Treat it as such.
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        (WebCore::WHLSL::LeftValueSimplifier::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: We need support for multiplication (for a
        test) and float3 for SV_DispatchThreadID.
        * Sources.txt:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/gpu/GPUComputePipeline.h: Associate a compute dimensions with a particular
        compute pipeline. This is how Metal knows what values to use for a dispatch.
        (WebCore::GPUComputePipeline::computeDimensions const):
        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Use the saved compute dimensions.
        (WebCore::GPUComputePassEncoder::dispatch):
        * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Make the code match GPURenderPipelineMetal.
        (WebCore::trySetMetalFunctions):
        (WebCore::trySetFunctions):
        (WebCore::convertComputePipelineDescriptor):
        (WebCore::tryCreateMTLComputePipelineState):
        (WebCore::GPUComputePipeline::tryCreate):
        (WebCore::GPUComputePipeline::GPUComputePipeline):
        (WebCore::tryCreateMtlComputeFunction): Deleted.
        * platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp: Added. Moved shared helper
        functions to a file where they can be accessed by multiple places.
        (WebCore::convertShaderStageFlags):
        (WebCore::convertBindingType):
        (WebCore::convertLayout):
        * platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.h.
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Delete the functions that were moved to GPUPipelineMetalConvertLayout.
        (WebCore::trySetFunctions):
        (WebCore::tryCreateMtlRenderPipelineState):
        (WebCore::convertShaderStageFlags): Deleted.
        (WebCore::convertBindingType): Deleted.
        (WebCore::convertLayout): Deleted.

2019-06-12  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Implement array references
        https://bugs.webkit.org/show_bug.cgi?id=198163

        Reviewed by Saam Barati.

        The compiler automatically generates anders for every array reference. Luckily, the infrastructure
        to generate those anders and emit Metal code to represent them already exists in the compiler.
        There are two pieces remaining (which this patch implements):

        1. The JavaScript compiler has a behavior where anders that are called with an array reference
           as an argument don't wrap the argument in a MakePointerExpression. This is because the array
           reference is already a reference type, so it's silly to operate on a pointer to a reference.
           This patch implements this by teaching the type checker about which types should be passed
           to the ander call, and by actually constructing those types in the property resolver.
           The property resolver does this by placing the logic to construct an ander argument in a
           single function which also has logic to save the argument in a temporary if the thread ander
           will be called. The semantics about which functions are called in which situations are not
           changed; instead, we just simply don't wrap array references with MakePointerExpressions.

        2. Creating a bind group from the WebGPU API has to retain information about buffer lengths for
           each buffer so the shader can properly perform bounds checks. This can be broken down into a
           few pieces:
           - Creating a bind group layout has to assign extra id indexes for each buffer which will be
             filled in to represent the buffer's length
           - Creating the bind group itself needs to fill in the buffer length into the Metal argument
             buffer
           - The shader compiler needs to emit code at the beginning of entry point to find the buffer
             lengths and pack them together into the array reference (array references correspond to
             a Metal struct with two fields: a pointer and a length).

        This patch doesn't actually implement bounds checks themselves; it just hooks up the buffer
        lengths so https://bugs.webkit.org/show_bug.cgi?id=198600 can implement it.

        The shader compiler's API is modified to allow for this extra buffer length information to be
        passed in from the WebGPU implementation.

        Unfortunately, I don't think I could split this patch up into two pieces because both are
        required to test the compiler with buffers.

        Tests: webgpu/whlsl-buffer-fragment.html
               webgpu/whlsl-buffer-vertex.html

        * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
        (WebCore::WHLSL::AST::PropertyAccessExpression::baseReference):
        * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp:
        (WebCore::WHLSL::AST::ResourceSemantic::isAcceptableType const): Arrays can't be resources
        because the compiler has no way of guaranteeing if the resource is long enough to hold the
        array at compile time.
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
        (WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding): Generate an extra
        variable name to represent the buffer length. Only do it for resources which have lengths.
        (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
        (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns): Perform
        the appropriate math to turn byte lengths into element counts and store the element count
        in the array reference.
        * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::resolveWithOperatorAnderIndexer): Refactor.
        (WebCore::WHLSL::resolveWithOperatorLength): Ditto.
        (WebCore::WHLSL::resolveWithReferenceComparator): Ditto.
        (WebCore::WHLSL::resolveByInstantiation): Ditto.
        (WebCore::WHLSL::argumentTypeForAndOverload): Given an ander, what should the type of the
        argument be?
        (WebCore::WHLSL::Checker::finishVisiting): Call argumentTypeForAndOverload(). Also, if
        we couldn't find an ander, try automatically generating it, the same way that function
        calls do. (This is how array references get their anders.)
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h: New WHLSL API to provide the length
        information.
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit): SimplifyRightValue() can't fail any more.
        (WebCore::WHLSL::wrapAnderCallArgument): If the ander argument should be wrapped in a
        MakePointer or a MakeArrayReference, do that. Also, if the ander is a thread ander, save
        the argument in a local variable and use that.
        (WebCore::WHLSL::anderCallArgument): The equivalent of argumentTypeForAndOverload().
        (WebCore::WHLSL::setterCall): Call anderCallArgument().
        (WebCore::WHLSL::getterCall): Ditto.
        (WebCore::WHLSL::modify): We used to have special-case code for handling pointer-to-argument
        values as distinct from just the argument values themselves. However, emitting
        chains of &* operators is valid and won't even make it through the Metal code generator
        after https://bugs.webkit.org/show_bug.cgi?id=198600 is fixed. So, in order to simplify
        wrapAnderCallArgument(), don't special case these values and just create &* chains instead.
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting): Call anderCallArgument().
        * Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp: Update to support the new compiler API.
        (WebCore::WHLSL::matchMode):
        (WebCore::WHLSL::matchResources):
        * Modules/webgpu/WebGPUBindGroupDescriptor.cpp: Ditto.
        (WebCore::WebGPUBindGroupDescriptor::tryCreateGPUBindGroupDescriptor const):
        * platform/graphics/gpu/GPUBindGroupLayout.h: Add some internal implementation data inside
        the bindings object. Use a Variant to differentiate between the various bindings types, and
        put the extra length field on just those members of the variant that represent buffers.
        * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Update to support the new compiler API.
        (WebCore::argumentDescriptor):
        (WebCore::GPUBindGroupLayout::tryCreate):
        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Ditto.
        (WebCore::setBufferOnEncoder):
        (WebCore::GPUBindGroup::tryCreate):
        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Ditto.
        (WebCore::convertBindingType):
        (WebCore::convertLayout):

2019-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        [cairo][SVG] If clipPath has multiple elements, clip-path doesn't work with transform
        https://bugs.webkit.org/show_bug.cgi?id=198746

        Reviewed by Don Olmstead.

        We need to save the current transformation matrix at the moment the image mask is set and set it again on
        restore right before applying the mask. This patch also creates a pattern for the image mask surface and set its
        transformation matrix according to the mask position, so that we don't need to save the mask rectangle too.

        Tests: svg/clip-path/clip-hidpi-expected.svg
               svg/clip-path/clip-hidpi.svg
               svg/clip-path/clip-opacity-translate-expected.svg
               svg/clip-path/clip-opacity-translate.svg

        * platform/graphics/cairo/PlatformContextCairo.cpp:
        (WebCore::PlatformContextCairo::restore):
        (WebCore::PlatformContextCairo::pushImageMask):

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

        paddingBoxRect() is wrong with RTL scrollbars on the left
        https://bugs.webkit.org/show_bug.cgi?id=198816

        Reviewed by Jon Lee.

        RenderBox::paddingBoxRect() needs to offset the left side of the box for the
        vertical scrollbar, if it's placed on the left.

        Test: compositing/geometry/rtl-overflow-scroll.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paddingBoxRect const):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::paddingBoxRect const): Deleted.
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGeometry):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::controlClipRect const):

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

        Use NSURLSession for WebSocket
        https://bugs.webkit.org/show_bug.cgi?id=198568

        Reviewed by Geoffrey Garen.

        Add a runtime flag to either choose the new WebSocket code path or the previously existing one.
        The switch is done at WebSocket channel API level which offers the necessary high level API to abstract the two code paths.
        By default, we continue using the current WebSocket implementation.
        Covered by manual testing on current WebSocket tests.

        * Modules/websockets/ThreadableWebSocketChannel.cpp:
        (WebCore::ThreadableWebSocketChannel::create):
        * Modules/websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::document):
        * Modules/websockets/WebSocketChannel.h:
        * WebCore.xcodeproj/project.pbxproj:
        * page/RuntimeEnabledFeatures.h:
        (WebCore::RuntimeEnabledFeatures::isNSURLSessionWebSocketEnabled const):
        (WebCore::RuntimeEnabledFeatures::setIsNSURLSessionWebSocketEnabled):
        * page/SocketProvider.cpp:
        (WebCore::SocketProvider::createWebSocketChannel):
        * page/SocketProvider.h:

2019-06-12  Myles C. Maxfield  <mmaxfield@apple.com>

        [WHLSL] Educate the property resolver about IndexExpressions
        https://bugs.webkit.org/show_bug.cgi?id=198399

        Reviewed by Saam Barati.

        This is part one of two patches which will allow buffers to work. This patch
        adds support in the property resolver for index expressions. Index expressions
        get turned into calls to "getter indexers", "setter indexers", or "ander
        indexers". They work almost identically to dot expressions, except there is an
        extra "index" expression which gets turned into an extra argument to those
        functions.

        There's actually a bit of a trick here. Let's say we need to run a getter and
        a setter separately (e.g. "foo[3]++;"). The index expression can't be duplicated
        for both the getter and the setter (e.g. the functions are
        int operator[](Foo, uint) and Foo operator[]=(Foo, uint, int), and we aren't
        allowed to execute the index expression multiple times. Consider if that "3"
        in the example is actually "bar()" with some side effect. So, we have to run
        the index expression once at the correct time, and save its result to a temporary
        variable, and then pass in the temporary variable into the getter and setter.

        So, if the code says "foo[bar()][baz()] = quux();" the following sequence of
        functions get run:

        - bar()
        - operator[](Foo, uint)
        - baz()
        - quux()
        - operator[]=(OtherType, uint, OtherOtherType)
        - operator[]=(Foo, uint, OtherType)

        The next patch will modify the WebGPU JavaScript implementation to send buffer
        lengths to the shader, and for the shader compiler to correctly unpack this
        information and place it inside the array references. That should be everything
        that's needed to get buffers to work. After that, hooking up compute should be
        fairly trivial.

        Tests: webgpu/propertyresolver/ander-abstract-lvalue.html
               webgpu/propertyresolver/ander-lvalue-3-levels.html
               webgpu/propertyresolver/ander-lvalue.html
               webgpu/propertyresolver/ander.html
               webgpu/propertyresolver/getter.html
               webgpu/propertyresolver/indexer-ander-abstract-lvalue.html
               webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html
               webgpu/propertyresolver/indexer-ander-lvalue.html
               webgpu/propertyresolver/indexer-ander.html
               webgpu/propertyresolver/indexer-getter.html
               webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html
               webgpu/propertyresolver/indexer-setter-abstract-lvalue.html
               webgpu/propertyresolver/indexer-setter-lvalue.html
               webgpu/propertyresolver/indexer-setter.html
               webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html
               webgpu/propertyresolver/setter-abstract-lvalue.html
               webgpu/propertyresolver/setter-lvalue.html

        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::toString):
        * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
        (WebCore::WHLSL::AST::toString):
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        (WebCore::WHLSL::AST::IndexExpression::takeIndex):
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        (WebCore::WHLSL::Metal::convertAddressSpace): Deleted.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        (WebCore::WHLSL::LeftValueSimplifier::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):

2019-06-12  Devin Rousso  <drousso@apple.com>

        Web Inspector: artificial context menus don't work when Web Inspector is zoomed
        https://bugs.webkit.org/show_bug.cgi?id=198801

        Reviewed by Joseph Pecoraro.

        * inspector/InspectorFrontendHost.cpp:
        (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
        Use the `absoluteLocation` of the `MouseEvent`, which takes into account zoom and scale.

2019-06-12  Sam Weinig  <weinig@apple.com>

        Remove dead code in user agent construction
        https://bugs.webkit.org/show_bug.cgi?id=198802

        Reviewed by Anders Carlsson.

        * page/NavigatorBase.cpp:
        (WebCore::NavigatorBase::platform const):
        Drop dead architures.

2019-06-12  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        [GTK] GTK_STOCK_* types have been deprecated since GTK 3.10
        https://bugs.webkit.org/show_bug.cgi?id=198787

        Reviewed by Michael Catanzaro.

        No behaviour changes.

        * platform/graphics/gtk/IconGtk.cpp:
        (WebCore::lookupIconName):
        * platform/graphics/gtk/ImageGtk.cpp:
        (WebCore::loadMissingImageIconFromTheme):

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

        (Async scrolling) Handle 'position:fixed' inside 'position:sticky' correctly.
        https://bugs.webkit.org/show_bug.cgi?id=198788
        <rdar://problem/51589759>

        Reviewed by Simon Fraser.

        Handle 'position:fixed' inside 'position:sticky' correctly.

        Also fix nested 'position:fixed' in case where there is an overflow scroller between them.

        Tests: scrollingcoordinator/ios/fixed-inside-overflow-inside-fixed.html
               scrollingcoordinator/ios/fixed-inside-sticky-frame.html
               scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2.html
               scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context.html
               scrollingcoordinator/ios/fixed-inside-sticky-stacking-context.html

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

        Take offsets from sticky nodes into account.

        * page/scrolling/cocoa/ScrollingTreeStickyNode.h:
        (WebCore::ScrollingTreeStickyNode::layer):
        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):

        Factor into a function.

        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
        (WebCore::ScrollingTreeStickyNode::scrollDeltaSinceLastCommit const):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):

        We need to generate a scrolling tree node for position:fixed in nested case if there is an overflow scroller
        between the layers.

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

        Unreviewed, rolling out r246350.

        r246350 Introduced a failing and timing out test svg/clip-path
        /clip-hidpi.svg

        Reverted changeset:

        "[cairo][SVG] If clipPath has multiple elements, clip-path doesn't work with transform"
        https://bugs.webkit.org/show_bug.cgi?id=198746
        https://trac.webkit.org/changeset/246350

2019-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>

        [cairo][SVG] If clipPath has multiple elements, clip-path doesn't work with transform
        https://bugs.webkit.org/show_bug.cgi?id=198746
        <rdar://problem/51665805>

        Reviewed by Don Olmstead.

        We need to save the current transformation matrix at the moment the image mask is set and set it again on
        restore right before applying the mask. This patch also creates a pattern for the image mask surface and set its
        transformation matrix according to the mask position, so that we don't need to save the mask rectangle too.

        Tests: svg/clip-path/clip-hidpi-expected.svg
               svg/clip-path/clip-hidpi.svg
               svg/clip-path/clip-opacity-translate-expected.svg
               svg/clip-path/clip-opacity-translate.svg

        * platform/graphics/cairo/PlatformContextCairo.cpp:
        (WebCore::PlatformContextCairo::restore):
        (WebCore::PlatformContextCairo::pushImageMask):

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

        [iOS] Idempotent text autosizing needs to react properly to viewport changes
        https://bugs.webkit.org/show_bug.cgi?id=198736
        <rdar://problem/50591911>

        Reviewed by Zalan Bujtas.

        Minor refactoring and some adjustments around StyleResolver::adjustRenderStyleForTextAutosizing. See below for
        more details, as well as the WebKit ChangeLog.

        Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-after-changing-initial-scale.html

        * css/StyleResolver.cpp:
        (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):

        Rewrite this using early return statements, to make it easier to debug why elements fall out of text autosizing.
        Additionally, this function currently bails if the initial scale is exactly 1, whereas we can really avoid text
        autosizing in the case where the initial scale is at least 1; handle this by making idempotentTextSize return
        immediately with the specified size, in the case where the scale is at least 1.

        Lastly, remove the null check for element by making this method take an Element&, and only call this from
        adjustRenderStyle if the element is nonnull (which matches adjustRenderStyleForSiteSpecificQuirks).

        (WebCore::StyleResolver::adjustRenderStyle):
        * css/StyleResolver.h:
        * rendering/style/TextSizeAdjustment.cpp:
        (WebCore::AutosizeStatus::idempotentTextSize):

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

        Flash when tapping compose button after switching to/from dark mode without restarting Mail.
        https://bugs.webkit.org/show_bug.cgi?id=198769
        rdar://problem/51370037

        Reviewed by Tim Horton.

        * WebCore.xcodeproj/project.pbxproj: Make LocalCurrentTraitCollection.h a private header.

2019-06-11  Commit Queue  <commit-queue@webkit.org>

        Unreviewed, rolling out r246320.
        https://bugs.webkit.org/show_bug.cgi?id=198773

        New test is failing, and commit is causing another test to
        fail. (Requested by ShawnRoberts on #webkit).

        Reverted changeset:

        "Web Inspector: AXI: Audit: image label test is throwing
        spurious errors on elements with existing alt attr, but no
        value: <img alt>"
        https://bugs.webkit.org/show_bug.cgi?id=194754
        https://trac.webkit.org/changeset/246320

2019-06-11  Devin Rousso  <drousso@apple.com>

        Sort the computed styles list
        https://bugs.webkit.org/show_bug.cgi?id=198743

        Reviewed by Simon Fraser

        * css/CSSComputedStyleDeclaration.cpp:

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

        Unreviewed build warning fixes

        Silence -Wunused-parameter warning

        * testing/Internals.cpp:
        (WebCore::Internals::storeRegistrationsOnDisk):

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

        Add logging for UI-side compositing hit-testing
        https://bugs.webkit.org/show_bug.cgi?id=198739

        Reviewed by Antti Koivisto.

        Export the TextStream output operator.

        * platform/TouchAction.h:

2019-06-11  Greg Doolittle  <gr3g@apple.com>

        Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
        https://bugs.webkit.org/show_bug.cgi?id=194754
        <rdar://problem/48144534>

        Reviewed by Chris Fleizach.

        Tests: accessibility/img-alt-attribute-empty-string.html
               accessibility/img-alt-attribute-no-value.html

        * accessibility/AccessibilityObject.cpp:
        (WebCore::AccessibilityObject::computedRoleString const):

2019-06-11  Sihui Liu  <sihui_liu@apple.com>

        Add a quirk for washingtonpost.com and nytimes.com
        https://bugs.webkit.org/show_bug.cgi?id=198678

        Reviewed by Geoffrey Garen.

        Covered by manual test.

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

2019-06-11  Devin Rousso  <drousso@apple.com>

        Include `touch-action` in the computed styles list
        https://bugs.webkit.org/show_bug.cgi?id=198742

        Reviewed by Antoine Quint.

        * css/CSSComputedStyleDeclaration.cpp:

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

        tu-berlin university email web interface (Outlook Web App) goes directly to the light version instead of the normal web app
        https://bugs.webkit.org/show_bug.cgi?id=198749

        Reviewed by Carlos Garcia Campos.

        Add user agent quirk for exchange.tu-berlin.de, which has lost the right to receive an
        accurate user agent from WebKit.

        * platform/UserAgentQuirks.cpp:
        (WebCore::urlRequiresMacintoshPlatform):

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

        MediaStreamAudioSourceNode::setFormat should check for m_sourceSampleRate equality
        https://bugs.webkit.org/show_bug.cgi?id=198740
        <rdar://problem/47088939>

        Reviewed by Eric Carlson.

        Covered by tests that are now passing.

        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
        (WebCore::MediaStreamAudioSourceNode::setFormat):

2019-06-11  Ludovico de Nittis  <ludovico.denittis@collabora.com>

        [GTK] Replace gdk_screen_get_monitor_geometry and gdk_screen_get_monitor_workarea
        https://bugs.webkit.org/show_bug.cgi?id=198750

        Reviewed by Carlos Garcia Campos.

        Since GTK 3.22 gdk_screen_get_monitor_geometry and
        gdk_screen_get_monitor_workarea has been deprecated. 

        No behavior change.

        * platform/gtk/PlatformScreenGtk.cpp:
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):

2019-06-11  Fujii Hironori  <Hironori.Fujii@sony.com>

        [cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
        https://bugs.webkit.org/show_bug.cgi?id=198701

        PlatformContextCairo::pushImageMask blits wrong position of the
        surface to the background of masking objects. And, I don't know
        the reason why this blitting is needed. Removed the blitting.

        Reviewed by Carlos Garcia Campos.

        Tests: svg/clip-path/clip-opacity.html
               svg/clip-path/svg-in-html.html

        * platform/graphics/cairo/PlatformContextCairo.cpp:
        (WebCore::PlatformContextCairo::pushImageMask): Don't blit the
        surface to the background.

2019-06-10  Fujii Hironori  <Hironori.Fujii@sony.com>

        [WinCairo][MediaFoundation] Remove the unused video window
        https://bugs.webkit.org/show_bug.cgi?id=198523

        Reviewed by Don Olmstead.

        Remove the video window which had been unused since Bug 150941.

        No behavior change.

        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
        (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
        (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
        (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
        (WebCore::MediaPlayerPrivateMediaFoundation::paint):
        (WebCore::MediaPlayerPrivateMediaFoundation::hostWindow):
        (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setVideoWindow):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setDestinationRect):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
        (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc): Deleted.
        (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass): Deleted.
        (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow): Deleted.
        (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow): Deleted.
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSwapChain): Deleted.
        (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::updateDestRect): Deleted.
        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

        Add visualization of touch action regions
        https://bugs.webkit.org/show_bug.cgi?id=198718

        Reviewed by Antoine Quint.

        Add a way to show which elements of the page have touch-action set on them by
        painting an overlay with small text that shows the type of action(s).

        The event regions are painted into GraphicsLayers at paint time in
        RenderLayerBacking by making a pattern image and filling the region rects
        with the pattern.

        * page/DebugPageOverlays.cpp:
        (WebCore::touchEventRegionColors):
        * rendering/EventRegion.cpp:
        (WebCore::EventRegion::regionForTouchAction const):
        * rendering/EventRegion.h:
        (WebCore::EventRegion::region const):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateEventRegion):
        (WebCore::patternForTouchAction):
        (WebCore::RenderLayerBacking::paintContents):

2019-06-10  Basuke Suzuki  <Basuke.Suzuki@sony.com>

        Web Inspector: DNS names in SymmaryInfo was wrong.
        https://bugs.webkit.org/show_bug.cgi?id=198732

        Reviewed by Devin Rousso.

        * inspector/agents/InspectorNetworkAgent.cpp:
        (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):

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

        [GTK] 2.25.1 does not build on 32-bit ARM due to bit-packing assertion, requires -DENABLE_DARK_MODE_CSS=OFF
        https://bugs.webkit.org/show_bug.cgi?id=198274

        Reviewed by Timothy Hatcher.

        Rather than reorder everything in StyleRareInheritedData, let's slightly increase the size
        of GreaterThanOrSameSizeAsStyleRareInheritedData to allow the static assert to pass.

        At the same time, remove an obsolote iOS-specific member that is probably no longer needed.

        * rendering/style/StyleRareInheritedData.cpp:

2019-06-10  Sam Weinig  <weinig@apple.com>

        Remove Dashboard support
        https://bugs.webkit.org/show_bug.cgi?id=198615

        Reviewed by Ryosuke Niwa.

        * Configurations/FeatureDefines.xcconfig:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSCalculationValue.cpp:
        (WebCore::hasDoubleValue):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::isValidCSSUnitTypeForDoubleConversion):
        (WebCore::isStringType):
        (WebCore::CSSPrimitiveValue::cleanup):
        (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
        (WebCore::CSSPrimitiveValue::equals const):
        * css/CSSPrimitiveValue.h:
        * css/CSSProperties.json:
        * css/CSSValueKeywords.in:
        * css/DashboardRegion.h: Removed.
        * css/StyleBuilderCustom.h:
        (WebCore::convertToIntLength): Deleted.
        (WebCore::StyleBuilderCustom::applyValueWebkitDashboardRegion): Deleted.
        * css/StyleResolver.cpp:
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::CSSPropertyParser::parseSingleValue):
        (WebCore::consumeWebkitDashboardRegion): Deleted.
        * dom/DataTransfer.cpp:
        (WebCore::DataTransfer::createForUpdatingDropTarget):
        * dom/Document.cpp:
        (WebCore::Document::invalidateRenderingDependentRegions):
        (WebCore::Document::annotatedRegions const): Deleted.
        (WebCore::Document::setAnnotatedRegions): Deleted.
        (WebCore::Document::updateAnnotatedRegions): Deleted.
        (WebCore::Document::invalidateScrollbarDependentRegions): Deleted.
        (WebCore::Document::updateZOrderDependentRegions): Deleted.
        * dom/Document.h:
        (WebCore::Document::setHasAnnotatedRegions): Deleted.
        (WebCore::Document::setAnnotatedRegionsDirty): Deleted.
        (WebCore::Document::annotatedRegionsDirty const): Deleted.
        (WebCore::Document::hasAnnotatedRegions const): Deleted.
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::createContext2d):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::rendererIsNeeded):
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::sourceURI const):
        * html/canvas/CanvasGradient.cpp:
        (WebCore::CanvasGradient::addColorStop):
        * html/canvas/CanvasGradient.h:
        (WebCore::CanvasGradient::setDashboardCompatibilityMode): Deleted.
        (): Deleted.
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::create):
        (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
        * html/canvas/CanvasRenderingContext2D.h:
        * html/canvas/CanvasRenderingContext2DBase.cpp:
        (WebCore::CanvasRenderingContext2DBase::CanvasRenderingContext2DBase):
        (WebCore::CanvasRenderingContext2DBase::fill):
        (WebCore::CanvasRenderingContext2DBase::stroke):
        (WebCore::CanvasRenderingContext2DBase::clip):
        (WebCore::CanvasRenderingContext2DBase::createLinearGradient):
        (WebCore::CanvasRenderingContext2DBase::createRadialGradient):
        (WebCore::CanvasRenderingContext2DBase::prepareGradientForDashboard const): Deleted.
        (WebCore::CanvasRenderingContext2DBase::clearPathForDashboardBackwardCompatibilityMode): Deleted.
        * html/canvas/CanvasRenderingContext2DBase.h:
        * html/canvas/OffscreenCanvasRenderingContext2D.cpp:
        (WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D):
        * html/canvas/PaintRenderingContext2D.cpp:
        (WebCore::PaintRenderingContext2D::PaintRenderingContext2D):
        * page/Chrome.cpp:
        (WebCore::ChromeClient::annotatedRegionsChanged): Deleted.
        * page/ChromeClient.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::didLayout):
        (WebCore::FrameView::didPaintContents):
        * page/Settings.yaml:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks const):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::addAnnotatedRegions): Deleted.
        * rendering/RenderInline.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollTo):
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):
        (WebCore::RenderLayer::updateScrollbarsAfterLayout):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::setHasVerticalScrollbar):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::addAnnotatedRegions): Deleted.
        (WebCore::RenderObject::collectAnnotatedRegions): Deleted.
        * rendering/RenderObject.h:
        (WebCore::AnnotatedRegionValue::operator== const): Deleted.
        (WebCore::AnnotatedRegionValue::operator!= const): Deleted.
        * rendering/style/RenderStyle.cpp:
        (WebCore::rareNonInheritedDataChangeRequiresLayout):
        (WebCore::RenderStyle::initialDashboardRegions): Deleted.
        (WebCore::RenderStyle::noneDashboardRegions): Deleted.
        (WebCore::RenderStyle::setDashboardRegion): Deleted.
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::dashboardRegions const): Deleted.
        (WebCore::RenderStyle::setDashboardRegions): Deleted.
        * rendering/style/StyleDashboardRegion.h: Removed.
        * rendering/style/StyleRareNonInheritedData.cpp:
        (WebCore::StyleRareNonInheritedData::operator== const):
        * rendering/style/StyleRareNonInheritedData.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):
        (WebCore::XMLHttpRequest::setRequestHeader):
        (WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode const): Deleted.
        * xml/XMLHttpRequest.h:

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

        Event region should be set on scrolledContentsLayer if it exists
        https://bugs.webkit.org/show_bug.cgi?id=198717
        <rdar://problem/51572169>

        Reviewed by Simon Fraser.

        Test: pointerevents/ios/touch-action-region-overflow.html

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

        Move to updateBackingAndHierarchy.

        (WebCore::RenderLayerBacking::updateEventRegion):

        - Set event region on scrolledContentsLayer if it exists
        - Translate away the scroll offset
        - Get the offset from renderer from the GraphicsLayer so scrolling and non-scrolling case can be handled uniformly.

        * rendering/RenderLayerBacking.h:
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

        Invoke updateEventRegion after geometry update so offsets are already available on GraphicsLayer.

2019-06-10  Daniel Bates  <dabates@apple.com>

        [CSP] Blob URLs should inherit their CSP policy
        https://bugs.webkit.org/show_bug.cgi?id=198579
        <rdar://problem/51366878>

        Reviewed by Brent Fulgham.

        As per <https://w3c.github.io/webappsec-csp/#security-inherit-csp> (Editor's Draft, 28 February 2019) blob
        URLs should inherit their CSP policy from their parent (if they have one).

        Test: http/tests/security/contentSecurityPolicy/navigate-self-to-blob.html
              http/tests/security/contentSecurityPolicy/navigate-self-to-data-url.html

        * dom/Document.cpp:
        (WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const): Return true if the document's URL
        is a Blob URL.
        (WebCore::Document::initContentSecurityPolicy): Take a pointer to a ContentSecurityPolicy object that
        represents the previous document's CSP. We only make us of this if the current URL is a Blob URL or a data
        URL. Otherwise, do what we do now and take the policy from the owner frame.
        * dom/Document.h:
        * loader/DocumentWriter.cpp:
        (WebCore::DocumentWriter::begin): Extend the lifetime of the previous document temporarily so that we can
        pass its CSP to FrameLoader::didBeginDocument(). We need to do this extension because this function calls
        FrameLoader::clear(), which can destroy the previous document and its ContentSecurityPolicy object. This
        extension is also no different than if this function was called with a non-null ownerDocument except that
        in that case it is the caller that extends the previous document's lifetime. Although it is tempting to
        make use of ownerDocument to fix this bug by having the caller of begin() pass the previous document as
        the ownerDocument when the new document's url (the one we are begin()ing) is a Blob URL. The ownerDocument
        concept would privilege the Blob URL more than necessary; we only need to inherit the CSP policy from the
        previous document for a Blob URL, not inherit the cookie URL or strict mixed content checking bit, etc. 
        We could make ContentSecurityPolicy ref-counted or even steal the ContentSecurityPolicy object from the
        previous document. The latter is not of the question as a future enhancement, but the former seemed excessive
        as a way to avoid extending the lifetime of the previous document because this would be the *only* call site
        that actaully takes out a second ref of a ContentSecurityPolicy object. In general, shared ownership of
        a ContentSecurityPolicy object does not make sense.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::didBeginDocument): Pass the specified content security policy through to
        Document::initContentSecurityPolicy().
        * loader/FrameLoader.h:

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

        [WHLSL] Auto initialize local variables
        https://bugs.webkit.org/show_bug.cgi?id=198426

        Reviewed by Myles Maxfield.

        This patch implements zero-filling for local variables in two parts:
        1. We add a new pass, autoInitializeVariables, which makes any variable declaration
        without an initializer call the default constructor for the variable's type.
        Since we auto generate the default constructor, it's a native function whose
        implementation we control.
        
        2. Each native constructor is implemented as a memset(&value, sizeof(value), 0).
        This memset is an inlined loop in each constructor. The reason this turns
        everything into zero is that for every primitive type, the "zero" value is
        represented as all zeroes in memory: float, int, pointers, etc.
        
        Since our ability to test some of this is limited, I opened a follow-up bug to
        test this more:
        https://bugs.webkit.org/show_bug.cgi?id=198413

        Tests: webgpu/whlsl-zero-initialize-values-2.html
               webgpu/whlsl-zero-initialize-values.html

        * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
        (WebCore::WHLSL::AST::VariableDeclaration::setInitializer):
        * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: Added.
        (WebCore::WHLSL::AutoInitialize::AutoInitialize):
        (WebCore::WHLSL::AutoInitialize::visit):
        (WebCore::WHLSL::autoInitializeVariables):
        * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h: Added.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
        (WebCore::WHLSL::inferTypesForCallImpl):
        (WebCore::WHLSL::inferTypesForCall):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.h:
        * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
        (WebCore::WHLSL::prepareShared):
        * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
        (WebCore::WHLSL::resolveFunctionOverloadImpl):
        (WebCore::WHLSL::resolveFunctionOverload):
        * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h:
        * Sources.txt:
        * WebCore.xcodeproj/project.pbxproj:

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

        Integrate dark mode support for iOS.
        https://bugs.webkit.org/show_bug.cgi?id=198687
        rdar://problem/51545643

        Reviewed by Tim Horton.

        Tests: css-dark-mode

        * Configurations/FeatureDefines.xcconfig:
        * SourcesCocoa.txt:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/cocoa/FontCascadeCocoa.mm:
        (WebCore::showLetterpressedGlyphsWithAdvances):
        * platform/ios/LocalCurrentTraitCollection.h: Added.
        * platform/ios/LocalCurrentTraitCollection.mm: Added.
        * platform/ios/PasteboardIOS.mm:
        * rendering/RenderThemeIOS.mm:
        (WebCore::RenderThemeIOS::systemColor const):
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::systemColor const):

2019-06-10  Ali Juma  <ajuma@chromium.org>

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

        Reviewed by Per Arne Vollan.

        Use a delay of 2000ms instead of 500ms when scheduling rendering updates
        for IntersectionObserver targets added during page load. This is a
        speculative fix for a page load time regression caused by r245396 and
        still not fixed after r245958.

        * dom/Document.cpp:
        (WebCore::Document::scheduleTimedRenderingUpdate):

2019-06-10  Sihui Liu  <sihui_liu@apple.com>

        [WKHTTPCookieStore getAllCookies:] may return duplicate cookies
        https://bugs.webkit.org/show_bug.cgi?id=198635
        <rdar://problem/46010232>

        Reviewed by Ryosuke Niwa.

        Test: WebKit.WKHTTPCookieStoreWithoutProcessPoolDuplicates

        * platform/Cookie.h:
        (WebCore::Cookie::isKeyEqual const):
        (WTF::HashTraits<WebCore::Cookie>::isEmptyValue):

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

        Add wildcard to Access-Control-Allow-Methods and Access-Control-Allow-Headers
        https://bugs.webkit.org/show_bug.cgi?id=165508

        Reviewed by Frédéric Wang.

        According to the spec [1] step 6.5, a wildcard for method
        and request's credentials mode should be taken into account, so
        add this to the check. Same for Access-Control-Allow-Headers (step 6.7).

        [1] https://fetch.spec.whatwg.org/#cors-preflight-fetch

        Tests: web-platform-tests/fetch/api/cors/cors-preflight-star.any.html
               web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker.html

        * loader/CrossOriginAccessControl.cpp:
        (WebCore::validatePreflightResponse):
        * loader/CrossOriginPreflightResultCache.cpp:
        (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):
        (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders const):
        (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
        * loader/CrossOriginPreflightResultCache.h:

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

        [LFC][IFC] Introduce Baseline to LineBox
        https://bugs.webkit.org/show_bug.cgi?id=198686
        <rdar://problem/51545175>

        Reviewed by Antti Koivisto.

        Make baselines alignment explicit in Line.
        This is in preparation for adding non-baseline vertical alignment support.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        (WebCore::Layout::Line::halfLeadingMetrics):
        * layout/inlineformatting/InlineLine.h:
        (WebCore::Layout::Line::Content::baseline const):
        (WebCore::Layout::Line::Content::setBaseline):
        (WebCore::Layout::Line::logicalHeight const):
        (WebCore::Layout::Line::baselineAlignedContentHeight const):
        (WebCore::Layout::Line::baselineOffset const):
        * layout/inlineformatting/InlineLineBox.h:
        (WebCore::Layout::LineBox::baseline const):
        (WebCore::Layout::LineBox::LineBox):

2019-06-07  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately
        https://bugs.webkit.org/show_bug.cgi?id=198664

        Reviewed by Simon Fraser.

        Because WK1 is a single process, scheduleCompositingLayerFlush() has to 
        be called immediately when layers' update is needed. Otherwise no content
        will be drawn for the current frame. Doing this will get smooth scrolling
        back to WK1.

        RenderingUpdateScheduler now has three different scheduling methods:

        1. scheduleTimedRenderingUpdate(): This is a two-steps scheduling method.
           DisplayRefreshMonitor has to fire before scheduleCompositingLayerFlush()
           is called. This is used by rAF, WebAnimations and intersection and
           resize observers.

        2. scheduleImmediateRenderingUpdate(): This is a one-step scheduling method.
           layerTreeAsText() calls this method because it has to process the rendering
           update within the current frame.

        3. scheduleRenderingUpdate(): RenderLayerCompositor::scheduleLayerFlush()
           calls this function to decide either immediately flush layers or wait
           for the next timed frame. scheduleImmediateRenderingUpdate() will be
           called for WK1. scheduleTimedRenderingUpdate() will be called for WK2.

        * animation/DocumentTimeline.cpp:
        (WebCore::DocumentTimeline::scheduleAnimationResolution):
        * dom/Document.cpp:
        (WebCore::Document::scheduleTimedRenderingUpdate):
        (WebCore::Document::scheduleInitialIntersectionObservationUpdate):
        (WebCore::Document::updateResizeObservations):
        (WebCore::Document::scheduleRenderingUpdate): Deleted.
        * dom/Document.h:
        * dom/ScriptedAnimationController.cpp:
        (WebCore::ScriptedAnimationController::scheduleAnimation):
        * page/ChromeClient.h:
        * page/PageOverlayController.cpp:
        (WebCore::PageOverlayController::didChangeViewExposedRect):
        (WebCore::PageOverlayController::notifyFlushRequired):
        * page/RenderingUpdateScheduler.cpp:
        (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
        (WebCore::RenderingUpdateScheduler::displayRefreshFired):
        (WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate):
        (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
        (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush): Deleted.
        * page/RenderingUpdateScheduler.h:
        * page/ResizeObserver.cpp:
        (WebCore::ResizeObserver::observe):
        * page/mac/ServicesOverlayController.mm:
        (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::layerTreeAsText):

2019-06-07  Megan Gardner  <megan_gardner@apple.com>

        Extend quirks to emulate bold/italic/underline in hidden editable areas
        https://bugs.webkit.org/show_bug.cgi?id=198681

        Reviewed by Wenson Hsieh.

        Rename only.

        Rename quirks to be more accurate for new extended use.

        * page/Quirks.cpp:
        (WebCore::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreasForHost):
        (WebCore::Quirks::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas const):
        (WebCore::shouldEmulateUndoRedoInHiddenEditableAreasForHost): Deleted.
        (WebCore::Quirks::shouldEmulateUndoRedoInHiddenEditableAreas const): Deleted.
        * page/Quirks.h:

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

        Unreviewed, rolling out r246138.

        Broke internal builds

        Reverted changeset:

        "[WHLSL] Educate the property resolver about IndexExpressions"
        https://bugs.webkit.org/show_bug.cgi?id=198399
        https://trac.webkit.org/changeset/246138

2019-06-07  Justin Fan  <justin_fan@apple.com>

        [WebGPU] Remove GPUBuffer.setSubData and implement GPUDevice.createBufferMapped
        https://bugs.webkit.org/show_bug.cgi?id=198591

        Reviewed by Myles C. Maxfield.

        Remove GPUBuffer.setSubData from the WebGPU API.
        Add GPUDevice.createBufferMapped to the WebGPU API. 

        Existing tests have been updated.

        * Modules/webgpu/WebGPUBuffer.cpp:
        (WebCore::WebGPUBuffer::setSubData): Deleted.
        * Modules/webgpu/WebGPUBuffer.h:
        * Modules/webgpu/WebGPUBuffer.idl:
        * Modules/webgpu/WebGPUDevice.cpp:
        (WebCore::WebGPUDevice::createBufferMapped const):
        * Modules/webgpu/WebGPUDevice.h:
        * Modules/webgpu/WebGPUDevice.idl:
        * platform/graphics/gpu/GPUBuffer.h:
        * platform/graphics/gpu/GPUCommandBuffer.h:
        * platform/graphics/gpu/GPUDevice.cpp:
        (WebCore::GPUDevice::tryCreateBuffer):
        * platform/graphics/gpu/GPUDevice.h:
        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
        (WebCore::GPUBuffer::tryCreate):
        (WebCore::GPUBuffer::GPUBuffer):
        (WebCore::GPUBuffer::state const):
        (WebCore::GPUBuffer::mapOnCreation):
        (WebCore::GPUBuffer::commandBufferCompleted):
        (WebCore::GPUBuffer::copyStagingBufferToGPU):
                Required to unmap GPUBuffers created with GPU-private storage.
        (WebCore::GPUBuffer::unmap):
        (WebCore::GPUBuffer::setSubData): Deleted.
        (WebCore::GPUBuffer::reuseSubDataBuffer): Deleted.

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

        Unreviewed, fix non-iOS build after r246205
        https://bugs.webkit.org/show_bug.cgi?id=198657
        <rdar://problem/51345064>

        * page/Quirks.cpp:
        * page/Quirks.h:

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

        mediaDevices.enumerateDevices() doesn't list the system default audio devices with deviceId as "default"
        https://bugs.webkit.org/show_bug.cgi?id=198577
        <rdar://problem/51454067>

        Reviewed by Eric Carlson.

        Make the system default microphone/camera be the first in the list.
        This ensures that getUserMedia without constraints will pick these devices.
        This also ensures enumerateDevices will show these default devices as first in the list.
        Make sure that a default device change will refresh the list.

        For CoreAudioCaptureSource, we always add the default system input device in the list of capture devices.

        Covered by manual testing.

        * platform/mediastream/mac/AVCaptureDeviceManager.h:
        * platform/mediastream/mac/AVCaptureDeviceManager.mm:
        (WebCore::toCaptureDevice):
        (WebCore::AVCaptureDeviceManager::isMatchingExistingCaptureDevice):
        (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
        (WebCore::getDefaultDeviceID):
        (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):

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

        A MediaStreamTrack cannot modify whether being a capture track or not
        https://bugs.webkit.org/show_bug.cgi?id=198669

        Reviewed by Eric Carlson.

        Add a boolean in MediaStreamTrack to store whether a track is a capture one or not.
        This removes the need to always go through the private and its source.
        As a track might change of source (for non capture track cases), this
        also removes the possibility for a track to be capture and then no
        longer capture.
        No change of behavior.
        See also rdar://problem/49444622.

        * Modules/mediastream/MediaStreamTrack.cpp:
        (WebCore::MediaStreamTrack::MediaStreamTrack):
        * Modules/mediastream/MediaStreamTrack.h:
        (WebCore::MediaStreamTrack::isCaptureTrack const):

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

        Add a RELEASE_ASSERT that removeAudioProducer should always be done in the main thread
        https://bugs.webkit.org/show_bug.cgi?id=198668

        Reviewed by Eric Carlson.

        See rdar://problem/49444622 for background information.
        No change of behavior.

        * dom/Document.cpp:
        (WebCore::Document::removeAudioProducer):

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

        Images are not resizing correctly when dragged to a message in 1/3 view
        https://bugs.webkit.org/show_bug.cgi?id=198623
        <rdar://problem/51185518>

        Reviewed by Wenson Hsieh.

        Mail's max-width: 100%; default style is in conflict with the preferred presentation size. This patch preserves the existing behaviour for Mail by
        not setting the height (and rely on the width + aspect ratio). 

        * editing/WebContentReader.h:
        * editing/cocoa/WebContentReaderCocoa.mm:
        (WebCore::createFragmentForImageAttachment):
        (WebCore::WebContentReader::readImage):
        (WebCore::attachmentForFilePath):
        (WebCore::attachmentForData):
        (WebCore::WebContentReader::readFilePath):
        (WebCore::WebContentReader::readDataBuffer):
        * editing/gtk/EditorGtk.cpp:
        (WebCore::createFragmentFromPasteboardData):
        * editing/markup.cpp:
        (WebCore::createFragmentForImageAndURL):
        * editing/markup.h:
        * platform/Pasteboard.h:
        (WebCore::PasteboardWebContentReader::readFilePath):
        (WebCore::PasteboardWebContentReader::readImage):
        (WebCore::PasteboardWebContentReader::readDataBuffer):
        * 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-06-07  Zalan Bujtas  <zalan@apple.com>

        [LFC][IFC] Line should skip all vertical adjustment when running preferred width computation
        https://bugs.webkit.org/show_bug.cgi?id=198642
        <rdar://problem/51511043>

        Reviewed by Antti Koivisto.

        While layout triggers both horizontal and vertical aligment, preferred width computation should only do (logical)horizontal.
        Make all vertical alignment computation optional in Line.

        * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
        (WebCore::Layout::UncommittedContent::add):
        (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
        (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
        (WebCore::Layout::inlineItemHeight): Deleted.
        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::Content::Run::Run):
        (WebCore::Layout::Line::Line):
        (WebCore::Layout::Line::close):
        (WebCore::Layout::Line::removeTrailingTrimmableContent):
        (WebCore::Layout::Line::moveLogicalLeft):
        (WebCore::Layout::Line::trailingTrimmableWidth const):
        (WebCore::Layout::Line::appendNonBreakableSpace):
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendInlineContainerEnd):
        (WebCore::Layout::Line::appendTextContent):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::appendReplacedInlineBox):
        (WebCore::Layout::Line::appendHardLineBreak):
        (WebCore::Layout::Line::inlineItemHeight const):
        * layout/inlineformatting/InlineLine.h:

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

        Limit simulated mouse events on Google Maps to entering Street View
        https://bugs.webkit.org/show_bug.cgi?id=198657
        <rdar://problem/51345064>

        Reviewed by Brent Fulgham.

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

2019-06-07  Joonghun Park  <jh718.park@samsung.com>

        Unreviewed. Use const TabSize& instead of TabSize to avoid unnecessary copy.

        Using const reference is a c++ feature to extend the life time of
        a temporary object to the life time of the const reference which refers to it.

        No behavioral changes.

        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::setTabSize):

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

        [GTK] GLContextEGL.h must be built with @no-unify
        https://bugs.webkit.org/show_bug.cgi?id=198659

        Unreviewed ARM build fix.

        * SourcesGTK.txt:

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

        position:fixed inside overflow positioning nodes is jumpy
        https://bugs.webkit.org/show_bug.cgi?id=198647
        <rdar://problem/51514437>

        Reviewed by Frédéric Wang.

        Tests: scrollingcoordinator/ios/fixed-overflow-no-stacking-context-1.html
               scrollingcoordinator/ios/fixed-overflow-no-stacking-context-2.html
               scrollingcoordinator/ios/fixed-overflow-stacking-context-stationary.html

        * page/scrolling/ScrollingTreeScrollingNode.h:
        * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
        (WebCore::ScrollingTreeFixedNode::applyLayerPositions):

        Take deltas from positioning nodes into account.

        * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
        (WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const):

        Rename since 'scrollOffset' has other meaning.

        (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
        (WebCore::ScrollingTreePositionedNode::scrollOffsetSinceLastCommit const): Deleted.
        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):

2019-06-07  Enrique Ocaña González  <eocanha@igalia.com>

        [MSE][GStreamer] Avoid QUOTA_EXCEEDED_ERR when seeking to a buffered range just before the buffered one
        https://bugs.webkit.org/show_bug.cgi?id=166620

        Reviewed by Xabier Rodriguez-Calvar.

        This patch is fixing a seek to unbuffered range just before the buffered one.
        For example, supposing a [120, 176) append has filled all the memory and then
        a seek to 115.0 is done, a subsequent [115, 120) append would fail without
        this fix. EvictCodedFrames() would return without actually evicting anything,
        and appendBufferInternal will print "buffer full, failing with
        QUOTA_EXCEEDED_ERR error" on GStreamer platforms instead of letting the new
        [115, 120) append succeed.

        This patch is based on an original patch by iivlev <iivlev@productengine.com>

        Test: media/media-source/media-source-append-before-last-range-no-quota-exceeded.html

        * Modules/mediasource/SourceBuffer.cpp:
        (WebCore::SourceBuffer::evictCodedFrames):
        Removed the "only if there are buffered ranges *containing* the currentTime" condition
        to enter into the second part of the eviction algorithm, which removes frames
        starting from the duration of the media and going backwards down to currentPosition + 30.
        The loop break condition has also been changed to deal with notFound currentTimeRange.

2019-06-07  Philippe Normand  <philn@igalia.com>

        [GStreamer] AVC1 decoding capabilities probing support
        https://bugs.webkit.org/show_bug.cgi?id=198569

        Reviewed by Xabier Rodriguez-Calvar.

        When capabilities for an avc1 codec are requested, the registry scanner looks
        for a compatible decoder for the given H.264 profile and level.

        This new approach can be avoided by using the WEBKIT_GST_MAX_AVC1_RESOLUTION
        environment variable. If supplied, the decoder capabilities won't be probed and
        the codec will be advertised as supported if it complies with the contents of
        the environment variable. The resolutions currently handled are specifically:
        1080P, 720P and 480P. We don't handle framerate checking yet, so the implied
        H.264 levels are assumed to be for 30FPS.

        * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
        (WebCore::GStreamerRegistryScanner::isCodecSupported const):
        (WebCore::GStreamerRegistryScanner::areInputCapsAccepted const):
        (WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const):
        * platform/graphics/gstreamer/GStreamerRegistryScanner.h:

2019-06-07  Joonghun Park  <jh718.park@samsung.com>

        Implement tab-size with units
        https://bugs.webkit.org/show_bug.cgi?id=179022

        Reviewed by Simon Fraser.

        This change is ported from Blink.
        The committed revision is https://src.chromium.org/viewvc/blink?revision=189430&view=revision.

        Additionally, this patch lets css "number" value be allowed as tab-size's property value,
        not css "integer" value,
        according to https://drafts.csswg.org/css-text-3/#tab-size-property.

        Tests: css3/tab-size.html
               imported/w3c/web-platform-tests/css/css-values/calc-numbers.html

        * Headers.cmake:
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
        * css/CSSProperties.json:
        * css/StyleBuilderConverter.h:
        (WebCore::StyleBuilderConverter::convertTabSize):
        * css/parser/CSSPropertyParser.cpp:
        (WebCore::consumeTabSize):
        * layout/inlineformatting/text/TextUtil.cpp:
        (WebCore::Layout::TextUtil::width):
        * platform/graphics/FontCascade.h:
        (WebCore::FontCascade::tabWidth const):
        * platform/graphics/TabSize.h: Added.
        (WebCore::TabSize::TabSize):
        (WebCore::TabSize::isSpaces const):
        (WebCore::TabSize::widthInPixels const):
        (WebCore::TabSize::operator bool const):
        (WebCore::operator==):
        (WebCore::operator!=):
        * platform/graphics/TextRun.cpp:
        * platform/graphics/TextRun.h:
        (WebCore::TextRun::tabSize const):
        (WebCore::TextRun::setTabSize):
        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
        (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
        * rendering/SimpleLineLayoutTextFragmentIterator.h:
        * rendering/style/RenderStyle.h:
        (WebCore::RenderStyle::tabSize const):
        (WebCore::RenderStyle::setTabSize):
        (WebCore::RenderStyle::initialTabSize):
        * rendering/style/StyleRareInheritedData.cpp:
        * rendering/style/StyleRareInheritedData.h:

2019-06-07  Philippe Normand  <pnormand@igalia.com>

        [GStreamer] videorate issues with v4l2src
        https://bugs.webkit.org/show_bug.cgi?id=198614

        Reviewed by Xabier Rodriguez-Calvar.

        Configure videorate to cope with the live stream provided by the
        source element. Not doing so might lead to errors in the v4l2
        buffer allocator.

        * platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
        (WebCore::GStreamerVideoCapturer::createConverter):

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

        process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
        https://bugs.webkit.org/show_bug.cgi?id=196930
        <rdar://problem/47819301>

        Reviewed by Chris Dumez.

        When the content filter blocks a navigation, it will continue to load the content filter
        error page in the provisional web process. When dispatching didFailProvisionalLoad, we need
        to specify WillContinueLoading::Yes so that WebKit presents the error page rather than
        switching back to the committed web process.

        Testing blocked by <https://webkit.org/b/198626>.

        * loader/ContentFilter.cpp:
        (WebCore::ContentFilter::willHandleProvisionalLoadFailure):
        (WebCore::ContentFilter::handleProvisionalLoadFailure):
        * loader/ContentFilter.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        * loader/FrameLoader.h:

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

        RELEASE_ASSERT hit in CachedFrame constructor
        https://bugs.webkit.org/show_bug.cgi?id=198625
        <rdar://problem/49877867>

        Reviewed by Geoffrey Garen.

        This is a speculative fix, it appears the document is already detached from its
        frame by the time we construct a CachedFrame for it when entering PageCache.

        No new tests, because we do not know yet how this can be reproduced.

        * history/PageCache.cpp:
        (WebCore::canCacheFrame):
        Make a frame as ineligible for PageCache if:
        1. It does not have a document
        or
        2. Its document is already detached from the frame

        (WebCore::PageCache::addIfCacheable):
        Destroy the render tree *before* we check if the page can enter page cache, in case
        destroying the render tree has any side effects that could make the page ineligible
        for Page Cache.

2019-06-06  Devin Rousso  <drousso@apple.com>

        Web Inspector: Timelines: only complete Composite records if the m_startedComposite (followup to r246142)
        https://bugs.webkit.org/show_bug.cgi?id=198639

        Reviewed by Matt Baker.

        In r246142, an `ASSERT` was removed because it is possible for Web Inspector to be opened in
        between `willComposite` and `didComposite`, meaning that previously the `ASSERT` would fire.

        In order to properly handle this, we should replace the `ASSERT` with an `if` so that Web
        Inspector doesn't even try to complete a `Composite` record if it was opened in that case.

        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::didComposite):

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

        Allow WebKitTestRunner to terminate network process after it finishes service worker file operations
        https://bugs.webkit.org/show_bug.cgi?id=198584

        Reviewed by Geoffrey Garen.

        Add a promise-based internal API to store service worker registrations on disk.
        Covered by updated test.

        * testing/Internals.cpp:
        (WebCore::Internals::storeRegistrationsOnDisk):
        * testing/Internals.h:
        * testing/Internals.idl:
        * workers/service/SWClientConnection.h:
        (WebCore::SWClientConnection::storeRegistrationsOnDiskForTesting):
        * workers/service/server/RegistrationStore.cpp:
        (WebCore::RegistrationStore::startSuspension):
        (WebCore::RegistrationStore::closeDatabase):
        * workers/service/server/RegistrationStore.h:
        * workers/service/server/SWServer.cpp:
        (WebCore::SWServer::Connection::storeRegistrationsOnDisk):
        * workers/service/server/SWServer.h:

2019-06-06  Brent Fulgham  <bfulgham@apple.com>

        Avoid generating new XSLT-based document when already changing the document.
        https://bugs.webkit.org/show_bug.cgi?id=198525
        <rdar://problem/51393787>

        Reviewed by Ryosuke Niwa.

        We should not allow a pending XSLT transform to change the current document when
        that current document is int he process of being replaced.

        * dom/Document.cpp:
        (WebCore::Document::applyPendingXSLTransformsTimerFired):

2019-06-06  Devin Rousso  <drousso@apple.com>

        Web Inspector: create CommandLineAPIHost lazily like the other agents
        https://bugs.webkit.org/show_bug.cgi?id=196047
        <rdar://problem/49087835>

        Reviewed by Timothy Hatcher.

        No change in functionality.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::createLazyAgents):
        * inspector/WorkerInspectorController.cpp:
        (WebCore::WorkerInspectorController::WorkerInspectorController):
        (WebCore::WorkerInspectorController::createLazyAgents):

        * inspector/WebInjectedScriptManager.h:
        * inspector/WebInjectedScriptManager.cpp:
        (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
        (WebCore::WebInjectedScriptManager::connect): Added.
        (WebCore::WebInjectedScriptManager::disconnect):
        (WebCore::WebInjectedScriptManager::discardInjectedScripts):

        * inspector/agents/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::setInspectedNode):

2019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>

        REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute 
        https://bugs.webkit.org/show_bug.cgi?id=198576

        Reviewed by Simon Fraser.

        Firing the load event should only happen when dynamic update changes the
        attribute 'externalResourcesRequired'. Animating this attribute should
        not fire the load event.

        When stopping the animations, applyAnimatedPropertyChange() should be
        called first then stopAnimation() is called second. The target element
        should know that its svgAttributeChanged() is called because of animating
        the attribute. So it can differentiate this case from the dynamic update.

        Test: svg/animations/animate-externalResourcesRequired-no-load-event.html

        * svg/SVGExternalResourcesRequired.cpp:
        (WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
        * svg/properties/SVGAnimatedPropertyAnimator.h:

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

        [LFC][IFC] Move baseline and line height computation to a dedicated function
        https://bugs.webkit.org/show_bug.cgi?id=198611
        <rdar://problem/51482708>

        Reviewed by Antti Koivisto.

        This is in preparation for adding vertical aligment.

        * layout/inlineformatting/InlineLine.cpp:
        (WebCore::Layout::Line::appendInlineContainerStart):
        (WebCore::Layout::Line::appendNonReplacedInlineBox):
        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
        * layout/inlineformatting/InlineLine.h:

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

        Position fixed is buggy with overflow:auto scrolling inside iframes
        https://bugs.webkit.org/show_bug.cgi?id=154399
        <rdar://problem/24742251>

        Reviewed by Frederic Wang and Simon Fraser.

        Test: scrollingcoordinator/ios/fixed-frame-overflow-swipe.html

        After layer tree commit we were calling mainFrameViewportChangedViaDelegatedScrolling (even if viewport did not change)
        and expecting it to apply UI side scrolling deltas. However optimization prevents it from descending into subframes
        and we fail to update those properly.

        In reality we only need to to apply scrolling tree positiong after commit if there has been delegated scrolling after the last
        one. Track this and do full update when needed.

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

        Add specific function for this. Don't do anything unless needed.

        * page/scrolling/ScrollingTree.h:
        (WebCore::ScrollingTree::didScrollByDelegatedScrolling):

        Track if there has been any delegated scrolling.

        * page/scrolling/ScrollingTreeScrollingNode.cpp:
        (WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling):

        We can now bail out if nothing changes since we no longer rely on this for post-commit updates.

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

        [LFC][IFC] Layout and preferred width computation should both call placeInlineItems().
        https://bugs.webkit.org/show_bug.cgi?id=198587
        <rdar://problem/51460340>

        Reviewed by Antti Koivisto.

        This patch enables inline placement logic sharing between layout and preferred width computation.

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

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

        [Curl] Report all request headers to web inspector.
        https://bugs.webkit.org/show_bug.cgi?id=191653

        Reviewed by Fujii Hironori.

        Test: http/tests/inspector/network/resource-request-headers.html

        * platform/network/curl/CurlContext.cpp:
        (WebCore::CurlHandle::setDebugCallbackFunction):
        * platform/network/curl/CurlContext.h:
        * platform/network/curl/CurlRequest.cpp:
        (WebCore::CurlRequest::setupTransfer):
        (WebCore::CurlRequest::didReceiveDebugInfo):
        (WebCore::CurlRequest::updateNetworkLoadMetrics):
        (WebCore::CurlRequest::didReceiveDebugInfoCallback):
        * platform/network/curl/CurlRequest.h:

2019-06-05  Said Abou-Hallawa  <sabouhallawa@apple.com>

        [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
        https://bugs.webkit.org/show_bug.cgi?id=198497

        Reviewed by Simon Fraser.

        WebInspecter should coalesce nested composites as one recorded composite.
        This can be done by ensuring that we only process CA preCommit and postCommit
        once per nested commits.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::willComposite):
        * inspector/InspectorController.h:
        Export willComposite(). We want to call willComposite()/ didComposite()
        from CA preCommit and postCommit handlers in flushLayers().

        * inspector/agents/InspectorTimelineAgent.cpp:
        (WebCore::InspectorTimelineAgent::didComposite):
        Unrelated change: didComposite() should not assert that we're in the middle
        of a composite. Web Inspector may connect in the middle of a composite.

        * page/FrameView.cpp:
        (WebCore::FrameView::flushCompositingStateIncludingSubframes):
        InspectorController::willComposite() will be called form CA preCommit
        handler of flushLayers().

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

        [WHLSL] Educate the property resolver about IndexExpressions
        https://bugs.webkit.org/show_bug.cgi?id=198399

        Reviewed by Saam Barati.

        This is part one of two patches which will allow buffers to work. This patch
        adds support in the property resolver for index expressions. Index expressions
        get turned into calls to "getter indexers", "setter indexers", or "ander
        indexers". They work almost identically to dot expressions, except there is an
        extra "index" expression which gets turned into an extra argument to those
        functions.

        There's actually a bit of a trick here. Let's say we need to run a getter and
        a setter separately (e.g. "foo[3]++;"). The index expression can't be duplicated
        for both the getter and the setter (e.g. the functions are
        int operator[](Foo, uint) and Foo operator[]=(Foo, uint, int), and we aren't
        allowed to execute the index expression multiple times. Consider if that "3"
        in the example is actually "bar()" with some side effect. So, we have to run
        the index expression once at the correct time, and save its result to a temporary
        variable, and then pass in the temporary variable into the getter and setter.

        So, if the code says "foo[bar()][baz()] = quux();" the following sequence of
        functions get run:

        - bar()
        - operator[](Foo, uint)
        - baz()
        - quux()
        - operator[]=(OtherType, uint, OtherOtherType)
        - operator[]=(Foo, uint, OtherType)

        The next patch will modify the WebGPU JavaScript implementation to send buffer
        lengths to the shader, and for the shader compiler to correctly unpack this
        information and place it inside the array references. That should be everything
        that's needed to get buffers to work. After that, hooking up compute should be
        fairly trivial.

        Tests: webgpu/propertyresolver/ander-abstract-lvalue.html
               webgpu/propertyresolver/ander-lvalue-3-levels.html
               webgpu/propertyresolver/ander-lvalue.html
               webgpu/propertyresolver/ander.html
               webgpu/propertyresolver/getter.html
               webgpu/propertyresolver/indexer-ander-abstract-lvalue.html
               webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html
               webgpu/propertyresolver/indexer-ander-lvalue.html
               webgpu/propertyresolver/indexer-ander.html
               webgpu/propertyresolver/indexer-getter.html
               webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html
               webgpu/propertyresolver/indexer-setter-abstract-lvalue.html
               webgpu/propertyresolver/indexer-setter-lvalue.html
               webgpu/propertyresolver/indexer-setter.html
               webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html
               webgpu/propertyresolver/setter-abstract-lvalue.html
               webgpu/propertyresolver/setter-lvalue.html

        * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
        (WebCore::WHLSL::AST::toString):
        * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
        (WebCore::WHLSL::AST::toString):
        * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
        (WebCore::WHLSL::AST::IndexExpression::takeIndex):
        * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
        * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
        (WebCore::WHLSL::Metal::writeNativeFunction):
        (WebCore::WHLSL::Metal::convertAddressSpace): Deleted.
        * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
        (WebCore::WHLSL::checkOperatorOverload):
        (WebCore::WHLSL::Checker::finishVisiting):
        (WebCore::WHLSL::Checker::visit):
        * Modules/webgpu/WHLSL/WHLSLInferTypes.h:
        * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
        (WebCore::WHLSL::PropertyResolver::visit):
        (WebCore::WHLSL::setterCall):
        (WebCore::WHLSL::getterCall):
        (WebCore::WHLSL::modify):
        (WebCore::WHLSL::PropertyResolver::simplifyRightValue):
        (WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
        (WebCore::WHLSL::LeftValueSimplifier::visit):
        * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
        * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
        (WebCore::WHLSL::synthesizeStructureAccessors):

2019-06-05  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): Deleted.
        (WebCore::WHLSL::Parser::completeTernaryConditional):
        (WebCore::WHLSL::Parser::parseAssignment): Deleted.
        (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-05  Alex Christensen  <achristensen@webkit.org>

        Revert part of r246126
        https://bugs.webkit.org/show_bug.cgi?id=197132

        * platform/ios/WebItemProviderPasteboard.h:
        This change broke an internal build, so I'm reverting it.

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

        [CSP] Data URLs should inherit their CSP policy
        https://bugs.webkit.org/show_bug.cgi?id=198572
        <rdar://problem/50660927>

        Reviewed by Brent Fulgham.

        As per <https://w3c.github.io/webappsec-csp/#security-inherit-csp> (Editor's Draft, 28 February 2019) data
        URLs should inherit their CSP policy from their parent (if they have one).

        Test: http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html

        * dom/Document.cpp:
        (WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const):

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

        Unreviewed. Follow up fix after r246115.
        I changed the code to assert that we don't have duplicate native
        functions. It turns out we do. I will fix that here, then add
        back the assert. https://bugs.webkit.org/show_bug.cgi?id=198580

        * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
        (WebCore::WHLSL::checkDuplicateFunctions):

2019-06-05  Alex Christensen  <achristensen@webkit.org>

        Progress towards resurrecting Mac CMake build
        https://bugs.webkit.org/show_bug.cgi?id=197132

        Reviewed by Don Olmstead.

        * CMakeLists.txt:
        * PlatformMac.cmake:
        * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:

== Rolled over to ChangeLog-2019-06-05 ==