[iOS] Redundant pointer events causes material design buttons to flush twice
[WebKit-https.git] / Source / WebCore / ChangeLog
index ab7a5e3..5df621b 100644 (file)
@@ -1,3 +1,344 @@
+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