[webkit-changes] [WebKit/WebKit] 2b0ebf: [css-easing-2] Implement linear(...) easing functi...

Devin Rousso noreply at github.com
Thu Jul 20 18:33:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b0ebfa3b59e02766ae58688d3b0e576367f9d16
      https://github.com/WebKit/WebKit/commit/2b0ebfa3b59e02766ae58688d3b0e576367f9d16
  Author: Devin Rousso <hi at devinrousso.com>
  Date:   2023-07-20 (Thu, 20 Jul 2023)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-output.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-output.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-syntax.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-syntax.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-computed-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-computed.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-invalid-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-invalid.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-valid-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-valid.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-easing/w3c-import.log
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/transition-timing-function.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-001.html
    M Source/WebCore/css/CSSTimingFunctionValue.cpp
    M Source/WebCore/css/CSSTimingFunctionValue.h
    M Source/WebCore/css/CSSValue.cpp
    M Source/WebCore/css/CSSValue.h
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
    M Source/WebCore/platform/animation/TimingFunction.cpp
    M Source/WebCore/platform/animation/TimingFunction.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm
    M Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  [css-easing-2] Implement linear(...) easing function for css animations
https://bugs.webkit.org/show_bug.cgi?id=240061
<rdar://problem/93088094>

Reviewed by Dean Jackson.

Add support for the `linear()` CSS timing function <https://drafts.csswg.org/css-easing-2/#the-linear-easing-function>.

* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::consumeLinear): Added.
(WebCore::CSSPropertyParserHelpers::consumeTimingFunction):
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::valueForAnimationTimingFunction):
Implement parsing logic for CSS `linear()` <https://drafts.csswg.org/css-easing-2/#linear-easing-function-parsing>.

* Source/WebCore/platform/animation/TimingFunction.h:
(WebCore::LinearTimingFunction::Point::operator== const): Added.
(WebCore::LinearTimingFunction::create): Added.
(WebCore::LinearTimingFunction::operator== const): Added.
(WebCore::LinearTimingFunction::points const): Added.
(WebCore::LinearTimingFunction::identity): Renamed from `sharedLinearTimingFunction`.
(WebCore::LinearTimingFunction::LinearTimingFunction): Added.
(WebCore::LinearTimingFunction::clone):
* Source/WebCore/platform/animation/TimingFunction.cpp:
(WebCore::operator<<):
(WebCore::TimingFunction::transformProgress const):
(WebCore::TimingFunction::createFromCSSValue):
(WebCore::TimingFunction::cssText const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebCore/css/CSSTimingFunctionValue.h:
(WebCore::CSSLinearTimingFunctionValue::create): Added.
(WebCore::CSSLinearTimingFunctionValue::points const): Added.
(WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue): Added.
* Source/WebCore/css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::customCSSText const): Added.
(WebCore::CSSLinearTimingFunctionValue::equals const): Added.
* Source/WebCore/css/CSSValue.h:
(WebCore::CSSValue::isLinearTimingFunctionValue const): Added.
* Source/WebCore/css/CSSValue.cpp:
(WebCore::CSSValue::visitDerived):
Add subclasses and member variables to support CSS `linear()`.
Implement the logic to calculate the current value of a CSS `linear()` given the current progress <https://drafts.csswg.org/css-easing-2/#linear-easing-function-output>.

* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::keyframeValueListHasSingleIntervalWithLinearOrEquivalentTimingFunction):
(WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::toCAMediaTimingFunction):
Use renamed `identity` instead of `sharedLinearTimingFunction` since `LinearTimingFunction` can now be more than just an identity function.

* Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js:
Add basic autocompletion support for `linear()` in Web Inspector.

* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-output.tentative.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-output.tentative-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-syntax.tentative.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/linear-timing-functions-syntax.tentative-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-computed.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-computed-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-invalid.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-invalid-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-valid.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/timing-functions-syntax-valid-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-easing/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/transition-timing-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-001-expected.txt:

Canonical link: https://commits.webkit.org/266195@main




More information about the webkit-changes mailing list