[iOS] Redundant pointer events causes material design buttons to flush twice
[WebKit-https.git] / Source / WebCore / ChangeLog
index 62e4a6b..5df621b 100644 (file)
@@ -1,3 +1,845 @@
+2019-04-15  Antoine Quint  <graouts@apple.com>
+
+        [iOS] Redundant pointer events causes material design buttons to flush twice
+        https://bugs.webkit.org/show_bug.cgi?id=196914
+        <rdar://problem/49571860>
+
+        Reviewed by Dean Jackson.
+
+        Test: pointerevents/ios/pointer-event-order.html
+
+        Do not dispatch pointer events for mouse events on iOS since we're already dispatching them when processing touch events.
+
+        * dom/Element.cpp:
+        (WebCore::Element::dispatchMouseEvent):
+
+2019-04-15  John Wilander  <wilander@apple.com>
+
+        Add a query string nonce to LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html to address flakiness
+        https://bugs.webkit.org/show_bug.cgi?id=196955
+
+        Unreviewed test gardening. The WebCore change is only in a dedicated
+        test function.
+
+        No new tests. Existing test updated.
+
+        * loader/AdClickAttribution.cpp:
+        (WebCore::AdClickAttribution::urlForTesting const):
+            Now preserves the query string in the test URL.
+
+2019-04-15  Chris Dumez  <cdumez@apple.com>
+
+        URL set by document.open() is not communicated to the UIProcess
+        https://bugs.webkit.org/show_bug.cgi?id=196941
+        <rdar://problem/49237544>
+
+        Reviewed by Geoffrey Garen.
+
+        Notify the FrameLoaderClient whenever an explicit open was done and provide it with
+        the latest document URL.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::didExplicitOpen):
+        * loader/FrameLoaderClient.h:
+
+2019-04-15  Eike Rathke  <erack@redhat.com>
+
+        Fix logic flow for error log
+        https://bugs.webkit.org/show_bug.cgi?id=196933
+
+        Reviewed by Alexey Proskuryakov.
+
+        Missing block braces logged an error always, not just
+        if (actionIfInvalid == Complain).
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::isSafeToLoadURL):
+
+2019-04-15  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
+        https://bugs.webkit.org/show_bug.cgi?id=196846
+        <rdar://problem/49499971>
+
+        Reviewed by Simon Fraser and Darin Adler.
+
+        When adding the special codepath for system-ui to behave as an entire list of fonts rather than a single item,
+        I never added a cache for the FontPlatformData objects that codepath creates. The non-system-ui codepath already
+        has a cache in fontPlatformDataCache() in FontCache.cpp.
+
+        This patch causes a 16.8x performance improvement on the attached benchmark.
+
+        Test: PerformanceTests/Layout/system-ui-rebuild-emoji.html
+
+        * page/cocoa/MemoryReleaseCocoa.mm:
+        (WebCore::platformReleaseMemory):
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::invalidateFontCache):
+        * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
+        (WebCore::FontFamilySpecificationKey::FontFamilySpecificationKey):
+        (WebCore::FontFamilySpecificationKey::operator== const):
+        (WebCore::FontFamilySpecificationKey::operator!= const):
+        (WebCore::FontFamilySpecificationKey::isHashTableDeletedValue const):
+        (WebCore::FontFamilySpecificationKey::computeHash const):
+        (WebCore::FontFamilySpecificationKeyHash::hash):
+        (WebCore::FontFamilySpecificationKeyHash::equal):
+        (WebCore::fontMap):
+        (WebCore::clearFontFamilySpecificationCoreTextCache):
+        (WebCore::FontFamilySpecificationCoreText::fontRanges const):
+        * platform/graphics/cocoa/FontFamilySpecificationCoreText.h:
+        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+        (WebCore::safeCFEqual): Deleted.
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: fake value descriptors for promises add a catch handler, preventing "rejectionhandled" events from being fired
+        https://bugs.webkit.org/show_bug.cgi?id=196484
+        <rdar://problem/49114725>
+
+        Reviewed by Joseph Pecoraro.
+
+        Test: inspector/runtime/promise-native-getter.html
+
+        Mark errors created from getters as being `isNativeGetterTypeError`.
+
+        * bindings/js/JSDOMExceptionHandling.cpp:
+        (WebCore::throwGetterTypeError):
+        (WebCore::rejectPromiseWithGetterTypeError):
+        (WebCore::rejectPromiseWithThisTypeError):
+
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::makeGetterTypeErrorForBuiltins):
+
+        * bindings/js/JSDOMPromiseDeferred.h:
+        * bindings/js/JSDOMPromiseDeferred.cpp:
+        (WebCore::createRejectedPromiseWithTypeError):
+
+        * Modules/streams/WritableStream.js:
+        (getter.closed):
+        (getter.ready):
+
+2019-04-15  Jer Noble  <jer.noble@apple.com>
+
+        Add a DiagnosticLogging method taking an arbitrary dictionary of values.
+        https://bugs.webkit.org/show_bug.cgi?id=196773
+
+        Reviewed by Alex Christensen.
+
+        * page/DiagnosticLoggingClient.h:
+
+2019-04-15  Justin Fan  <justin_fan@apple.com>
+
+        Let WTF::convertSafely deduce types from arguments.
+
+        Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793.
+
+        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
+        (WebCore::GPUBuffer::tryCreate):
+        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
+        (WebCore::GPUCommandBuffer::copyBufferToTexture):
+        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
+        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
+        (WebCore::trySetInputStateForPipelineDescriptor):
+
+2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Throw TypeError when custom element constructor returns a wrong element or tries to create itself
+        https://bugs.webkit.org/show_bug.cgi?id=196892
+
+        Reviewed by Dean Jackson.
+
+        Throw TypeError instead of InvalidStateError for consistency. This updates WebKit's custom elements
+        implementation for https://github.com/whatwg/html/pull/4525.
+
+        Tests: imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html
+               imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html
+
+        * bindings/js/JSCustomElementInterface.cpp:
+        (WebCore::JSCustomElementInterface::upgradeElement):
+        * bindings/js/JSHTMLElementCustom.cpp:
+        (WebCore::constructJSHTMLElement):
+
+2019-04-15  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] WebCore derived sources should only be referenced inside WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=196904
+
+        Reviewed by Konstantin Tokarev.
+
+        Use WebCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_WEBCORE_DIR.
+
+        * CMakeLists.txt:
+        * PlatformGTK.cmake:
+        * PlatformWin.cmake:
+        * WebCoreMacros.cmake:
+
+2019-04-15  John Wilander  <wilander@apple.com>
+
+        Send delayed Ad Click Attribution conversion requests to the click source
+        https://bugs.webkit.org/show_bug.cgi?id=196838
+        <rdar://problem/47650157>
+
+        Reviewed by Chris Dumez and Youenn Fablet.
+
+        WebCore::AdClickAttribution now:
+        - Sets m_earliestTimeToSend correctly based on WallTime::now().
+        - Allows for a test override of the base URL for conversions.
+        - Holds state for whether or not a conversion request has been sent.
+        - Outputs m_earliestTimeToSend and m_conversion->hasBeenSent in toString().
+        - Returns m_earliestTimeToSend as a result of a call to
+        convertAndGetEarliestTimeToSend() which used to be called setConversion().
+
+        Test: http/tests/adClickAttribution/send-attribution-conversion-request.html
+
+        * loader/AdClickAttribution.cpp:
+        (WebCore::AdClickAttribution::convertAndGetEarliestTimeToSend):
+        (WebCore::AdClickAttribution::url const):
+        (WebCore::AdClickAttribution::urlForTesting const):
+        (WebCore::AdClickAttribution::markConversionAsSent):
+        (WebCore::AdClickAttribution::wasConversionSent const):
+        (WebCore::AdClickAttribution::toString const):
+        (WebCore::AdClickAttribution::setConversion): Deleted.
+            Renamed convertAndGetEarliestTimeToSend().
+        * loader/AdClickAttribution.h:
+        (WebCore::AdClickAttribution::Conversion::Conversion):
+        (WebCore::AdClickAttribution::Conversion::encode const):
+        (WebCore::AdClickAttribution::Conversion::decode):
+        * platform/Timer.h:
+            Now exports nextFireInterval.
+
+2019-04-15  Chris Dumez  <cdumez@apple.com>
+
+        Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=196841
+        <rdar://problem/45957016>
+
+        Reviewed by Myles C. Maxfield.
+
+        Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
+        features that were added in r237903 so I looked for behavior changes in the context of
+        Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
+        returning true a lot more often after r237903. The reason is that r237903 dropped the
+        visualOverflowForDecorations() checks in this method and started returning true a lot
+        more as a result.
+
+        To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
+        that were dropped in r237903. I have verified that with this patch,
+        RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
+        r237903.
+
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeAffectsVisualOverflow const):
+
+2019-04-15  Said Abou-Hallawa  <said@apple.com>
+
+        ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
+        https://bugs.webkit.org/show_bug.cgi?id=196895
+
+        Reviewed by Darin Adler.
+
+        When cloning elements to the shadow tree of an SVGUseElement, the
+        corresponding element links are set from the clones to the originals.
+        Later some of the elements may be disallowed to exist in the shadow tree.
+        For example the SVGPatternElement is disallowed and has to be removed 
+        even after cloning. The problem is the corresponding elements are not
+        reset to null. Usually this is not a problem because the removed elements
+        will be deleted and the destructor of SVGElement will reset the corresponding
+        element links. However in some cases, the cloned element is referenced
+        from another SVGElement, for example the target of a SVGTRefElement. In
+        this case the clone won't be deleted but it will be linked to the original
+        and the event listeners won't be copied from the original. When the
+        original is deleted, its event listeners have to be removed. The event
+        listeners of the clones also ave to be removed. But because the event
+        listeners of the original were not copied when cloning, the assertion in
+        SVGElement::removeEventListener() fires.
+
+        Test: svg/custom/use-disallowed-element-clear-corresponding-element.html
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::disassociateAndRemoveClones):
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
+        https://bugs.webkit.org/show_bug.cgi?id=196556
+        <rdar://problem/49570681>
+
+        Reviewed by Timothy Hatcher.
+
+        Test: inspector/dom-debugger/attribute-modified-style.html
+
+        * css/PropertySetCSSStyleDeclaration.h:
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
+        (WebCore::InlineCSSStyleDeclaration::willMutate): Added.
+
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::styleAttributeChanged):
+        (WebCore::StyledElement::inlineStyleChanged):
+
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
+        (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
+        (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
+
+        * inspector/agents/InspectorDOMAgent.h:
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
+
+        * inspector/agents/InspectorDOMDebuggerAgent.h:
+        * inspector/agents/InspectorDOMDebuggerAgent.cpp:
+        (WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
+        (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
+        https://bugs.webkit.org/show_bug.cgi?id=196887
+        <rdar://problem/49870627>
+
+        Reviewed by Timothy Hatcher.
+
+        Test: inspector/dom/event-listener-add-remove.html
+              inspector/dom/event-listener-inspected-node.html
+
+        * inspector/agents/InspectorDOMAgent.h:
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::getEventListenersForNode):
+        (WebCore::InspectorDOMAgent::setInspectedNode):
+        (WebCore::InspectorDOMAgent::didAddEventListener):
+        (WebCore::InspectorDOMAgent::willRemoveEventListener):
+
+2019-04-15  Antoine Quint  <graouts@apple.com>
+
+        Ensure iOS layout traits are used for media controls in modern compatibility mode
+        https://bugs.webkit.org/show_bug.cgi?id=196812
+        <rdar://problem/47460637>
+
+        Unreviewed. Speculative fix for test regressions on open-source bots.
+
+        * Modules/modern-media-controls/media/media-controller.js:
+        (MediaController.prototype.get layoutTraits):
+
+2019-04-11  Antoine Quint  <graouts@apple.com>
+
+        Ensure iOS layout traits are used for media controls in modern compatibility mode
+        https://bugs.webkit.org/show_bug.cgi?id=196812
+        <rdar://problem/47460637>
+
+        Reviewed by Dean Jackson.
+
+        Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html
+
+        Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
+        be using the iOS layout traits for media controls.
+
+        * Modules/modern-media-controls/media/media-controller.js:
+        (MediaController.prototype.get layoutTraits):
+
+2019-04-14  Rob Buis  <rbuis@igalia.com>
+
+        Link prefetch not useful for top-level navigation
+        https://bugs.webkit.org/show_bug.cgi?id=195623
+
+        Reviewed by Youenn Fablet.
+
+        Cache cross-domain top-level prefetches in a dedicated cache and not in the
+        memory cache. Ignore prefetches for content extension checks.
+
+        Tests: http/tests/cache/link-prefetch-main-resource-iframe.html
+               http/tests/cache/link-prefetch-main-resource.html
+
+        * loader/LinkLoader.cpp:
+        (WebCore::LinkLoader::prefetchIfNeeded):
+        * loader/ResourceLoadInfo.cpp:
+        (WebCore::toResourceType):
+        * loader/ResourceLoadInfo.h:
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::willSendRequestInternal):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::requestResource):
+
+2019-04-14  Dean Jackson  <dino@apple.com>
+
+        Extract UTI mapping and allow for additions
+        https://bugs.webkit.org/show_bug.cgi?id=196822
+        <rdar://problem/49822339>
+
+        Reviewed by Darin Adler
+
+        Post landing feedback on minimizing String constructors.
+
+        * platform/network/mac/UTIUtilities.mm:
+        (WebCore::MIMETypeFromUTITree):
+        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+
+2019-04-14  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] JavaScriptCore derived sources should only be referenced inside JavaScriptCore
+        https://bugs.webkit.org/show_bug.cgi?id=196742
+
+        Reviewed by Konstantin Tokarev.
+
+        Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.
+
+        * CMakeLists.txt:
+
+2019-04-12  Antoine Quint  <graouts@apple.com>
+
+        Provide a quirk to disable Pointer Events
+        https://bugs.webkit.org/show_bug.cgi?id=196877
+        <rdar://problem/49863470>
+
+        Reviewed by Dean Jackson.
+
+        Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.
+
+        * dom/PointerEvent.idl:
+        * page/Quirks.cpp:
+        (WebCore::Quirks::shouldDisablePointerEventsQuirk const):
+        * page/Quirks.h:
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::TreeResolver::resolveElement):
+
+2019-04-12  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Enable modern compatibility mode by default in WKWebView on some devices
+        https://bugs.webkit.org/show_bug.cgi?id=196883
+        <rdar://problem/49864527>
+
+        Reviewed by Tim Horton.
+
+        Add a new helper function to determine whether an app is pre-installed on iOS, for the purposes of ensuring
+        compatibility with existing Apple apps that are not affected by linked-on-or-after. This involves all apps with
+        a bundle ID that begins with "com.apple.".
+
+        * platform/RuntimeApplicationChecks.h:
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::setApplicationBundleIdentifier):
+        (WebCore::applicationBundleStartsWith):
+        (WebCore::IOSApplication::isAppleApplication):
+
+2019-04-12  Justin Fan  <justin_fan@apple.com>
+
+        [Web GPU] Prevent narrowing conversions during Metal function calls on 32-bit platforms
+        https://bugs.webkit.org/show_bug.cgi?id=196793
+
+        Reviewed by Darin Adler.
+
+        On 32-bit platforms, NSUInteger is 32-bit, which limits certain Web GPU parameters. 
+        Ensure that valid parameters are properly converted to NSUInteger for Metal calls, regardless of platform.
+
+        * platform/graphics/gpu/GPUBuffer.h:
+        (WebCore::GPUBuffer::byteLength const):
+        * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:
+        (WebCore::tryGetResourceAsBufferBinding):
+        (WebCore::setBufferOnEncoder):
+        * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
+        (WebCore::GPUBuffer::validateBufferUsage):
+        (WebCore::GPUBuffer::tryCreate):
+        (WebCore::GPUBuffer::GPUBuffer):
+        (WebCore::GPUBuffer::setSubData):
+        * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
+        (WebCore::GPUCommandBuffer::copyBufferToBuffer):
+        (WebCore::GPUCommandBuffer::copyBufferToTexture):
+        (WebCore::GPUCommandBuffer::copyTextureToBuffer):
+        * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
+        (WebCore::GPURenderPassEncoder::drawIndexed):
+        * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
+        (WebCore::trySetInputStateForPipelineDescriptor):
+
+2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
+
+        Unreviewed fix for non-unified build.
+
+        * dom/ScriptedAnimationController.h:
+        Add missing include from r244182.
+
+2019-04-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        WebThread should run at a higher priority than user initiated
+        https://bugs.webkit.org/show_bug.cgi?id=196849
+        <rdar://problem/46851062>
+
+        Reviewed by Geoffrey Garen.
+
+        Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
+        won't wait for other threads with priority 30-37 but does not content with the main thread.
+
+        Also removed the call to pthread_attr_setschedparam which disables QoS.
+
+        This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
+        iBooks to an opened book.
+
+        * platform/ios/wak/WebCoreThread.mm:
+        (StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.
+
+2019-04-12  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Add CSS Shadow Parts as a feature under consideration
+        https://bugs.webkit.org/show_bug.cgi?id=196835
+
+        Reviewed by Antti Koivisto.
+
+        This feature is under consideration.
+
+        * features.json:
+
+2019-04-12  Ross Kirsling  <ross.kirsling@sony.com>
+
+        WebKit should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
+        https://bugs.webkit.org/show_bug.cgi?id=196845
+
+        Reviewed by Ryosuke Niwa.
+
+        * html/canvas/CanvasRenderingContext2DBase.cpp:
+        (WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):
+        (WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const):
+        (WebCore::CanvasRenderingContext2DBase::FontProxy::fontDescription const):
+        (WebCore::CanvasRenderingContext2DBase::FontProxy::width const):
+        (WebCore::CanvasRenderingContext2DBase::FontProxy::drawBidiText const):
+        (WebCore::CanvasRenderingContext2DBase::beginCompositeLayer):
+        (WebCore::CanvasRenderingContext2DBase::endCompositeLayer):
+        Remove inline specifier to address linking errors (regardless of CMake platform).
+        Doing this in a .cpp file interferes with symbol creation.
+
+        * Modules/mediastream/MediaStreamTrack.cpp:
+        * Modules/webvr/VREyeParameters.cpp:
+        * Modules/webvr/VRFrameData.cpp:
+        * Modules/webvr/VRPose.cpp:
+        * accessibility/AccessibilityList.cpp:
+        * accessibility/isolatedtree/AXIsolatedTree.cpp:
+        * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
+        * bindings/js/JSDOMConvertWebGL.cpp:
+        * bindings/js/JSHistoryCustom.cpp:
+        * bindings/js/JSIDBCursorWithValueCustom.cpp:
+        * bindings/js/JSPerformanceObserverCustom.cpp:
+        * bindings/js/WindowProxy.cpp:
+        * platform/ColorData.gperf:
+        * platform/mediastream/RealtimeMediaSourceSettings.cpp:
+        * platform/network/DNSResolveQueue.cpp:
+        * workers/service/ServiceWorkerClientQueryOptions.h:
+        * workers/service/ServiceWorkerContainer.cpp:
+        Add missing includes to address compiler errors on GTK.
+
+2019-04-12  Zalan Bujtas  <zalan@apple.com>
+
+        REGRESSION (r244098): [ Mac WK1 ] Layout Test fast/dynamic/paused-event-dispatch.html is Timing out
+        https://bugs.webkit.org/show_bug.cgi?id=196789
+        <rdar://problem/49855255>
+
+        Reviewed by Tim Horton.
+
+        Disable auto-sizing mode at the start of each test.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+
+2019-04-12  Eric Carlson  <eric.carlson@apple.com>
+
+        Update AudioSession route sharing policy
+        https://bugs.webkit.org/show_bug.cgi?id=196776
+        <rdar://problem/46501611>
+
+        Reviewed by Jer Noble.
+
+        No new tests, updated an API test.
+
+        * platform/audio/AudioSession.cpp:
+        (WebCore::convertEnumerationToString):
+        * platform/audio/AudioSession.h:
+        (WTF::LogArgument<WebCore::RouteSharingPolicy>::toString):
+        (WTF::LogArgument<WebCore::AudioSession::CategoryType>::toString):
+        * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
+        (MediaSessionManagerCocoa::updateSessionState):
+        * platform/audio/ios/AudioSessionIOS.mm:
+        (WebCore::AudioSession::setCategory):
+        (WebCore::AudioSession::routeSharingPolicy const):
+        * platform/audio/mac/AudioSessionMac.cpp:
+        (WebCore::AudioSession::setCategory):
+
+2019-04-12  Antoine Quint  <graouts@apple.com>
+
+        Opt some websites into the simulated mouse events dispatch quirk when in modern compatibility mode
+        https://bugs.webkit.org/show_bug.cgi?id=196830
+        <rdar://problem/49124313>
+
+        Reviewed by Wenson Hsieh.
+
+        We add a new policy to determine whether simulated mouse events dispatch are allowed and use it to determine whether the
+        simulated mouse events dispatch quirk can be used for a given website. We then check the domain name for the current page's
+        document to see if it matches some known websites that require this quirk.
+
+        We needed to add some calls into Quirks::shouldDispatchSimulateMouseEvents() where we used to only consult the RuntimeEnabledFeature
+        flag to ensure we correctly created touch regions for simulated mouse events.
+
+        * dom/EventNames.h:
+        (WebCore::EventNames::isTouchRelatedEventType const):
+        * dom/Node.cpp:
+        (WebCore::Node::moveNodeToNewDocument):
+        (WebCore::tryAddEventListener):
+        (WebCore::tryRemoveEventListener):
+        (WebCore::Node::defaultEventHandler):
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::simulatedMouseEventsDispatchPolicy const):
+        (WebCore::DocumentLoader::setSimulatedMouseEventsDispatchPolicy):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::addEventListener):
+        (WebCore::DOMWindow::removeEventListener):
+        * page/Quirks.cpp:
+        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
+        (WebCore::Quirks::shouldDispatchSimulateMouseEvents const): Deleted.
+        * page/Quirks.h:
+
+2019-04-11  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Wrong scrolling behavior for nested absolute position elements inside overflow scroll
+        https://bugs.webkit.org/show_bug.cgi?id=196146
+
+        Reviewed by Antti Koivisto.
+        
+        computeCoordinatedPositioningForLayer() failed to handle nested positions elements
+        inside overflow scroll, because it only walked up to the first containing block of
+        a nested position:absolute. We need to walk all the way up the ancestor layer chain,
+        looking at containing block, scroller and composited ancestor relationships.
+
+        Make this code easier to understand by writing it in terms of "is foo scrolled by bar", rather than
+        trying to collapse all the logic into a single ancestor walk, which was really hard. This is a few
+        more ancestor traversals, but we now only run this code if there's composited scrolling
+        in the ancestor chain.
+
+        Tests: scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html
+               scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html
+               scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html
+               scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::enclosingCompositedScrollingLayer):
+        (WebCore::isScrolledByOverflowScrollLayer):
+        (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
+        (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary):
+        (WebCore::collectStationaryLayerRelatedOverflowNodes):
+        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
+        (WebCore::collectRelatedCoordinatedScrollingNodes):
+        (WebCore::layerParentedAcrossCoordinatedScrollingBoundary): Deleted.
+
+2019-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [css-flex][css-grid] Fix synthesized baseline
+        https://bugs.webkit.org/show_bug.cgi?id=196312
+
+        Reviewed by Javier Fernandez.
+
+        When a flex or grid container has no baseline,
+        its baseline should be synthesized from the border edges.
+        The same happens for flex and grid items.
+        
+        Right now we were using the content box in some cases
+        and even using the margin box in a particular scenario.
+        The patch fixes this.
+        
+        At the same time this is also fixing the baseline for
+        inline flex/grid containers to make it interoperable with Firefox.
+        Inline blocks have a special behavior per legacy reasons,
+        which applies to inline flex/grid containers when they have no items;
+        otherwise the items should be used to compute its baseline.
+        See more at: https://github.com/w3c/csswg-drafts/issues/3416
+
+        Note that we need to keep current behavior for buttons,
+        as the flexbox spec doesn't apply to them.
+
+        Tests: css3/flexbox/flexbox-baseline-margins.html
+               fast/css-grid-layout/grid-baseline-margins-1.html
+               fast/css-grid-layout/grid-baseline-margins-2.html
+               imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001.html
+               imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001.html
+               imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001.html
+
+        * rendering/RenderButton.cpp:
+        (WebCore::synthesizedBaselineFromContentBox):
+        (WebCore::RenderButton::baselinePosition const):
+        * rendering/RenderButton.h:
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::synthesizedBaselineFromBorderBox):
+        (WebCore::RenderFlexibleBox::baselinePosition const):
+        (WebCore::RenderFlexibleBox::firstLineBaseline const):
+        (WebCore::RenderFlexibleBox::inlineBlockBaseline const):
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::baselinePosition const):
+        (WebCore::RenderGrid::inlineBlockBaseline const):
+
+2019-04-11  Simon Fraser  <simon.fraser@apple.com>
+
+        Avoid doing positioned scrolling tree node work for layers not inside overflow:scroll
+        https://bugs.webkit.org/show_bug.cgi?id=196848
+
+        Reviewed by Zalan Bujtas.
+
+        Maintain a bit on RenderLayer which says if a layer has a composited scrolling ancestor
+        in the layer tree. We only need to do work related to making positioned scrolling tree nodes
+        for layers which are layer tree descendants of overflow:scroll.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::RenderLayer):
+        (WebCore::RenderLayer::updateLayerPositions):
+        (WebCore::outputPaintOrderTreeLegend):
+        (WebCore::outputPaintOrderTreeRecursive):
+        * rendering/RenderLayer.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
+        (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
+        (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
+        (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
+
+2019-04-11  Zalan Bujtas  <zalan@apple.com>
+
+        Try to fix Windows build.
+
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::computedPageMargin):
+
+2019-04-11  Megan Gardner  <megan_gardner@apple.com>
+
+        Update 'Save Image' to more clear instructions
+        https://bugs.webkit.org/show_bug.cgi?id=196833
+        <rdar://problem/47446845>
+
+        Reviewed by Wenson Hsieh.
+
+        Not testable, UI change only.
+
+        * en.lproj/Localizable.strings:
+
+2019-04-11  Zalan Bujtas  <zalan@apple.com>
+
+        Add @page margin support
+        https://bugs.webkit.org/show_bug.cgi?id=196680
+        <rdar://problem/45217707>
+
+        Reviewed by Tim Horton.
+
+        This patch adds support for @page margin. This feature is currently behind a runtime flag and is off by default.
+        We resolve the @page margin values in the WebProcess (currently no pseudo class is supported) and transfer them to the UIProcess through computedPagesCallback.
+        UIProcess is responsible for applying these new values on the printer. We also re-compute the available width/height for the current printing context
+        in the WebProcess if needed (see PrintInfo for current printer margins).
+
+        Tests: printing/page-with-10mm-left-margin.html
+               printing/page-with-zero-margin.html
+
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::computedPageMargin):
+        (WebCore::PrintContext::computedPageSize):
+        * page/PrintContext.h:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::pageAtRuleSupportEnabled const):
+        (WebCore::RuntimeEnabledFeatures::setPageAtRuleSupportEnabled):
+
+2019-04-11  Dean Jackson  <dino@apple.com>
+
+        Extract UTI mapping and allow for additions
+        https://bugs.webkit.org/show_bug.cgi?id=196822
+        <rdar://problem/49822339>
+
+        Reviewed by Tim Horton.
+
+        Add an ADDITIONAL_SYSTEM_PREVIEW_TYPES macro to the list
+        of accepted MIME types. And add a new helper to map
+        MIME types to UTI types when the system was unable to
+        find an existing type.
+
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
+        * platform/network/mac/UTIUtilities.mm:
+        (WebCore::UTIFromUnknownMIMEType):
+        (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+
+2019-04-09  Ryosuke Niwa  <rniwa@webkit.org>
+
+        [iOS] Moving backwards by word granularity does not work if the previous line was inside another block element
+        https://bugs.webkit.org/show_bug.cgi?id=196670
+
+        Reviewed by Wenson Hsieh.
+
+        The bug was ultimately caused by two reasons:
+         1. On iOS, previousWordPositionBoundary would identify a blank line as a word boundary.
+         2. SimplifiedBackwardsTextIterator generates a new line character (\n) between two block elements.
+
+        When moving backwards by word granularity, therefore, previousBoundary would encounter a new line created by (2)
+        and then previousWordPositionBoundary would identify it as a word boundary.
+
+        Fixed the bug (2) by adding the same check as TextIterator::exitNode has to avoid generating an extra new line
+        character following an exiting new line character. Also added internals.rangeAsTextUsingBackwardsTextIterator
+        to make SimplifiedBackwardsTextIterator directly testable in layout tests.
+
+        This fix unveiled an unrelated bug when moving backwards with sentence granularity at the beginning of a line.
+        In this case, WebKit was previously feeding ICU with the previous line's content followed by two new lines,
+        which constituted a new sentence. However after the fix, ICU no longer detects a new sentence after the end
+        of the prevous line. This patch, therefore, introduces a new optional argument to previousBoundary which forces
+        the succeeding paragraph's content (i.e. the content of the line from which we're moving backwards with sentence
+        granularity) to be fed to ICU. This fixes the bug that we were previously not being able to move backwards
+        with sentence granularity at the beginning of a line as indicated by the new tests.
+
+        Tests: editing/selection/extend-selection-backward-at-beginning-of-line-by-sentence-granularity.html
+               editing/selection/extend-selection-backward-at-beginning-of-line-by-word-granularity.html
+               editing/selection/move-selection-backward-at-beginning-of-line-by-sentence-granularity.html
+               editing/selection/move-selection-backward-at-beginning-of-line-by-word-granularity.html
+               editing/text-iterator/backwards-text-iterator-basic.html
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::previousBoundary): Fixed the bug that moving backwards with sentence granularity at
+        the beginning of a line does not work like we did in VisibleUnits. See the description below. It's tested by
+        an existing layout test accessibility/mac/text-marker-sentence-nav.html, which would fail without this fix.
+        (WebCore::AXObjectCache::startCharacterOffsetOfSentence):
+        * accessibility/AXObjectCache.h:
+        (WebCore::CharacterOffset::isEqual const):
+        * editing/TextIterator.cpp:
+        (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Fixed the bug that we were generating two line
+        lines between block elements. This fixes the bug that moving backwards with word granularity at the beginning
+        of a line fails on iOS.
+        (WebCore::plainTextUsingBackwardsTextIteratorForTesting): Added.
+        * editing/TextIterator.h:
+        * editing/VisibleUnits.cpp:
+        (WebCore::previousBoundary): Added the code to extract the succeeding paragraph's content as context for ICU.
+        This fixes the bug that moving backwards with sentence granularity at the beginning of a line fails.
+        Limit the length of backwards iteration at the current position to avoid traversing backwards beyond
+        the current position, and fixed a bug that an early return for the text node was not taking the suffix length
+        into account when deciding whether next position resides in the starting container node or not.
+        (WebCore::startSentenceBoundary):
+        (WebCore::startOfSentence):
+        * testing/Internals.cpp:
+        (WebCore::Internals::rangeAsTextUsingBackwardsTextIterator): Added.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
+2019-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Allow the MediaSource API to be enabled via website policy
+        https://bugs.webkit.org/show_bug.cgi?id=196429
+        <rdar://problem/48774333>
+
+        Reviewed by Tim Horton.
+
+        Add support in DocumentLoader for adjusting page settings using its per-site policies. See WebKit ChangeLog for
+        more detail (in particular, the implementation of applyToDocumentLoader).
+
+        Test: fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::applyPoliciesToSettings const):
+        (WebCore::DocumentLoader::attachToFrame):
+        * loader/DocumentLoader.h:
+
+        Add an enum class for MediaSource policies; while we're at it, make all of these enum values 8 bits wide.
+
+        (WebCore::DocumentLoader::mediaSourcePolicy const):
+        (WebCore::DocumentLoader::setMediaSourcePolicy):
+
 2019-04-11  Youenn Fablet  <youenn@apple.com>
 
         Support RTCDataChannel blob binaryType