[webkit-changes] [WebKit/WebKit] 8f690b: imported/w3c/web-platform-tests/css/css-transition...

Antoine Quint noreply at github.com
Mon Jan 30 08:46:51 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8f690bd4d72836915fb0c82775e16f1bf01caf59
      https://github.com/WebKit/WebKit/commit/8f690bd4d72836915fb0c82775e16f1bf01caf59
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/animation/TimingFunction.h

  Log Message:
  -----------
  imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed.html crashes (libc++ assertions)
https://bugs.webkit.org/show_bug.cgi?id=251352

Reviewed by Antti Koivisto and Chris Dumez.

We have a `m_stepPosition == otherSteps.m_stepPosition` check in TimingFunction::operator==(const TimingFunction&) which would
catch the case where both m_stepPosition and otherSteps.m_stepPosition, which are std::optional<>, would not hold a value.

However, we would hit a recently-enabled libc++ assertion (see bug 245692) because of the check
`*m_stepPosition == StepPosition::End && !otherSteps.m_stepPosition`. Indeed, it is possible for otherSteps.m_stepPosition to
hold a value while m_stepPosition does not.

We simply reverse the two clauses such that we test `!otherSteps.m_stepPosition` first since we already know from earlier
that `otherSteps.m_stepPosition` and `m_stepPosition` cannot both not hold a value.

* Source/WebCore/platform/animation/TimingFunction.h:

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




More information about the webkit-changes mailing list